roflcoopter / viseron

Self-hosted, local only NVR and AI Computer Vision software. With features such as object detection, motion detection, face recognition and more, it gives you the power to keep an eye on your home, office or any other place you want to monitor.
MIT License
1.74k stars 179 forks source link

[FR] Multiple redundant detectors #5

Open mario-tux opened 4 years ago

mario-tux commented 4 years ago

I’m actually using Frigate (on Coral USB) + Deepstack (on CPU) + HA to get mobile notifications with snapshot&video of detected people on my cameras. I combine Frigate with Deepstack because TFlite models raise too many false positives. Coral is great to keep CPU load negligible but is very limited on detector capability/tuning: to use the CPU just to confirm the coral detections is fine to keep low CPU usage. The idea to combine (as a pipe) multiple detectors makes false positives disappear for me.

At some point you speak of “multiple detectors” on the future of Viseron: would be possible to run multiple detectors on the same event/image to confirm its goodness?

akohlsmith commented 4 years ago

I'm interested in learning more about how you use the models in this way - can you give some more detail about how you go about doing this? I'm a newb at TF but I catch on fast.

roflcoopter commented 4 years ago

I totally missed replying to this, sorry about that. This should be quite easy to implement, i will get to it as soon as i am done with zones in 1.4.0

mario-tux commented 4 years ago

I'm interested in learning more about how you use the models in this way - can you give some more detail about how you go about doing this? I'm a newb at TF but I catch on fast.

I use HA to manage most of the automatism: when Frigate signals an event (new event-based mqtt system in v0.6.0-rc1) I get a snapshot from frigate and send it to Deepstack. If Deepstack confirm a person detection I send a notification on the mobile phone with picture and video links (Frigate saves video too). It's not a clean solution but at least it works for me. I hope Viseron could natively support a better and direct solution.

roflcoopter commented 4 years ago

Is Deepstack integration a deal-breaker for you? Or would you be satisfied with EdgeTPU > Darknet. In my experience Darknet is much more accurate than EdgeTPU and is state-of-the-art

mario-tux commented 4 years ago

Is Deepstack integration a deal-breaker for you? Or would you be satisfied with EdgeTPU > Darknet. In my experience Darknet is much more accurate than EdgeTPU and is state-of-the-art

I guess that to cut false positives it would be enough to use Darknet (never tested it!) on CPU (I just got Intel GPU of an i3). I don't care to use Deepstack: I used it just because it was my first attempt before Frigate&Coral. A fully internal management of the double-check by Viseron would be great for simplicity. The on-second-check activation of Darknet on CPU, I guess, would be negligible: the most work load would be endorsed by Coral EdgeTPU.

roflcoopter commented 4 years ago

Great, then i should be able to deliver on this! Hopefully in the coming weekend, atleast as a beta for you to try out. A bonus of using OpenCVs implementation of Darknet is that OpenCV has support for OpenCL, which means the object detection will run on your integrated GPU.

mario-tux commented 4 years ago

I'm testing the new Frigate heuristic against false positive (https://github.com/blakeblackshear/frigate/pull/190) and, working on multiple measuring along the "detected event", it is very effective to sieve false positives.