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

barcode perf tests #3482

Merged
merged 7 commits into from
May 24, 2023
Merged

Conversation

MaximMilashchenko
Copy link
Contributor

Added four perf case for barcode. Detection and decoding time check.

modules/barcode/test/perf_barcode Outdated Show resolved Hide resolved
@opencv-alalek
Copy link

Preliminary results on i7-12700K with 1/2/4/8 threads (no fixed frequency, with turbo boost enabled):

SIMD:

Name of Test 1th 2th 4th 8th
decode::Perf_Barcode_multi::"4_barcodes.jpg" 2.500 2.177 2.033 1.989
decode::Perf_Barcode_single::"book.jpg" 0.415 0.389 0.390 0.376
decode::Perf_Barcode_single::"bottle_1.jpg" 0.266 0.221 0.198 0.221
decode::Perf_Barcode_single::"bottle_2.jpg" 0.712 0.699 0.732 0.727
detect::Perf_Barcode_multi::"4_barcodes.jpg" 7.527 5.939 5.486 4.888
detect::Perf_Barcode_single::"book.jpg" 1.679 1.660 1.670 1.685
detect::Perf_Barcode_single::"bottle_1.jpg" 3.243 2.687 2.447 2.326
detect::Perf_Barcode_single::"bottle_2.jpg" 1.974 1.985 1.975 2.045

noSIMD / noIPP (-DCV_DISABLE_OPTIMIZATION=ON):

Name of Test 1th 2th 4th 8th
decode::Perf_Barcode_multi::"4_barcodes.jpg" 4.615 3.477 3.162 3.060
decode::Perf_Barcode_single::"book.jpg" 0.650 0.584 0.586 0.579
decode::Perf_Barcode_single::"bottle_1.jpg" 0.536 0.406 0.341 0.295
decode::Perf_Barcode_single::"bottle_2.jpg" 0.975 0.881 0.872 0.871
detect::Perf_Barcode_multi::"4_barcodes.jpg" 9.504 7.636 6.563 6.274
detect::Perf_Barcode_single::"book.jpg" 2.580 2.500 2.493 2.570
detect::Perf_Barcode_single::"bottle_1.jpg" 4.240 3.750 3.507 3.270
detect::Perf_Barcode_single::"bottle_2.jpg" 2.964 2.896 2.839 2.852

1 thread, "Generic C++" vs optimized code:

Name of Test generic optimized x-factor
decode::Perf_Barcode_multi::"4_barcodes.jpg" 4.615 2.500 1.85
decode::Perf_Barcode_single::"book.jpg" 0.650 0.415 1.57
decode::Perf_Barcode_single::"bottle_1.jpg" 0.536 0.266 2.02
decode::Perf_Barcode_single::"bottle_2.jpg" 0.975 0.712 1.37
detect::Perf_Barcode_multi::"4_barcodes.jpg" 9.504 7.527 1.26
detect::Perf_Barcode_single::"book.jpg" 2.580 1.679 1.54
detect::Perf_Barcode_single::"bottle_1.jpg" 4.240 3.243 1.31
detect::Perf_Barcode_single::"bottle_2.jpg" 2.964 1.974 1.50

Copy link

@opencv-alalek opencv-alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is removed modules/barcode/test/test_barcode.cpp?

modules/barcode/perf/perf_barcode.cpp Show resolved Hide resolved
@MaximMilashchenko
Copy link
Contributor Author

Why is removed modules/barcode/test/test_barcode.cpp?

it is my fault, i'll correct it

@opencv-alalek
Copy link

@SinM9 please review this PR.

modules/barcode/perf/perf_barcode.cpp Outdated Show resolved Hide resolved
modules/barcode/perf/perf_barcode.cpp Outdated Show resolved Hide resolved
modules/barcode/perf/perf_barcode.cpp Outdated Show resolved Hide resolved
modules/barcode/perf/perf_barcode.cpp Outdated Show resolved Hide resolved
modules/barcode/perf/perf_barcode.cpp Outdated Show resolved Hide resolved
Copy link

@opencv-alalek opencv-alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link

@opencv-alalek opencv-alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash commits into one before merge.

modules/barcode/perf/perf_precomp.hpp Show resolved Hide resolved
modules/wechat_qrcode/test/test_qrcode.cpp Outdated Show resolved Hide resolved
modules/barcode/test/perf_barcode Outdated Show resolved Hide resolved
@mshabunin mshabunin merged commit 82cb030 into opencv:4.x May 24, 2023
@asmorkalov asmorkalov mentioned this pull request May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants