motokimura / yolo_v1_pytorch

PyTorch implementation of YOLO-v1 including training
MIT License
142 stars 38 forks source link

little bug about loss.py #1

Closed FlowEternal closed 4 years ago

FlowEternal commented 4 years ago

pred_xyxy[:, :2] = pred[:, 2]/float(S) - 0.5 pred[:, 2:4] pred_xyxy[:, 2:4] = pred[:, 2]/float(S) + 0.5 pred[:, 2:4]

should be changed to pred_xyxy[:, :2] = pred[:, :2]/float(S) - 0.5 pred[:, 2:4] pred_xyxy[:, 2:4] = pred[:, :2]/float(S) + 0.5 pred[:, 2:4]

and also for target_xyxy

motokimura commented 4 years ago

Thank you for reporting. This has been solved in PR https://github.com/motokimura/yolo_v1_pytorch/pull/2 by nuka137.