Group homework for the 7th semester class Image Processing at the Budapest University of Technology and Economics.
Install Python packages with pip:
pip install -r requirements.txt
- Put images in the
imagesfolder. ./detect.shoutput_original.csvcontains the results (in the root folder)output.csvcontains the results of each cutout- good for debugging purposes, and matching these against the detections in
images/cutouts/
- good for debugging purposes, and matching these against the detections in
- Put images in the
imagesfolder. - Run YOLO object detection
python yolov7-number-plates/detect.py --weights yolov7-number-plates/yolov7-number-plates-trained.pt --img-size 448 --source images --name number-plates-yolo --save-txt --save-conf --nosave --project images --exist-ok
- Cut out detections
- move detected
*.txtlabels into folderimages/labelsmv images/number-plates-yolo/labels images/labels
python cutout.py images- Results are now in the
images/cutoutsfolder
- move detected
- Run OCR on detections
python paddleOCR/main.py
output.csvcontains the results (in the root folder)- Run
python fix_csv.pyto merge detections from the same image to the same line, with the original file names - The final results are in
output_original.csv
- License Plate Object Detection: https://github.com/bobarna/yolov7-number-plates
- OCR: we implemented 2 different methods, and ended up using paddleOCR
- paddleOCR:
paddleOCRfolder - custom OCR:
LicensePlateOCRfolder
- paddleOCR:
See docs folder.
