1
0
mirror of https://github.com/open-mmlab/mmdeploy.git synced 2025-01-14 08:09:43 +08:00
lzhangzz bb655af629
Add Python wrapper for SDK ()
* add python API for detector

* integrate detection

* add python segmentor

* add segmentation support

* add classifier, text-detector, text-recognizer and restorer

* integrate classifier

* integrate textdet, textrecog and restorer

* simplify

* add inst-seg

* fix inst-seg

* integrate inst-seg

* Moidfy _build_wrapper

* better pipeline substitution

* use registry for backend model creation

* build Python module according to C API targets

* minor fix

* move sdk data pipeline to backend_config

* remove debugging lines

* add docstring for SDKEnd2EndModel

* fix type hint

* fix lint

* fix lint

* insert build/lib to sys.path

Co-authored-by: SingleZombie <singlezombie@163.com>
2022-01-13 11:31:51 +08:00

26 lines
582 B
C++

// Copyright (c) OpenMMLab. All rights reserved.
#ifndef MMDEPLOY_CSRC_APIS_PYTHON_COMMON_H_
#define MMDEPLOY_CSRC_APIS_PYTHON_COMMON_H_
#include <stdexcept>
#include "apis/c/common.h"
#include "pybind11/numpy.h"
#include "pybind11/pybind11.h"
#include "pybind11/stl.h"
namespace py = pybind11;
using PyImage = py::array_t<uint8_t, py::array::c_style | py::array::forcecast>;
namespace mmdeploy {
std::map<std::string, void (*)(py::module &)> &gPythonBindings();
mm_mat_t GetMat(const PyImage &img);
} // namespace mmdeploy
#endif // MMDEPLOY_CSRC_APIS_PYTHON_COMMON_H_