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/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image data repeat resize and compute ratio bugs

OceanWong1991 opened this issue · comments

@FateScript @Joker316701882 Thanks for Sharing this great project!

I think we may do repeat image data resize and compute ratio

  1. In load_resized_img and load_anno_from_ids we do the resize image first time.
  2. In MosaicDetection, We repeat do the image resize
  3. In TrainTransform, We do resize image again

Is that right?

@FateScript You can debug it, the ratio is constant 1.0, because when we load image and anno, we already do the resize and ratio work.

I also make a PR fix this bug, and past the test on my server, if there is anything wrong with my understanding, plz tell me, Thx~

Thanks for you contribution : )
Actucally this code is writen by design. User could delete this code or write their own version. We add 3 resize code is to make sure those people who fork this repo will not doing things wrong if they modify the code a little.

@FateScript Thx for your replying. Actually, I DO NOT think repeat write same code is a good to prevent users from making mistakes.

Yes, I totally agree with you. In fact, the root reason for this is that we are lack of time when we prepara to release the code. Dataloader and its related code in this repo should be refactored actually.