COMPUTER VISION · INTERVIEW QUESTION
Compare YOLO, SSD, and Faster R-CNN for object detection.
🟡 intermediate · Object Detection
Hint: One-stage vs two-stage detectors. Think speed vs accuracy tradeoff.
Answer
Two-stage (Faster R-CNN):
Interview reasoning
- Region Proposal Network generates candidate boxes
- Classify and refine each proposal. High accuracy, slower (~5 FPS). Best for accuracy-critical applications. One-stage (YOLO): divides image into grid, predicts bounding boxes and classes simultaneously. Real-time (~30-60 FPS), slightly lower accuracy. YOLOv8 closes the gap significantly. SSD: multi-scale feature maps for detecting objects at different sizes, real-time.
Modern landscape: YOLOv8/YOLO-NAS for real-time, DETR (transformer-based) for end-to-end detection without NMS, SAM for segmentation.
Choice depends on latency requirements, accuracy needs, and deployment constraints (edge vs cloud).
One-stage and two-stage detection families trade architectural choices, assignment and deployment cost, but generation-specific implementations vary substantially. Compare accuracy at matched input resolution and full latency budgets, including preprocessing and NMS. Data geometry and hardware matter more than assuming a model family's name guarantees speed or quality.
Worked example. For a 30 FPS service, the total frame budget is about 33 ms; a model spending 30 ms in inference leaves little room for decoding and postprocessing. Test a budget such as 3 ms decode, 22 ms inference and 8 ms postprocessing/networking under realistic load rather than treating model time as the whole service.
Validation
Benchmark the specific versions on small/crowded objects, memory, p95/p99 and the actual device; tune reasonable comparable recipes.
Common pitfalls
A desktop GPU benchmark may not transfer to an edge device. Stronger AP with a missed real-time deadline may be unusable for the application.
Related questions
- Explain the concept of transfer learning in computer vision.
- 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?