MobileOne is Apple’s improved one-millisecond mobile backbone (Backbone) model, which achieves 75.9% Top-1 accuracy in 1 ms.

Model Zoo

Latency measured on iPhone 12 Pro

usage

To use the model, follow the code snippet below,

import torch
from mobileone import mobileone, reparameterize_model

# To Train from scratch/fine-tuning
model = mobileone(variant='s0')
# ... train ...

# Load Pre-trained checkpoint for fine-tuning
checkpoint = torch.load('/path/to/unfused_checkpoint.pth.tar')
model.load_state_dict(checkpoint)
# ... train ...

# For inference
model.eval()      
model_eval = reparameterize_model(model)
# Use model_eval at test-time

To simply evaluate the model, use branch reparameterized fusion checkpoints.

import torch
from mobileone import mobileone

model = mobileone(variant='s0', inference_mode=True)
checkpoint = torch.load('/path/to/checkpoint.pth.tar')
model.load_state_dict(checkpoint)
# ... evaluate/demo ...

#MobileOne #Homepage #Documentation #Downloads #Mobile #Backbone #Improvements #News Fast Delivery

Leave a Comment

Your email address will not be published. Required fields are marked *