Image Classification
timm
Safetensors
Transformers

Model card for cpubone_b0_bfrobust.r224_in1k

A CPUBone image classification model. CPUBone is designed for efficient CPU inference by balancing a low operation count with hardware-efficient execution (high MACs per second). It combines grouped MBConv variants, reduced convolution kernels, and LowFormer attention in its final two stages. This checkpoint was trained on ImageNet-1k by the paper authors and converted to the timm state-dict layout.

Model Notes

  • bfrobust local MBConv branches normalize the expansion, depthwise, and projection convolutions.
  • The default preprocessing is encoded in the pretrained configuration: bicubic resize, ImageNet mean and standard deviation, and a center crop with crop_pct=0.95.
  • The model can be used for ImageNet-1k classification, image embeddings, or multi-scale feature-map extraction with features_only=True.
  • CPU latency depends on the target hardware, inference runtime, export path, and batch size. See the paper for device-specific batch-size-one measurements and methodology.

Model Details

Model Usage

Image Classification

from urllib.request import urlopen
from PIL import Image
import timm

img = Image.open(urlopen(
    'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png'
))

model = timm.create_model('cpubone_b0_bfrobust.r224_in1k', pretrained=True)
model = model.eval()

# get model specific transforms (normalization, resize)
data_config = timm.data.resolve_model_data_config(model)
transforms = timm.data.create_transform(**data_config, is_training=False)

output = model(transforms(img).unsqueeze(0))  # unsqueeze single image into batch of 1

top5_probabilities, top5_class_indices = torch.topk(output.softmax(dim=1) * 100, k=5)

Feature Map Extraction

from urllib.request import urlopen
from PIL import Image
import timm

img = Image.open(urlopen(
    'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png'
))

model = timm.create_model(
    'cpubone_b0_bfrobust.r224_in1k',
    pretrained=True,
    features_only=True,
)
model = model.eval()

# get model specific transforms (normalization, resize)
data_config = timm.data.resolve_model_data_config(model)
transforms = timm.data.create_transform(**data_config, is_training=False)

output = model(transforms(img).unsqueeze(0))  # unsqueeze single image into batch of 1

for o in output:
    # print shape of each feature map in output
    # e.g.:
    #  torch.Size([1, 32, 56, 56])
    #  torch.Size([1, 64, 28, 28])
    #  torch.Size([1, 128, 14, 14])
    #  torch.Size([1, 256, 7, 7])

    print(o.shape)

Image Embeddings

from urllib.request import urlopen
from PIL import Image
import timm

img = Image.open(urlopen(
    'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png'
))

model = timm.create_model(
    'cpubone_b0_bfrobust.r224_in1k',
    pretrained=True,
    num_classes=0,  # remove classifier nn.Linear
)
model = model.eval()

# get model specific transforms (normalization, resize)
data_config = timm.data.resolve_model_data_config(model)
transforms = timm.data.create_transform(**data_config, is_training=False)

output = model(transforms(img).unsqueeze(0))  # output is (batch_size, num_features) shaped tensor

# or equivalently (without needing to set num_classes=0)

output = model.forward_features(transforms(img).unsqueeze(0))
# output is unpooled, a (1, 256, 7, 7) shaped tensor

output = model.forward_head(output, pre_logits=True)
# output is a (1, num_features) shaped tensor

Model Comparison

ImageNet-1k validation accuracy in FP32 with bicubic interpolation and a centered crop (crop_pct=0.95). Values are Top-1 / Top-5 percentages; only input resolution changes between columns.

Model Params (M) 224 Top-1 / Top-5 256 Top-1 / Top-5 288 Top-1 / Top-5
cpubone_b0_bfrobust.r224_in1k 10.37 77.632 / 93.548 78.344 / 93.896 78.342 / 94.010
cpubone_b1_bfrobust.r224_in1k 12.44 78.928 / 94.188 79.462 / 94.564 79.620 / 94.548
cpubone_b1_dwnorm.timm_r256_in1k 12.43 78.280 / 94.020 79.352 / 94.624 80.002 / 94.914
cpubone_b2_bfrobust.r224_in1k 23.87 80.730 / 95.238 81.144 / 95.536 81.330 / 95.528
cpubone_b2pt5_dwnorm.timm_r256_in1k 30.43 81.118 / 95.354 81.736 / 95.706 82.072 / 95.882
cpubone_b3.r224_in1k 40.74 83.048 / 96.366 83.244 / 96.474 83.050 / 96.130
cpubone_nano.r224_in1k 6.52 72.806 / 90.624 73.716 / 91.150 73.572 / 91.124
cpubone_s0.r224_in1k 8.73 75.892 / 92.568 76.532 / 92.916 76.636 / 93.030
cpubone_t0.r224_in1k 7.54 74.868 / 91.928 75.330 / 92.358 75.406 / 92.330

Citation

@inproceedings{nottebaum2026cpubone,
  title={CPUBone: Efficient Vision Backbone Design for Devices with Low Parallelization Capabilities},
  author={Nottebaum, Moritz and Dunnhofer, Matteo and Micheloni, Christian},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year={2026}
}
@misc{rw2019timm,
  author = {Ross Wightman},
  title = {PyTorch Image Models},
  year = {2019},
  publisher = {GitHub},
  journal = {GitHub repository},
  doi = {10.5281/zenodo.4414861},
  howpublished = {\url{https://github.com/huggingface/pytorch-image-models}}
}
Downloads last month
5
Safetensors
Model size
10.4M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train timm/cpubone_b0_bfrobust.r224_in1k

Paper for timm/cpubone_b0_bfrobust.r224_in1k