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

DataResize part code question #7

Closed
wangjiyuan9 opened this issue May 26, 2023 · 3 comments
Closed

DataResize part code question #7

wangjiyuan9 opened this issue May 26, 2023 · 3 comments

Comments

@wangjiyuan9
Copy link

Emm,
At here 41~48
I think inputs[k],inputs[(n + "_aug", im)] and inputs[(n, im)] are same???

@Dwawayu
Copy link
Member

Dwawayu commented May 26, 2023

Hi! I want to remind that Line 41-48 is for resizing cropping, while Line 71-77 is for resizing only. You can use the --no_crop flag to choose which one to use.

Regarding your question of Line 41-48, inputs[(n + "_aug", im)] and inputs[(n, im)] are the same here, both cropped and resized. inputs[k] is only resized without cropping.

Later on, inputs[(n + "_aug", im)] will be further augmented in the color space, so all of them will be different.

By default, inputs[(n + "_aug", im)] is the input of network and inputs[(n, im)] is used for computing the loss. You can use --match_aug flag to compute loss on inputs[(n + "_aug", im)] if you wish.

I hope this answered your question. Please feel free to contact me if you meet any more questions.

@Dwawayu Dwawayu closed this as completed May 29, 2023
@wangjiyuan9
Copy link
Author

My previous understanding was superficial, thank you for your detailed explanation.

@wangjiyuan9
Copy link
Author

Hi, I think I have a deep understanding of your code.
Actually ,your codes are robust to hold any condition.
But the inputs[k] really don't necessary. Because in the function add_flip_right_inputs you make the new inputs and never consider the inputs[k].
So your code use another useless resize time to create inputs[k]. (the resize code will done over 100k time in training!)

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