[Model] add tracking trail on vis_mot (#461)

* 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>

* add tracking trail on vis_mot

* add tracking trail

* modify code for  some suggestion

* remove unused import

* fix import bug

Signed-off-by: ChaoII <849453582@qq.com>
Co-authored-by: Jason <jiangjiajun@baidu.com>
This commit is contained in:
ChaoII
2022-11-03 09:57:07 +08:00
committed by GitHub
parent 328212f270
commit 22d60fdadf
16 changed files with 208 additions and 116 deletions

View File

@@ -12,5 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import absolute_import
from ... import c_lib_wrap as C
from .pptracking import PPTracking
try:
TrailRecorder = C.vision.tracking.TrailRecorder
except:
pass

View File

@@ -48,3 +48,18 @@ class PPTracking(FastDeployModel):
"""
assert input_image is not None, "The input image data is None."
return self._model.predict(input_image)
def bind_recorder(self, val):
""" Binding tracking trail
:param val: (TrailRecorder) trail recorder, which is contained object's id and center point sequence
:return: None
"""
self._model.bind_recorder(val)
def unbind_recorder(self):
""" cancel binding of tracking trail
:return:
"""
self._model.unbind_recorder()

View File

@@ -15,6 +15,7 @@
from __future__ import absolute_import
import logging
from ... import c_lib_wrap as C
import cv2
def vis_detection(im_data,
@@ -106,5 +107,5 @@ def vis_ppocr(im_data, det_result):
return C.vision.vis_ppocr(im_data, det_result)
def vis_mot(im_data, mot_result, fps, frame_id):
return C.vision.vis_mot(im_data, mot_result, fps, frame_id)
def vis_mot(im_data, mot_result, score_threshold=0.0, records=None):
return C.vision.vis_mot(im_data, mot_result, score_threshold, records)