Using MobileNetV3Backbone for object detection #1772
-
Hi, Firstly, thanks for a great project, its been exciting to follow the progress. I'm interested in doing object detection on edge devices in latency-critical applications. In the past, I've had success with ssd+mobilenetv2 with tensorflow models from the model zoo. I see that you have a MobileNetV3Backbone with weights for 'mobilenet_v3_large_imagenet'. However, I'm not sure how I'd use that backbone in an object detection task. Is there currently any way to do that using an existing model from the object_detection/ directory? Or are the backbones primarily for use in classification tasks? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Thanks for the question @barrypitman! Our object detection models Task models are compatible with any of our Backbone models. While they are pretrained on Imagenet, this is the classic source of transfer learning for all CV tasks. If you want to use our mobilenet preset with RetinaNet, you can use one of two APIs: # Explicit backbone
backbone = keras_cv.models.MobileNetV3Backbone.from_preset("mobilenet_v3_large_imagenet")
model = keras_cv.models.RetinaNet(
backbone,
num_classes=20,
bounding_box_format="xywh",
)
# from_preset constructor
model = keras_cv.models.RetinaNet.from_preset(
"mobilenet_v3_large_imagenet",
num_classes=20,
bounding_box_format="xywh",
) |
Beta Was this translation helpful? Give feedback.
Thanks for the question @barrypitman!
Our object detection models Task models are compatible with any of our Backbone models. While they are pretrained on Imagenet, this is the classic source of transfer learning for all CV tasks.
If you want to use our mobilenet preset with RetinaNet, you can use one of two APIs: