Skip to content

Commit d5b6d7e

Browse files
committed
add tracking time
Signed-off-by: wep21 <daisuke.nishimatsu1021@gmail.com>
1 parent 508671a commit d5b6d7e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

examples/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ rust_binary(
1919
],
2020
deps = [
2121
"//detector:rtmo",
22-
"//tracker:tracker",
22+
"//tracker",
23+
"@crates//:ab_glyph",
2324
"@crates//:image",
2425
"@crates//:imageproc",
2526
"@crates//:minifb",
26-
"@crates//:ab_glyph",
2727
"@crates//:video-rs",
2828
"@cxx.rs//:cxx",
2929
],

examples/src/video_demo.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
5757
let inference_time = start_time.elapsed();
5858
println!("Inference status: {}", status);
5959
println!("Inference time: {:?}", inference_time);
60+
let track_start_time = std::time::Instant::now();
6061
let pose_results_with_track_id: Vec<PoseResultWithTrackID> = pose_results
6162
.iter()
6263
.map(|pose_result| PoseResultWithTrackID {
@@ -71,6 +72,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
7172
eprintln!("Error updating tracker: {}", e);
7273
vec![]
7374
});
75+
let track_time = track_start_time.elapsed();
76+
println!("Tracking time: {:?}", track_time);
7477

7578
// Draw inference results on the frame
7679
let mut annotated_image = ImageBuffer::from_fn(width as u32, height as u32, |x, y| {

0 commit comments

Comments
 (0)