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.62k stars 167 forks source link

Trigger Deepstack custom model after detection #505

Open kiwimato opened 1 year ago

kiwimato commented 1 year ago

Hi,

First of all, super nice project! I'm using Deepstack as a object detector, and I'm interested if for example after it detects a car if i would be able to trigger another Deepstack custom model which is able to detect license plates? That would be in the same way face detection works, but a bit more flexible.

Thank you

roflcoopter commented 1 year ago

Thanks for the kind words, and your support!

Sounds like a good idea, i have one question tho. What is the output of your custom model when running it using the DeepStack API?

kiwimato commented 1 year ago

At this point it's just a model which detects if it's a license plate, so it doesn't actually read the plate itself, however there's also a tesseract model which can actually read it, but I don't know yet how to chain all of them together, because this is all new to me. I assume I would also be able to train Deepstack to include this model as an alternative, but I have to figure that one out myself.

I think even just ability to trigger a custom python script would be interesting because I can write it myself, or I can also take a look at the actual code after work, I could also contribute code if that's OK with you.

roflcoopter commented 1 year ago

Sounds great! There is an open feature request on license plate recognition as a post processor (face recognition is a post processor).

The available post processors can be found here: https://viseron.netlify.app/docs/documentation/configuration#post-processors

Adding one for license plates would probably be pretty easy, takes a bit of extra work tho when its a completely new category of post processors tho.

I think even just ability to trigger a custom python script would be interesting because I can write it myself, or I can also take a look at the actual code after work, I could also contribute code if that's OK with you.

A custom one also sounds like a great idea. Would love some contributions! Right now its pretty much only me working on Viseron. I dont really have any good developer docs apart from the Contributing guidelines, but i am more than happy to answer any questions you might have