diff --git a/tutorials/vision_processor/README.md b/tutorials/vision_processor/README.md index c8362b917e..47b4ff799c 100644 --- a/tutorials/vision_processor/README.md +++ b/tutorials/vision_processor/README.md @@ -9,20 +9,42 @@ Vision Processor is used to implement model preprocessing, postprocessing, etc. ## C++ -TODO(guxukai) +C++ API, Currently supported operators are as follows: + +- Cast +- CenterCrop +- HWC2CHW +- Resize +- ResizeByShort +- NormalizeAndPermute +- Normalize +- Pad +- PadToSize +- StridePad + +Users can inherit `ProcessorManager` when creating a `Preprocessor` class in the C++ deployment of the visual class model, and can choose to use OpenCV or CV-CUDA through `UseCuda()` in the `ProcessorManager` base class. The base class `ProcessorManager` implements GPU memory management, CUDA stream management, etc. Users only need to implement the `Apply()` function, in which operators in the multi-hardware image processing library are called to implement processing logic. For specific implementation, please refer to the sample code. ## Python Python API, Currently supported operators are as follows: +- Cast +- CenterCrop +- HWC2CHW +- Resize - ResizeByShort - NormalizeAndPermute +- Normalize +- Pad +- PadToSize +- StridePad Users can implement a image processing modules by inheriting the `PyProcessorManager` class. The base class `PyProcessorManager` implements GPU memory management, CUDA stream management, etc. Users only need to implement the apply() function by calling vision processors in this library and implements processing logic. For specific implementation, please refer to the demo code. ### Demo - [Python Demo](python) +- [C++ Demo](cpp) ### Performance comparison between CV-CUDA and OpenCV: diff --git a/tutorials/vision_processor/README_CN.md b/tutorials/vision_processor/README_CN.md index 8d4e9741ec..6966a9d774 100644 --- a/tutorials/vision_processor/README_CN.md +++ b/tutorials/vision_processor/README_CN.md @@ -8,20 +8,42 @@ ## C++ -待编写 +C++ API目前支持的算子如下: + +- Cast +- CenterCrop +- HWC2CHW +- Resize +- ResizeByShort +- NormalizeAndPermute +- Normalize +- Pad +- PadToSize +- StridePad + +用户可在视觉类模型的C++部署中创建`Preprocessor`类时继承`ProcessorManager`,即可通过ProcessorManager基类中的`UseCuda()`选择使用OpenCV或者CV-CUDA,基类`ProcessorManager`实现了GPU内存管理、CUDA stream管理等,用户仅需要实现`Apply()`函数,在其中调用多硬件图像处理库中的算子、实现处理逻辑即可,具体实现可参考示例代码。 ## Python Python API目前支持的算子如下: +- Cast +- CenterCrop +- HWC2CHW +- Resize - ResizeByShort - NormalizeAndPermute +- Normalize +- Pad +- PadToSize +- StridePad -用户可通过继承PyProcessorManager类,实现自己的图像处理模块。基类PyProcessorManager实现了GPU内存管理、CUDA stream管理等,用户仅需要实现apply()函数,在其中调用多硬件图像处理库中的算子、实现处理逻辑即可,具体实现可参考示例代码。 +用户可通过继承`PyProcessorManager`类,实现自己的图像处理模块。基类`PyProcessorManager`实现了GPU内存管理、CUDA stream管理等,用户仅需要实现`apply()`函数,在其中调用多硬件图像处理库中的算子、实现处理逻辑即可,具体实现可参考示例代码。 ### 示例代码 - [Python示例](python) +- [C++示例](cpp) ### CV-CUDA与OpenCV性能对比