Skip to content
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

[apriltag_demo] improving perf testing #218

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jrepp
Copy link
Contributor

@jrepp jrepp commented Mar 1, 2022

When running multiple iterations we want to focus the profiling time on the core algorithm. This change separates image loading from detection. Each iteration is the array of loaded images. A summary is printed at the end.

Improvements to running with -i N -q which allows iterations
of 1000-10000 to be easily tested in a console on modest hardware and prevents measuring the print time (around .8ms on my machine)

An additional cleanup to the called functions for profiling to place them in ms for parity with the existing reporting.

./apriltag_demo -i 1000 -q nori-5-640.jpg
loaded image: nori-5-640.jpg 480x640
iter 1 / 1000
iter 101 / 1000
iter 201 / 1000
iter 301 / 1000
iter 401 / 1000
iter 501 / 1000
iter 601 / 1000
iter 701 / 1000
iter 801 / 1000
iter 901 / 1000
Summary
hamm  1000     0     0     0     0     0     0     0     0     0
time 12700.00ms avg_time 12.70ms quads 18000 avg_quads    18 detections  1000 avg_detections     1

When running multiple iterations we want to focus the profiling time on
the core algorithm. This change separates image loading from detection.
Each iteration is over each image. A summary is printed at the end. Of
note is the improvement to running with -i N -q which allows iterations
of 1000-10000 to be easily in a console on modest hardware.

An additional cleanup to the called functions for profiling to include
units for clarity.

```
./apriltag_demo -i 1000 -q nori-5-640.jpg
loaded image: nori-5-640.jpg 480x640
iter 1 / 1000
iter 101 / 1000
iter 201 / 1000
iter 301 / 1000
iter 401 / 1000
iter 501 / 1000
iter 601 / 1000
iter 701 / 1000
iter 801 / 1000
iter 901 / 1000
Summary
hamm  1000     0     0     0     0     0     0     0     0     0
time 12700.00ms avg_time 12.70ms quads 18000 avg_quads    18 detections  1000 avg_detections     1
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant