huggingface.co web signal

Visual-Focus Losses Push DINOv2 ImageNet-Seg mIoU to 67.29%

TL;DR

  • Combined inside/outside focus losses lift DINOv2 ImageNet-Segmentation mIoU from 63.67% to 67.29%, with PASCAL VOC rising from 58.10% to 60.68%.
  • Classification trades down: k-NN top-1 drops from 81.7% to 80.3% and training stretches to 5 days 10 hours on 4 NVIDIA H200 GPUs.
  • On a larger ViT-g/16 backbone, the ImageNet-Segmentation mIoU gain widens to 4.24 points, hinting at favorable scaling.

Two "visual focusing" losses added to DINOv2 training lift zero-shot ImageNet-Segmentation mIoU from 63.67% to 67.29%, with PASCAL VOC climbing from 58.10% to 60.68%, according to a new paper on Hugging Face titled "Training Vision Transformers to Focus: Emergence of Spatial Attention Head Specialization."

The authors describe an inside-focus loss that aligns model attention with cropped image regions and an outside-focus loss that steers heads toward non-masked areas, both running alongside the standard DINO, iBOT and KoLeo objectives at weights of 0.05 each. "While standard DINOv2 already exhibits content-based head specialization, with individual heads capturing different semantic features within an image, our method retains such content-based specialization while introducing an additional, complementary form of specialization across spatial regions," the paper reports.

Gains are not free. Classification slips: k-NN top-1 falls from 81.7% to 80.3% and linear probing from 82.6% to 81.8%. Training stretches from 2 days 22 hours to 5 days 10 hours on 4 NVIDIA H200 GPUs. Scaling cuts both ways: on a ViT-g/16 backbone the mIoU gain widens to 4.24 points, while on ViT-B/16 it narrows to 1.01. The result lands in a busy stretch for the subfield, one of 61 computer vision stories we've tracked in the last 90 days.