keras-nlp
keras-nlp copied to clipboard
[Object Detection] Add YOLOv11 Architecture and Presets
Draft PR for transparency.
Done
- [x] Basic components
- [x] CIoU Loss
- [x] ImageObjectDetector Task
- [x] ImageObjectDetectorPreprocessor
Planned
- [] YOLOv11 Architecture
- [] Object detection workflow
- [] Weight conversion script
- [] Utils for bounding boxes
- [] Presets (n...xl)
Out of Scope
- Instance segmentation
- Pose estimation
- Oriented Object Detection (i.e. rotated bounding boxes)
These will be exported as separate tasks (i.e. ImagePoseEstimator, ImageInstanceSegmentor, their respective preprocessors, etc.) in separate PRs.
API Considerations
There will be lots of reusability between YOLOv11 OD, YOLOv11 Pose, etc. Some functions such as the non-max-supression can be wrapped into generic public layers and reused between object detectors. We could benefit from refactoring these into general utils in KerasHub (currently, they belong to models, such as in the case of RetinaNet).
Some YOLO models are consistent with the same architecture but rely on a different config. Enabling v11 will enable v8 as well, for example. These can be handled through presets. We could turn YOLOv11 into a generic YOLO class, which is configurable through presets and layers. This lets us support multiple versions, but also easily port and publish YOLOv{N} and subsequent versions in the future with minimal code changes (i.e. a layer or two + config).
/cc @divyashreepathihalli @mattdangerw @fchollet for API discussions and considerations.