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

Resize precision issue. #442

Closed
atranitell opened this issue Sep 26, 2019 · 2 comments
Closed

Resize precision issue. #442

atranitell opened this issue Sep 26, 2019 · 2 comments
Labels

Comments

@atranitell
Copy link

atranitell commented Sep 26, 2019

Hello, when converting a image to float type and calling Resize operation, we found that it is different with the result by only using cv.imread(). Then, we find that

# in imgaug/augmentors/size.py line: 373
 if not isinstance(images, list):
     all_same_size = (len(set([image.shape for image in result])) == 1)
     if all_same_size:
         result = np.array(result, dtype=np.uint8)

if the input is not list, it will make a numpy array and convert to uint8. The opeartion will result in the inconsistent with our expectation.

While, we could pass the parameters with (images=[image]) to solve the problem, but I'm not sure the intention to do that.

Best,
KJ

@aleju aleju added the bug label Sep 26, 2019
aleju added a commit that referenced this issue Sep 26, 2019
aleju added a commit that referenced this issue Sep 26, 2019
Fix resize breaking input dtypes #442
@aleju
Copy link
Owner

aleju commented Sep 26, 2019

This is now fixed in master.

@atranitell
Copy link
Author

@aleju thx very much.

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

No branches or pull requests

2 participants