Skip to content

Conversation

@james-kwong
Copy link

@james-kwong james-kwong commented Sep 29, 2025

Description

Implemented YoloV11 Oriented Bounding Box detection so recognized bounding boxes also include an angle theta describing their rotation. Helpful when the overall axis aligned BB is too inaccurate or big. Only supports RKNN JNI for now. (Corresponding PR: PhotonVision/rknn_jni#28)

Photonvision OBB Demo

Meta

Merge checklist:

  • Pull Request title is short, imperative summary of proposed changes
  • The description documents the what and why
  • If this PR changes behavior or adds a feature, user documentation is updated
  • If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly
  • If this PR touches configuration, this is backwards compatible with settings back to v2025.3.2

@james-kwong james-kwong requested a review from a team as a code owner September 29, 2025 19:01
@github-actions github-actions bot added documentation Anything relating to https://docs.photonvision.org frontend Having to do with PhotonClient and its related items backend Things relating to photon-core and photon-server labels Sep 29, 2025
@samfreund

This comment was marked as resolved.

@samfreund
Copy link
Member

Also, lint please 😄

:items="
useSettingsStore().general.supportedBackends?.includes('RKNN')
? ['YOLOv5', 'YOLOv8', 'YOLO11']
? ['YOLOv5', 'YOLOv8', 'YOLO11', 'YOLO11OBB']
Copy link
Member

Choose a reason for hiding this comment

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

Let's try and be consistent with how we use the v in yolov11. I'd prefer to do it the same across everywhere, and we currently have YOLOv11.

Copy link
Author

Choose a reason for hiding this comment

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

Oh yeah I noticed that too!
For the other places I did YoloV11OBB, but for that specific place I did "YOLO11OBB" because the "YOLO11" behind it didn't have the "V"

Should we change both?

Copy link
Member

Choose a reason for hiding this comment

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

For the other places using the v works fine, our goal is to keep it consistent. According to the branding standards, it should be yolo11 but that's what they get for changing it.

To whit, YOLOV11OBB please!

Copy link
Author

Choose a reason for hiding this comment

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

I agree we should keep it consistent, but I was referring to:

['YOLOv5', 'YOLOv8', 'YOLO11', 'YOLO11OBB']

We should probably change Yolo11 to YoloV11 there as well

@samfreund

This comment was marked as resolved.

Copy link
Member

@samfreund samfreund left a comment

Choose a reason for hiding this comment

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

Blocking comment, bump the rknn version 😄

@samfreund samfreund force-pushed the yolo11obb branch 2 times, most recently from d1c428e to 157a615 Compare October 31, 2025 05:04
@samfreund

This comment was marked as resolved.

@james-kwong

This comment was marked as resolved.

@samfreund

This comment was marked as resolved.

@james-kwong

This comment was marked as resolved.

@samfreund

This comment was marked as resolved.

Copy link
Member

@samfreund samfreund left a comment

Choose a reason for hiding this comment

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

I got it working! Just some cleanup stuff now.

  • I'd like to see only the bounding box for the obb displayed in the processed stream, I don't think we need the non-rotated one as well.

  • I saw you added the note about YOLO11-OBB being supported to the opi docs, I would love if you could write a little explanation of how to use this as well for the docs.

@samfreund
Copy link
Member

Also, if you're willing to do a writeup on the steps you took to convert the OBB model and how they differ from the typical detection model, that would be really helpful.

@james-kwong
Copy link
Author

Wait by the way, thank you for all your help in fixing some of the formatting and stuff up.

I'm currently at university so I have to wait until I get back home before I can access the Orange PI. I noticed how it draws both the axis-aligned BB and OBB, but I didn't add the axis aligned one. It seems how Photonvision works is whenever its drawing a contour, it overlays the minimum rectangle over it as well.

Do you have any ideas on how I could fix that ?

@samfreund
Copy link
Member

Wait by the way, thank you for all your help in fixing some of the formatting and stuff up.

In the future, you can do it yourself!

I'm currently at university so I have to wait until I get back home before I can access the Orange PI. I noticed how it draws both the axis-aligned BB and OBB, but I didn't add the axis aligned one. It seems how Photonvision works is whenever its drawing a contour, it overlays the minimum rectangle over it as well.

Do you have any ideas on how I could fix that ?

Drawing 2d targets is done here, I would guess that's where you would fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Things relating to photon-core and photon-server documentation Anything relating to https://docs.photonvision.org frontend Having to do with PhotonClient and its related items

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants