Skip to content

MRobalinho/Object-Detection-Video

Repository files navigation

Object Detection Video

Object Detection Video with TensorFlow

Detecting objects in videos and camera feeds using Keras, OpenCV, and ImageAI

https://heartbeat.fritz.ai/detecting-objects-in-videos-and-camera-feeds-using-keras-opencv-and-imageai-c869fe1ebcdb


Object detection is a branch of Computer Vision, in which visually observable objects that are in images of videos can be detected, localized, and recognized by computers. An image is a single frame that captures a single-static instance of a naturally occurring event
On the other hand, a video contains many instances of static images displayed in one second, inducing the effect of viewing a naturally occurring event.


A Python library called ImageAI
https://github.com/OlafenwaMoses/ImageAI/


Install on your computer is Python 3.

pip3 install the following dependencies:


i. TensorFlow (tensorflow)
ii. Numpy (numpy)
iii. SciPy (scipy)
iv. OpenCV (opencv-python)
v. Pillow (pillow)
vi. Matplotlib (matplotlib)
vii. H5py (h5py)
viii. Keras (keras)
ix. ImageAI (https://github.com/OlafenwaMoses/ImageAI/releases/download/2.0.2/imageai-2.0.2-py3-none-any.whl )



We use trained YOLOv3 computer vision model to perform the detection and recognition tasks
Download YOLO here:
https://github.com/OlafenwaMoses/ImageAI/releases/download/1.0/yolo.h5

Download the RetinaNet model file that will be used for object detection via this link.
Here to download:
https://github.com/OlafenwaMoses/ImageAI/releases/download/1.0/resnet50_coco_best_v2.0.1.h5
or here: Here have already documentation about ImageAI
https://imageai.readthedocs.io/en/latest/video/index.html
Download RetinaNet Model - resnet50_coco_best_v2.0.1.h5
https://github.com/OlafenwaMoses/ImageAI/releases/tag/1.0/

In order to Install ImageAI see this page:
https://imageai.readthedocs.io/en/latest/


Installing ImageAI
ImageAI requires that you have Python 3.5.1 or higher installed as well as some other Python libraries and frameworks. Before you install ImageAI, you must install the following dependencies.


Download and install:
Python 3.5.1 or higher, Download Python here: https://www.python.org/downloads/
pip3 , Download PyPi here: https://pypi.org/project/pip/


Use Command line CMD.exe as administrator


Tensorflow 1.4.0 or higher > pip3 install --upgrade tensorflow
Numpy 1.13.1 or higher > pip3 install numpy
SciPy .19.1 or higher > pip3 install scipy
OpenCV > pip3 install opencv-python
Pillow > pip3 install pillow
Matplotlib > pip3 install matplotlib
h5py > pip3 install h5py
Keras > pip3 install keras
Install ImageAI > pip3 install https://github.com/OlafenwaMoses/ImageAI/releases/download/2.0.2/imageai-2.0.2-py3-none-any.whl

RESULT can be watched in:

DETECTION VIDEO
https://youtu.be/xZW8j-umdgs
DETECTION VIDEO
https://youtu.be/Q3lKlzi_cEw

Releases

No releases published

Packages

No packages published