# Object detecion with 10 lines of code

**URL:** <https://discourse.julialang.org/t/object-detecion-with-10-lines-of-code/11748>\
**Category:** Machine Learning\
**Created:** [June 18, 2018, 6:57am UTC](https://discourse.julialang.org/t/object-detecion-with-10-lines-of-code/11748 "2018-06-18T06:57:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [June 18, 2018, 6:57am UTC](https://discourse.julialang.org/t/object-detecion-with-10-lines-of-code/11748/1 "2018-06-18T06:57:57Z")

</div>

> **[Object Detection with 10 lines of code](https://towardsdatascience.com/object-detection-with-10-lines-of-code-d6cb4d86f606)**
>
> One of the important fields of Artificial Intelligence is Computer Vision. Computer Vision is the science of computers and software systems that can recognize and understand images and scenes…

This is a good article. Does anyone have a feel on how easy it would be to port to Julia?  
Looking at the github it makes use of many libraries which are already available in Julia

> **[GitHub - OlafenwaMoses/ImageAI: A python library built to empower developers...](https://github.com/OlafenwaMoses/ImageAI#dependencies)**
>
> A python library built to empower developers to build applications and systems with self-contained Computer Vision capabilities - GitHub - OlafenwaMoses/ImageAI: A python library built to empower ...

---

<div class="post-metadata">

**Author:** ![Phil\_Tomson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/phil_tomson/32/3575_2.png) [@Phil\_Tomson](https://discourse.julialang.org/u/Phil_Tomson)\
**Post date:** [June 19, 2018, 11:08pm UTC](https://discourse.julialang.org/t/object-detecion-with-10-lines-of-code/11748/2 "2018-06-19T23:08:33Z")

</div>

Looks like this is implemented in Keras. You could give Keras.jl a try ([GitHub - ayush1999/Keras.jl: Run keras models with a Flux backend](https://github.com/ayush1999/Keras.jl)). Karas has a model.to\_json method to serialize a model to JSON. As long as the Keras model doesn’t have any Lambda layers you should be able to import it to Flux.jl using Karas.jl.

---

<div class="post-metadata">

**Author:** ![Ponnooss](https://avatars.discourse-cdn.com/v4/letter/p/f475e1/32.png) [@Ponnooss](https://discourse.julialang.org/u/Ponnooss)\
**Post date:** [October 3, 2018, 5:20am UTC](https://discourse.julialang.org/t/object-detecion-with-10-lines-of-code/11748/3 "2018-10-03T05:20:27Z")

</div>

ImportError Traceback (most recent call last)  
 in ()  
----\> 1 from imageai.Detection import ObjectDetection  
2 import os  
3  
4 execution\_path = os.getcwd()  
5

~\Anaconda3\lib\site-packages\imageai\Detection\__init_\_.py in ()  
----\> 1 import cv2  
2  
3 from imageai.Detection.keras\_retinanet.models.resnet import resnet50\_retinanet  
4 from imageai.Detection.keras\_retinanet.utils.image import read\_image\_bgr, read\_image\_array, read\_image\_stream, preprocess\_image, resize\_image  
5 from imageai.Detection.keras\_retinanet.utils.visualization import draw\_box, draw\_caption

~\Anaconda3\lib\site-packages\cv2\__init_\_.py in ()  
1 import importlib  
2  
----\> 3 from .cv2 import \*  
4 from .data import \*  
5

ImportError: DLL load failed: The specified module could not be found.

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [October 3, 2018, 7:10am UTC](https://discourse.julialang.org/t/object-detecion-with-10-lines-of-code/11748/4 "2018-10-03T07:10:48Z")

</div>

@Ponnoss Are you wanting to implement this in Python?  
I am not familiar with Python on Windows 10 but it looks like you need to use Anaconda to install the data package
