magsol / wildlife-cameras

🐍️ Scripts related to the outdoor wildlife cameras.
MIT License
1 stars 0 forks source link

META: Object detection #29

Open magsol opened 1 year ago

magsol commented 1 year ago

Ideally, we'd like to perform real-time object detection. Whether this is possible on a Pi 3B+ has yet to be determined, but we'll proceed for now as though it is.

In particular, we want to detect:

OpenCV has some built-in Haar Cascades pre-trained weights, in particular:

(these are located at ~/.local/lib/python3.9/site-packages/cv2/data)

But beyond that, we'll need a custom object detector.

magsol commented 1 year ago

First, some downloads.

yolov4-tiny weights: https://github.com/AlexeyAB/darknet/releases/download/yolov4/yolov4-tiny.weights

yolov4-tiny config: https://raw.githubusercontent.com/AlexeyAB/darknet/master/cfg/yolov4-tiny.cfg

Classes can be found packaged with OpenCV in the examples: /path/to/opencv/samples/data/dnn/object_detection_classes_yolov3.txt