-
Notifications
You must be signed in to change notification settings - Fork 7k
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
[Feature Request] Datasets Should Use New torchvision.io
Image Loader APIs and Return TVTensor
Images by Default
#8762
Comments
Hi @fang-d , thank you for the feature request. This is a great idea, and I think the torchvision decoders are in a stable enough state to enable this now. We already support the I think the way to go would probably be to add that
|
Hi @NicolasHug |
Hi @NicolasHug, I'd like to tackle this issue, but there're some concerns that I'd like to ask here first.
|
Hi @GdoongMathew ,
Yes good point, we should also add the
Unfortunately, no... This would be BC-breaking :/ . I'm not sure I understand the concern though - is there any issue with having the datasets import things from
I think we'll need to keep PIL as the default loader, yes. But we can encourage users to rely on Overall and to answer your final point, I don't think we should implement all this via a new "image backend". The image backend logic is really old and I'm not even sure we still support accimage at all. I think this is better done by simply adding a Thanks a lot for working on this! |
Well the 1st point is more about the dependency? From what I understand, most of the datasets are subclassed from |
Hi, @NicolasHug , I think there's another problem tho.. If we use the provided loader, then we probably will need to add additional argument for the Or, for the time being, we just expose |
Great point about loading masks - lets' just take it step by step first, maybe we can start with the classification datasets as a first step. |
Hi @NicolasHug , here're the rest of the datasets that still needs further refactor:
I think we could keep working on the datasets in 1, 2, 4, 5, and leave the one in 3 and 6 for further discussion? |
🚀 The feature
torchvision.io
APIs (See: Release Notes v0.20) and enable it by default.TVTensor
images by default instead ofPIL.Image
.Motivation, pitch
torchvision.io
APIs that enhance its encoding/decoding capabilities.PIL.Image
by default, but the first step of transforms is usuallytransforms.ToImage()
.torchvision.io
APIs.torchvision.io
APIs.Alternatives
PIL.Image
when using the PIL or the accimage backends, and beTVTensor
if using new APIs (may lose consistency).Additional context
I would like to make a pull request if the community likes this feature.
The text was updated successfully, but these errors were encountered: