DeepLabv3
각 픽셀을 분류하기 전에 여러 팽창률로 특징을 병렬 풀링하는 의미 분할 네트워크입니다. 이를 atrous spatial pyramid pooling이라고 합니다. LibreYOLO는 의미 분할 전용으로 DeepLabv3를 제공합니다.
- 작업
- semantic
- 크기
- 설치
pip install libreyolo- 지원 티어
- 추론 전용, v부터 지원. 예측, 검증, 내보내기만 지원합니다. 학습 기능은 적용되지 않습니다.
- 라이선스
- 코드 BSD-3-Clause, 가중치 BSD-3-Clause. 상업적 사용
설치
DeepLabv3에는 선택적 extra가 필요하지 않습니다. 가져오는 모든 항목이 기본 설치에 포함됩니다.
pip install libreyolo예측
처음 사용할 때 Hugging Face에서 가중치를 다운로드해 로컬에 캐시합니다. 이 계열에는 -sem 파일명 접미사가 필요합니다.
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibreDeepLabv3r50-sem.pt")result = model(SAMPLE_IMAGE, save=True) mask = result.semantic_maskprint(mask.data.shape) # (H, W) 클래스 IDprint(mask.classes) # 이미지에 있는 클래스 ID 정렬 목록libreyolo predict model=LibreDeepLabv3r50-sem.pt source=https://raw.githubusercontent.com/LibreYOLO/libreyolo/release/libreyolo/assets/parkour.jpg save=True의미 분할은 박스가 아니라 픽셀마다 클래스 ID 하나를 반환합니다. 따라서 result.semantic_mask의 .data에는 (H, W) 배열이, .classes에는 이미지에 있는 클래스 ID 목록이 들어 있습니다. conf, iou, max_det은 API 일관성을 위해 허용되지만 아무 효과가 없습니다. 모델은 신뢰도 임곗값이나 NMS 단계 없이 argmax로 모든 픽셀에 클래스를 할당합니다. 소스, 스트리밍, 결과 처리는 예측을 참조합니다.
변형
백본은 팽창 ResNet-50, 팽창 ResNet-101, 팽창 MobileNetV3-Large 세 가지입니다. 이는 DeepLabv3+가 아니라 DeepLabv3이므로 디코더 단계나 CRF 정제가 없습니다. 논문 자체의 참조 코드가 아닌 torchvision 구현과 일치합니다.
LibreYOLO는 DeepLabv3를 학습하지 않습니다. 이 계열에서 train()은 NotImplementedError를 발생시키며 위의 지원 티어에서는 이를 추론 전용으로 표시합니다. 공개된 세 체크포인트는 torchvision 자체의 COCO-with-VOC-label 가중치를 LibreYOLO 로더용으로 변환한 것입니다.
검증
val()은 학습에 사용한 형식의 데이터셋을 대상으로 측정한 metrics/mIoU와 metrics/pixel_accuracy를 반환합니다.
from libreyolo import LibreYOLO model = LibreYOLO("LibreDeepLabv3r50-sem.pt")metrics = model.val(data="my-dataset.yaml") print(metrics["metrics/mIoU"])print(metrics["metrics/pixel_accuracy"])libreyolo val model=LibreDeepLabv3r50-sem.pt data=my-dataset.yaml내보내기
| 작업 | ONNX | TorchScript | ExecuTorch | TensorRT | OpenVINO | Paddle | MNN | RKNN | ncnn | TFLite | CoreML | Core AI |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| semantic | semantic to ONNX: 지원함 | semantic to TorchScript: 지원함 | semantic to ExecuTorch: 지원하지 않음 | semantic to TensorRT: 지원함 | semantic to OpenVINO: 지원함 | semantic to Paddle: 지원하지 않음 | semantic to MNN: 지원하지 않음 | semantic to RKNN: 지원하지 않음 | semantic to ncnn: 지원하지 않음 | semantic to TFLite: 지원하지 않음 | semantic to CoreML: 지원하지 않음 | semantic to Core AI: 지원하지 않음 |
내보낸 아티팩트는 파일 접미사에 따라 LibreYOLO()로 다시 불러옵니다. 따라서 .onnx 또는 .engine 파일은 체크포인트처럼 동작하며 동일한 Results를 반환합니다. 각 형식이 받는 인수는 내보내기에 나와 있습니다.
from libreyolo import LibreYOLO model = LibreYOLO("LibreDeepLabv3r50-sem.pt")model.export(format="onnx")model.export(format="tensorrt", half=True)libreyolo export model=LibreDeepLabv3r50-sem.pt format=onnxlibreyolo export model=LibreDeepLabv3r50-sem.pt format=tensorrt half=Truefrom libreyolo import LibreYOLO, SAMPLE_IMAGE # 팩토리는 파일 접미사에 따라 라우팅하므로 내보낸 아티팩트도# 다른 체크포인트처럼 불러와 동일한 Results 객체를 반환합니다.model = LibreYOLO("LibreDeepLabv3r50-sem.onnx")result = model(SAMPLE_IMAGE) print(result.semantic_mask.data.shape)체크포인트
이 계열에 공개된 모든 가중치 파일입니다.
| 파일 | 입력(px) | 가중치 라이선스 |
|---|---|---|
| semantic | ||
| LibreDeepLabv3r50-sem.pt | bsd-3-clause | |
| LibreDeepLabv3r101-sem.pt | bsd-3-clause | |
| LibreDeepLabv3mv3-sem.pt | bsd-3-clause | |
위의 모든 파일은 현재 LibreYOLO 조직에 있으며 처음 사용할 때 내려받습니다.
라이선스
내려받는 특정 가중치의 Hugging Face 저장소에서 라이선스를 확인하십시오. LibreYOLO 조직의 모든 체크포인트에는 라이선스가 있으며 한 계열 안에서도 항상 같지는 않습니다. 해당 저장소가 신뢰할 수 있는 기준입니다. 아래 요약은 이 페이지를 마지막으로 검증했을 때 적용된 내용을 설명합니다.
관련 라이선스에 관한 설명이며 법률 자문이 아닙니다. 상업적으로 중요한 사안이라면 라이선스를 직접 읽고 별도의 법률 자문을 받으십시오.
- 원작
- DeepLabv3, 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 and these weights can be used in commercial and closed-source products. It asks you to keep the copyright notice, license text and a non-endorsement clause with any copy you redistribute. LibreYOLO's inference graph is torchvision's ASPP head over its ResNet-50, ResNet-101 and MobileNetV3-Large backbones; it is DeepLabv3, not DeepLabv3+, so there is no decoder or CRF, and the paper's training-only auxiliary FCN classifier is excluded. The three published checkpoints are torchvision's official COCO-with-VOC-label weights; their separate LibreYOLO Hugging Face mirrors carry BSD-3-Clause on an implied basis disclosed by torchvision rather than an explicit checkpoint-specific grant, and torchvision's own documentation notes that pretrained-model terms can depend on the training data, leaving that determination to the user.