-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
img_size
attribute for TensorPoint
is not updated properly
#2799
img_size
attribute for TensorPoint
is not updated properly
#2799
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a test in the notebook that previously would have failed, but this change makes pass?
I have updated the last test from 09_vision.augment.ipynb with a new transform Resize(256) - it is clearly seen that previously bboxes are not covering the objects. |
Oh interesting - can you tell me more about this? Is it a fastcore change or fastai change which broke things? Do you know what version the breakage occurred from? |
I think I was the one who originally stated that a previous version existed that did not have the issue. I tried to track down the issue, but didn't get to the bottom of it yet. This notebook shows the behavior I found that was suspicious: https://gist.github.com/marii-moe/a8e7a330fbd4d9b0dc326e396ef17e36 commit that this is from is 94e1568, though I have no idea what version actually broke it yet. I was moving my last project off of the old environment when I noticed the discrepancy between the old and new fastai. Just noticed gist has display issues with displaying the results from the previous version of fastai, leaving this here as I am having trouble getting its formatting correct in the notebook gist:
NotE: this was found in a debugger, I am just trying to make it more obvious what is happening by breaking open the dataloader. All of the 'Nones' is what makes me suspect that the previous version of fastai had something that was broken, but a new version fixed something else, that actually ended up breaking bounding boxes, by making img_size not null. Which is why I think IRailean's fix may work. This logic is a bit convoluted though. |
Thanks to you both! I'll just go ahead and merge this then, but I don't actually know if it's the right fix, so I'd love it if you folks could take a look at some image augmentation outputs and confirm visually that it all looks ok to you! :) |
img_size
attribute for TensorPoint
is not updated properly
Can confirm this is working. Also fixes any issues with |
Solving the issue reported in #2786
As resized image size will be saved in PointScaler self.sz variable, and 'img_size' attribute for TensorPoint is not updated properly -> prioritize self.sz over sz in PointScaler _get_sz function.