Skip to content

Add streaming queue capacity option choice to MTCNN G-API sample#20155

Merged
alalek merged 3 commits intoopencv:masterfrom
dbudniko:dbudniko/G-API_mtcnn_demo_queue_option
May 27, 2021
Merged

Add streaming queue capacity option choice to MTCNN G-API sample#20155
alalek merged 3 commits intoopencv:masterfrom
dbudniko:dbudniko/G-API_mtcnn_demo_queue_option

Conversation

@dbudniko
Copy link
Copy Markdown

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

force_builders=Custom,Custom Win,Custom Mac
build_gapi_standalone:Linux x64=ade-0.1.1f
build_gapi_standalone:Win64=ade-0.1.1f
build_gapi_standalone:Mac=ade-0.1.1f
build_gapi_standalone:Linux x64 Debug=ade-0.1.1f

build_image:Custom=centos:7
buildworker:Custom=linux-1
build_gapi_standalone:Custom=ade-0.1.1f

Xbuild_image:Custom=ubuntu-openvino-2020.3.0:16.04
build_image:Custom Win=openvino-2021.3.0
build_image:Custom Mac=openvino-2021.3.0

test_modules:Custom=gapi,python2,python3,java
test_modules:Custom Win=gapi,python2,python3,java
test_modules:Custom Mac=gapi,python2,python3,java

buildworker:Custom=linux-1
// disabled due high memory usage: test_opencl:Custom=ON
test_opencl:Custom=OFF
test_bigdata:Custom=1
test_filter:Custom=*

"{ thrr | 0.7 | MTCNN R confidence threshold}"
"{ thro | 0.7 | MTCNN O confidence threshold}"
"{ half_scale | false | MTCNN P use half scale pyramid}"
"{ queue_capacity | 1 | Streaming executor queue capacity. Calculated automaticaly if 0}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

M B -1 will be value for automatic calculation and it will be asserted for zero that queue capacity != 0.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

queue capacity = 0 case is documented in the sample help string. The sample will never try to provide compile args with zero queue depth by design.

const auto target_dev_o = cmd.get<std::string>("mtcnnod");
const auto conf_thresh_o = cmd.get<float>("thro");
const auto use_half_scale = cmd.get<bool>("half_scale");
const auto streaming_queue_capacity = cmd.get<unsigned int>("queue_capacity");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

size_t

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

MAC build broken

Copy link
Copy Markdown
Contributor

@TolyaTalamanov TolyaTalamanov left a comment

Choose a reason for hiding this comment

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

I would exclude it from options and set to 1. But let's to discuss locally.

@dbudniko
Copy link
Copy Markdown
Author

@alalek could you please merge this update for MTCNN sample?

@alalek alalek merged commit cf96a9f into opencv:master May 27, 2021
@alalek alalek mentioned this pull request Jun 4, 2021
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
…mo_queue_option

Add streaming queue capacity option choice to MTCNN G-API sample

* Add streaming queue capacity option

* trying to fix mac build

* rename face detection sample
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