YOLOv6
YOLOv6 copied to clipboard
Why is the IOU_LOSS as nan?
Im training with 69 images and 10 images for testing. Im trainng on my local pc.
im using python3 tools/train.py --batch 1 --conf configs/yolov6s.py --data data/dataset.yaml --device 0
Im getting iou_loss as nan as shown in the picture im sharing.
Hi, the possible reason is that the gt box of some samples is too large and the value overflows in the calculation of ciou loss. You can try to solve this problem by adding “loss = torch.nan_to_num(loss)” to the “IOUloss” function.
@qinhao14 where do i add that? right in the function?
@joel5638 YOLOv6/yolov6/utils/figure_iou.py class IOUloss:
while training. i dont see the 69 images being loaded. I see this. Is this normal.
Yes, in you screenshot, it shows Final number of valid images: 69 / labels:69
.