lartpang/SAMs-CDConcepts-Eval
소개
차세대 Segment Anything 모델을 위한 연구: 다양한 프롬프트로 여러 장면에서 맥락 의존적 개념을 대상으로 SAM과 SAM 2를 종합적으로 평가
기타 프로젝트측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalInspiring the Next Generation of Segment Anything Models: Comprehensively Evaluate SAM and SAM 2 with Diverse Prompts Towards Context-Dependent Concepts under Different Scenes
As large-scale foundation models trained on billions of image–mask pairs covering a vast diversity of scenes, objects, and contexts, SAM and its upgraded version, SAM 2, have significantly influenced multiple fields within computer vision. Leveraging such unprecedented data diversity, they exhibit strong open-world segmentation capabilities, with SAM 2 further enhancing these capabilities to support high-quality video segmentation. While SAMs (SAM and SAM 2) have demonstrated excellent performance in segmenting context-independent concepts like people, cars, and roads, they overlook more challenging context-dependent (CD) concepts, such as visual saliency, camouflage, industrial defects, and medical lesions. CD concepts rely heavily on global and local contextual information, making them susceptible to shifts in different contexts, which requires strong discriminative capabilities from the model. The lack of comprehensive evaluation of SAMs limits understanding of their performance boundaries, which may hinder the design of future models. In this paper, we conduct a thorough evaluation of SAMs on 11 CD concepts across 2D and 3D images and videos in various visual modalities within natural, medical, and industrial scenes. We develop a unified evaluation framework for SAM and SAM 2 that supports manual, automatic, and intermediate self-prompting, aided by our specific prompt generation and interaction strategies. We further explore the potential of SAM 2 for in-context learning and introduce prompt robustness testing to simulate real-world imperfect prompts. Finally, we analyze the benefits and limitations of SAMs in understanding CD concepts and discuss their future development in segmentation tasks. This work aims to provide valuable insights to guide future research in both context-independent and context-dependent concepts segmentation, potentially informing the development of the next version — SAM 3.
Usage
Prepare Datasets
See our ArXiv version for dataset details and set their paths in the config file.
[!note]
- Some datasets need to be preprocessed before use by the scripts in the folder
preprocess:- Images in some datasets like CAD for Video COD, may not have corresponding annotations, and these images will not be used for model prediction and performance evaluation. So please clean them up in advance before the script is used.
Prepare SAM and SAM 2
- Install SAM:
git clone https://github.com/facebookresearch/segment-anything.gitcd segment-anythingpip install -e .
- Install SAM 2:
git clone https://github.com/facebookresearch/sam2.git segment-anything2(Use a separate folder forsam2code.)cd segment-anything2pip install -e .
- Download SAM and SAM 2 checkpoints and assign their paths to the items
sam-landsam2-lof the config file:vit_lcheckpoint from https://github.com/facebookresearch/segment-anything?tab=readme-ov-file#model-checkpoints.hiera_largecheckpoint from https://github.com/facebookresearch/sam2?tab=readme-ov-file#sam-2-checkpoints
Generate Predictions
Run the corresponding commands (see ./run.sh) to generate predictions for each task.
Evaluation Tools
- https://github.com/Xiaoqi-Zhao-DLUT/PySegMetric_EvalToolkit
- https://github.com/zhaoyuan1209/PyADMetric_EvalToolkit
Awesome-Unified-Context-dependent-Concept-Segmentation
Contributors
Citation
@misc{Eva_SAMs,
title={Inspiring the Next Generation of Segment Anything Models: Comprehensively Evaluate SAM and SAM 2 with Diverse Prompts Towards Context-Dependent Concepts under Different Scenes},
author={Xiaoqi Zhao and Youwei Pang and Shijie Chang and Yuan Zhao and Lihe Zhang and Chenyang Yu and Hanqi Liu and Jiaming Zuo and Jinsong Ouyang and Weisi Lin and Georges El Fakhri and Huchuan Lu and Xiaofeng Liu},
year={2025},
eprint={2412.01240},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2412.01240},
}
관련 프로젝트 살펴보기
불러오는 중…