I have setup docker file to do Video analysis using Yolo and openCV library which will read video as frames and detect objects in that frames. I saved all videos files and output json file in local videos folder.
Docker image with python 3.7 and opencv 4.1.0
Build and tag the image "sudo docker build -t opencvcalculai ."
Run docker file "sudo docker run -d opencvcalculai:latest"
Run this command "xhost local:root" when erro occures as "Gtk-WARNING **: 06:49:47.946: cannot open display: unix:0"
docker-compose build
docker-compose up
or
Install below required library in your local machine.
- python 3.7
- opencv 4.1.0
- numpy
Download the pre-trained YOLO v3 weights file from this link and place it in the current directory
This analyse python file using Yolov3 to detect objects from videos and save object names as JSON file in videos folder.
I have uploaded sample json file results in videos folder.
{'remote', 'cup', 'cell phone', 'person'}