Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image data repeat resize and compute ratio bugs #1747

Open
OceanWong1991 opened this issue Dec 25, 2023 · 5 comments
Open

Image data repeat resize and compute ratio bugs #1747

OceanWong1991 opened this issue Dec 25, 2023 · 5 comments

Comments

@OceanWong1991
Copy link

@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
Copy link
Author

@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
Copy link
Author

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~

@FateScript
Copy link
Member

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.

@OceanWong1991
Copy link
Author

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

@FateScript
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants