[Model] update pptracking letterboxresize and add some comment (#438)

* add override mark

* delete some

* recovery

* recovery

* add tracking

* add tracking py_bind and example

* add pptracking

* add pptracking

* iomanip head file

* add opencv_video lib

* add python libs package

Signed-off-by: ChaoII <849453582@qq.com>

* complete comments

Signed-off-by: ChaoII <849453582@qq.com>

* add jdeTracker_ member variable

Signed-off-by: ChaoII <849453582@qq.com>

* add 'FASTDEPLOY_DECL' macro

Signed-off-by: ChaoII <849453582@qq.com>

* remove kwargs params

Signed-off-by: ChaoII <849453582@qq.com>

* [Doc]update pptracking docs

* delete 'ENABLE_PADDLE_FRONTEND' switch

* add pptracking unit test

* update pptracking unit test

Signed-off-by: ChaoII <849453582@qq.com>

* modify test video file path and remove trt test

* update unit test model url

* remove 'FASTDEPLOY_DECL' macro

Signed-off-by: ChaoII <849453582@qq.com>

* fix build python packages about pptracking on win32

Signed-off-by: ChaoII <849453582@qq.com>

* update comment

Signed-off-by: ChaoII <849453582@qq.com>

* add pptracking model explain

Signed-off-by: ChaoII <849453582@qq.com>

Signed-off-by: ChaoII <849453582@qq.com>
Co-authored-by: Jason <jiangjiajun@baidu.com>
This commit is contained in:
ChaoII
2022-10-28 20:46:00 +08:00
committed by GitHub
parent d794810f10
commit d70b6c99df
10 changed files with 157 additions and 131 deletions

View File

@@ -24,6 +24,14 @@ class PPTracking(FastDeployModel):
config_file,
runtime_option=None,
model_format=ModelFormat.PADDLE):
"""Load a PPTracking model exported by PaddleDetection.
:param model_file: (str)Path of model file, e.g pptracking/model.pdmodel
:param params_file: (str)Path of parameters file, e.g ppyoloe/model.pdiparams
:param config_file: (str)Path of configuration file for deployment, e.g ppyoloe/infer_cfg.yml
:param runtime_option: (fastdeploy.RuntimeOption)RuntimeOption for inference this model, if it's None, will use the default backend on CPU
:param model_format: (fastdeploy.ModelForamt)Model format of the loaded model
"""
super(PPTracking, self).__init__(runtime_option)
assert model_format == ModelFormat.PADDLE, "PPTracking model only support model format of ModelFormat.Paddle now."
@@ -33,5 +41,10 @@ class PPTracking(FastDeployModel):
assert self.initialized, "PPTracking model initialize failed."
def predict(self, input_image):
"""Predict the MOT result for an input image
:param input_image: (numpy.ndarray)The input image data, 3-D array with layout HWC, BGR format
:return: MOTResult
"""
assert input_image is not None, "The input image data is None."
return self._model.predict(input_image)