Files
FastDeploy/tutorials/image_decoder/cpp
Wang Xinyu efa46563f3 [nvJPEG] Integrate nvJPEG decoder (#1288)
* nvjpeg cmake

* add common decoder, nvjpeg decoder and add image name predict api

* ppclas support nvjpeg decoder

* remove useless comments

* image decoder support opencv

* nvjpeg decode fallback to opencv

* fdtensor add nbytes_allocated

* single image decode api

* fix bug

* add pybind

* ignore nvjpeg on jetson

* fix cmake in

* predict on fdmat

* remove image names predict api, add image decoder tutorial

* Update __init__.py

* fix pybind
2023-02-17 10:27:05 +08:00
..

English | 中文

Image Decoder C++ Example

  1. Build FastDeploy or download FastDeploy prebuilt library

  2. Build example

mkdir build
cd build

# [PATH-TO-FASTDEPLOY] is the install directory of FastDeploy
cmake .. -DFASTDEPLOY_INSTALL_DIR=[PATH-TO-FASTDEPLOY]
make -j

# Download the test image
wget https://gitee.com/paddlepaddle/PaddleClas/raw/release/2.4/deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg

# OpenCV decoder
./image_decoder ILSVRC2012_val_00000010.jpeg 0
# nvJPEG
./image_decoder ILSVRC2012_val_00000010.jpeg 1