FCOS
FCOS는 미리 정의한 앵커 박스 집합에 의존하지 않고 픽셀별로 객체를 탐지하며, 특징 맵의 각 위치에서 바운딩 박스와 중심성 점수를 예측합니다. LibreYOLO는 탐지용 torchvision 구현을 포팅합니다.
- 작업
- detection
- 크기
- r50 at 800 px
- 설치
pip install libreyolo- 지원 티어
- 추론 전용, v부터 지원. 예측, 검증, 내보내기만 지원합니다. 학습 기능은 적용되지 않습니다.
- 라이선스
- 코드 BSD-3-Clause, 가중치 BSD-3-Clause. 상업적 사용
설치
FCOS에는 선택적 extra가 필요하지 않습니다. 가져오는 모든 항목이 기본 설치에 포함됩니다.
pip install libreyolo예측
가중치는 처음 사용할 때 Hugging Face에서 내려받아 로컬에 캐시됩니다.
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibreFCOSr50.pt")result = model(SAMPLE_IMAGE, save=True) for box in result.boxes: print(box.cls, box.conf, box.xyxy)libreyolo predict model=LibreFCOSr50.pt source=https://raw.githubusercontent.com/LibreYOLO/libreyolo/release/libreyolo/assets/parkour.jpg save=True반환되는 Results 객체는 모든 계열에서 동일하므로 다른 탐지기로 바꾸려면 한 줄만
수정하면 됩니다. 임계값 인수 없이 모델을 호출하면 FCOS 자체의 공개된 기본값인
conf=0.2, iou=0.6, max_det=100을 적용합니다. 세 값 중 하나라도 전달하면
재정의할 수 있습니다. FCOS는 픽셀별 예측에 최종 NMS 단계를 유지합니다. 소스,
스트리밍, 결과 처리는 예측을 참조합니다.
변형
크기는 특징 피라미드가 있는 ResNet-50 하나이며, 이 계열이 인식하는 유일한 변형입니다.
검증
val()은 학습에 사용한 형식의 모든 데이터셋을 대상으로 측정한 정밀도, 재현율,
mAP 50, mAP 50-95를 포함하는 metrics/ 키 딕셔너리를 반환합니다.
from libreyolo import LibreYOLO model = LibreYOLO("LibreFCOSr50.pt")metrics = model.val(data="my-dataset.yaml") print(metrics["metrics/mAP50-95"])print(metrics["metrics/mAP50"])libreyolo val model=LibreFCOSr50.pt data=my-dataset.yaml내보내기
| 작업 | ONNX | TorchScript | ExecuTorch | TensorRT | OpenVINO | Paddle | MNN | RKNN | ncnn | TFLite | CoreML | Core AI |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Detection | Detection to ONNX: 지원함 | Detection to TorchScript: 지원함 | Detection to ExecuTorch: 지원하지 않음 | Detection to TensorRT: 지원하지 않음 | Detection to OpenVINO: 지원함 | Detection to Paddle: 지원하지 않음 | Detection to MNN: 지원하지 않음 | Detection to RKNN: 지원하지 않음 | Detection to ncnn: 지원하지 않음 | Detection to TFLite: 지원하지 않음 | Detection to CoreML: 지원하지 않음 | Detection to Core AI: 지원하지 않음 |
FCOS는 ONNX, TorchScript, OpenVINO로 내보냅니다. FCOS는 그래프 실행 전에 소스
종횡비를 유지하므로 LibreYOLO는 전달된 값과 관계없이 ONNX 및 OpenVINO 경로에서
dynamic=True를 강제하여 패딩된 입력 형상에 그래프가 유효하도록 합니다. 내보낸
.onnx 파일은 파일 접미사에 따라 LibreYOLO()로 다시 불러오며 동일한 Results를
반환합니다.
from libreyolo import LibreYOLO model = LibreYOLO("LibreFCOSr50.pt")model.export(format="onnx", imgsz=800)model.export(format="torchscript", imgsz=800)libreyolo export model=LibreFCOSr50.pt format=onnx imgsz=800from libreyolo import LibreYOLO, SAMPLE_IMAGE # 팩토리는 파일 접미사로 라우팅하므로 내보낸 아티팩트도# 체크포인트처럼 불러오며 동일한 Results 객체를 반환합니다.model = LibreYOLO("LibreFCOSr50.onnx")result = model(SAMPLE_IMAGE) print(result.boxes.xyxy)체크포인트
이 계열에서 공개된 모든 가중치 파일입니다.
| 파일 | 입력(px) | 가중치 라이선스 |
|---|---|---|
| Detection | ||
| LibreFCOSr50.pt | 800 | bsd-3-clause |
위의 모든 파일은 현재 LibreYOLO 조직에 있으며 처음 사용할 때 내려받습니다.
라이선스
내려받는 특정 가중치의 Hugging Face 저장소에서 라이선스를 확인하십시오. LibreYOLO 조직의 모든 체크포인트에는 라이선스가 있으며 한 계열 안에서도 항상 같지는 않습니다. 해당 저장소가 신뢰할 수 있는 기준입니다. 아래 요약은 이 페이지를 마지막으로 검증했을 때 적용된 내용을 설명합니다.
관련 라이선스에 관한 설명이며 법률 자문이 아닙니다. 상업적으로 중요한 사안이라면 라이선스를 직접 읽고 별도의 법률 자문을 받으십시오.
- 원작
- FCOS, PyTorch
- 업스트림 라이선스
- BSD-3-Clause
- 업스트림 소스
- github.com/pytorch/vision
- LibreYOLO 코드
- MIT
- 가중치
- BSD-3-Clause, huggingface.co/LibreYOLO에 다시 게시됨
- 해석
- BSD-3-Clause is a permissive license, so this code can be used in commercial and closed-source products with no obligation on your own application code. It asks only that you keep the copyright notice and disclaimer with any copy you redistribute, and it carries no patent grant. The published checkpoint used for parity testing is not distributed in the LibreYOLO source tree: torchvision's own documentation notes that a pretrained model's terms may depend on its training data, so the Hugging Face mirror ships the BSD text on that implied basis and repeats the caveat rather than issuing an explicit checkpoint-specific grant.
인용
@inproceedings{tian2019fcos,
title = {{FCOS}: Fully Convolutional One-Stage Object Detection},
author = {Tian, Zhi and Shen, Chunhua and Chen, Hao and He, Tong},
booktitle = {Proc. Int. Conf. Computer Vision (ICCV)},
year = {2019}
}
@article{tian2021fcos,
title = {{FCOS}: A Simple and Strong Anchor-free Object Detector},
author = {Tian, Zhi and Shen, Chunhua and Chen, Hao and He, Tong},
booktitle = {IEEE T. Pattern Analysis and Machine Intelligence (TPAMI)},
year = {2021}
}github.com/tianzhi0549/FCOS#citations에 있는 저자의 인용 블록에서 복사했습니다.