Training detect.py?

Discussion topics related to mobile applications and ZoneMinder Event Server (including machine learning)
Post Reply
Chimaera
Posts: 21
Joined: Mon Apr 15, 2019 8:13 pm

Training detect.py?

Post by Chimaera »

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: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Training detect.py?

Post by asker »

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!
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Chimaera
Posts: 21
Joined: Mon Apr 15, 2019 8:13 pm

Re: Training detect.py?

Post by Chimaera »

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