๐ง EfficientSAM: Leveraged Masked Image Pretraining for Efficient Segment Anything โ ์ค์ ํ SAM์ ํ์ค
๐ง EfficientSAM: Leveraged Masked Image Pretraining for Efficient Segment Anything โ ์ค์ ํ SAM์ ํ์ค
๐ง (English) EfficientSAM: A โLight & Fastโ Segment Anything via Leveraged Masked Image Pretraining
- Title: EfficientSAM: Leveraged Masked Image Pretraining for Efficient Segment Anything
- Venue: CVPR 2024 (OpenAccess) โ PDF
- Code/CKPT: GitHub โ yformer/EfficientSAM
- Keywords:
Segment Anything
,Masked Image Pretraining
,Lightweight ViT
,Promptable Segmentation
- TL;DR: EfficientSAM keeps SAMโs strengths while being faster and lighter for practical use.
๐ EfficientSAM โ Key Points
One-liner: โRetain SAMโs capability, optimize weight and speed for deployment.โ
1) Efficient architecture ๐ง
- Lightweight image encoder: Replace SAMโs heavy ViT-H with ViT-Tiny/Small backbones. Prompt encoder & mask decoder stay compatible with SAM, preserving the pipeline.
2) Smarter pretraining ๐ฏ
- SAMI (SAM-Leveraged Masked Image Pretraining): Train the lightweight encoder to reconstruct features from SAMโs ViT-H with a masked pretext task โ transfers SAMโs representation power into a compact backbone.
3) Practical extensibility ๐ ๏ธ
- Keeps SAMโs interactive prompts (points/boxes/โsegment everythingโ) and can be fine-tuned for classification, detection, segmentation downstream.
4) Better efficiencyโaccuracy trade-off โก
- Aims to retain segmentation quality while cutting params/FLOPs, ideal for edge/mobile/real-time scenarios.
๐ Prior Work
- Making SAM & ViT efficient
- SAM is widely used; many works reduce its compute cost.
- FastSAM uses a CNN (e.g., YOLOv8-seg) to segment all objects efficiently.
- MobileSAM distills a light image encoder via decoupled distillation.
- Efficient ViT variants continue to emerge: ViT/DeiT Tiny/Small, MobileViT, LeViT, EfficientViT, etc.
- Knowledge Distillation (KD)
- KD transfers knowledge from a large teacher to a small student without changing architecture, supervised by hard + soft labels.
- Hard labels: one-hot targets (e.g.,
[cat=1, fox=0, car=0]
); typically trained with CE; lack inter-class similarity. - Soft labels: teacherโs probability distribution (e.g.,
[cat=0.60, fox=0.35, car=0.05]
), often with temperature to reveal dark knowledge (class relations), improving generalization/calibration.
- Hard labels: one-hot targets (e.g.,
- Recent trends: stronger soft-label KD, decoupling (separate feature learning vs. classification), and Decoupled KD (split KD loss into target/non-target parts) so the student learns both confidence for the true class and relations among the rest.
- Another line matches intermediate features directlyโe.g., FitNet, SSTA for ViT students, or aligning features between MAE teacher/student.
- KD transfers knowledge from a large teacher to a small student without changing architecture, supervised by hard + soft labels.
- MIM (Masked Image Modeling)
- Self-supervised pretraining: mask patches and reconstruct the missing parts.
- BEiT predicts visual tokens; SimMIM reconstructs pixels; MaskFeat reconstructs HOG features.
- MAE (Masked Autoencoder): high mask ratio (~75%), asymmetric encoderโdecoder; encoder sees only visible patches, decoder reconstructs the full image (usually pixels).
๐งฑ EfficientSAM Architecture
- Image Encoder
- ViT-Tiny/Small backbones.
- SAMI pretraining teaches them to reconstruct SAM ViT-H features, so the compact encoder inherits SAM-like representations.
- Instead of vanilla KD, masking improves local/occluded-region awareness and robustness.
- Prompt Encoder (same as SAM)
- Lightweight transformer that embeds points/boxes into a unified prompt embedding.
- Mask Decoder (same as SAM)
- Combines image & prompt embeddings with dual cross-attention, outputs masks (+ IoU prediction).
- Full compatibility with existing SAM tooling/interfaces.
๐ง Training Recipe & Results
- 1) SAMI Pretraining
- Teacher: SAMโs ViT-H image encoder features.
- Student: lightweight ViT-T/S.
- Goal: via masked reconstruction, reproduce SAM features โ student learns promptable-segmentation-friendly representations.
- 2) SA-1B Finetuning
- SAMI-initialized encoder + SAM decoder are finetuned on SA-1B for points/boxes/โeverythingโ.
- 3) Downstream transfer
- Use the SAMI encoder for classification/detection/segmentation to show broad applicability.
- Shows solid performance on Image Classification, Object Detection & Instance Segmentation, Semantic Segmentation.
๐งช Segmentation Results & Ablations
1) Benefit of SAMI
- Compared to vanilla MAE-like pretraining, SAMI (reconstructing SAM features) learns representations more suitable for promptable segmentation.
2) Effectiveness of lightweight backbones
- With ViT-T/S + SAMI + finetune, EfficientSAM keeps quality while boosting efficiency, reducing reliance on ViT-H.
3) Practical compatibility
- Maintains points/boxes/everything prompts and SAM mask decoder, minimizing replacement cost (checkpoints/examples provided).
๐ฏ Zero-shot single-point valid mask evaluation (1-click / 1-box)
- Protocol: Random foreground point within GT mask; tight GT bbox as prompt; among multiple predictions, evaluate the highest-confidence mask.
- Highlights
- EfficientSAM-Ti: vs MobileSAM, +1.9 mIoU (1-click), +1.5 mIoU (1-box) at similar complexity.
- SAMI > MAE: SAMI-pretrained weights outperform MAE-pretrained on COCO/LVIS interactive.
- EfficientSAM-S: COCO(box) โ1.5 mIoU vs SAM; LVIS(box) โ3.5 mIoU (~20ร fewer params).
- Competitive on multi-click as well.
๐ฆ Zero-shot instance segmentation
- Protocol: Use ViTDet-generated bbox prompts; pick the mask with max IoU to the bbox.
- Thus ViTDet-H serves as a strong upper baseline for comparison.
- Results
- EfficientSAM-S: vs FastSAM COCO +6.5 AP, LVIS +7.8 AP.
- EfficientSAM-Ti: vs FastSAM COCO +4.1 AP, LVIS +5.3 AP; vs MobileSAM COCO +3.6 AP, LVIS +5.5 AP.
- Model size: Ti 9.8M vs FastSAM 68M โ much lighter.
- S model narrows the gap to full SAM (0.6G params) to about ~2 AP.
- Summary: Beats other lightweight models; slightly below the very large ViTDet-H+SAM pipeline.
๐ Qualitative & Salient Instance Segmentation
- Qualitative: For points/boxes/โsegment everything,โ EfficientSAMโs boundaries & occlusion reasoning are close to SAM.
- Salient Instance Seg.: Generate a saliency map with Uยฒ-Net, then sample 3 points (3-click) inside the map to segment with EfficientSAM.
โ Promising for accessibility (e.g., users with limited hand mobility).
๐งช Core Ablations
- Reconstruction loss in SAMI: MSE > Cosine โ directly reconstructing SAM feature values works better.
- Cross-attention decoder: Query only masked tokens (encoder outputs act like anchors) โ +3% Top-1 vs decoding all tokens (MAE-style) on ImageNet-1K (SAMI-Ti).
- Mask ratio: High ratio (~75%) remains consistently strong (50/75/85% tested).
- Reconstruction target: Using CLIP encoder features as target still yields +0.8%p over MAE (ViT-Tiny, IN-1K) โ validates Guided MIM with strong teacher features.
- Finetuning steps: Good results even at 0.1 epoch; +2.5 mIoU by 1 epoch.
- EfficientSAM-S final 76.9 mIoU, only โ1.5 mIoU vs SAM.
โ Conclusion
- EfficientSAM transfers SAMโs representational power into a lightweight encoder via SAMI pretraining, achieving similar accuracy with much better efficiency.
- With prompt compatibility (points/boxes/everything) and open checkpoints, itโs highly suitable for edge, real-time, and large-scale deployment.
๐ง (ํ๊ตญ์ด) EfficientSAM : Leveraged Masked Image Pretraining๋ก โ๊ฐ๋ณ๊ณ ๋น ๋ฅธโ SAM!
- ์ ๋ชฉ: EfficientSAM: Leveraged Masked Image Pretraining for Efficient Segment Anything
- ํํ: CVPR 2024 (OpenAccess) โ PDF
- ์ฝ๋/์ฒดํฌํฌ์ธํธ: GitHub โ yformer/EfficientSAM
- ํต์ฌ ํค์๋:
Segment Anything
,Masked Image Pretraining
,Lightweight ViT
,Promptable Segmentation
- ์์ฝ: EfficientSAM์ ๋น ๋ฅด๋ฉด์๋ ์ ํํ SAM!! ํจ์จ์ ์ธ SAM!
๐ EfficientSAM ํต์ฌ ์์ฝ
ํ ์ค ์์ฝ: โSAM์ ๊ฐ์ ์ ์ ์ง, ๋ฌด๊ฒ์ ์๋๋ ์ค์ ์ ๋ง๊ฒ ์ต์ ํ.โ
1) ํจ์จ์ ์ธ ๋ชจ๋ธ ๊ตฌ์กฐ ๐ง
- ์ด๋ฏธ์ง ์ธ์ฝ๋ ๊ฒฝ๋ํ: SAM์ ๊ณ ๊ฐ์ฉ๋ ViT-H ๋์ ViT-Tiny/Small ๋ฐฑ๋ณธ์ผ๋ก ๊ต์ฒด. ํ๋กฌํํธ ์ธ์ฝ๋/๋ง์คํฌ ๋์ฝ๋๋ SAM๊ณผ ํธํํด ํ์ดํ๋ผ์ธ์ ๊ทธ๋๋ก ์ ์งํฉ๋๋ค.
2) ๋ ๋๋ํด์ง ์ฌ์ ํ์ต ๐ฏ
- SAMI(SAM-Leveraged Masked Image Pretraining): SAM ViT-H์์ ๋์จ ํน์ง์ โ์ฌ๊ตฌ์ฑโํ๋๋ก ๊ฒฝ๋ ์ธ์ฝ๋๋ฅผ ๋ง์คํน ํ๋ฆฌํ ์คํธ๋ก ํ์ต โ SAM์ ํํ๋ ฅ์ ๊ฒฝ๋ ๋ฐฑ๋ณธ์ ์ด์ํฉ๋๋ค.
3) ์ค์ ํ์ฅ์ฑ ๐ ๏ธ
- ํฌ์ธํธ/๋ฐ์ค/์๋ธ๋ฆฌ์ฑ ํ๋กฌํํธ ๋ฑ SAM์ ์ํธ์์ฉ ๋ฐฉ์์ ์ ์งํ๊ณ , ๋ค์ํ ๋น์ ํ์คํฌ(๋ถ๋ฅยท๊ฒ์ถยท๋ถํ )๋ก๋ ํ์ฅ ๊ฐ๋ฅ!!
4) ํจ์จโ์ ํ๋ ํธ๋ ์ด๋์คํ ํฅ์ โก
- ํ๋ผ๋ฏธํฐยท์ฐ์ฐ ๊ฐ์ ๋๋น Segmentation ํ์ง ์ ์ง๋ฅผ ๋ชฉํ๋ก ์ค๊ณ๋์ด, ์ฃ์งยท๋ชจ๋ฐ์ผยท์ค์๊ฐ ํ์ฉ์ ์ ๋ฆฌํฉ๋๋ค.
๐ ๊ธฐ์กด ์ฐ๊ตฌ๋ค!!
- SAM&ViT์ ๊ฒฝ๋ํ!
- ๊ธฐ์กด SAM์ ๋ค์ํ๋ถ์ผ์์ ํ์๋ฐ์ผ๋ฉฐ, ๊ทธ ์ฐ์ฐ๋น์ฉ์ ์ค์ด๋๋ฐ ์ฐ๊ตฌ๋ค์ด ์ด์ด์ ธ์ด!
FastSAM
์ ํจ์จ ํฅ์์ ์ํด ์ด๋ฏธ์ง ๋ด ๋ชจ๋ ๊ฐ์ฒด๋ฅผ ๋ถํ ํ๋ CNN ๊ธฐ๋ฐ ์ํคํ ์ฒ(์: YOLOv8-seg[30])๋ฅผ ๊ฐ๋ฐMobileSAM
์ ๊ฒฝ๋ ์ด๋ฏธ์ง ์ธ์ฝ๋๋ฅผ ์ป๊ธฐ ์ํ decoupled distillation ๋ฐฉ๋ฒ์ ์ ์- ViT(Vision Transformer)๋ํ
ViTSmall/Deit-Small and ViT-Tiny/DeiT-Tiny
๋ฑ์ด ๊ณต๊ฐ๋จ - ์ด์ด์
MobileViT
,LeViT
,EfficientViT
๋ฑ์ ์ฐ๊ตฌ๊ฐ ๊ณต๊ฐ๋๋ฉฐ ์ง์์ ์ผ๋ก ๋ฐ์ !
- ์ง์ ์ฆ๋ฅ(KD)
- ์ง์์ฆ๋ฅ(Knowledge Distillation)์ ๋ชจ๋ธ ๊ตฌ์กฐ๋ฅผ ๋ฐ๊พธ์ง ์๊ณ , ํฐ ๊ต์ฌ ๋ชจ๋ธ์ ์ง์์ ์์ ํ์ ๋ชจ๋ธ๋ก ์ฎ๊ฒจ ์ฑ๋ฅ์ ๋์ด๋ ๊ธฐ๋ฒ์ผ๋ก ํ๋ ๋ผ๋ฒจ + ์ํํธ ๋ผ๋ฒจ ๊ฐ๋
์ผ๋ก ๊ตฌ๋ถ!!
- ํ๋ ๋ผ๋ฒจ (Hard label)
- ์-ํซ(one-hot) ์ ๋ต: ์ ๋ต ํด๋์ค๋ง 1, ๋๋จธ์ง๋ 0 (์:
[cat=1, fox=0, car=0]
). - ํ์ต ์์ค์ ๋ณดํต ํฌ๋ก์ค ์ํธ๋กํผ(CE) ๋ฅผ ์ฌ์ฉ.
- ๋จ์ : ํด๋์ค ๊ฐ ์ ์ฌ๋ ์ ๋ณด๊ฐ ์์ โ โ๊ณ ์์ด์ ์ฌ์ฐ๊ฐ ๋น์ทํ๋คโ ๊ฐ์ ๋ฏธ๋ฌํ ๊ด๊ณ๋ฅผ ํ์์ด ๋ฐฐ์ฐ๊ธฐ ์ด๋ ค์.
- ์-ํซ(one-hot) ์ ๋ต: ์ ๋ต ํด๋์ค๋ง 1, ๋๋จธ์ง๋ 0 (์:
- ์ํํธ ๋ผ๋ฒจ (Soft label)
- ๊ต์ฌ ๋ชจ๋ธ์ ํ๋ฅ ๋ถํฌ๋ฅผ ๊ทธ๋๋ก ์ฌ์ฉ(์:
[cat=0.60, fox=0.35, car=0.05]
). - ์จ๋(Temperature) (T>1) ๋ฅผ ์ ์ฉํ ์ํํธ๋งฅ์ค๋ก ๋ถํฌ๋ฅผ ๋ ๋ถ๋๋ฝ๊ฒ ๋ง๋ค์ด โ์๋ฌต์ง(dark knowledge)โ(์ ์ฌ๋ยท๊ฒฝ๊ณ ์ ๋ณด)๋ฅผ ๋๋ฌ๋.
- ํ์์ ์ด ๋ถํฌ๋ฅผ ๋ฐ๋ผ๊ฐ๋ฉฐ ํด๋์ค ๊ฐ ๊ด๊ณ/๋์ด๋ ๋ฅผ ํ์ต โ ์ผ๋ฐํยท์บ๋ฆฌ๋ธ๋ ์ด์ ๊ฐ์ .
- ๊ต์ฌ ๋ชจ๋ธ์ ํ๋ฅ ๋ถํฌ๋ฅผ ๊ทธ๋๋ก ์ฌ์ฉ(์:
- ํ๋ ๋ผ๋ฒจ (Hard label)
- ์ต๊ทผ ์ฐ๊ตฌ๋ ์ํํธ ๋ผ๋ฒจ ํ์ฉ ์์ฃผ์ ์ง์์ฆ๋ฅ + ๋์ปคํ๋ง(ํํ ํ์ต๊ณผ ๋ถ๋ฅ๋ฅผ ๋ณ๋ ํ์ต์ต) + Decoupled KD(KD ์์ค์ ํ๊น/๋นํ๊น์ผ๋ก ๋ถ๋ฆฌ)๋ก ์งํ๋จ!
- ๋์ปคํ๋ง : Feature extractor์ ๋ถ๋ฅ๊ธฐ๋ฅผ ๋ถ๋ฆฌ, ๊ฐ์ญ์ ์ค์ด๊ณ ์์ ๋๋ฅผ ๋์!
- Decoupled KD: ์์ค์ ํ๊น vs ๋นํ๊น์ผ๋ก ๋ถ๋ฆฌ โ ์ ๋ต ์์ ๊ฐ๊ณผ ์ค๋ต๋ค ๊ฐ ๊ด๊ณ๋ฅผ ๋ ๋ค ์ ๋๋ก ๋ฐฐ์ฐ๊ฒ ํจ!
- ๋ ๋ค๋ฅธ ํ๋ฆ์ ์ค๊ฐ ํน์ง์ ์ง์ ๋ง์ถ๋ ๋ฐฉ์์ผ๋ก, FitNet์ด ๋ํ์ ์ด๋ฉฐ([47]), SSTA๋ก ViT ํ์์ ๋ณด์กฐ ์ง๋ํ๊ฑฐ๋([60]), MAE ์ฌ์ ํ์ต ๊ต์ฌโํ์์ ์ค๊ฐ ํน์ง ์ ๋ ฌ์ ํตํด ์ง์์ ์ ์ดํ๋ค([2]).
- ์ง์์ฆ๋ฅ(Knowledge Distillation)์ ๋ชจ๋ธ ๊ตฌ์กฐ๋ฅผ ๋ฐ๊พธ์ง ์๊ณ , ํฐ ๊ต์ฌ ๋ชจ๋ธ์ ์ง์์ ์์ ํ์ ๋ชจ๋ธ๋ก ์ฎ๊ฒจ ์ฑ๋ฅ์ ๋์ด๋ ๊ธฐ๋ฒ์ผ๋ก ํ๋ ๋ผ๋ฒจ + ์ํํธ ๋ผ๋ฒจ ๊ฐ๋
์ผ๋ก ๊ตฌ๋ถ!!
- MIM (Masked Image Modeling)
- ์ด๋ฏธ์ง๋ฅผ ํจ์น ๋จ์๋ก ๊ฐ๋ฆฌ๊ณ (mask), ๊ฐ๋ ค์ง ๋ถ๋ถ์ ๋ณต์ํ๋๋ก ํ์ตํ๋ Self-supervised pretraining ๋ฐฉ๋ฒ
- BEiT๋ ViT์ ์ด๊ธฐ MIM์ ๋ํํ๋ ๋ฐฉ๋ฒ ์ค ํ๋(ํ ํฌ๋์ด์ ๋ก ๋ง๋ ๋น์ฃผ์ผ ํ ํฐ ๋ณต์)
- ์ดํ SimMIM(ํฝ์ ๋ณต์), MaskFeat(HOG ํน์ง ๋ณต์) ๋ฑ ๋ค์ํ ํ๊น์ผ๋ก ํ์ฅ.
- MAE (Masked Autoencoder)
- MIM์ ํ ๋ณํ์ผ๋ก, ๋์ ๋ง์คํฌ ๋น์จ(~75%), ๋น๋์นญ ์ธ์ฝ๋โ๋์ฝ๋๋ฅผ ์ฌ์ฉ.
- ์ธ์ฝ๋๋ ๋ณด์ด๋ ํจ์น๋ง ์ฒ๋ฆฌํด ํจ์จ์ ์ด๊ณ , ๋์ฝ๋๊ฐ ์ ์ฒด ์ด๋ฏธ์ง๋ฅผ ๋ณต์(์ฃผ๋ก ํฝ์ ๊ฐ ๋ณต์).
#๏ผ# ๐งฑ EfficientSAM ๊ตฌ์กฐ(Architecture)
- Image Encoder:
- ViT-Tiny / ViT-Small ๋ฑ ๊ฒฝ๋ ๋ฐฑ๋ณธ ๊ธฐ๋ฐ
- SAMI ํ๋ฆฌํธ๋ ์ด๋์ผ๋ก SAM ViT-H ํน์ง์ ์ฌ๊ตฌ์ฑํ๊ฒ ํ์ต โ ๊ฒฝ๋ ์ธ์ฝ๋๊ฐ SAM์ ํํ๋ ฅ์ ์ต๋.
- SAM์ ํน์ง์ ๋ณด๋ค ์ ๋ฐฐ์ฐ๊ธฐ ์ํด, SAM์ ์ด๋ฏธ์ง ์๋ฒ ๋ฉ์, ๋์ผํ๊ฒ KDํ๋๊ฒ์ด ์๋๋ผ, masked ๋ ์ด๋ฏธ์ง๋ก ํ์ตํค์ ๋ถ์๋ถ์๋ณ, ํน์ ๋ณด์ด์ง ์๋ ๋ถ๋ถ๋ ์ถ๋ก ํ์ฌ์ฌ ํน์ง์ ์ ํ์ ํ ์ ์๊ฒํจ
- Prompt Encoder (SAM๊ณผ ๋์ผ):
- ํฌ์ธํธ/๋ฐ์ค ํ๋กฌํํธ๋ฅผ ๋์ผํ ์๋ฒ ๋ฉ์ผ๋ก ๋ณํํ๋ ๊ฒฝ๋ ํธ๋์คํฌ๋จธ ์ธ์ฝ๋๋ฅผ ๊ทธ๋๋ก ์ฌ์ฉ
- Mask Decoder (SAM๊ณผ ๋์ผ):
- ์ด๋ฏธ์งยทํ๋กฌํํธ ์๋ฒ ๋ฉ์ ๋์ผ ํฌ๋ก์ค์ดํ ์ ์ผ๋ก ๊ฒฐํฉํด ๋ง์คํฌ(๋ฐ IoU ์์ธก)๋ฅผ ์ถ๋ ฅ.
- ๊ตฌ์กฐ ํธํ์ ํตํด ๊ธฐ์กด SAM ํด๋ง/์ธํฐํ์ด์ค๋ฅผ ๋๋ถ๋ถ ์ฌ์ฌ์ฉ
#๏ผ# ๐ง ํ์ต๋ฒ(Training Recipe) ๋ฐ ํ์ต ๊ฒฐ๊ณผ(Results)
- 1) SAMI ํ๋ฆฌํธ๋ ์ด๋ (์ฌ์ ํ์ต)
- ๊ต์ฌ: SAM์ ViT-H ์ธ์ฝ๋๋ก๋ถํฐ ์ป์ ๊ณ ํ์ง ํน์ง.
- ํ์: ๊ฒฝ๋ ViT-T/S ์ธ์ฝ๋.
- ๋ชฉํ: ๋ง์คํน ๋ณต์์ ํตํด SAM ํน์ง์ ์ฌํ โ ๊ฒฝ๋ ์ธ์ฝ๋๊ฐ ํ๋กฌํํธ ๋ถํ ์ ์ ํฉํ ํํ ์ต๋
- 2) SA-1B ํ์ธํ๋ (์ธ๊ทธ๋ฉํธ ์ ๋์ฑ ํ์คํฌ ์ ํฉํ)
- SAMI๋ก ์ด๊ธฐํ๋ ์ธ์ฝ๋ + SAM ๋์ฝ๋๋ฅผ SA-1B๋ก ํ์ธํ๋ํด ํฌ์ธํธ/๋ฐ์ค/Everything ์ค์ ์์์ ์ฑ๋ฅ์ ๋ง์ถค
- 3) ๋ค์ด์คํธ๋ฆผ ์ ์ด: SAMI์์ ๋์จ ์ธ์ฝ๋๋ฅผ ๋ฐํ์ผ๋ก ๋ถ๋ฅยท๊ฒ์ถยท๋ถํ ๋ฑ ๋ค์ํ ๊ณผ์ ์ ํ์ธํ๋ ํด๋ณด๋ฉฐ ๋ค์ํ ๊ณผ์ ์ ์ฌ์ฉ ๊ฐ๋ฅํจ์ ํ ์คํธ
- Image Classification. Object Detection and Instance Segmentation. Semantic Segmentation ์์ ๋ชจ๋ ์ข์ ์ฑ๋ฅ์ ๋ณด์!
๐งช Segmentation ๊ฒฐ๊ณผ ๋ถ์ & Ablation ํ ์คํธ
1) SAMI์ ์ด๋
- ์ผ๋ฐ MAE๋ฅ ๋๋น, SAM ํน์ง ๋ณต์์ ๋ชฉํ๋ฅผ ๋ SAMI๊ฐ ํ๋กฌํํธ ๋ถํ ์ ๋ ์ ํฉํ ํํ์ ํ์ตํ๋ ๊ฒ์ผ๋ก ๋ณด๊ณ ๋ฉ๋๋ค. :contentReference[oaicite:16]{index=16}
2) ๊ฒฝ๋ ๋ฐฑ๋ณธ์ ์คํจ์ฑ
- ViT-T/S๋ก ๊ต์ฒดํด๋, SAMI+ํ์ธํ๋์ผ๋ก ํ์ง์ ์ ์งํ๋ฉด์ ํจ์จ์ฑ์ ํ๋ณด. ๋๊ท๋ชจ ViT-H ์์กด๋๋ฅผ ๋ฎ์ถฅ๋๋ค. :contentReference[oaicite:17]{index=17}
3) ์ค์ ํธํ์ฑ
- ํฌ์ธํธ/๋ฐ์ค/Everything ํ๋กฌํํธ์ SAM ๋ง์คํฌ ๋์ฝ๋๋ฅผ ์ ์งํด, ๊ธฐ์กด ํ์ดํ๋ผ์ธ ๋์ฒด ๋น์ฉ์ด ๋ฎ์ต๋๋ค(์ฒดํฌํฌ์ธํธยท์์ ์ ๊ณต). :contentReference[oaicite:18]{index=18}
๐ฏ Zero-shot single point valid mask evaluation results (1-click / 1-box)
- ํ๋กํ ์ฝ: GT ๋ง์คํฌ ๋ด๋ถ ๋๋ค ํฌ์ธํธ, GT ๋ง์คํฌ์ ๋ํ tight bbox๋ฅผ ํ๋กฌํํธ๋ก ์ฌ์ฉ. ๋ค์ค ๋ง์คํฌ ์ค ์ต๊ณ ์ ๋ขฐ๋ ํ๋๋ง ํ๊ฐ.
- ๊ฒฐ๊ณผ
- EfficientSAM-Ti: MobileSAM ๋๋น +1.9 mIoU(1-click), +1.5 mIoU(1-box) (๋ณต์ก๋ ์ ์ฌ)
- SAMI > MAE: COCO/LVIS ์ธํฐ๋ํฐ๋ธ์์ SAMI ์ฌ์ ํ์ต ๊ฐ์ค์น๊ฐ MAE ์ฌ์ ํ์ต๋ณด๋ค ์ฐ์
- EfficientSAM-S: COCO(box) ๊ธฐ์ค SAM ๋๋น โ1.5 mIoU, LVIS(box) โ3.5 mIoU (ํ๋ผ๋ฏธํฐ๋ ~20ร ์ ์)
- ๋ค์ค ํด๋ฆญ์์๋ MobileSAM, SAM-MAE-Ti์ ๊ฒฝ์์ ์ฑ๋ฅ
๐ฆ Zero-shot instance segmentation
- ํ๋กํ ์ฝ: ViTDet์ด ์์ฑํ bbox ํ๋กฌํํธ ์ฌ์ฉ, bbox์ IoU ์ต๋ ๋ง์คํฌ๋ฅผ ์ ํ
- ๊ทธ๋์ ViTDet-H ๊ฐ ์ํ์ ์ผ๋ก ๋ณด๋ฉด๋จ!!
- ๊ฒฐ๊ณผ
- EfficientSAM-S: FastSAM ๋๋น COCO +6.5 AP, LVIS +7.8 AP
- EfficientSAM-Ti: FastSAM ๋๋น COCO +4.1 AP, LVIS +5.3 AP / MobileSAM ๋๋น COCO +3.6 AP, LVIS +5.5 AP
- ๋ชจ๋ธ ํฌ๊ธฐ: Ti 9.8M vs FastSAM 68M โ ํจ์ฌ ๊ฒฝ๋
- S ๋ชจ๋ธ: 0.6G ํ๋ผ๋ฏธํฐ SAM ๋๋น AP ~2 ์ฐจ์ด๊น์ง ๊ฒฉ์ฐจ ์ถ์
- ์์ฝ : ๋ค๋ฅธ ๊ฒฝ๋๋ชจ๋ธ๋ค์ ๋นํด์๋ ์ฑ๋ฅ์ด ์ข๊ณ ํฐ๋ชจ๋ธ(ViTDet-H)์ ๋ ์กฐ๊ธ ๋จ์ด์ง๋ ์ฑ๋ฅ
๐ ์ ์ฑ ๋น๊ต & ์ฃผ๋ชฉ ๊ฐ์ฒด(Salient) ์ธ๊ทธ๋ฉํ ์ด์
- ์ ์ฑ ๊ฒฐ๊ณผ: ํฌ์ธํธ/๋ฐ์ค/โsegment everythingโ ์๋๋ฆฌ์ค์์ SAM์ ๊ทผ์ ํ ๊ฒฝ๊ณยท๊ฐ๋ฆผ ์ถ๋ก ํ์ง
- Salient Instance Seg.: Uยฒ-Net์ผ๋ก Saliency map ์์ฑ โ ๋งต ๋ด๋ถ 3์ (3-click)๋ง์ผ๋ก ๊ด์ฌ ๊ฐ์ฒด ๋ถํ
โ ์ ์ฌ์ฉ์ด ์ด๋ ค์ด ์ฌ์ฉ์๋ฅผ ๋๋ ์ ๊ทผ์ฑ ์๋๋ฆฌ์ค ๊ฐ๋ฅ์ฑ
๐งช Ablation ํต์ฌ
- SAMI์์์ Reconstsuction lOss์ ์ค๊ณ: MSE > Cosine โ SAM ํผ์ฒ์ โ๊ฐโ์ ์ง์ ์ฌ๊ตฌ์ฑํ๋ ํธ์ด ์ข๋ค!!
- ํฌ๋ก์ค-์ดํ
์
๋์ฝ๋: Masked ํ ํฐ๋ง ๋์ฝ๋์์ ์ฟผ๋ฆฌ(์ธ์ฝ๋ ์ถ๋ ฅ ํ ํฐ์ ์ต์ปค์ฒ๋ผ ์ฌ์ฉ)
โ ๋ชจ๋ ํ ํฐ ๋์ฝ๋ฉ(MAE์) ๋๋น Top-1 +3%p(ImageNet-1K, SAMI-Ti) - ๋ง์คํฌ ๋น์จ: 50/75/85% ์คํ์์ ๋์ ๋น์จ(โ75%)์ด ์ผ๊ด๋๊ฒ ์ฐ์
- ์ฌ๊ตฌ์ฑ ํ๊น: CLIP ์ธ์ฝ๋ ํผ์ฒ๋ฅผ ํ๊น์ผ๋ก ํด๋ MAE ๋๋น +0.8%p(ViT-Tiny, IN-1K)
โ ๊ฐ๋ ฅํ ๊ต์ฌ ํผ์ฒ๋ฅผ ํ๊น์ผ๋ก ํ๋ Guided MIM์ ํจ๊ณผ - ํ์ธํ๋ ์คํ
: 0.1 epoch์์๋ ์ค์, 1 epoch์ +2.5 mIoU ์์น
- EfficientSAM-S ์ต์ข 76.9 mIoU, SAM ๋๋น โ1.5 mIoU
โ ๊ฒฐ๋ก
- EfficientSAM์ SAM์ ํํ ๋ฅ๋ ฅ์ ๊ฒฝ๋ ์ธ์ฝ๋์ ์ด์ํ๋ SAMI ์ฌ์ ํ์ต์ผ๋ก, ์ ํ๋ ์ ์ง + ์ถ๋ก ํจ์จ ๊ฐ์ ์ ์ด๋ฃธ!!
- ํ๋กฌํํธ ํธํ์ฑ(ํฌ์ธํธ/๋ฐ์ค/Everything)๊ณผ ์คํ๋ ์ฒดํฌํฌ์ธํธ ๋๋ถ์, ์ฃ์งยท์ค์๊ฐยท๋๊ท๋ชจ ๋ฐฐํฌ์ ํ์ฉ ๊ฐ๋ฅ!!
This post is licensed under CC BY 4.0 by the author.