COMPUTER VISION · INTERVIEW QUESTION
Explain the concept of transfer learning in computer vision.
🟢 beginner · Image Classification
Hint: Using a model pre-trained on ImageNet for your specific task.
Answer
Transfer learning uses knowledge from a model trained on a large dataset (e.g., ImageNet with 1.4M images) and applies it to a different but related task.
Interview reasoning
Process:
-
Take a pre-trained model (ResNet, EfficientNet, ViT).
-
Replace the final classification layer with one matching your number of classes.
-
Fine-tune: either freeze early layers (feature extraction) or update all layers (full fine-tuning).
Why it works: early CNN layers learn universal features (edges, textures, shapes) transferable across tasks. Later layers learn task-specific features.
Benefits: requires much less data (hundreds vs millions of images), faster training, better performance.
Modern trend: foundation models (CLIP, DINOv2) provide even more powerful pre-trained features. CLIP enables zero-shot classification by matching images to text descriptions.
Transfer learning starts from representations trained on a related distribution. Freeze or partially fine-tune when labels are scarce, and allow broader adaptation when domain cues differ. Compare head-only, partial and full fine-tuning with layer-appropriate learning rates, keeping acquisition-specific holdouts and training/evaluation state explicit.
Worked example. A pretrained image backbone can train a new classifier on a small label set, then unfreeze later blocks if validation supports it.
Validation
Compare against a strong from-scratch or simple baseline under matched budgets; assess domain, rare-class and sample-size slices across seeds.
Common pitfalls
Transfer can be negative. Frozen weights do not automatically freeze normalization running state, and pretraining/evaluation overlap can inflate results.
Related questions
- Compare YOLO, SSD, and Faster R-CNN for object detection.
- Compare GANs, VAEs, and Diffusion Models for image generation.
- In an object detector, validation mAP@0.50 improves while mAP@[0.50:0.95] drops after increasing input resolution. What is the most likely interpretation?
- A segmentation model has high pixel accuracy on a medical dataset but very low Dice for lesions. Which evaluation issue is most likely?
- For contrastive image-text pretraining, why is the temperature parameter important in the softmax objective?