The Pytorch implementation is xuexingyu24/License_Plate_Detection_Pytorch.
-
download model from HERE and put it into
modelsfolder -
use
genwts.pyto generate wts file
python3 genwts.py- build C++ code
pushd tensorrtx/lprnet
cmake -S . -B build -G Ninja --fresh
cmake --build build- serialize wts model to engine file
./build/LPRnet -snow you may see LPRNet.engine under models
- run inference
sample code use the image under assets by default:
./build/LPRnet -doutput looks like:
...
Execution time: 205us
-65.58, -28.74, -52.1, -70.79, -53.36, -57.58, -70.97, -60.66, -48.18, -57.38, -54.07, -58.56, -49.04, -52.39, -51.94, -53.4, -49.04, -45.89, -49.42, -7.863, -42.12,
====
Execution time: 202us
-65.58, -28.74, -52.1, -70.79, -53.36, -57.58, -70.97, -60.66, -48.18, -57.38, -54.07, -58.56, -49.04, -52.39, -51.94, -53.4, -49.04, -45.89, -49.42, -7.863, -42.12,
====
result: 沪BKB770if you are running this demo on windows, you may need to check the code page, e.g., for Windows PowerShell, run:
chcpif the output is not 65001, then use
chcp 65001to set the code page to utf-8, so you can get the correct literal result.
