Skip to content

Commit

Permalink
[Doc] fix tutorials/vision_processor/README_CN.md README.md (PaddlePa…
Browse files Browse the repository at this point in the history
…ddle#1870)

* fix readme

* fix readme en

* fix readme op list

* Update README_CN.md

* Update README.md

---------

Co-authored-by: DefTruth <[email protected]>
  • Loading branch information
GodIsBoom and DefTruth authored Apr 25, 2023
1 parent 430fc42 commit 597fe57
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 3 deletions.
24 changes: 23 additions & 1 deletion tutorials/vision_processor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
26 changes: 24 additions & 2 deletions tutorials/vision_processor/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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性能对比

Expand Down

0 comments on commit 597fe57

Please sign in to comment.