uoft-cs/cifar10
Viewer • Updated • 60k • 305k • 119
How to use DeKUT-DSAIL/convnextv2-huge-cifar10-native with timm:
import timm
model = timm.create_model("hf_hub:DeKUT-DSAIL/convnextv2-huge-cifar10-native", pretrained=True)ConvNeXt V2 Huge fine-tuned on CIFAR-10 at native 32x32 resolution (adapted stem).
Fine-tuned from ImageNet-pretrained weights (timm name convnextv2_huge) on
CIFAR-10 as part of a native-resolution vs upsampling study.
| Metric | Value |
|---|---|
| Top-1 accuracy | 99.18% |
| Top-5 accuracy | 99.91% |
| F1 (macro) | 0.9918 |
| AUC (macro) | 0.9991 |
| ECE | 0.1082 |
[0.4914, 0.4822, 0.4465] and std [0.247, 0.2435, 0.2616].from cifar_classifier import CIFAR10Classifier
clf = CIFAR10Classifier.from_pretrained("DeKUT-DSAIL/convnextv2-huge-cifar10-upsample")
label, probs = clf.predict("image.jpg")
print(label, probs)
Get cifar_classifier.py from the hf_deployment/ folder of the training
repository. It only needs torch, torchvision, timm, Pillow and
huggingface_hub.
airplane, automobile, bird, cat, deer, dog, frog, horse, ship, truck