--- license: apache-2.0 library_name: libreyolo pipeline_tag: image-classification tags: - image-classification - vision-transformer - vit - imagenet - libreyolo datasets: - imagenet-1k --- # LibreViTb-cls Classic ViT-Base/16 image classifier (224px, ImageNet-1k, 1000 classes), repackaged for [LibreYOLO](https://github.com/LibreYOLO/libreyolo). The model has 86.6 million parameters and is inference-only in LibreYOLO. ## Source Derived from [timm](https://github.com/huggingface/pytorch-image-models) model `vit_base_patch16_224.augreg2_in21k_ft_in1k` at timm v1.0.28 (commit `8ef73809f622e0031bd7f4940265734aef8b9978`). The exact source checkpoint is [`timm/vit_base_patch16_224.augreg2_in21k_ft_in1k`](https://huggingface.co/timm/vit_base_patch16_224.augreg2_in21k_ft_in1k/tree/063c6c38a5d8510b2e57df480445e94b231dad2c) at revision `063c6c38a5d8510b2e57df480445e94b231dad2c`. The source and weights are Apache-2.0. Copyright (c) Ross Wightman and the timm contributors. The architecture originates from Google Research's Apache-2.0 [Vision Transformer](https://github.com/google-research/vision_transformer). These AugReg2 weights use ImageNet-21k pretraining followed by ImageNet-1k fine-tuning. ## Modifications Learned parameters are unchanged. Conversion adds LibreYOLO checkpoint metadata (`model_family`, `size`, `task`, `nc`, `names`, and `imgsz`) only. LibreYOLO's native graph loads the state dict strictly and produces exactly the same pretrained logits as timm (`max_abs_diff == 0`). See `weights/convert_vit_weights.py` and `docs/provenance/vit.md` in the [LibreYOLO source repository](https://github.com/LibreYOLO/libreyolo). Source `model.safetensors` SHA-256: `32aa17d6e17b43500f531d5f6dc9bc93e56ed8841b8a75682e1bb295d722405b`. ## Usage ```python from libreyolo import LibreYOLO model = LibreYOLO("LibreViTb-cls.pt") result = model.predict("image.jpg") print(result.probs.top1, result.probs.top5) ``` ## License Apache License 2.0. See [`LICENSE`](./LICENSE) and [`NOTICE`](./NOTICE).