JackEasson / SLPNet_pytorch

SLPNet: Towards End-to-End Car License Plates Detection and Recognition Using Lightweight CNN
56 stars 13 forks source link

Issue in computing accuracy in eval.py #19

Open gokulakrishnanswaminathan opened 1 year ago

gokulakrishnanswaminathan commented 1 year ago

Hello,

I was running the eval.py against an image from ccpd_fn image for batch size of 1, in the line https://github.com/JackEasson/SLPNet_pytorch/blob/8619e8ecda907e159e2e0b46f3a5aa9c177d6124/eval.py#L109 gives an output None for the lp_labels_clean and length_labels_clean. But when I increase the batch size to 2 or more, the error does not show up. After examination, it seems that the check on lp_labels_clean https://github.com/JackEasson/SLPNet_pytorch/blob/8619e8ecda907e159e2e0b46f3a5aa9c177d6124/model/detection_recognition_pipeline.py#L148 is to verify if the list is empty not checking if all images were processed. This in turn affects the remainder of the computation hence gives a different accuracy measure.