-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Support for customized channel TIF input image #514
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
Comments
I think in order to properly support this it would be better to refactor our As a workaround, do you need to perform any data augmentations in your code (rotation, flip, etc)? Also, do you want to normalize the image to be in a specific range? It would be great if we could have some pointers of some reference images and tools that could be used to load them, so that we can take that into account when improving those transforms. |
It worked if I have no transformation. But I do need transformation and normalization. One thing I felt weird is that, current transformation is done via PIL, that is the reason PIL format is required. I think it would make more sense if you can do transformation on the np.array or tensor format. |
Yes, requiring the image to be a PIL image has some limitations. But for that to work, we would need to know a bit better how the other formats are structured, and what is the representation that is used. Could you give us some pointers? |
Majority images are grey or RGB. The only images I know that contain channel number above 4 is TIF stacked image. So I would say add a support for TIF stacked image for read-in part. Once read-in an image, convert it to numpy array, or pytorch tensor. And apply all the transformation on these. |
@fmassa It would be nice if PyTorch supported running without Pillow(-SIMD which can have installation issues, since it requires to uninstall pillow package which some other pip packages can reinstall back). With |
@vadimkantorov almost. One thing I was thinking was to eventually extend the support of |
I just discovered a way to do this, I am not sure it can be solution to your problem, but I'll share it in case it can be useful to others.
|
Uh oh!
There was an error while loading. Please reload this page.
I am currently working on medical images, where one field of view could have more than 3 channels (up to 50+ channels). Current loader does not support customized channel input. If you give it a stacked TIF image, it use convert 'RGB' function to make it something else. If I change the loader and make it output the n-d array of the input image, it gives future error because it assumes PIL image format as input. Any solutions? Thanks.
The text was updated successfully, but these errors were encountered: