This project is created as celebration of Eid al-Adha 2020. The object detection is performed with Pretrained SSD on COCO dataset. The SSD uses mobilenet v2 as backbone. The video is royalty free and you can found it here
git clone https://github.com/WiraDKP/cow_detection_opencv.git
Please download miniconda if you haven't. Then use this command to install the environment
cd /path/to/cow_detection_opencv
conda env create -f environment.yml
You may use your own video. Upload it to the data
folder. Then change FILE_PATH
in config.py
.
You may also change other configuration as you need.
FILE_PATH = "data/cows.mp4"
MODEL_PATH = "model/mobilenet_v2_ssd_coco_frozen_graph.pb"
CONFIG_PATH = "model/mobilenet_v2_ssd_coco_config.pbtxt"
LABEL_PATH = "model/coco_class_labels.txt"
WINDOW_NAME = "detection"
MIN_CONF = 0.4
MAX_IOU = 0.5
conda activate cow_detection
python main.py