pytorch / vision

Datasets, Transforms and Models specific to Computer Vision
https://pytorch.org/vision
BSD 3-Clause "New" or "Revised" License
16.04k stars 6.93k forks source link

ImageReadMode should support strings #8625

Closed NicolasHug closed 3 weeks ago

NicolasHug commented 3 weeks ago

It's pretty inconvenient to have to import ImageReadMode just to ask decode_* for an RGB image. We should just allow strings as well.

Also, RGBA should be a valid option (like in PIL). RGB_ALPHA is... long.