nvjpeg
copied
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Readme
Files and versions
Updated 2 years ago
image-decode
Image Decode Implementation with NVJpeg and CV2
author: Junjie Jiang
Description
An image decode operator implementation with OpenCV and NvJpeg. The decoder will use GPU to decode jpeg images.
Only supports linux.
Code Example
Load a image from path './dog.jpg'.
Write the pipeline in simplified style:
import towhee
towhee.glob('./dog.jpg') \
.image_decode.nvjpeg() \
.show()
Write a same pipeline with explicit inputs/outputs name specifications:
import towhee
towhee.glob['path']('./dog.jpg') \
.image_decode.nvjpeg['path', 'img']() \
.select['img']() \
.show()
Factory Constructor
Create the operator via the following factory method:
image_decode.nvjpeg()
Interface
An image decode operator takes an image path as input. It decodes the image back to ndarray.
Parameters:
img: str
Image file path.
Returns: towhee.types.Image (a sub-class of numpy.ndarray)
The decoded image data as numpy.ndarray.
junjiejiangjjj
a7c2a089e6
| 8 Commits | ||
---|---|---|---|
cpp | 2 years ago | ||
py36nvjpeg | 2 years ago | ||
py37nvjpeg | 2 years ago | ||
py38nvjpeg | 2 years ago | ||
py39nvjpeg | 2 years ago | ||
.gitattributes |
1.1 KiB
|
2 years ago | |
README.md |
1.1 KiB
|
2 years ago | |
__init__.py |
726 B
|
2 years ago | |
image_decoder.py |
2.9 KiB
|
2 years ago | |
requirements.txt |
29 B
|
2 years ago |