Skip to content

Conversation

aljazkonec1
Copy link

Purpose

This PR is the first port of depthai-nodes ImgDetectionsExtended (link) and Keypoints (link) messages into the core library.
An example of using new ImgDetections + Keypoints can be found on this branch.

Specification

  • New feature dai::RotatedRect: Added two new utility functions to dai::RotatedRect, used for converting the stored rectangle to the other popular YOLO and VOC bounding box representation types.
  • New Keypoint common data structure: It is defined as a collection of Point3f coordinates, float confidence, int label and string labelName.
  • New KeypointsList common data structure: It stores a vector of dai::Keypoint objects, a vector of possible edge idices between Keypoints and provides utility functions for faster and easier conversions between dai::Keypoints types and other common types like dai::Point3f / dai::Point2f.
  • New Keypoints message type: serialization of dai::KeypointsList.
  • Extended dai::ImgDetection :
    • Add dai::RotatedRect as a field
    • Add dai::KeypointsList as field
    • Add utility functions and getters for new fields and easier access to relevant data
    • If using getters / setters, the legacy xmin, ymin, xmax, ymax format and new dai::RotatedRect fields are synced and current implementations of ImgDetections still work.
  • Pybindings for all new additions.

Dependencies & Potential Impact

Potential risks include already built pipelines that rely on dai::ImgDetections.

Testing & Validation

Tested on this branch. Two annotations are seen. detections topic sends dai::ImgDetections directly to visualizer and visualizer handles annotating it. modified_annotations is a modified version where rotation and keypoints are also taken into account when visualizing a bounding box. Tested only on RVC4.

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.

1 participant