ALPR with YOLOv4 is an advanced Automatic License Plate Recognition (ALPR) system that leverages the powerful YOLOv4 (You Only Look Once) one-stage object detection framework. It can efficiently and accurately detect and recognize vehicle license plates in real-time.
About Darknet : http://pjreddie.com/darknet/
.weights
: https://drive.google.com/file/d/1b3rYgP48z_NGvSuNoMKDvxXzYmray_Qr/view?usp=sharing.mlmodel
: https://drive.google.com/file/d/1eREdAVoiOVlAiPOxv5c_Sc5EBPybOIUq/view?usp=sharing
- car
- license_plate
Labeling Tool : https://github.com/AlexeyAB/Yolo_mark
Darknet (Yolov4) : https://github.com/AlexeyAB/darknet
Cloud Service | GPU | Traing Data | Training Iterations | Time |
---|---|---|---|---|
GCP(Google Cloud Platform) | Nvidia Tesla P100 | Over 2600 images | 4000 iterations | 5h |
./darknet detector train data/obj.data cfg/yolov4_ANPR.cfg yolov4.conv.137 -gpu 0
git clone https://github.com/AlexeyAB/darknet
cd darknet
- Configure Makefile according to your environment:
vi Makefile
GPU=0 # Change to 1 if using GPU
CUDNN=0 # Change to 1 if using cuDNN (NVIDIA)
CUDNN_HALF=0
OPENCV=0 # Change to 1 if using OpenCV
AVX=0
OPENMP=0
LIBSO=1 # Generate libdarknet.so
...
...
make
- Required packages: make, gcc, pkg-config (if not installed, use
sudo apt-get install …
to install)
- Download
data/*
,cfg/yolov4-ANPR.cfg
, andbackup/yolov4-ANPR.weights
./darknet detector test data/obj.data cfg/yolov4-ANPR.cfg backup/yolov4-ANPR.weights data/(이미지파일.jpg)
Make sure to use
.jpg
images
./darknet detector demo data/obj.data cfg/yolov4-ANPR.cfg backup/yolov4-ANPR.weights data/(동영상파일.mp4)
./darknet detector demo data/obj.data cfg/yolov4-ANPR.cfg backup/yolov4-ANPR.weights
./darknet detector test data/obj.data cfg/yolov4-ANPR.cfg backup/yolov4-ANPR.weights data/testfile.jpg
Loading weights from backup/yolov4-ANPR.weights...
seen 64, trained: 256 K-images (4 Kilo-batches_64)
Done! Loaded 162 layers from weights-file
data/testfile.jpg: Predicted in 9325.005000 milli-seconds.
car: 63%
car: 98%
license_plate: 96%
car: 47%
car: 61%
car: 30%
./darknet detector demo data/obj.data cfg/yolov4-ANPR.cfg backup/yolov4-ANPR.weights data/testvideo.jpg
python darknet_video.py
Demo Video Link (1) : https://drive.google.com/file/d/1DGmF2bwtDMe1y-wNuv_YT827Vr6Y8Q2m/view?usp=sharing
Demo Video Link (2) : https://drive.google.com/file/d/1nJjIQFcrYRYSJ0n9FK0-x_Fk6HrULsZY/view?usp=sharing
- Papers
- Keras-yolov3
- Core ML