SAM 3

SAM 3는 일반적인 점과 박스 프롬프트에 텍스트 개념 프롬프트를 더해 SAM을 확장합니다. 따라서 "yellow school bus" 같은 문구로 일치하는 모든 인스턴스를 반환할 수 있습니다. LibreYOLO는 `LibreYOLO()` 탐지기 팩토리와 분리된 전용 LibreSAM 팩토리로 이미지 경로를 지원합니다.

작업
instance segmentation
크기
large at 1008 px
설치
pip install libreyolo
지원 티어
별도 티어, v부터 지원. 자체 팩토리와 계약을 갖춘 별도의 제품 영역입니다.
업스트림
Meta FAIR의 SAM 3, SAM License (Meta custom, gated). 논문, 소스
라이선스
코드 MIT, 가중치 SAM License (Meta custom, gated). 상업적 사용

설치

SAM 3에는 transformerstimm을 설치하는 sam extra가 필요합니다.

bash
pip install "libreyolo[sam]"

가중치에는 접근 제한이 있습니다. huggingface.co/facebook/sam3을 방문해 Meta의 SAM License에 동의한 다음 첫 다운로드 전에 hf auth login을 실행하거나 HF_TOKEN을 설정합니다. LibreYOLO는 이 계열을 처음 다운로드할 때 라이선스 고지를 기록합니다.

예측

LibreSAM(...) 또는 계열별 LibreSAM3(...)LibreYOLO(...)와 별도의 진입점입니다. 여기서는 프롬프트 없는 순전파에 의미가 없으므로 탐지기 대신 프롬프트 가능 분할기를 반환합니다. 이 계열에는 libreyolo predict CLI 명령이 없으므로 Python API를 사용합니다. 이미지 추론만 지원하며 SAM 3의 동영상 모델은 범위에 포함되지 않습니다.

점과 박스 프롬프트
from libreyolo import LibreSAM, SAMPLE_IMAGE # "sam3"는 유일한 크기인 "large"입니다. 별칭은 "sam3", "sam-3", "sam3-large"입니다.model = LibreSAM("sam3") # 점 프롬프트: 픽셀 좌표 [x, y], 레이블 1은 전경입니다.result = model.predict(SAMPLE_IMAGE, points=[640, 420], labels=[1])print(result.masks.xy)      # 마스크별 폴리곤print(result.boxes.xyxy)    # 마스크에서 파생된 꼭 맞는 박스 # 점 대신 박스 프롬프트를 사용합니다.result = model.predict(SAMPLE_IMAGE, bboxes=[300, 200, 900, 700])
텍스트(개념) 프롬프트
from libreyolo import LibreSAM3, SAMPLE_IMAGE model = LibreSAM3("large") # 객체 하나만이 아니라 문구와 일치하는 모든 인스턴스를 찾습니다.# text=는 points, bboxes, labels, masks와 함께 사용할 수 없습니다.result = model.predict(SAMPLE_IMAGE, text="a person")print(result.names)         # {0: "a person"}print(result.boxes.conf)    # 인스턴스별 PCS 탐지 점수
한 번 인코딩하고 여러 번 프롬프팅
from libreyolo import LibreSAM3, SAMPLE_IMAGE model = LibreSAM3("large") # 이미지 인코더는 비용이 많이 드는 부분입니다. set_image()는 한 번 실행하고# 이후 모든 predict() 호출은 캐시된 임베딩을 재사용합니다. tracker와# 개념 분할 인코더는 캐시를 공유하지 않으므로 text= 호출은 내부에서 다시 인코딩합니다.model.set_image(SAMPLE_IMAGE)a = model.predict(points=[640, 420], labels=[1])b = model.predict(bboxes=[300, 200, 900, 700])model.reset_image()

점과 박스 경로는 다른 SAM 계열과 같습니다. 점 프롬프트는 객체 하나에 [x, y]를, 여러 객체에 [[x, y], ...]를 받습니다. labels는 각 점을 1(전경) 또는 0(배경)으로 표시하며, 박스 프롬프트는 [x1, y1, x2, y2] 또는 박스 목록을 받습니다. 이 경로의 conf는 탐지 신뢰도가 아니라 예측된 마스크 품질(IoU)을 기준으로 필터링합니다.

