mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 17:17:14 +08:00
Add PaddleOCRv3 & PaddleOCRv2 Support (#139)
* Add PaddleOCR Support * Add PaddleOCR Support * Add PaddleOCRv3 Support * Add PaddleOCRv3 Support * Update README.md * Update README.md * Update README.md * Update README.md * Add PaddleOCRv3 Support * Add PaddleOCRv3 Supports * Add PaddleOCRv3 Suport * Fix Rec diff * Remove useless functions * Remove useless comments * Add PaddleOCRv2 Support
This commit is contained in:
@@ -48,6 +48,14 @@ void BindVisualize(pybind11::module& m) {
|
||||
vision::Mat(vis_im).ShareWithTensor(&out);
|
||||
return TensorToPyArray(out);
|
||||
})
|
||||
.def_static("vis_ppocr",
|
||||
[](pybind11::array& im_data, vision::OCRResult& result) {
|
||||
auto im = PyArrayToCvMat(im_data);
|
||||
auto vis_im = vision::Visualize::VisOcr(im, result);
|
||||
FDTensor out;
|
||||
vision::Mat(vis_im).ShareWithTensor(&out);
|
||||
return TensorToPyArray(out);
|
||||
})
|
||||
.def_static("vis_matting_alpha",
|
||||
[](pybind11::array& im_data, vision::MattingResult& result,
|
||||
bool remove_small_connected_area) {
|
||||
|
Reference in New Issue
Block a user