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

Examples compatible with parsers v2. #117

Merged
merged 7 commits into from
Oct 25, 2024
Merged

Examples compatible with parsers v2. #117

merged 7 commits into from
Oct 25, 2024

Conversation

kkeroo
Copy link
Collaborator

@kkeroo kkeroo commented Oct 25, 2024

This PR fixes examples so they work with parsers v2. Almost all models from ZOO do work in examples except multi-head models (Hand landmarker, Objectron, Vehicle attributes, Age-Gender).

Additionally, some small bugs were fixed mainly because we defined too strict checks in messages so some edge cases fail:

  • Fix score check: if scores are empty array, we can not check the datatype. Fixed in ced692c.
  • Correct mask init: We instantiated mask as np.array instead of SegmentationMask. Fixed in 9c9a90c.
  • Sometimes values do not meet criteria (between 0 and 1) so clipping is done in parsers. Maybe we could just clip the values inside the message itself? Fixed in 611f8cc.
  • Examples are fixed in 63f879c.

If the model has more than one head, error is raised.

@github-actions github-actions bot added messages Changes affecting ml.messages parsers Changes affecting ml.parsers examples Changes affecting examples. fix Fixing a bug release New version release labels Oct 25, 2024
Copy link

github-actions bot commented Oct 25, 2024

Test Results

125 tests   125 ✅  1s ⏱️
  1 suites    0 💤
  1 files      0 ❌

Results for commit 40a4d18.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Oct 25, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
3729 1248 33% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
depthai_nodes/init.py 100% 🟢
depthai_nodes/ml/messages/classification.py 84% 🟢
depthai_nodes/ml/messages/img_detections.py 74% 🟢
depthai_nodes/ml/parsers/keypoints.py 22% 🟢
depthai_nodes/ml/parsers/mediapipe_palm_detection.py 15% 🟢
depthai_nodes/ml/parsers/scrfd.py 19% 🟢
depthai_nodes/ml/parsers/utils/ppdet.py 10% 🟢
depthai_nodes/ml/parsers/yolo.py 19% 🟢
depthai_nodes/ml/parsers/yunet.py 15% 🟢
TOTAL 40% 🟢

updated for commit: 40a4d18 by action🐍

@kkeroo kkeroo marked this pull request as ready for review October 25, 2024 09:42
@kkeroo kkeroo changed the title Fix/examples Examples compatible with parsers v2. Oct 25, 2024
Copy link
Collaborator

@jkbmrz jkbmrz left a comment

Choose a reason for hiding this comment

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

LGTM

@klemen1999 klemen1999 removed the release New version release label Oct 25, 2024
@klemen1999 klemen1999 merged commit 92a4d92 into main Oct 25, 2024
@klemen1999 klemen1999 deleted the fix/examples branch October 25, 2024 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DevOps examples Changes affecting examples. fix Fixing a bug messages Changes affecting ml.messages parsers Changes affecting ml.parsers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants