-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a09f34
commit bf08206
Showing
1 changed file
with
2 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,8 @@ | ||
An extension of [TorchVision](https://github.com/pytorch/vision) for decoding | ||
AVIF and HEIC images. | ||
|
||
## Usage | ||
Please refer to the [torchvision | ||
docs](https://pytorch.org/vision/stable/io.html) for usage. | ||
|
||
Assuming torchvision is already installed: | ||
|
||
```bash | ||
$ pip install torchvision-extra-decoders | ||
``` | ||
|
||
Then, you can use the HEIC and AVIF decoders from torchvision like the other | ||
decoders ([docs](https://pytorch.org/vision/stable/io.html)): | ||
|
||
```py | ||
from torchvision.io import decode_image, decode_heic, decode_avif | ||
|
||
img = decode_image("image.heic") | ||
img = decode_image("image.avif") | ||
|
||
img = decode_heic("image.heic") | ||
img = decode_avif("image.avif") | ||
``` | ||
|
||
## LICENSE | ||
|
||
This project is released under the [LGPL 2.1 License](./LICENSE). |