TGDA: fine-grained image recognition from scratch with teacher-guided data augmentation
These are the checkpoints behind Fine-Grained Image Recognition from Scratch with Teacher-Guided Data Augmentation (arXiv:2507.12157). Students trained from scratch learn from a fine-grained teacher (a ResNet-101 trained with counterfactual attention learning, CAL), which also guides data-aware augmentation of the student's inputs. Code: arkel23/TGDA.
249 checkpoints, one per configuration, each the last epoch of one training seed. Each file
is a torch.save dict with config (the full training configuration), model (the state dict),
accuracy and epoch, with no optimizer state. File names are the runs' experiment-log names,
ending in the serial. Load them with fgir-zoo. The
collection groups this repo with the paper.
Layout
Folder
Serials
What
Files
sota_448
301-304
Main state-of-the-art table: ResNet-18/34/50/101 students, TGDA with TrivialAugment, label smoothing and stochastic depth
12
lrnet_128
201-204
Main LRNet table: low-resolution students at 128 px from a 448 px teacher
24
vitfs_448
100, 101
Efficient ViTs and the ViTFS variants, teacher and student at 448 px
54
vitfs_224_t448
102
Teacher at 448 px, student at 224 px
15
vitfs_224
103
Teacher and student at 224 px
9
vitfs_128
109
ViTFS tiny/micro/nano students at 128 px from a 448 px teacher
8
vit_ce_448
107
The serial-101 models trained with cross-entropy only (no teacher)
35
vitfs_transfer
104-106
A TGDA-trained student transferred to two new datasets with cross-entropy
Ablations: TGDA without extra regularization, one- vs two-stage training, augmentation type, teacher type, transfer
73
scratch_vs_pt_448
320, 321, 331
200 epochs from scratch with cross-entropy or KD, and ImageNet-pretrained with KD
9
sweeps_128
0, 1
KD weight and temperature sweeps on CUB
2
manifest.csv lists every file with its dataset, student, teacher, serial, seed, image size,
class count, accuracy, SHA-256 and size.
Load a checkpoint and classify an image
import torch
from PIL import Image
from torchvision import transforms
from fgir_zoo import tgda
model = tgda.create_model('sota_448/cub_resnet18_resnet101_cal_tgda_301')
cfg = model.config
tf = transforms.Compose([
transforms.Resize((cfg.test_resize_size, cfg.test_resize_size),
interpolation=transforms.InterpolationMode.BICUBIC),
transforms.CenterCrop(cfg.student_image_size or cfg.image_size),
transforms.ToTensor(),
transforms.Normalize((0.485, 0.456, 0.406), (0.229, 0.224, 0.225)),
])
# a CUB-200-2011 test image, class index 50 (051.Horned_Grebe)
x = tf(Image.open('Horned_Grebe_0050_34561.jpg').convert('RGB')).unsqueeze(0)
with torch.no_grad():
logits = model(x)
print(logits.argmax(-1).item(), logits.softmax(-1).max().item()) # 50 0.9855
Accuracy of the released checkpoints
Top-1 accuracy (%) stored in each file, on the dataset's test split at the end of training.
Each value is one seed; the paper reports its own aggregates, so its tables can differ slightly.
fgir-zoo (pip install git+https://github.com/arkel23/fgir-zoo.git), which pins
timm==0.9.12
torch (checked with 2.5.1)
Citation
@misc{rios_tgda_2025,
title = {Fine-Grained Image Recognition from Scratch with Teacher-Guided Data Augmentation},
author = {Rios, Edwin Arkel and Mikael, Fernando and Gosal, Oswin and Oyerinde, Femiloye and
Liang, Hao-Chun and Lai, Bo-Cheng and Hu, Min-Chun},
year = {2025},
eprint = {2507.12157},
archivePrefix = {arXiv},
primaryClass = {cs.CV},
doi = {10.48550/arXiv.2507.12157},
url = {https://arxiv.org/abs/2507.12157}
}