Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very low loss but no detection on images #7307

Open
Snickbrack opened this issue Jan 28, 2021 · 4 comments
Open

Very low loss but no detection on images #7307

Snickbrack opened this issue Jan 28, 2021 · 4 comments
Labels
Training issue Training issue - no-detections / Nan avg-loss / low accuracy:

Comments

@Snickbrack
Copy link

read FAQ: https://github.com/AlexeyAB/darknet/wiki/FAQ---frequently-asked-questions

I have read the FAQ and

  • I ran the map-Command and got (TP = 0, FP = 0) for it
  • I ran this command "detector train .\yolo.data .\yolov3_license_plate.cfg .\yolov3_license_plate_last.weights -show_imgs" and got correct bounding boxes

what command do you use?

detector train .\yolo.data .\yolov3_license_plate.cfg .\yolov3_license_plate_last.weights

what dataset do you use?

I use a custom dataset with german license plates. Examples can be found in the attachment.

what Loss and mAP did you get?

I do get a Loss of around 0.0034 and a mAP of (TP = 0, FP = 0) after 5k of Iterations

show chart.png with Loss and mAP

It is in the attachment

check your dataset - run training with flag -show_imgs i.e. ./darknet detector train ... -show_imgs and look at the aug_...jpg images, do you see correct truth bounded boxes?

I do see the correct bounding boxes

rename your cfg-file to txt-file and drag-n-drop (attach) to your message here

it is

show content of generated files bad.list and bad_label.list if they exist

There are no files.

Aug-Files:
aug-images.zip

Config-File:
yolov3_license_plate.txt

chart

@Snickbrack Snickbrack added the Training issue Training issue - no-detections / Nan avg-loss / low accuracy: label Jan 28, 2021
@PaserSRL
Copy link

I have the same issue...

@Snickbrack
Copy link
Author

I have changed the Network Size to 768x768 and the division to 64. And now I now get following output for mAP for around 3k Batches:

calculation mAP (mean average precision)...
Detection layer: 82 - type = 28
Detection layer: 94 - type = 28
Detection layer: 106 - type = 28
6300
detections_count = 7680, unique_truth_count = 9013
class_id = 0, name = license_plate, ap = 3.38%           (TP = 300, FP = 284)

for conf_thresh = 0.25, precision = 0.51, recall = 0.03, F1-score = 0.06
for conf_thresh = 0.25, TP = 300, FP = 284, FN = 8713, average IoU = 32.89 %

IoU threshold = 50 %, used Area-Under-Curve for each unique Recall
mean average precision (mAP@0.50) = 0.033779, or 3.38 %
Total Detection Time: 1231 Seconds.

And I also got some good detections for manual testing some of my images. I think darknet was not able to see the objects which I wanted to be detected. I will run the training to finish and share my results here.

@versavel
Copy link

TP = 0, FP = 0 indicates that none of the testing images have an object defined in their .txt annotation file. To fix this issue, did you change the valid = ... line in your .\yolo.data file to get the new TP = 300, FP = 284 result ?

@Snickbrack
Copy link
Author

@versavel I do have annotations in the .txt Files of the Testing Images.

I use all of my training images as Validation Images.
And no. The only thing I have changed was to increase the network Size and the subdivision-Parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Training issue Training issue - no-detections / Nan avg-loss / low accuracy:
Projects
None yet
Development

No branches or pull requests

3 participants