Starter files for the Object Detection Workshop. The objective is to implement YOLOv3 using OpenCV to detect objects in an image or video. This was repo contains the material that was covered during the Vancouver School of AI's Object Detection Workshop. The Workshop's slides can be viewed here.
-
Make sure you have Python 3.6 installed.
-
Clone the repository
git clone https://github.com/mezzX/YOLO_OpenCV.git
-
Use Conda to create a new environment and install dependencies.
Click Here if you need a detail guide on using conda.- Linux or Mac:
conda create --name connect4 python=3.6 source activate connect4 conda install numpy conda install opencv conda install jupyter notebook
- Windows:
conda create --name connect4 python=3.6 activate connect4 conda install numpy conda install opencv conda install jupyter notebook
-
Download the YOLOv3-416 weights file and place it in the project directory
There are two different versions included in this repo. The .ipybn files are meant to be imported into google colab. The .py file is meant to be ran on a local machine. To run yolo_detector.py first navigate to the directory in the terminal and run one of the three following commands
-
To run yolo_detector.py on a single image, use the following command:
python yolo_detector.py --image 'image_path'
-
To run yolo_detector.py on a single video, use the following command:
python yolo_detector.py --video 'video_path'
-
To run yolo_detector.py on a webcam feed, use the following command:
python yolo_detector.py