text= 경로는 SAM 3에 추가된 기능입니다. 개념 문자열을 사용하면 Promptable Concept Segmentation으로 이미지에서 일치하는 모든 인스턴스를 반환하며 점, 박스, 레이블 또는 마스크와 함께 사용할 수 없습니다. 이 경로에서 conf는 마스크 IoU가 아니라 PCS 탐지 점수입니다. 기본값을 유지하면 모델 자체의 0.3 임곗값이 적용되고 conf=0.0은 모든 후보를 유지합니다. 프롬프트 가능 마스크에는 달리 고정된 클래스 집합이 없으므로 반환되는 names는 클래스 ID 0을 요청한 개념 문자열에 매핑합니다. device=는 모델을 이동하며 set_image() 세션이 활성화된 경우 캐시된 임베딩도 이동합니다. 이 계열에서 train(), val(), export(), track()은 모두 NotImplementedError를 발생시킵니다. SAM 3는 LibreYOLO에서 예측 전용이며 동영상 추적은 범위에 포함되지 않습니다. 소스 유형은 예측을 참조합니다.

변형

크기는 하나이며 고정된 1008 px 입력을 사용하는 large입니다. SAM 3.1은 지원하지 않습니다. 구현에 이 MIT 저장소로 벤더링할 수 없는 사용자 정의 라이선스가 적용되며, LibreYOLO가 의존하는 Transformers 버전도 아직 해당 체크포인트 형식을 불러오지 못합니다.

라이선스

내려받는 특정 가중치의 Hugging Face 저장소에서 라이선스를 확인하십시오. LibreYOLO 조직의 모든 체크포인트에는 라이선스가 있으며 한 계열 안에서도 항상 같지는 않습니다. 해당 저장소가 신뢰할 수 있는 기준입니다. 아래 요약은 이 페이지를 마지막으로 검증했을 때 적용된 내용을 설명합니다.

관련 라이선스에 관한 설명이며 법률 자문이 아닙니다. 상업적으로 중요한 사안이라면 라이선스를 직접 읽고 별도의 법률 자문을 받으십시오.

원작
SAM 3, Meta FAIR
업스트림 라이선스
SAM License (Meta custom, gated)
LibreYOLO 코드
MIT
가중치
SAM License (Meta custom, gated), 저자가 배포합니다. LibreYOLO는 이를 호스팅하거나 미러링하지 않습니다.
해석
The SAM License is Meta's own agreement, not an OSI-approved license like MIT or Apache-2.0. It grants a worldwide, royalty-free license to use, reproduce, distribute and create derivative works, and does not itself say the weights are non-commercial. It does add terms Apache and MIT do not: publications that use the results must acknowledge SAM Materials, reverse engineering is prohibited, use is subject to export-control and sanctions compliance, filing IP litigation against Meta over the materials terminates your license, and Meta may amend the agreement. Weights are gated on facebook/sam3 on Hugging Face: you must accept the terms there and authenticate before downloading. LibreYOLO calls SAM 3 through the Apache-2.0 Transformers implementation and vendors none of Meta's model source, but does not redistribute the weights themselves; read the license yourself before relying on it commercially.

LibreYOLO는 SAM 3 가중치 사본을 자체적으로 호스팅하거나 재배포하지 않습니다. LibreSAM("sam3")는 Hugging Face에서 Meta의 접근 제한 저장소인 facebook/sam3의 파일을 직접 다운로드합니다. 첫 다운로드 전에 Meta의 SAM License에 동의하고 인증해야 합니다.

인용

@misc{carion2025sam3segmentconcepts,
      title={SAM 3: Segment Anything with Concepts},
      author={Nicolas Carion and Laura Gustafson and Yuan-Ting Hu and Shoubhik Debnath and Ronghang Hu and Didac Suris and Chaitanya Ryali and Kalyan Vasudev Alwala and Haitham Khedr and Andrew Huang and Jie Lei and Tengyu Ma and Baishan Guo and Arpit Kalla and Markus Marks and Joseph Greer and Meng Wang and Peize Sun and Roman Rädle and Triantafyllos Afouras and Effrosyni Mavroudi and Katherine Xu and Tsung-Han Wu and Yu Zhou and Liliane Momeni and Rishi Hazra and Shuangrui Ding and Sagar Vaze and Francois Porcher and Feng Li and Siyuan Li and Aishwarya Kamath and Ho Kei Cheng and Piotr Dollár and Nikhila Ravi and Kate Saenko and Pengchuan Zhang and Christoph Feichtenhofer},
      year={2025},
      eprint={2511.16719},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2511.16719},
}

github.com/facebookresearch/sam3#citing-sam-3에 있는 저자의 인용 블록에서 복사했습니다.

LibreYOLO v1.5.0에서 검증되었습니다. 이 페이지의 지원 표, 체크포인트, 벤치마크 수치는 출시된 라이브러리와 공개된 가중치에서 생성되며 수동으로 작성되지 않습니다.