Skip to content

Using MobileNetV3Backbone for object detection #1772

Answered by jbischof
barrypitman asked this question in Q&A
Discussion options

You must be logged in to vote

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",
)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@jbischof
Comment options

@barrypitman
Comment options

@jbischof
Comment options

Answer selected by barrypitman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants