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

Add YOLOX object detection #24

Merged
merged 22 commits into from
Apr 25, 2024
Merged

Add YOLOX object detection #24

merged 22 commits into from
Apr 25, 2024

Conversation

laggui
Copy link
Member

@laggui laggui commented Mar 8, 2024

Closes issue #21

This PR adds a Burn implementation for the YOLOX object detection models. Implementation and weights are based on the official implementation.

TODO

  • YOLOX-Nano support
  • NMS tensor implementation
    • Requires argsort
    • We should compare timings w/ the current naive implementation to see if it is worth it since we don't have the nms kernel to perform the computations even more efficiently

I scratched the NMS tensor implementation. Not required at this time.

Copy link
Member

@nathanielsimard nathanielsimard left a comment

Choose a reason for hiding this comment

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

Some minor comments, but LGTM

yolox-burn/README.md Outdated Show resolved Hide resolved
yolox-burn/src/model/head.rs Outdated Show resolved Hide resolved
- Pre-trained weights are from COCO (README)
- Remove training outputs TODO
- Current example uses YOLOX-Tiny (Nano WIP)
}

/// YOLOX-X pre-trained weights.
pub enum YoloxX {
Copy link
Member Author

Choose a reason for hiding this comment

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

Style-wise I am still unsure about the enum variants due to the PascalCase... Names like YoloxS and YoloxX look weird to me, so feel free to leave suggestions if you have any!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ahh, that's fine to me - it seems super minor.

@laggui laggui marked this pull request as ready for review March 19, 2024 15:33
Copy link
Collaborator

@antimora antimora left a comment

Choose a reason for hiding this comment

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

Wow that's big. Looks good overall. I have minor comments. Please see. I am approving ahead.

yolox-burn/src/model/blocks.rs Outdated Show resolved Hide resolved
yolox-burn/src/model/blocks.rs Outdated Show resolved Hide resolved
yolox-burn/src/model/weights.rs Show resolved Hide resolved
}

/// YOLOX-X pre-trained weights.
pub enum YoloxX {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ahh, that's fine to me - it seems super minor.

yolox-burn/src/model/yolox.rs Outdated Show resolved Hide resolved
yolox-burn/src/model/yolox.rs Outdated Show resolved Hide resolved
yolox-burn/src/model/yolox.rs Show resolved Hide resolved
@antimora
Copy link
Collaborator

@laggui ready to merge?

@laggui
Copy link
Member Author

laggui commented Mar 29, 2024

@laggui ready to merge?

Actually I think we're waiting for the Burn release so we can use the crates version and announce some things.

I'll let @nathanielsimard decide when we merge this.

- Removed init_with methods
- Fixed empty MaxPool2d vec initialization
Copy link
Member

@nathanielsimard nathanielsimard left a comment

Choose a reason for hiding this comment

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

🎉

@laggui laggui merged commit 0f9c6c6 into main Apr 25, 2024
2 checks passed
@laggui laggui deleted the yolox branch April 25, 2024 15:31
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.

3 participants