Instructions to use LibreYOLO/LibreMobileNetV4s-cls with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LibreYOLO
How to use LibreYOLO/LibreMobileNetV4s-cls with LibreYOLO:
# pip install libreyolo from libreyolo import LibreYOLO model = LibreYOLO("LibreYOLO/LibreMobileNetV4s-cls") results = model("https://raw.githubusercontent.com/LibreYOLO/libreyolo/release/libreyolo/assets/guggenheim-bilbao.jpg", save=True) - Notebooks
- Google Colab
- Kaggle
LibreMobileNetV4s-cls
MobileNetV4-conv-Small image classifier (224px input, ImageNet-1k, 1000 classes), repackaged for LibreYOLO. ~3.8M parameters.
Source
Derived from huggingface/pytorch-image-models (timm),
model mobilenetv4_conv_small.e2400_r224_in1k. Architecture and pretrained weights by Ross Wightman and the timm
contributors (ImageNet-1k, trained in timm; no distillation, no extra data).
Copyright (c) Ross Wightman. Licensed under the Apache License 2.0.
MobileNetV4 paper: "MobileNetV4 - Universal Models for the Mobile Ecosystem" (https://arxiv.org/abs/2404.10518).
Modifications
Learned parameters are unchanged from timm. The checkpoint is metadata-wrapped into the
LibreYOLO format (model_family / task / nc / names). LibreYOLO's native MobileNetV4
implementation mirrors timm's module names, so inference is bit-identical to timm
(max_abs_diff == 0, verified by the parity test). See
weights/convert_mobilenetv4_weights.py in the
LibreYOLO source repository.
Usage
from libreyolo import LibreYOLO
model = LibreYOLO("LibreMobileNetV4s-cls.pt")
result = model.predict("image.jpg")[0]
print(result.probs.top1, result.probs.top5)
License
Apache License 2.0. See the LICENSE and NOTICE files in this repository.
- Downloads last month
- 138