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

CVS-160560 nanobindings for keypoint detection and segmentation #258

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

mgumowsk
Copy link
Collaborator

@mgumowsk mgumowsk commented Jan 22, 2025

What does this PR do?

AnomalyDetection, Classification and KeypointDetection can be replaced with python version.
Segmentation and InstanceSegmentation still need work to match python format results.

Fixes # (issue)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

@mgumowsk mgumowsk requested a review from sovrasov January 23, 2025 08:05
@github-actions github-actions bot added the cpp C++ related changes label Jan 27, 2025
static_cast<size_t>(r.anomaly_map.channels())});
},
nb::rv_policy::reference_internal)
.def_ro("pred_boxes", &AnomalyResult::pred_boxes)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is cv::Rect correctly wrapped?

nb::class_<InstanceSegmentationResult, ResultBase>(m, "InstanceSegmentationResult")
.def(nb::init<int64_t, std::shared_ptr<MetaData>>(), nb::arg("frameId") = -1, nb::arg("metaData") = nullptr)
.def_prop_ro(
"feature_vector",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Iseg result also contains a saliency map as a vector of cv::Mat. Perhaps, it's not that easy to expose but there is a chance a vector of nb::ndarray<uint8_t... would work here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cpp C++ related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants