mrzaizai2k / License-Plate-Recognition-YOLOv7-and-CNN

This project is for the ultimate manner of identifying the License Plate. Combining YOLOv7 object detection, Hough transform alignment, and CNN character recognition
MIT License
30 stars 10 forks source link

list index out of range #9

Open thanhlong143 opened 1 year ago

thanhlong143 commented 1 year ago

I got this error when running main_video.py

Traceback (most recent call last): File "\License-Plate-Recognition-YOLOv7-and-CNN-main\main_video.py", line 37, in pred, LP_detected_img = detect(model_LP, source_img, device, imgsz=640) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "\License-Plate-Recognition-YOLOv7-and-CNN-main\detect.py", line 78, in detect return final_pred[0].to(device='cpu').detach().numpy(), imgsz


IndexError: list index out of range
mrzaizai2k commented 1 year ago

List out of range is bc your list is empty but u want to make a loop or read sth inside. The reason why your list is empty is mainly because your model cannot catch any license plate or you didnt input the picture so please check the picture or check the output of the model if they return any recognized object