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

V3 Replay node in NN build methods #1214

Open
wants to merge 13 commits into
base: v3_develop
Choose a base branch
from

Conversation

Serafadam
Copy link
Contributor

Adds new overloads for build methods in NN, Detections and SpatialDetection nodes. Also some cosmetic changes

@Serafadam Serafadam marked this pull request as draft January 20, 2025 10:41
@Serafadam Serafadam marked this pull request as ready for review January 20, 2025 13:28
@Serafadam Serafadam requested a review from moratom January 20, 2025 13:34
@moratom moratom requested a review from asahtik January 29, 2025 16:14
Copy link
Collaborator

@moratom moratom left a comment

Choose a reason for hiding this comment

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

LGTM - let's just add a few basic tests before merging

@@ -85,6 +85,24 @@ void bind_neuralnetwork(pybind11::module& m, void* pCallstack) {
py::arg("model"),
py::arg("fps") = 30.0f,
DOC(dai, node, NeuralNetwork, build))
.def(
"build",
[](NeuralNetwork& self, const std::shared_ptr<ReplayVideo>& input, const dai::NNArchive& nnArchive, float fps) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Use py::overload_cast<const std::shared_ptr<ReplayVideo>&, const dai::NNArchive&, float>(&NeuralNetwork::build) instead of lambda for consistency

Copy link
Contributor

@asahtik asahtik left a comment

Choose a reason for hiding this comment

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

Maybe add an example (or modify an existing one) that uses the Replay node. Otherwise LGTM.

Copy link
Collaborator

@moratom moratom Feb 4, 2025

Choose a reason for hiding this comment

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

The example workss cross platform, so it can be moved to "DetectionNetwork" folder IMO

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And for CPP to HostNodes?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can make the same one in DetectionNetwork (note I renamed the example a bit to be consistent with the other ones in the folder and added it to tests).

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.

3 participants