YOLOv10: 실시간 종단 간 객체 감지

2024년 5월에 출시된 YOLOv10은 칭화대학교 연구진이 Ultralytics Python 패키지를 기반으로 개발했으며, 이전 YOLO 버전의 후처리 및 모델 아키텍처의 단점을 해결하는 새로운 실시간 객체 탐지 접근 방식을 도입했습니다. 비최대 억제(NMS)를 제거하고 여러 모델 구성 요소를 최적화함으로써 YOLOv10은 출시 당시 계산 오버헤드를 크게 줄이면서 우수한 성능을 달성했습니다. NMS 없는 엔드투엔드 설계는 새로운 접근 방식을 개척했으며, 이후 YOLO26에서 더욱 발전했습니다.

NMS-free 학습을 위한 YOLOv10 일관된 이중 할당



시청: Ultralytics를 사용하여 SKU-110k 데이터셋으로 YOLOv10을 학습하는 방법 | 소매 데이터셋

개요#

실시간 객체 탐지는 이미지 내 객체의 종류와 위치를 낮은 지연 시간으로 정확하게 예측하는 것을 목표로 합니다. YOLO 시리즈는 성능과 효율성의 균형을 바탕으로 이 연구를 선도해 왔습니다. 그러나 NMS에 대한 의존성과 비효율적인 아키텍처가 최적의 성능을 저해해 왔습니다. YOLOv10은 NMS 없는 학습을 위한 일관된 이중 할당과 효율성 및 정확도를 종합적으로 고려한 모델 설계 전략을 도입해 이러한 문제를 해결합니다.

아키텍처#

YOLOv10 아키텍처는 이전 YOLO 모델의 강점을 기반으로 몇 가지 핵심 혁신을 도입합니다. 모델 아키텍처는 다음 구성 요소로 이루어집니다.

  1. 백본: YOLOv10의 백본은 feature extraction을 담당하며, CSPNet (Cross Stage Partial Network)의 개선된 버전을 사용해 gradient flow를 향상시키고 계산 중복을 줄입니다.
  2. 넥: 넥은 서로 다른 스케일의 feature를 통합해 헤드로 전달하도록 설계되었습니다. 효과적인 멀티스케일 feature fusion을 위해 PAN (Path Aggregation Network) 레이어를 포함합니다.
  3. One-to-Many 헤드: 학습 중 객체당 여러 예측을 생성해 풍부한 지도 신호를 제공하고 학습 정확도를 높입니다.
  4. 일대일 헤드: 추론 중 각 객체에 대해 최적의 예측 하나만 생성하여 NMS가 필요하지 않도록 함으로써 지연 시간을 줄이고 효율성을 높입니다.

주요 기능#

  1. NMS 없는 학습: 일관된 이중 할당을 활용하여 NMS가 필요하지 않도록 하고 추론 지연 시간을 줄입니다.
  2. 종합적인 모델 설계: 경량 분류 헤드, 공간-채널 분리 다운샘플링, 순위 기반 블록 설계를 포함하여 효율성과 정확도 관점에서 다양한 구성 요소를 종합적으로 최적화합니다.
  3. 향상된 모델 성능: 대형 커널 컨볼루션과 부분적인 셀프 어텐션 모듈을 적용해 계산 비용을 크게 늘리지 않으면서 성능을 개선합니다.

모델 변형#

YOLOv10은 다양한 애플리케이션 요구 사항을 충족하기 위해 여러 모델 규모로 제공됩니다:

  • YOLOv10n: 리소스가 매우 제한된 환경을 위한 나노 버전입니다.
  • YOLOv10s: 속도와 정확도의 균형을 맞춘 소형 버전입니다.
  • YOLOv10m: 범용으로 사용할 수 있는 중형 버전입니다.
  • YOLOv10b: 정확도를 높이기 위해 너비를 늘린 균형형 버전입니다.
  • YOLOv10l: 계산 리소스가 더 많이 필요한 대신 정확도가 높은 대형 버전입니다.
  • YOLOv10x: 정확도와 성능을 극대화한 초대형 버전입니다.

성능#

출시 당시 YOLOv10은 정확도와 효율성에서 이전 YOLO 버전과 다른 최첨단 모델을 능가했습니다. 예를 들어, YOLOv10s는 COCO 데이터셋에서 비슷한 AP를 달성하면서 RT-DETR-R18보다 1.8배 빠르며, YOLOv10b는 동일한 성능을 내면서 YOLOv9-C보다 지연 시간이 46% 짧고 파라미터가 25% 적습니다.

성능

지연 시간은 T4 GPU에서 TensorRT FP16을 사용하여 측정했습니다.

모델입력 크기AP검증50-95FLOPs (G)지연 시간 (ms)
[YOLOv10n][1]64038.56.71.84
[YOLOv10s][2]64046.321.62.49
[YOLOv10m][3]64051.159.14.74
[YOLOv10b][4]64052.592.05.74
[YOLOv10l][5]64053.2120.37.28
[YOLOv10x][6]64054.4160.410.70

방법론#

NMS 없는 학습을 위한 일관된 이중 할당#

YOLOv10은 학습 중 일대다 및 일대일 전략을 결합한 이중 레이블 할당을 사용하여 풍부한 감독 신호와 효율적인 엔드투엔드 배포를 지원합니다. Ultralytics의 예측 및 검증은 기본적으로 NMS를 적용하는 일대다 헤드를 사용합니다. nms=False을 설정하면 NMS 없는 헤드를 선택할 수 있습니다. 일관된 매칭 지표는 두 전략의 감독 신호를 정렬하여 추론 중 예측 품질을 높입니다.

효율성과 정확도를 종합적으로 고려한 모델 설계#

효율성 향상#

  1. 경량 분류 헤드: 깊이별 분리 합성곱을 사용하여 분류 헤드의 계산 오버헤드를 줄입니다.
  2. 공간-채널 분리 다운샘플링: 정보 손실과 계산 비용을 최소화하기 위해 공간 축소와 채널 변조를 분리합니다.
  3. 순위 기반 블록 설계: 각 단계의 내재적 중복성에 따라 블록 설계를 조정하여 파라미터를 최적으로 활용합니다.

정확도 향상#

  1. 대규모 커널 합성곱: 수용 영역을 확장하여 특징 추출 능력을 높입니다.
  2. 부분 셀프 어텐션 (PSA): 오버헤드를 최소화하면서 전역 표현 학습을 개선하는 셀프 어텐션 모듈을 적용합니다.

실험 및 결과#

YOLOv10은 COCO와 같은 표준 벤치마크에서 평가되었습니다. 출시 당시 모든 변형 모델은 이전 YOLO 버전과 동시대 탐지기보다 지연 시간과 정확도의 균형을 개선했습니다.

비교#

최첨단 객체 탐지기와 YOLOv10 비교

다른 최첨단 탐지기와 비교하면 다음과 같습니다:

  • YOLOv10s / x는 비슷한 정확도에서 RT-DETR-R18 / R101보다 각각 1.8배 / 1.3배 빠릅니다.
  • YOLOv10b는 동일한 정확도에서 YOLOv9-C보다 파라미터 수가 25% 적고 지연 시간이 46% 짧습니다.
  • YOLOv10l / x는 YOLOv8l / x보다 파라미터 수가 각각 1.8배 / 2.3배 적으면서 AP가 0.3 / 0.5 높습니다.
성능

아래 수치는 YOLOv10 논문에 보고된 값으로, 자체 프로토콜에 따라 측정되었으므로 Ultralytics 모델 페이지의 값과 직접 비교할 수 없습니다:

모델파라미터
(M)
FLOPs
(G)
mAPval50-95지연 시간
(ms)
순전파 지연 시간
(ms)
YOLOv6-3.0-N4.711.437.02.691.76
Gold-YOLO-N5.612.139.62.921.82
YOLOv8n3.28.737.36.161.77
YOLOv10n2.36.738.51.841.79
YOLOv6-3.0-S18.545.344.33.422.35
Gold-YOLO-S21.546.045.43.822.73
YOLOv8s11.228.644.97.072.33
YOLOv10s7.221.646.32.492.39
RT-DETR-R1820.060.046.54.584.49
YOLOv6-3.0-M34.985.849.15.634.56
Gold-YOLO-M41.387.549.86.385.45
YOLOv8m25.978.950.69.505.09
YOLOv10m15.459.151.14.744.63
YOLOv6-3.0-L59.6150.751.89.027.90
Gold-YOLO-L75.1151.751.810.659.78
YOLOv8l43.7165.252.912.398.06
RT-DETR-R5042.0136.053.19.209.07
YOLOv10l24.4120.353.27.287.21
YOLOv8x68.2257.853.916.8612.83
RT-DETR-R10176.0259.054.313.7113.58
YOLOv10x29.5160.454.410.7010.60

model.fuse() 이후 Conv 및 BatchNorm 레이어를 병합하고 보조 일대다 탐지 헤드를 제거한 융합 모델의 파라미터 및 FLOPs 값입니다. 사전 학습된 체크포인트는 전체 학습 아키텍처를 유지하므로 더 높은 수치를 보일 수 있습니다.

사용 예시#

Ultralytics Platform을 통해 클라우드 GPU에서 모델을 학습할 수도 있습니다. YOLOv10으로 새 이미지에 대해 예측하려면 다음을 수행합니다:

예제
from ultralytics import YOLO

# 사전 학습된 YOLOv10n 모델 로드
model = YOLO("yolov10n.pt")

# 이미지에서 객체 탐지 수행
results = model("image.jpg")

# 결과를 표시합니다
results[0].show()

사용자 지정 데이터셋에서 YOLOv10을 학습하려면 다음을 수행합니다:

예제
from ultralytics import YOLO

# YOLOv10n 모델을 처음부터 로드
model = YOLO("yolov10n.yaml")

# 모델 학습
model.train(data="coco8.yaml", epochs=100, imgsz=640)

지원 작업 및 모드#

YOLOv10 모델 시리즈는 각각 객체 탐지에 최적화된 다양한 모델을 제공합니다. 각 변형 모델은 여러 계산 예산과 정확도 요구 사항을 충족합니다.

모델파일 이름작업학습검증추론내보내기
YOLOv10yolov10n.pt yolov10s.pt yolov10m.pt yolov10b.pt yolov10l.pt yolov10x.pt객체 탐지✅✅✅✅

YOLOv10 내보내기#

YOLOv10에 새 연산이 도입되어 Ultralytics에서 제공하는 모든 내보내기 형식이 현재 지원되는 것은 아닙니다. 아래 표에는 Ultralytics가 YOLOv10용으로 성공적으로 변환한 형식이 나와 있습니다. 추가 형식의 내보내기를 지원하는 풀 리퀘스트를 환영합니다.

내보내기 형식내보내기 지원내보낸 모델 추론참고
TorchScript✅✅표준 PyTorch 모델 형식입니다.
ONNX✅✅배포에 널리 지원됩니다.
OpenVINO✅✅Intel 하드웨어에 최적화되어 있습니다.
TensorRT✅✅NVIDIA GPU에 최적화되어 있습니다.
CoreML✅✅Apple 기기로 제한됩니다.
TF SavedModel✅✅TensorFlow의 표준 모델 형식입니다.
TF GraphDef✅✅레거시 TensorFlow 형식입니다.
TF Edge TPU✅✅Google의 Edge TPU 기기 전용입니다.
LiteRT✅✅모바일, 임베디드 및 브라우저(LiteRT.js)에 최적화되어 있습니다.
PaddlePaddle✅✅중국에서 널리 사용되지만, 전 세계적인 지원은 제한적입니다.
NCNN✅✅모바일 및 임베디드 디바이스에 최적화되어 있습니다.

결론#

YOLOv10은 출시 당시 NMS 후처리를 제거하고 효율성과 정확도를 모두 고려해 모델 구성 요소를 재설계함으로써 실시간 객체 탐지를 발전시켰습니다. NMS 없는 접근 방식은 YOLO 계열에서 엔드투엔드 객체 탐지를 개척했습니다. 최신 Ultralytics 모델인 YOLO26은 이를 바탕으로 성능과 NMS 없는 추론을 개선했습니다.

인용 및 감사의 글#

광범위한 연구와 Ultralytics 프레임워크에 대한 중요한 기여를 해 주신 칭화대학교의 YOLOv10 저자들께 감사드립니다:

인용
@inproceedings{wang2024yolov10,
  title={YOLOv10: Real-Time End-to-End Object Detection},
  author={Wang, Ao and Chen, Hui and Liu, Lihao and Chen, Kai and Lin, Zijia and Han, Jungong and Ding, Guiguang},
  booktitle={Advances in Neural Information Processing Systems},
  doi = {10.52202/079017-3429},
  url = {https://proceedings.neurips.cc/paper_files/paper/2024/file/c34ddd05eb089991f06f3c5dc36836e0-Paper-Conference.pdf},
  volume={37},
  pages={107984--108011},
  year={2024}
}

자세한 구현 내용, 아키텍처 혁신 및 실험 결과는 칭화대학교 팀의 YOLOv10 연구 논문과 GitHub 저장소를 참조하세요.

자주 묻는 질문#

  • 칭화대학교 연구진이 개발한 YOLOv10은 실시간 객체 탐지에 몇 가지 핵심 혁신을 도입했습니다. 학습 중 일관된 이중 할당을 적용해 비최대 억제(NMS)의 필요성을 없애고, 연산 오버헤드를 줄이도록 모델 구성 요소를 최적화합니다.

  • Ultralytics Python API 또는 명령줄 인터페이스(CLI)를 사용해 추론을 실행하세요. 아래는 YOLOv10으로 새 이미지를 예측하는 예제입니다:

    예제
    from ultralytics import YOLO
    
    # 사전 학습된 YOLOv10n 모델을 로드합니다
    model = YOLO("yolov10n.pt")
    results = model("image.jpg")
    results[0].show()

    더 많은 사용 예시는 사용 예시 섹션을 참조하세요.

  • YOLOv10은 다양한 사용 사례에 적합하도록 여러 모델 변형을 제공합니다:

    • YOLOv10n: 리소스가 매우 제한된 환경에 적합합니다
    • YOLOv10s: 속도와 정확도의 균형을 맞춥니다
    • YOLOv10m: 범용으로 사용할 수 있습니다
    • YOLOv10b: 너비를 늘려 정확도를 높였습니다
    • YOLOv10l: 계산 리소스가 더 많이 필요하지만 정확도가 높습니다
    • YOLOv10x: 정확도와 성능을 극대화합니다

    각 변형은 서로 다른 계산 요구 사항과 정확도 요구 사항에 맞게 설계되어 다양한 애플리케이션에 유연하게 적용할 수 있습니다. 자세한 내용은 모델 변형 섹션을 참조하세요.

  • YOLOv10은 일관된 이중 할당 방식으로 학습하여 일대일 헤드가 객체마다 가장 적합한 예측 하나를 출력하므로 추론 시 비최대 억제(NMS)가 필요하지 않습니다. Ultralytics의 예측과 검증은 기본적으로 NMS를 적용하는 일대다 헤드를 사용합니다. NMS 프리 헤드를 선택하고 NMS 단계를 생략하려면 nms=False을 설정하세요. 자세한 설명은 NMS 프리 학습을 위한 일관된 이중 할당 섹션을 참조하세요.

  • YOLOv10은 TorchScript, ONNX, OpenVINO, TensorRT 등 여러 내보내기 형식을 지원합니다. 하지만 새로운 연산이 사용되므로 현재 Ultralytics에서 제공하는 모든 내보내기 형식이 YOLOv10을 지원하는 것은 아닙니다. 지원 형식과 내보내기 방법에 대한 자세한 내용은 YOLOv10 내보내기 섹션을 참조하세요.

  • 출시 당시 YOLOv10은 정확도와 효율성 면에서 이전 YOLO 버전과 다른 최첨단 모델을 능가했습니다. 예를 들어, YOLOv10s는 COCO 데이터셋에서 비슷한 AP를 달성하면서 RT-DETR-R18보다 1.8배 빠릅니다. YOLOv10b는 동일한 성능을 내면서 YOLOv9-C보다 지연 시간이 46% 짧고 파라미터가 25% 적습니다. 자세한 벤치마크는 비교 섹션에서 확인할 수 있습니다.

댓글188

질문을 하거나 결과를 공유하거나 다른 사람을 도와주세요.

  1. Glenn JocherUltralytics(수정됨)

    I'm super excited about the groundbreaking work on YOLOv10 by the researchers at Tsinghua University. Just a week ago, @pderrenger and I had the privilege of presenting YOLO to ML graduate students at Tsinghua University in Shenzhen, and I was thoroughly impressed by their enthusiasm and expertise.

    1716582575743

    Now, seeing the remarkable advancements in real-time object detection with YOLOv10, I'm thrilled to collaborate with the Tsinghua team to officially bring YOLOv10 support to the Ultralytics Python package soon. The innovative approach to NMS-free training and holistic model design optimizations demonstrates their commitment to pushing the boundaries of what's possible.

    Stay tuned for the official release of YOLOv10 support in the Ultralytics package, and get ready to experience the incredible capabilities of this revolutionary real-time object detector!

    38
    1. jameslahmGitHub

      Thank you so much for your great support for YOLOv10! We are truly grateful for your efforts to bring YOLOv10 to the Ultralytics package. ❤️

      2
  2. heynewyeahGitHub

    您好。如果我想在训练结束后,以last.pt的模型权重继续训练(因为还未收敛),有什么办法能获取last epoch的优化器状态吗,用于继续训练。或者有什么其他方法能够完成继续训练吗?

    1. alephpiGitHub(수정됨)
      from ultralytics import YOLO
      
      # Load a model
      model = YOLO("path/to/last.pt")  # load a partially trained model
      
      # Resume training
      results = model.train(resume=True)
  3. Anser1GitHub

    Hello, I'm sorry to disturb you. I want to conduct the training for the segmentation task based on YOLOv10, but I found that there seems to be no YAML structure file for the segmentation model. What should I do?

  4. zlj127GitHub

    Does YOLOv10 have the pose function? Currently, I have only found a pre-trained model for gestures under the GitHub of the Hagrid dataset, but it is still used for detection.

    1. Glenn JocherUltralytics(수정됨)

      @zlj127 YOLOv10 currently focuses on object detection tasks and does not include built-in pose estimation functionality. For pose/keypoint estimation, we recommend using YOLO26 which offers integrated support for pose estimation along with detection, segmentation, and classification. See the YOLO26 Pose documentation for implementation details and code examples.

  5. gniqehGitHub

    It is important to configure the correct threshold of dual label assignments in the paper. But how can we change the threshold in yolov10 of ultralytics module?

    Es importante configurar el umbral correcto de asignaciones de etiquetas duales en el documento. pero ¿cómo podemos cambiar el umbral en yolov10 del módulo ultralytics?

    1. Glenn JocherUltralytics(수정됨)

      @gniqeh the dual label assignment settings are not exposed in the model YAML or as training arguments. They are set in the loss code (E2EDetectLoss in ultralytics/utils/loss.py), where the one-to-many branch uses tal_topk=10 and the one-to-one branch uses tal_topk=1. To change them, edit those values in a local copy of the package. For details, see the YOLOv10 Ultralytics documentation. Let us know if you need further clarification!

    2. gniqehGitHub

      Thx for your reply my friend, I have checked the documentation and API ref. of yolov10 but there is only the basical introductiong about it. And i am pleasure if u can provide further implementation explaining. Thanks again!

    3. Glenn JocherUltralytics

      Thank you for your feedback! For a deeper understanding of YOLOv10 implementation, you can explore the specifics of its architecture and features in the YOLOv10 documentation. If you have particular aspects or technical details you'd like clarified, feel free to let us know!

    1. Glenn JocherUltralytics

      YOLOv10 and YOLO11 introduce innovations like NMS-free training, which can enhance small target detection performance compared to YOLOv7 and YOLOv8, but results may vary based on specific use cases and datasets.

    1. Glenn JocherUltralytics

      @abaldanz thank you for your interest. Currently, we don't have plans to provide pre-trained weights specifically for 1280p images. For updates, please keep an eye on our repository and documentation.

  6. YuwenliulaGitHub

    请问一下,yolov10是否内置了IOU计算的功能,在val结果中未见到IOU的输出,如果没有的话,能方便提供代码进行IOU计算吗?

    1. Glenn JocherUltralytics

      @Yuwenliula yOLOv10 does not directly output IoU in validation results. You can calculate IoU using the bounding box coordinates from the model's predictions. If you need further assistance, please refer to the Ultralytics documentation for guidance.

    1. Glenn JocherUltralytics

      @wuqrcn the results.csv file contains metrics such as precision, recall, mAP, and loss values for each epoch during training. These metrics help evaluate the model's performance and convergence. For more details, please refer to the documentation.

    1. Glenn JocherUltralytics

      @alifazeli00 the difference in results might be due to variations in training data, hyperparameters, or preprocessing steps. Ensure both models are evaluated under identical conditions for accurate comparison.

    2. alifazeli00GitHub

      They are all the same except for the val_period parameter, which is only present in the THU-MIG model. However, the Ultralytics model performs better. I tested x and noticed differences in the weights. Are you saying that these two models should produce identical results?

    3. Glenn JocherUltralytics

      The differences in results could be due to variations in training data, hyperparameters, or preprocessing steps. Ensure both models are evaluated under identical conditions for accurate comparison.

      -1