yitu-opensource / T2T-ViT

ICCV2021, Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet
Other
1.15k stars 176 forks source link

train T2T-ViT on the custom dataset #55

Open 123-xin opened 3 years ago

123-xin commented 3 years ago

Hello, thank you very much for your work. Can you tell me how my training set and label format should be set up if I train the network on a custom dataset. (My custom dataset is divided into two categories )

yuanli2333 commented 3 years ago

Hi, you should write a dataloader to load your own data,

Or if you want to use our repo to train, you should reorganize the data structure of your dataset as ImageNet:

│imagenet/ ├──train/ │ ├── n01440764 │ │ ├── n01440764_10026.JPEG │ │ ├── n01440764_10027.JPEG │ │ ├── ...... │ ├── ...... ├──val/ │ ├── n01440764 │ │ ├── ILSVRC2012_val_00000293.JPEG │ │ ├── ILSVRC2012_val_00002138.JPEG │ │ ├── ...... │ ├── ......