logo
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.

junjie.jiang 84dd76ca0f add requirements 7 Commits
folder-icon cpp update 2 years ago
folder-icon py36nvjpeg add so 2 years ago
folder-icon py37nvjpeg add so 2 years ago
folder-icon py38nvjpeg update 2 years ago
folder-icon py39nvjpeg add so 2 years ago
file-icon .gitattributes
1.1 KiB
download-icon
Initial commit 2 years ago
file-icon README.md
1.1 KiB
download-icon
update readme 2 years ago
file-icon __init__.py
696 B
download-icon
add 2 years ago
file-icon image_decoder.py
3.2 KiB
download-icon
update 2 years ago
file-icon requirements.txt
29 B
download-icon
add requirements 2 years ago