huggingface / pytorch-image-models

The largest collection of PyTorch image encoders / backbones. Including train, eval, inference, export scripts, and pretrained weights -- ResNet, ResNeXT, EfficientNet, NFNet, Vision Transformer (ViT), MobileNetV4, MobileNet-V3 & V2, RegNet, DPN, CSPNet, Swin Transformer, MaxViT, CoAtNet, ConvNeXt, and more
https://huggingface.co/docs/timm
Apache License 2.0
31.9k stars 4.73k forks source link

[FEATURE] Validation labels txt or csv file #1081

Open IgorKasianenko opened 2 years ago

IgorKasianenko commented 2 years ago

I have trained model using timm distributed_train.sh, but I have 0.1 validation accuracy on imagenet. Images in validation folder are all placed in root directory going like ILSVRC2012_val_00000001.JPEG ... ILSVRC2012_val_00050000.JPEG.

Describe the solution you'd like I would like to have parameter in validate.py file similar to '--real-labels' that will take csv or txt file with structure like

ImageId,Class
ILSVRC2012_val_00000001,n01751748
aliutkus commented 2 years ago

run https://github.com/PatrickHua/EasyImageNet/blob/main/valprep.sh in the validation folder of your imagenet copy (the one featuring 50k files) and everything will run smoothly from this point