This project aims to conduct automatic number-plate recognition by YOLOv7 with OCR.
conda create -n ANPR python=3.8
conda activate ANPR
pip install -r requirements.txt
Install pytorch from web
- Downloaded the dataset to the root of this project
- name the folder "car-plate-detection".
Run the following command to preprocess the dataset and start transfer learning yolov7 to our application.
source setup.sh
You can inference this project by following command. If you try to add your own testing image, please put it into folder "license".
source detect_ocr.sh
or
cd yolov7
python detect.py --weights ./runs/train/yolov7-license/weights/best.pt --conf 0.25 --img-size 640 --source ../license --save-txt
cd ..
python OCR.py
YOLOv7
Datasets
- Car License Plate Detection https://www.kaggle.com/datasets/andrewmvd/car-plate-detection