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 3 months ago
image-decode
Image Decode Implementation with CV2 and nvjpeg
author: junjie.jiang
Description
An image decode operator implementation with OpenCV and nvjpeg. In CPU env, use OpenCV, in GPU env, use nvjpeg to decode jpeg files.
Code Example
Load a image from path './src_dog.jpg'.
Write the pipeline in simplified style:
from towhee import pipe, ops, DataCollection
p = (
pipe.input('url')
.map('url', 'image', ops.image_decode.nvjpeg())
.output('image')
)
DataCollection(p('./src_dog.jpg')).show()
Factory Constructor
Create the operator via the following factory method:
ops.image_decode.nvjpeg()
Interface
An image decode operator takes an image path as input. It decodes the image back to ndarray.
Parameters:
img: str
Local file path or http url.
Returns: towhee.types.Image (a sub-class of numpy.ndarray)
The decoded image data as numpy.ndarray.
More Resources
- Scalar Quantization and Product Quantization - Zilliz blog: A hands-on dive into scalar quantization (integer quantization) and product quantization with Python.
- How to Get the Right Vector Embeddings - Zilliz blog: A comprehensive introduction to vector embeddings and how to generate them with popular open-source models.
- What is a Convolutional Neural Network? An Engineer's Guide: Convolutional Neural Network is a type of deep neural network that processes images, speeches, and videos. Let's find out more about CNN.
- The guide to clip-vit-base-patch32 | OpenAI: clip-vit-base-patch32: a CLIP multimodal model variant by OpenAI for image and text embedding.
- Using Vector Search to Better Understand Computer Vision Data - Zilliz blog: How Vector Search improves your understanding of Computer Vision Data
- Demystifying Color Histograms: A Guide to Image Processing and Analysis - Zilliz blog: Mastering color histograms is indispensable for anyone involved in image processing and analysis. By understanding the nuances of color distributions and leveraging advanced techniques, practitioners can unlock the full potential of color histograms in various imaging projects and research endeavors.
- Understanding ImageNet: A Key Resource for Computer Vision and AI Research: The large-scale image database with over 14 million annotated images. Learn how this dataset supports advancements in computer vision.
- Enhancing Efficiency in Vector Searches with Binary Quantization and Milvus - Zilliz blog: Binary quantization represents a transformative approach to managing and searching vector data within Milvus, offering significant enhancements in both performance and efficiency. By simplifying vector representations into binary codes, this method leverages the speed of bitwise operations, substantially accelerating search operations and reducing computational overhead.
- Image Embeddings for Enhanced Image Search - Zilliz blog: Image Embeddings are the core of modern computer vision algorithms. Understand their implementation and use cases and explore different image embedding models.
Jael Gu
cee4336f7c
| 12 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 |
3.7 KiB
|
3 months ago | |
__init__.py |
726 B
|
2 years ago | |
dog.jpg |
26 KiB
|
2 years ago | |
image_decoder.py |
2.9 KiB
|
2 years ago | |
requirements.txt |
29 B
|
2 years ago | |
src_dog.jpg |
26 KiB
|
2 years ago |