Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants