YOLO Vision 2026:

Ultralytics YOLO26의 엔드투엔드(End-to-End) 탐지 이해하기#

YOLO26 detection-style models — detection, segmentation, pose, and OBB — are NMS-free by default: they output final detections directly from the model, with no Non-Maximum Suppression (NMS) post-processing step. Earlier models like YOLOv8 and YOLO11 produce thousands of overlapping predictions that a separate NMS step has to filter down, which adds latency, complicates export graphs, and can behave inconsistently across hardware platforms.

This is known as end-to-end object detection, and it is enabled by default. The result is a simpler deployment pipeline and lower latency — YOLO26n runs up to 43% faster than YOLO11n on CPU ONNX inference (Intel Xeon CPU @ 2.00 GHz).

이 가이드에서는 변경된 내용, 코드 업데이트 필요 여부, 엔드투엔드 추론을 지원하는 내보내기 형식, 그리고 이전 YOLO 모델에서 원활하게 마이그레이션하는 방법을 안내합니다.

이러한 아키텍처 전환의 배경에 대한 자세한 내용은 YOLO26이 NMS를 제거한 이유에 관한 Ultralytics 블로그 게시물을 참조하세요.

간략 요약
  • Ultralytics API 또는 CLI를 사용하고 계신가요? 변경 사항이 필요하지 않습니다. 모델 이름을 yolo26n.pt(으)로 변경하기만 하면 됩니다.
  • 사용자 정의 추론 코드(ONNX Runtime, TensorRT 등)를 사용하고 계신가요? 후처리를 업데이트하세요. 이제 감지 출력은 NMS가 필요 없는 xyxy 형식의 (N, 300, 6)입니다. 기타 작업의 경우 추가 데이터(마스크 계수, 키포인트 또는 각도)가 뒤에 붙습니다.
  • Exporting? Most formats keep end-to-end output natively; a few fall back to traditional output, and quantization can disable it — see Export Format Compatibility.

엔드투엔드 탐지의 작동 방식#

YOLO26은 학습 중에 듀얼 헤드 아키텍처를 사용합니다. 두 헤드 모두 동일한 백본과 넥을 공유하지만, 서로 다른 방식으로 출력을 생성합니다.

헤드목적탐지 출력후처리
One-to-One (기본값)엔드투엔드 추론(N, 300, 6)신뢰도 임계값만 적용
One-to-Many기존 YOLO 출력(N, nc + 4, 8400)NMS 필요

The shapes above are for detection, where N is the batch size, nc is the number of classes (e.g., 80 for COCO), and the 8400 anchor count is the value at imgsz=640. Other tasks extend the one-to-one output with additional data per detection:

작업엔드투엔드 출력추가 데이터
탐지(N, 300, 6)
인스턴스 세그멘테이션(N, 300, 6 + nm) + 프로토 (N, nm, H, W)nm 마스크 계수(기본값 32)
Pose(N, 300, 57)17개 키포인트 × 3 (x, y, 가시성)
OBB(N, 300, 7)회전 각도

학습 중에는 두 헤드가 동시에 실행됩니다. 1대다 헤드는 더 풍부한 학습 신호를 제공하고, 1대1 헤드는 깔끔하고 겹치지 않는 예측을 생성하는 법을 학습합니다. 추론내보내기 중에는 기본적으로 1대1 헤드만 활성화되어 이미지당 최대 300개의 검출 결과를 [x1, y1, x2, y2, confidence, class_id] 형식으로 생성합니다.

model.fuse()을(를) 호출하면 더 빠른 추론을 위해 Conv + BatchNorm 레이어가 병합되며, 엔드투엔드 모델의 경우 1대다 헤드도 제거되어 모델 크기와 FLOP가 감소합니다. 듀얼 헤드 아키텍처에 대한 자세한 내용은 YOLO26 모델 페이지를 참조하세요.

코드를 변경해야 합니까?#

Ultralytics Python API 또는 CLI 사용#

변경 사항이 필요하지 않습니다. 표준 Ultralytics Python API 또는 CLI를 사용하는 경우 예측, 검증, 내보내기 모두 엔드투엔드 모델을 기본적으로 지원하므로 모든 것이 자동으로 작동합니다.

Ultralytics API 사용 시 코드 변경 불필요
from ultralytics import YOLO

# Load a YOLO26 model
model = YOLO("yolo26n.pt")

# Predict — no NMS step, no code changes
results = model.predict("image.jpg")

사용자 정의 추론 코드 사용#

네, 출력 형식이 다릅니다. YOLOv8 또는 YOLO11용 사용자 정의 후처리 로직을 작성한 경우(ONNX Runtime 또는 TensorRT로 추론을 실행할 때 등), 새로운 출력 형태를 처리하도록 업데이트해야 합니다.

YOLOv8 / YOLO11YOLO26 (엔드투엔드)
탐지 출력(N, nc + 4, 8400)(N, 300, 6)
박스 형식xywh (중심 x, 중심 y, 너비, 높이)xyxy (좌측 상단 x, 좌측 상단 y, 우측 하단 x, 우측 하단 y)
레이아웃앵커당 박스 좌표 + 클래스 점수[x1, y1, x2, y2, conf, class_id]
NMS 필요아니요
후처리NMS + 신뢰도 필터신뢰도 필터만 적용

세그멘테이션, 포즈, OBB 태스크의 경우, YOLO26은 각 검출에 태스크별 데이터를 추가합니다. 출력 형태 표를 참조하세요.

엔드투엔드 모델을 사용하면 후처리가 훨씬 간단해집니다(예: ONNX Runtime을 사용할 때).

import onnxruntime as ort

# Load and run the exported end-to-end model
session = ort.InferenceSession("yolo26n.onnx")
output = session.run(None, {session.get_inputs()[0].name: input_tensor})

# End-to-end output: (batch, 300, 6) → [x1, y1, x2, y2, confidence, class_id]
detections = output[0][0]  # first image in batch
detections = detections[detections[:, 4] > 0.25]  # confidence filter, no NMS

One-to-Many 헤드로 전환#

기존 YOLO 출력 형식이 필요한 경우(예: 기존의 NMS 기반 후처리 코드를 재사용하기 위해), end2end=False을(를) 설정하여 사용 가능한 경우 1대다 헤드로 전환할 수 있습니다.

기존의 NMS 기반 출력을 위해 One-to-Many 헤드 사용
from ultralytics import YOLO

model = YOLO("yolo26n.pt")

# Prediction with NMS (traditional behavior)
results = model.predict("image.jpg", end2end=False)

# Validation with NMS
metrics = model.val(data="coco.yaml", end2end=False)

# Export without end-to-end
model.export(format="onnx", end2end=False)

내보내기 형식 호환성#

대부분의 내보내기 형식ONNX, TensorRT, CoreML, OpenVINO, LiteRT, MNN을 포함하여 엔드투엔드 추론을 기본적으로 지원합니다.

다음 형식은 엔드투엔드를 지원하지 않으며 자동으로 1대다 헤드로 대체됩니다: NCNN, RKNN, PaddlePaddle, ExecuTorch, IMX, Edge TPU, Qualcomm QNN.

엔드투엔드가 지원되지 않을 때 발생하는 현상

When you export to one of these formats, Ultralytics automatically switches to the one-to-many head and logs a warning. This means you'll need NMS in your inference pipeline for these formats, just like with YOLOv8 or YOLO11.

For Hailo, the exporter picks the output path from the loaded head rather than from an argument, so end2end is rejected if passed: a default YOLO26 detection model keeps its NMS-free one-to-one outputs, while a checkpoint whose head is already end2end=False compiles the traditional path with HailoRT NMS.

Quantization and runtime version can disable end-to-end

TensorRT and LiteRT support end-to-end, but the branch is auto-disabled on TensorRT older than 8.5.0, on TensorRT 10.3.0 with quantize=8 on JetPack 6, and on LiteRT with quantize=8 or quantize="w8a16". Each case logs a warning and exports the one-to-many head.

Accuracy and Speed Trade-offs#

엔드투엔드 검출은 정확도에 미치는 영향이 최소화되면서도 상당한 배포 이점을 제공합니다.

지표엔드투엔드 (기본값)1대다 + NMS (end2end=False)
COCO mAPval0.6-0.8 lower기준값
후처리신뢰도 필터만 적용전체 NMS 파이프라인
배포 복잡성최소화NMS 구현 필요

Across the five detection scales the one-to-one head costs 0.6-0.8 mAP on COCO — 40.9 to 40.1 for YOLO26n and 57.5 to 56.9 for YOLO26x — in exchange for dropping the NMS pass entirely. If maximum accuracy is your priority, fall back to the one-to-many head with end2end=False.

모든 모델 크기(n, s, m, l, x)에 대한 자세한 벤치마크는 YOLO26 성능 지표를 참조하세요.

YOLOv8 또는 YOLO11에서 마이그레이션하기#

If you're upgrading an existing project to YOLO26:

  • Ultralytics API / CLI 사용자: 변경 사항이 없습니다. 모델 이름을 yolo26n.pt(또는 yolo26n-seg.pt, yolo26n-pose.pt, yolo26n-obb.pt)으로 업데이트하기만 하면 됩니다.
  • 사용자 정의 후처리 코드: 새로운 출력 형태를 처리하도록 업데이트하세요. 검출의 경우 (N, 300, 6), 세그멘테이션, 포즈, OBB에 대한 태스크별 데이터가 포함됩니다. 또한 박스 형식 변경 사항을 xywh에서 xyxy(으)로 확인하세요.
  • 내보내기 파이프라인: 대상 형식에 대한 형식 호환성 섹션을 확인하세요.
  • TensorRT below 8.5.0: end-to-end is disabled at every precision — upgrade TensorRT to 8.5.0 or later to keep it
  • Quantized exports: TensorRT 10.3.0 with quantize=8 on JetPack 6, and LiteRT with quantize=8 or quantize="w8a16", auto-disable end-to-end — export at a higher precision to keep it
  • FP16 내보내기: 모든 출력이 FP16 형식이어야 하는 경우 end2end=False(으)로 내보내세요. output0이 FP32로 유지되는 이유를 참조하세요.
  • iOS / CoreML: 엔드투엔드가 완벽하게 지원됩니다. Xcode Preview 지원이 필요한 경우 nms=True과 함께 end2end=False을 사용하세요.
  • 엣지 기기(NCNN, RKNN): 이러한 형식은 자동으로 One-to-Many로 돌아가므로, 온디바이스 파이프라인에 NMS를 포함하십시오.

결론#

엔드투엔드 검출은 YOLO26의 기본값이며 Ultralytics Python API 또는 CLI를 사용하는 경우 코드 변경이 필요하지 않습니다. 새로운 (N, 300, 6) 출력을 읽고 NMS 단계를 제거하도록 사용자 정의 후처리 파이프라인만 업데이트하면 됩니다. 단, 1대다 출력으로 대체되는 내보내기 형식(예: NCNN 및 RKNN)은 온디바이스에서 여전히 NMS가 필요합니다. 모든 모델 크기에 대한 자세한 속도 및 정확도 벤치마크는 YOLO26 모델 페이지를 참조하고, 전체 내보내기 옵션 및 형식 세트는 Export 모드 설명서를 참조하세요.

FAQ#

  • 아니요. 이 옵션들은 상호 배타적입니다. export 과정에서 엔드투엔드 모델에 nms=True을 설정하면, 경고와 함께 자동으로 nms=False(으)로 강제 설정됩니다. 엔드투엔드 헤드가 내부적으로 중복 필터링을 이미 처리하므로 외부 NMS는 필요하지 않습니다.

    그러나 end2end=False과(와) nms=True의 조합은 유효한 구성으로, 전통적인 NMS를 내보내기 그래프에 포함합니다. 이는 검출 모델과 함께 Xcode의 미리보기(Preview) 기능을 직접 사용할 수 있게 해주므로 CoreML 내보내기에 유용할 수 있습니다.

  • max_det 매개변수(기본값: 300)는 이미지당 반환되는 최대 검출 수를 설정합니다. 추론 또는 내보내기 시점에 조정할 수 있습니다.

    model.predict("image.jpg", max_det=100)  # fewer detections
    model.export(format="onnx", max_det=500)  # more detections for dense scenes

    The value is baked into an exported graph as the head's top-k, so max_det=500 widens the output tensor to up to (1, 500, 6), capped by the anchor count.

  • Yes, that's the expected end-to-end output format for detection: batch size of 1, up to 300 detections, each with 6 values [x1, y1, x2, y2, confidence, class_id]. Simply filter by confidence threshold — no NMS needed.

    다른 작업의 경우 출력 형태가 다릅니다:

    작업출력 형태설명
    탐지(1, 300, 6)[x1, y1, x2, y2, conf, class_id]
    세그멘테이션(1, 300, 38) + (1, 32, 160, 160)6개의 박스 값 + 32개의 마스크 계수, 그리고 프로토타입 마스크 텐서
    포즈(Pose)(1, 300, 57)6개의 박스 값 + 17개의 키포인트 × 3 (x, y, 가시성)
    OBB(방향성 경계 상자)(1, 300, 7)6개의 박스 값 + 1개의 회전 각도
  • You can check from the Ultralytics Python API or from the exported ONNX model metadata:

    모델이 엔드투엔드인지 확인
    from ultralytics import YOLO
    
    model = YOLO("yolo26n.onnx")
    model.predict(verbose=False)  # run predict to setup predictor first
    print(model.predictor.model.end2end)  # True if end-to-end is enabled

    The two checks answer different questions: the ONNX metadata records the head that was exported, while predictor.model.end2end reports that the backend output is already post-processed and needs no external NMS. They disagree for a model exported with end2end=False, nms=True, which uses the one-to-many head but bakes NMS into the graph and also outputs (1, 300, 6) — so neither the flag nor the output shape alone identifies the head. For other task shapes, see the output shapes FAQ.

  • 네. YOLO26 검출 스타일 태스크 변형(검출, 인스턴스 세그멘테이션, 포즈 추정, 지향성 객체 검출(OBB))은 기본적으로 엔드투엔드 추론을 지원합니다. end2end=False 대체 기능도 이러한 태스크에서 사용할 수 있습니다.

    Each task extends the base detection output with task-specific data; yolo26n.pt, yolo26n-seg.pt, yolo26n-pose.pt, and yolo26n-obb.pt output shapes are listed under How End-to-End Detection Works.

댓글