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

E2E Tests: ImageManip node and better checks. #140

Merged
merged 2 commits into from
Nov 27, 2024
Merged

Conversation

kkeroo
Copy link
Collaborator

@kkeroo kkeroo commented Nov 26, 2024

Checks added in E2E tests:

  • Catches the error when downloading the model from ZOO
  • Catches the error when loading the NN archive
  • Checks if the model has more than one output

Every catch has a print(e) so we know whats wrong when running it with manual.py

This PR also adds ImageManipV2 node to the pipeline if the model input size is not divisible by 2 (e.g. 513x513 in deeplab) or the input size is too small. We request 2 or 4 times bigger input size from the camera and then resize it down to model's input size with ImageManipV2 node.

This feature now runs more models in E2E testing.

@codecov-commenter
Copy link

codecov-commenter commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 33.04%. Comparing base (37a2d92) to head (0849253).
Report is 13 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #140      +/-   ##
==========================================
- Coverage   33.40%   33.04%   -0.36%     
==========================================
  Files          68       69       +1     
  Lines        3739     3746       +7     
==========================================
- Hits         1249     1238      -11     
- Misses       2490     2508      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kkeroo kkeroo requested a review from klemen1999 November 26, 2024 17:20
@kkeroo
Copy link
Collaborator Author

kkeroo commented Nov 26, 2024

@klemen1999 I am re-requesting your review since I updated the PR with the addition of ImageManip to handle small input sizes.

@kkeroo kkeroo changed the title Better checks to E2E testing. E2E Tests: ImageManip node and better checks. Nov 26, 2024
Copy link
Collaborator

@klemen1999 klemen1999 left a comment

Choose a reason for hiding this comment

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

LGTM, just left one suggestion

dai.ImgFrame.Type.BGR888i
if device.getPlatform().name == "RVC4"
else dai.ImgFrame.Type.BGR888p
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we set the type based on ˙dai_type˙ field in the NNArchive if present otherwise use this as default?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will be addressed in the future because dai has not yet implemented it.

@kkeroo kkeroo merged commit 3c1fc50 into main Nov 27, 2024
10 checks passed
@kkeroo kkeroo deleted the tests/e2e-checks branch November 27, 2024 11:49
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.

4 participants