why:As more users are getting up to speed with depthai, one of the most commonly requested features is automatically saving a JPEG when a certain class is detected. Such a thing is write-able by the end user, but we have not given advice in many locations for the same exact thing.
howWe should write a canonical example of doing this, using the Gen2 pipeline builder, and add it to the code samples here: https://docs.luxonis.com/projects/api/en/gen2_develop/
what:Make an example that automatically saves a JPEG when a certain class is detected, e.g. person or tv/monitor for the default MobileNetSSDv2 PASCAL VOC 2007-trained model.
@Luxonis-Brandon here is the initial implementation https://github.com/luxonis/depthai-experiments/pull/62
@Luxonis-Brandon here is the initial implementation luxonis/depthai-experiments#62
What about the other models?
@Luxonis-Brandon here is the initial implementation luxonis/depthai-experiments#62
What about the other models?
Is there a specific model you are wanting to see?
Yes
vehicle-license-plate-detection-barrier-0106
So are you wanting to save when a vehicle is detected? If so actually it's just a matter of changing the model and then the class to save. We can write up an example if you'd like. Thoughts?
Yes, thank you.
And I am also trying run a function when a vehicle is detected.
If you want, you can see my current code
@qaqak while I'm not part of the Luxonios team -- post what code you have and I'll happily take a look
Thanks @wasauce . And yes we'd like to see it as well. CC: @cafemoloko .
@qaqak while I'm not part of the Luxonios team -- post what code you have and I'll happily take a look
I put it in this repo with a README.md
Thanks.
Hey @qaqak , I see that you are using Gen1 API to use the pre-trained OpenVINO Model. The Gen2 API is comparitively easy to customize and there are documented scripts you could follow along. Would you mind giving the Gen2 API a shot with this model. You could convert the .xml and .bin files from the OpenVINO model vehicle-license-plate-detection-barrier-0106
and convert to .blob file using the detailed doc page - https://docs.luxonis.com/projects/api/en/latest/tutorials/local_convert_openvino/
The OpenVINO Model is a Mobilenet V2 SSD, and fits the implementation in the gen2 class saver jpeg example - https://github.com/luxonis/depthai-experiments/tree/master/gen2-class-saver-jpeg
Don't forget to replace the 'models/mobilent.blob' file with your custom file
Also edit the labels to the one's the model would be using to ensure there are no errors
This would leave you with more room to flexibility and space for adding custom functions.
Most helpful comment
@qaqak while I'm not part of the Luxonios team -- post what code you have and I'll happily take a look