question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Example Request of Automatically Storing JPEGs for a Detected Class

See original GitHub issue

Start with the 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.

Move to the how

We 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/

Move to the 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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
wasaucecommented, Mar 2, 2021

@qaqak while I’m not part of the Luxonios team – post what code you have and I’ll happily take a look

1reaction
dhruvsheth-aicommented, Mar 4, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Object Detection with 10 lines of code | by Moses Olafenwa
Part 2 of this tutorial for detecting your custom objects is available via this link. One of the important fields of Artificial Intelligence ......
Read more >
Auto annotate images for TensorFlow object detection - Medium
With this new approach, I've created a Python class called generate XML, which is responsible for doing the hard work for me, annotating...
Read more >
Object detection with deep learning and OpenCV
Learn how to apply object detection using deep learning, Python, and OpenCV with pre-trained Convolutional Neural Networks.
Read more >
Reading and saving image files with Python, OpenCV (imread ...
In Python and OpenCV, you can read (load) and write (save) image files with cv2.imread() and cv2.imwrite(). Images are read as NumPy array ......
Read more >
Using Amazon S3 storage classes - AWS Documentation
For example, if you list the objects in an S3 bucket, the console shows the ... Storage class for automatically optimizing data with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found