YOLOX icon indicating copy to clipboard operation
YOLOX copied to clipboard

Image data repeat resize and compute ratio bugs

Open OceanWong1991 opened this issue 1 year ago • 5 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?

OceanWong1991 avatar Dec 25 '23 08:12 OceanWong1991

@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.

OceanWong1991 avatar Dec 25 '23 09:12 OceanWong1991

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~

OceanWong1991 avatar Dec 25 '23 09:12 OceanWong1991

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 avatar Dec 25 '23 11:12 FateScript

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

OceanWong1991 avatar Dec 26 '23 02:12 OceanWong1991

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.

FateScript avatar Dec 26 '23 11:12 FateScript