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

Enable IC background blur feature #564

Open
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

zhibo1-wang
Copy link

Create background blur post-processor for CameraVideoCapturer.

talk/owt/sdk/ic/BUILD.gn Outdated Show resolved Hide resolved
talk/owt/BUILD.gn Outdated Show resolved Hide resolved
talk/owt/BUILD.gn Outdated Show resolved Hide resolved
talk/owt/BUILD.gn Outdated Show resolved Hide resolved
talk/owt/sdk/ic/BUILD.gn Outdated Show resolved Hide resolved
talk/owt/sdk/ic/BUILD.gn Outdated Show resolved Hide resolved
bool BackgroundBlur::SetParameter(const std::string& key,
const std::string& value) {
if (key == "model_path") {
return model.LoadModel(value);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this a blocking call? Do you expect caller do this on a task queue?

Copy link
Author

Choose a reason for hiding this comment

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

It is blocking. When the function returns, the model should be ready for inference. The caller do the task queue / threading if they don't want to wait.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Need to clearly call this out in your API doc


cv::Mat predict(const cv::Mat& frame);
void predictAsync(const cv::Mat& frame);
cv::Mat waitForFinished();
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's the point of public this?

Copy link
Author

Choose a reason for hiding this comment

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

Sync/Async prediction are options provided by openvino. I just pass on these to provides potential caller with free usage.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't agree. If you want to provide async API, your API should include a callback param instead of asking developer to call another API just to wait for the result.

Copy link
Author

Choose a reason for hiding this comment

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

The waitForFinished function behave like await Promise, I believe this is another async call design except for callbacks. Anyway, we may remove the async api since the postprocessors use a sequential processing.

Copy link
Collaborator

@taste1981 taste1981 left a comment

Choose a reason for hiding this comment

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

Please also add new build descriptions of building with --openvino_root in README.md

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.

None yet

2 participants