Intermediate
Open
Pro
CNN or ViT for a 5,000-Image Dataset?
Your team has 5,000 labelled product photos in 20 classes, one GPU, and a latency budget of about 30 ms per image on a modest server. A colleague says "everyone uses Vision Transformers now, let's fine-tune a ViT". Another says "CNNs are better on small data, train a ResNet from scratch".
- State what is wrong with each claim.
- Explain what inductive biases a CNN has that a ViT lacks, and what the patch embedding of a ViT-B/16 is in convolution terms.
- Compare the token counts and attention cost of a ViT with 16x16 patches at 224x224 and at 384x384, and relate it to the latency budget.
- Propose an experiment plan with a fair comparison and a default recommendation.
Share this question