Training detect.py?

Discussion topics related to mobile applications for ZoneMinder
Post Reply
Chimaera
Posts: 17
Joined: Mon Apr 15, 2019 8:13 pm

Training detect.py?

Post by Chimaera » Tue Apr 16, 2019 12:35 pm

First of all, thanks for your amazing work on ZMNinja and the event notification/object detection scripts. I went from having no ZM installation to a 4 camera object-detection system in a weekend and that included rebuilding it on another box because my NAS was just too slow for it.

I'm wondering if there is any way to "train" the detection (YoloV3 etc) if it detects an object incorrectly? For example I have 3 cats and it started out detecting them correctly, but now it says they're dogs. Obviously it learned that somehow but I don't know how to tell it different.

Thanks again for the work you put into this, it's just incredible.

User avatar
asker
Posts: 1079
Joined: Sun Mar 01, 2015 12:12 pm

Re: Training detect.py?

Post by asker » Tue Apr 16, 2019 2:43 pm

Hi,
1. Note that detect.py (and Yolo) does not change its learning unless you specifically re-train it. So its impossible for a cat to generally become a dog after you install it. What might be happening is due to different positional/lighting issues it is misclassifying (and those misclassifications did not occur before before the image conditions were not the same)

2. Yes, it is possible to retrain. Basically, it falls under a generic problem of how to create your own classifier for YoloV3. There are many tutorials, one of which is https://www.learnopencv.com/training-yo ... -detector/ . After you finish training, you basically need to point objdetect.ini to your retrained weights and config.

Glad you are enjoying object detection!
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

Chimaera
Posts: 17
Joined: Mon Apr 15, 2019 8:13 pm

Re: Training detect.py?

Post by Chimaera » Tue Apr 16, 2019 4:42 pm

Thanks, that's what I was looking for :)

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests