Link to this section객체 탐지#
객체 탐지는 이미지나 비디오 스트림 내 객체의 위치와 클래스를 식별하는 작업입니다.
객체 탐지 모델의 출력값은 이미지 내 객체를 둘러싼 일련의 바운딩 박스(bounding box)이며, 각 박스에 대한 클래스 라벨과 신뢰도 점수가 함께 제공됩니다. 객체 탐지는 장면 내의 관심 객체를 식별해야 하지만 객체의 정확한 위치나 형태를 알 필요는 없을 때 적합한 선택입니다.
Watch: Object Detection with Pretrained Ultralytics YOLO Model.
YOLO26 Detect 모델은 기본 YOLO26 모델로, 예: yolo26n.pt이며 COCO로 사전 학습되었습니다.
Link to this section모델#
여기에 YOLO26 사전 학습 Detect 모델이 나와 있습니다. Detect, Segment, Pose 모델은 COCO 데이터셋으로 사전 학습되었으며, Semantic 모델은 Cityscapes로, Classify 모델은 ImageNet 데이터셋으로 사전 학습되었습니다.
모델은 처음 사용할 때 최신 Ultralytics 릴리스에서 자동으로 다운로드됩니다.
| 모델 | 크기 (픽셀) | mAPval 50-95 | mAPval 50-95(e2e) | 속도 CPU ONNX (ms) | 속도 T4 TensorRT10 (ms) | 파라미터 (M) | FLOPs (B) |
|---|---|---|---|---|---|---|---|
| YOLO26n | 640 | 40.9 | 40.1 | 38.9 ± 0.7 | 1.7 ± 0.0 | 2.4 | 5.4 |
| YOLO26s | 640 | 48.6 | 47.8 | 87.2 ± 0.9 | 2.5 ± 0.0 | 9.5 | 20.7 |
| YOLO26m | 640 | 53.1 | 52.5 | 220.0 ± 1.4 | 4.7 ± 0.1 | 20.4 | 68.2 |
| YOLO26l | 640 | 55.0 | 54.4 | 286.2 ± 2.0 | 6.2 ± 0.2 | 24.8 | 86.4 |
| YOLO26x | 640 | 57.5 | 56.9 | 525.8 ± 4.0 | 11.8 ± 0.2 | 55.7 | 193.9 |
- mAPval 값은 COCO val2017 데이터셋에서 단일 모델 단일 스케일로 측정한 값입니다.
재현하려면yolo val detect data=coco.yaml device=0을 사용하세요. - 속도는 Amazon EC2 P4d 인스턴스를 사용하여 COCO val 이미지에 대해 평균화된 값입니다.
재현하려면yolo val detect data=coco.yaml batch=1 device=0|cpu를 사용하세요. - 파라미터 및 FLOPs 값은
model.fuse()이후 융합된 모델에 대한 것으로, 이는 Conv 및 BatchNorm 레이어를 병합하며, end2end 모델의 경우 보조적인 일대다(one-to-many) 탐지 헤드를 제거합니다. 사전 학습된 체크포인트는 전체 학습 아키텍처를 유지하므로 더 높은 수치를 보일 수 있습니다.
Link to this section학습 (Train)#
이미지 크기 640에서 100 에포크(epochs) 동안 COCO8 데이터셋으로 YOLO26n을 학습합니다. 사용 가능한 인수의 전체 목록은 설정(Configuration) 페이지를 참조하세요.
from ultralytics import YOLO
# Load a model
model = YOLO("yolo26n.yaml") # build a new model from YAML
model = YOLO("yolo26n.pt") # load a pretrained model (recommended for training)
model = YOLO("yolo26n.yaml").load("yolo26n.pt") # build from YAML and transfer weights
# Train the model
results = model.train(data="coco8.yaml", epochs=100, imgsz=640)train 모드에 대한 전체 세부 정보는 Train 페이지를 참조하세요. 탐지 모델은 Ultralytics Platform을 통해 클라우드 GPU에서 학습할 수도 있습니다.
Link to this section데이터셋 형식#
YOLO 탐지 데이터셋 형식은 데이터셋 가이드(Dataset Guide)에서 자세히 확인할 수 있습니다. 기존 데이터셋을 다른 형식(예: COCO 등)에서 YOLO 형식으로 변환하려면 Ultralytics의 JSON2YOLO 도구를 사용하세요. AI 보조 라벨링 도구를 사용하여 Ultralytics Platform에서 탐지 데이터셋을 직접 어노테이션하고 관리할 수도 있습니다.
Link to this section검증 (Val)#
COCO8 데이터셋에서 학습된 YOLO26n 모델의 정확도(accuracy)를 검증합니다. model이 학습 시의 data와 인수를 모델 속성으로 유지하므로 별도의 인수가 필요하지 않습니다.
from ultralytics import YOLO
# Load a model
model = YOLO("yolo26n.pt") # load an official model
model = YOLO("path/to/best.pt") # load a custom model
# Validate the model
metrics = model.val() # no arguments needed, dataset and settings remembered
metrics.box.map # map50-95
metrics.box.map50 # map50
metrics.box.map75 # map75
metrics.box.maps # a list containing mAP50-95 for each category
metrics.box.image_metrics # per-image metrics dictionary with precision, recall, F1, TP, FP, and FNLink to this section예측 (Predict)#
학습된 YOLO26n 모델을 사용하여 이미지에 대한 예측을 실행합니다.
from ultralytics import YOLO
# Load a model
model = YOLO("yolo26n.pt") # load an official model
model = YOLO("path/to/best.pt") # load a custom model
# Predict with the model
results = model("https://ultralytics.com/images/bus.jpg") # predict on an image
# Access the results
for result in results:
xywh = result.boxes.xywh # center-x, center-y, width, height
xywhn = result.boxes.xywhn # normalized
xyxy = result.boxes.xyxy # top-left-x, top-left-y, bottom-right-x, bottom-right-y
xyxyn = result.boxes.xyxyn # normalized
names = [result.names[cls.item()] for cls in result.boxes.cls.int()] # class name of each box
confs = result.boxes.conf # confidence score of each boxpredict 모드에 대한 전체 세부 정보는 Predict 페이지를 참조하세요.
Link to this section결과 출력#
객체 탐지는 이미지당 하나의 Results 객체를 반환합니다. 기본 예측 필드는 result.boxes이며, 여기에는 각 탐지된 객체에 대한 박스 좌표, 클래스 ID 및 신뢰도 점수가 포함되어 있습니다.
| 속성 | 유형 | Shape | 설명 |
|---|---|---|---|
result.boxes | Boxes | (N) | 탐지 박스. |
result.boxes.data | torch.float32 | (N,6/7) | 원시 [x1,y1,x2,y2,conf,cls]와 추가적인 트랙 ID. |
result.boxes.xyxy | torch.float32 | (N,4) | xyxy 픽셀 박스. |
result.boxes.conf | torch.float32 | (N,) | 신뢰도 점수. |
result.boxes.cls | torch.float32 | (N,) | 클래스 ID; 이름을 위해 int로 변환. |
모든 작업에 걸친 작업별 Results 필드에 대해서는 작업별 예측 결과(Predict Results by Task) 섹션을 참조하세요.
Link to this section내보내기 (Export)#
YOLO26n 모델을 ONNX, CoreML 등과 같은 다른 형식으로 내보냅니다.
from ultralytics import YOLO
# Load a model
model = YOLO("yolo26n.pt") # load an official model
model = YOLO("path/to/best.pt") # load a custom-trained model
# Export the model
model.export(format="onnx")사용 가능한 YOLO26 내보내기 형식은 아래 표와 같습니다. format 인수를 사용하여 모든 형식으로 내보낼 수 있습니다(예: format='onnx' 또는 format='engine'). 내보낸 모델에서 직접 예측하거나 검증할 수 있습니다(예: yolo predict model=yolo26n.onnx). 내보내기가 완료되면 모델에 대한 사용 예시가 표시됩니다.
| 형식 | format 인수 | 모델 | 메타데이터 | 인수 |
|---|---|---|---|---|
| PyTorch | - | yolo26n.pt | ✅ | - |
| TorchScript | torchscript | yolo26n.torchscript | ✅ | imgsz, half, dynamic, optimize, nms, batch, device |
| ONNX | onnx | yolo26n.onnx | ✅ | imgsz, half, int8, dynamic, simplify, opset, nms, batch, data, fraction, device |
| OpenVINO | openvino | yolo26n_openvino_model/ | ✅ | imgsz, half, dynamic, int8, nms, batch, data, fraction, device |
| TensorRT | engine | yolo26n.engine | ✅ | imgsz, half, dynamic, simplify, workspace, int8, nms, batch, data, fraction, device |
| CoreML | coreml | yolo26n.mlpackage | ✅ | imgsz, dynamic, half, int8, nms, batch, device |
| TF SavedModel | saved_model | yolo26n_saved_model/ | ✅ | imgsz, keras, int8, nms, batch, data, fraction, device |
| TF GraphDef | pb | yolo26n.pb | ❌ | imgsz, batch, device |
| TF Lite | tflite | yolo26n.tflite | ✅ | imgsz, half, int8, nms, batch, data, fraction, device |
| TF Edge TPU | edgetpu | yolo26n_edgetpu.tflite | ✅ | imgsz, int8, data, fraction, device |
| TF.js | tfjs | yolo26n_web_model/ | ✅ | imgsz, half, int8, nms, batch, data, fraction, device |
| PaddlePaddle | paddle | yolo26n_paddle_model/ | ✅ | imgsz, batch, device |
| MNN | mnn | yolo26n.mnn | ✅ | imgsz, batch, int8, half, device |
| NCNN | ncnn | yolo26n_ncnn_model/ | ✅ | imgsz, half, batch, device |
| IMX500 | imx | yolo26n_imx_model/ | ✅ | imgsz, int8, data, fraction, nms, device |
| RKNN | rknn | yolo26n_rknn_model/ | ✅ | imgsz, batch, name, int8, data, fraction, device |
| ExecuTorch | executorch | yolo26n_executorch_model/ | ✅ | imgsz, batch, device |
| Axelera | axelera | yolo26n_axelera_model/ | ✅ | imgsz, batch, int8, data, fraction, device |
| DEEPX | deepx | yolo26n_deepx_model/ | ✅ | imgsz, int8, data, optimize, device |
| Qualcomm QNN | qnn | yolo26n_qnn_model/ | ✅ | imgsz, batch, name, int8, data, fraction, device |
전체 export 세부 정보는 Export 페이지를 참조하십시오.
Link to this sectionFAQ#
Link to this section코딩 없이 객체 탐지 모델을 학습하고 배포할 수 있습니까?#
네, 가능합니다. Ultralytics Platform은 데이터셋 주석 작업, 클라우드 GPU 기반의 탐지 모델 학습, 그리고 추론 엔드포인트로의 배포를 위한 브라우저 기반 워크플로우를 제공합니다. 시작하려면 Platform quickstart를 참조하십시오.
Link to this section사용자 지정 데이터셋으로 YOLO26 모델을 어떻게 학습합니까?#
사용자 지정 데이터셋으로 YOLO26 모델을 학습하는 과정은 다음과 같습니다:
- 데이터셋 준비: 데이터셋이 YOLO 형식인지 확인하십시오. 지침은 Dataset Guide를 참조하십시오.
- 모델 로드: Ultralytics YOLO 라이브러리를 사용하여 사전 학습된 모델을 로드하거나 YAML 파일에서 새 모델을 생성하십시오.
- 모델 학습: Python에서
train메서드를 실행하거나 CLI에서yolo detect train명령을 실행하십시오.
from ultralytics import YOLO
# Load a pretrained model
model = YOLO("yolo26n.pt")
# Train the model on your custom dataset
model.train(data="my_custom_dataset.yaml", epochs=100, imgsz=640)자세한 구성 옵션은 Configuration 페이지를 방문하십시오.
Link to this sectionYOLO26에서는 어떤 사전 학습 모델을 사용할 수 있습니까?#
Ultralytics YOLO26은 객체 탐지, 인스턴스 분할, 의미론적 분할, 그리고 포즈 추정을 위한 다양한 사전 학습 모델을 제공합니다. 이 모델들은 COCO 데이터셋, 의미론적 분할을 위한 Cityscapes, 또는 분류 작업을 위한 ImageNet으로 사전 학습되었습니다. 다음은 사용 가능한 모델들입니다:
상세한 목록 및 성능 지표는 Models 섹션을 참조하십시오.
Link to this section학습된 YOLO 모델의 정확도를 어떻게 검증할 수 있습니까?#
학습된 YOLO26 모델의 정확도를 검증하려면 Python에서 .val() 메서드를 사용하거나 CLI에서 yolo detect val 명령을 사용할 수 있습니다. 이를 통해 mAP50-95, mAP50 등의 지표를 확인할 수 있습니다.
from ultralytics import YOLO
# Load the model
model = YOLO("path/to/best.pt")
# Validate the model
metrics = model.val()
print(metrics.box.map) # mAP50-95더 자세한 검증 내용은 Val 페이지를 참조하십시오.
Link to this sectionYOLO26 모델은 어떤 형식으로 내보낼 수 있습니까?#
Ultralytics YOLO26은 다양한 플랫폼 및 장치와의 호환성을 보장하기 위해 ONNX, TensorRT, CoreML 등 다양한 형식으로 모델을 내보낼 수 있습니다.
from ultralytics import YOLO
# Load the model
model = YOLO("yolo26n.pt")
# Export the model to ONNX format
model.export(format="onnx")지원되는 형식의 전체 목록과 지침은 Export 페이지에서 확인하십시오.
Link to this section왜 객체 탐지에 Ultralytics YOLO26을 사용해야 합니까?#
Ultralytics YOLO26은 객체 탐지, 인스턴스 분할, 의미론적 분할, 포즈 추정에서 최첨단 성능을 제공하도록 설계되었습니다. 주요 장점은 다음과 같습니다:
- 사전 학습 모델: COCO 및 ImageNet과 같이 널리 사용되는 데이터셋으로 사전 학습된 모델을 활용하여 개발 속도를 높일 수 있습니다.
- 높은 정확도: 인상적인 mAP 점수를 달성하여 안정적인 객체 탐지를 보장합니다.
- 속도: 실시간 추론에 최적화되어 있어 빠른 처리가 필요한 애플리케이션에 이상적입니다.
- 유연성: 다양한 플랫폼에 배포할 수 있도록 ONNX 및 TensorRT와 같은 여러 형식으로 모델을 내보낼 수 있습니다.
실제 YOLO26의 활용 사례와 성공 스토리는 블로그에서 확인하십시오.