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 example #94

Merged
merged 12 commits into from
Mar 17, 2021
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions gen2-license-plate-recognition/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Gen2 License Plates Recognition

This example demonstrates how to run 2 stage inference on DepthAI using Gen2 Pipeline Builder.
First, a license plate is detected on the image and then the cropped license frame is sent to text detection network,
which tries to decode the license plates texts


> :warning: **This demo is adjusted to detect and recognize chinese license plates**! It may not work with other license plates

## Demo

[![Gen2 License Plates recognition](https://user-images.githubusercontent.com/5244214/111202991-c62f3980-85c4-11eb-8bce-a3c517abeca1.gif)](https://www.youtube.com/watch?v=tB_-mVVNIro "License Plates recognition on DepthAI")

## Pre-requisites

1. Purchase a DepthAI model (see [shop.luxonis.com](https://shop.luxonis.com/))
2. Install requirements
```
python3 -m pip install -r requirements.txt
```

## Usage

```
usage: main.py [-h] [-nd] [-cam] [-vid VIDEO]

optional arguments:
-h, --help show this help message and exit
-nd, --no-debug Prevent debug output
-cam, --camera Use DepthAI 4K RGB camera for inference (conflicts with -vid)
-vid VIDEO, --video VIDEO
Path to video file to be used for inference (conflicts with -cam)
```

To use with a video file, run the script with the following arguments

```
python3 main.py -vid ./chineese_traffic.mp4
```

To use with DepthAI 4K RGB camera, use instead

```
python3 main.py -cam
```
Binary file not shown.
Loading