Megvii-BaseDetection / YOLOX

YOLOX is a high-performance anchor-free YOLO, exceeding yolov3~v5 with MegEngine, ONNX, TensorRT, ncnn, and OpenVINO supported. Documentation: https://yolox.readthedocs.io/
Apache License 2.0
9.15k stars 2.15k forks source link

Bug: mosaic_prob is no 1 or 0, AttributeError: 'int' object has no attribute 'numel' #1749

Open OceanWong1991 opened 6 months ago

OceanWong1991 commented 6 months ago

Hi, @FateScript, recently, when I test the Yolox, I find when you set 0<mosaic_prob<1, we may have this bug:

numel = sum(x.numel() for x in batch)
AttributeError: 'int' object has no attribute 'numel'

I debug it find that: image image

When we ConcatDataset, The data type should be same, So I think we should just return idx, because when I read the source code the img_id is totally same with idx.