Home

Awesome

<div align="center"> <h1>WeakSAM </h1> <h3>Segment Anything Meets Weakly-supervised Instance-level Recognition</h3>

Lianghui Zhu<sup>1</sup> *,Junwei Zhou<sup>1</sup> *,Yan Liu<sup>2</sup>, Xin Hao<sup>2</sup>, Wenyu Liu<sup>1</sup>, Xinggang Wang<sup>1 :email:</sup>

<sup>1</sup> School of EIC, Huazhong University of Science and Technology, <sup>2</sup> Alipay Tian Qian Security Lab

(*) equal contribution, (<sup>:email:</sup>) corresponding author.

ArXiv Preprint (arXiv 2402.14812), Project Page(WeakSAM project page)

</div>

PWC PWC PWC PWC PWC PWC

News

Abstract

Weakly supervised visual recognition using inexact supervision is a critical yet challenging learning problem. It significantly reduces human labeling costs and traditionally relies on multi-instance learning and pseudo-labeling. This paper introduces WeakSAM and solves the weakly-supervised object detection (WSOD) and segmentation by utilizing the pre-learned world knowledge contained in a vision foundation model, i.e., the Segment Anything Model (SAM). WeakSAM addresses two critical limitations in traditional WSOD retraining, i.e., pseudo ground truth (PGT) incompleteness and noisy PGT instances, through adaptive PGT generation and Region of Interest (RoI) drop regularization. It also addresses the SAM's problems of requiring prompts and category unawareness for automatic object detection and segmentation. Our results indicate that WeakSAM significantly surpasses previous state-of-the-art methods in WSOD and WSIS benchmarks with large margins, i.e. average improvements of 7.4% and 8.5%, respectively.

<p align="middle"> <img src="sources/radarv1.3.png" alt="Highlight performances" width="400px"> </p>

Overview

We first introduce classification clues and spatial points as automatic SAM prompts, which address the problem of SAM requiring interactive prompts. Next, we use the WeakSAM-proposals in the WSOD pipeline, in which the weakly-supervised detector performs class-aware perception to annotate pseudo ground truth (PGT). Then, we analyze the incompleteness and noise problem existing in PGT and propose adaptive PGT generation, RoI drop regularization to address them, respectively. Finally, we use WeakSAM-PGT to prompt SAM for WSIS extension. (The snowflake mark means the model is frozen.)

<p align="middle"> <img src="sources/weaksam_pipeline_v4.0_1.png" alt="WeakSAM pipeline" width="1600px"> </p>

Main results

For WSOD task:

DatasetWSOD methodWSOD performanceRetrain methodRetrain performance
VOC2007WeakSAM(OICR)58.9 AP50Faster R-CNN65.7 AP50
DINO66.1 AP50
WeakSAM(MIST)67.4 AP50Faster R-CNN71.8 AP50
DINO73.4 AP50
COCO2014WeakSAM(OICR)19.9 mAPFaster R-CNN22.3 mAP
DINO24.9 mAP
WeakSAM(MIST)22.9 mAPFaster R-CNN23.8 mAP
DINO26.6 mAP

For WSIS task:

DatasetRetrain methodAP25AP50AP70AP75
VOC2012Mask R-CNN70.359.643.136.2
Mask2Former73.464.449.745.3
DatasetRetrain methodAP[50:95]AP50AP75
COCOval2017Mask R-CNN20.633.922.0
Mask2Former25.238.427.0
COCOtest-devMask R-CNN21.034.522.2
Mask2Former25.939.927.9

Data & Preliminaries

Generation & Training pipelines

Citation

If you find this repository/work helpful in your research, welcome to cite the paper and give a ⭐.

@article{zhu2024weaksam,
  title={WeakSAM: Segment Anything Meets Weakly-supervised Instance-level Recognition},
  author={Zhu, Lianghui and Zhou, Junwei and Liu, Yan and Hao, Xin and Liu, Wenyu and Wang, Xinggang},
  journal={Proceedings of the 32nd ACM International Conference on Multimedia},
  year={2024}
}

Acknowledgement

Thanks for these wonderful works and their codebases! ❤️ MIST, WSOD2, Segment-anything, WeakTr, SoS-WSOD