Skip to content

Add annotation tool for valve handle orientation #12

@kluge7

Description

@kluge7

Task:

  • Build a small tool to extend the current dataset with handle orientation annotations.
  • Current label format (YOLO default, from Roboflow):
<class_id> <x_center> <y_center> <width> <height>

Example:

0 0.512 0.478 0.220 0.330
  • Proposed expanded format (with orientation θ):
<class_id> <x_center> <y_center> <width> <height> <theta>

Example:

0 0.512 0.478 0.220 0.330 1.5708
  • Required functionality::
    • Load image with its bounding box (Roboflow export).
    • User draws a line along the valve handle.
    • Tool calculates orientation angle θ (in radians, CCW).
    • Save angle alongside bbox in the updated label file.
  • Keep it lightweight (Python + OpenCV or Matplotlib GUI is fine).

Angle convention (must be consistent)

  • 0° / 0 rad -> Valve handle pointing upwards (Shut position).
  • 90° / π/2 rad -> Valve handle pointing left (Open position).
  • Rotation is counterclockwise (CCW) from Shut -> Open.

For example, in the image below the handle is vertical: θ = 0 rad (0°)
Image of valve

Deliverables:

  • Simple GUI tool or script for manual angle annotation.
  • Updated dataset format: bbox + θ.
  • Documentation:
    • How to use the tool.
    • Example of annotated label files before/after.

References:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions