torchvision.io and torchvision.utils #482
Replies: 6 comments 18 replies
-
A new example, IOReadWrite and its corresponding stub implementation, contain a very basic idea of what the image reading and writing would look like. The files also contain my reason for including I also want commentary on if the method casing is appropriate as @NiklasGustafsson mentioned that |
Beta Was this translation helpful? Give feedback.
-
Looking at read_image(), I come to think of how it makes sense for Pytorch to have the GRAY_ALPHA and RGB_ALPHA image modes. How is the alpha channel represented in tensors? Usually, you have one or three channels, but transparency would require a second or fourth channel? What's the common practice? |
Beta Was this translation helpful? Give feedback.
-
I've also add stubs for Video without the Fine-grained video API for now. |
Beta Was this translation helpful? Give feedback.
-
I'm not sure. It seemed like the right thing to do, just to keep the size of the base package smaller, but now a number of the TV features have been implemented in native code, which complicates things. What do others think? @michaelgsharp, what's your opinion? @dsyme?
That's not generally a good idea, IMO. It just means spinning up a new thread to do synchronous work and then wait for it. Unless you're unblocking the UI thread, or parallelizing I/O, I don't think it makes sense. Does ImageSharp not have async versions of the I/O methods? |
Beta Was this translation helpful? Give feedback.
-
@NiklasGustafsson I've updated my branch with the complete |
Beta Was this translation helpful? Give feedback.
-
@oluwandabira -- it's been a couple of months. Are you interested in turning this into a PR? |
Beta Was this translation helpful? Give feedback.
-
As per the original discussion on #471 I'm opening up a proper discussion.
I have created a branch on my fork , vision-io, for writing the code examples.
Major considerations for this implementation are:
Beta Was this translation helpful? Give feedback.
All reactions