-
Notifications
You must be signed in to change notification settings - Fork 690
[Model] add tracking trail on vis_mot #461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
79 commits
Select commit
Hold shift + click to select a range
92eb0ab
add override mark
ChaoII c34b67a
Merge branch 'develop' into develop
jiangjiajun 5ac31e7
Merge branch 'develop' into develop
jiangjiajun dd64a46
Merge branch 'develop' of github.com:PaddlePaddle/FastDeploy into dev…
ChaoII ff5ee8f
Merge branch 'develop' of github.com:ChaoII/FastDeploy into develop
ChaoII 38ce0cf
Merge branch 'develop' of github.com:PaddlePaddle/FastDeploy into dev…
ChaoII cff22b8
delete some
ChaoII d6215ad
Merge branch 'develop' of github.com:PaddlePaddle/FastDeploy into dev…
ChaoII db3c81e
recovery
ChaoII 1d64e35
Merge branch 'develop' of github.com:PaddlePaddle/FastDeploy into dev…
ChaoII 0251b22
Merge branch 'develop' of github.com:PaddlePaddle/FastDeploy into dev…
ChaoII 2910b3f
recovery
ChaoII f2f95ad
Merge branch 'develop' of github.com:PaddlePaddle/FastDeploy into dev…
ChaoII c54af78
add tracking
ChaoII fff9af0
Merge branch 'develop' of github.com:PaddlePaddle/FastDeploy into dev…
ChaoII f8f6998
add tracking py_bind and example
ChaoII 5b845b4
Merge branch 'develop' of github.com:PaddlePaddle/FastDeploy into dev…
ChaoII 9f79627
add pptracking
ChaoII 6b9a5c4
add pptracking
ChaoII 1d134b0
Merge branch 'develop' of github.com:PaddlePaddle/FastDeploy into dev…
ChaoII d800402
iomanip head file
ChaoII d7b534e
Merge branch 'develop' of github.com:PaddlePaddle/FastDeploy into dev…
ChaoII c92e5d5
add opencv_video lib
ChaoII a0b7f67
add python libs package
ChaoII cef6dd5
Merge branch 'develop' into develop
jiangjiajun a4dedb8
complete comments
ChaoII d80be12
Merge branch 'develop' of github.com:PaddlePaddle/FastDeploy into dev…
ChaoII 3da3d36
Merge branch 'develop' of github.com:ChaoII/FastDeploy into develop
ChaoII 00fa281
Merge branch 'develop' into develop
jiangjiajun 1902c3c
Merge branch 'develop' into develop
jiangjiajun e8c6f0b
Merge branch 'develop' into develop
jiangjiajun 9552329
add jdeTracker_ member variable
ChaoII 33ab3e6
Merge branch 'develop' of github.com:ChaoII/FastDeploy into develop
ChaoII 0a18021
add 'FASTDEPLOY_DECL' macro
ChaoII e86411c
remove kwargs params
ChaoII c80dbd9
Merge branch 'develop' into develop
jiangjiajun 6eb6a7a
Merge branch 'develop' into develop
jiangjiajun cb424cd
Merge branch 'develop' into develop
jiangjiajun c4bf265
Merge branch 'develop' into develop
jiangjiajun 7dbd62a
[Doc]add pptracking doc
ChaoII 5b93f1d
Merge branch 'develop' of github.com:ChaoII/FastDeploy into develop
ChaoII 4e8db89
Merge branch 'develop' into develop
jiangjiajun 9a3f1a4
[Doc]update pptracking docs
ChaoII 5eaf19e
Merge branch 'develop' of github.com:ChaoII/FastDeploy into develop
ChaoII df0d551
delete 'ENABLE_PADDLE_FRONTEND' switch
ChaoII 23f329d
add pptracking unit test
ChaoII a5f5544
update pptracking unit test
ChaoII 20edce2
modify test video file path and remove trt test
ChaoII 09d9a7f
update unit test model url
ChaoII 2e09944
Merge branch 'develop' into develop
jiangjiajun b23bb44
remove 'FASTDEPLOY_DECL' macro
ChaoII 0734229
Merge branch 'develop' of github.com:ChaoII/FastDeploy into develop
ChaoII edcdab6
Merge branch 'develop' into develop
jiangjiajun dd99333
fix build python packages about pptracking on win32
ChaoII faaa94e
Merge branch 'develop' of github.com:ChaoII/FastDeploy into develop
ChaoII bef7cc9
Merge branch 'develop' into develop
jiangjiajun 25c1576
Merge branch 'develop' into develop
jiangjiajun 778de0d
Merge branch 'develop' of github.com:PaddlePaddle/FastDeploy into dev…
ChaoII e1b5cf4
update comment
ChaoII 7001bee
Merge branch 'develop' into pptracking
jiangjiajun 60ca6d4
add pptracking model explain
ChaoII 4b4705b
Merge branch 'develop' of github.com:PaddlePaddle/FastDeploy into ppt…
ChaoII 470134f
Merge branch 'pptracking' of github.com:ChaoII/FastDeploy into pptrac…
ChaoII a2fe764
Merge branch 'develop' into pptracking
jiangjiajun 8025d28
Merge branch 'develop' into pptracking
jiangjiajun aa23471
add tracking trail on vis_mot
ChaoII 87c00ce
fix conflicts
ChaoII d02baa3
Merge branch 'develop' into pptracking
jiangjiajun ba7a848
Merge branch 'develop' into pptracking
jiangjiajun 4fd8144
Merge branch 'develop' into pptracking
jiangjiajun cbd8ce1
add tracking trail
ChaoII 4f5400f
Merge branch 'develop' of github.com:PaddlePaddle/FastDeploy into ppt…
ChaoII 10772b1
Merge branch 'develop' into pptracking
jiangjiajun 08d3bdc
Merge branch 'develop' of github.com:PaddlePaddle/FastDeploy into ppt…
ChaoII 08123fb
Merge branch 'pptracking' of github.com:ChaoII/FastDeploy into pptrac…
ChaoII 62e5352
modify code for some suggestion
ChaoII 875fb04
fix conflict
ChaoII 893036e
remove unused import
ChaoII 52c8063
fix import bug
ChaoII File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,6 @@ | |
|
|
||
| import fastdeploy as fd | ||
| import cv2 | ||
| import time | ||
| import os | ||
|
|
||
|
|
||
|
|
@@ -60,20 +59,26 @@ def build_option(args): | |
| model = fd.vision.tracking.PPTracking( | ||
| model_file, params_file, config_file, runtime_option=runtime_option) | ||
|
|
||
| # 初始化轨迹记录器 | ||
| recorder = fd.vision.tracking.TrailRecorder() | ||
| # 绑定记录器 注意:每次预测时,往trail_recorder里面插入数据,随着预测次数的增加,内存会不断地增长, | ||
| # 可以通过unbind_recorder()方法来解除绑定 | ||
| model.bind_recorder(recorder) | ||
| # 预测图片分割结果 | ||
| cap = cv2.VideoCapture(args.video) | ||
| frame_id = 0 | ||
| # count = 0 | ||
| while True: | ||
| start_time = time.time() | ||
| frame_id = frame_id+1 | ||
| _, frame = cap.read() | ||
| if frame is None: | ||
| break | ||
| result = model.predict(frame) | ||
| end_time = time.time() | ||
| fps = 1.0/(end_time-start_time) | ||
| img = fd.vision.vis_mot(frame, result, fps, frame_id) | ||
| # count += 1 | ||
| # if count == 10: | ||
| # model.unbind_recorder() | ||
| img = fd.vision.vis_mot(frame, result, 0.0, recorder) | ||
| cv2.imshow("video", img) | ||
| cv2.waitKey(30) | ||
| if cv2.waitKey(30) == ord("q"): | ||
| break | ||
| model.unbind_recorder() | ||
| cap.release() | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 也显式调用一行model.unbind_trail_recorder()
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 添加显示调用 |
||
| cv2.destroyAllWindows() | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在for循环后,显式调用一行
model.UnBindRecorder();便于用户直接了解There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
添加显示调用