Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gen2 License Plate Detection and OCR #47

Closed
Luxonis-Brandon opened this issue Jan 26, 2021 · 9 comments
Closed

Gen2 License Plate Detection and OCR #47

Luxonis-Brandon opened this issue Jan 26, 2021 · 9 comments
Labels
enhancement New feature or request Gen2 Feature for or issue with Gen2

Comments

@Luxonis-Brandon
Copy link
Contributor

Luxonis-Brandon commented Jan 26, 2021

Start with the why:

Now that we have the general text-detection + optical character recognition pipeline working (here), it would great to show a specific example of instead of doing overall text detection, to only detect license plates and then do OCR on them instead.

So below shows running the general OCR example on license plates:
image

With a license-plate detector as the first stage (instead of a general text detector), likely things like the DVD 493 plate would be correctly detected as one string instead of 2, for example. And other attributes (like country, state, etc.) could be pulled off, as in our manual/hard-coded example of such a pipeline, here.

Move to the how:

Use the vehicle-license-plate-detection-barrier-0106 detector instead of the EAST general text detector as the first-stage detector (and likely return additional metadata it may provide) and feed this into the OCR.

An example of running this first-stage model is below:
image

And then in addition to this model as the first-stage, we should likely use vehicle-attributes-recognition-barrier-0039 to get vehicle attributes and license-plate-recognition-barrier-0001 to actually do the OCR of the plate (as in the hard-coded example, here).

Move to the what:

Make a Gen2 pipeline example/reference application specific for license plate detection and optical character recognition (OCR).

@wasauce
Copy link
Contributor

wasauce commented Mar 10, 2021

@Luxonis-Brandon in the video you linked https://youtu.be/aID571OzBws -- do you have the python code that was leveraging license-plate-recognition-barrier-0001 such that you were getting OUT the text and then adding that label?

@Luxonis-Brandon
Copy link
Contributor Author

We don't yet sorry @wasauce . That video was the result of a static pipeline we made in C++ that we can't share unfortunately. This pipeline was manually created on depthai in firmware in preparation for architecting the Gen2 pipeline builder. So this is not possible, but we haven't yet implemented the pipeline in Gen2.

I'm asking internally about availability to make this happen. We had intended to make it already but have been behind.

@Luxonis-Brandon
Copy link
Contributor Author

As an update @wasauce we think we'll have this Python example next week. We got swamped doing the Gen2 release/docs (and are still behind on the docs), but should have some time to crank a first version out likely by the end of next week.

@wasauce
Copy link
Contributor

wasauce commented Mar 12, 2021

@Luxonis-Brandon - Awesome. Thank you. I have started a PR here https://github.com/luxonis/depthai-experiments/pull/92/files. Many things to improve there and of course you can ignore it as you probably have a better approach, and depending on my free time this weekend -- you are likely to finish before me if you are targeting end of next week.

@Luxonis-Brandon
Copy link
Contributor Author

Fantastic thank you @wasauce ! Will be good to compare notes I think!

@Luxonis-Brandon
Copy link
Contributor Author

In progress here: #94

And ArduCam made their own example, here: https://github.com/OAKChina/depthai-examples/tree/master/security_barrier_camera

@dhruvmsheth
Copy link
Contributor

Surprisingly, their results seem to be really good

@Luxonis-Brandon
Copy link
Contributor Author

Thanks CC: @VanDavv on ArduCam implementation.

@Luxonis-Brandon
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Gen2 Feature for or issue with Gen2
Projects
None yet
Development

No branches or pull requests

3 participants