RTDETRv2와 YOLOX
실시간 객체 탐지 시스템을 구축하는 개발자는 다양한 아키텍처 중에서 선택할 수 있습니다. 주목할 만한 두 모델은 Transformer 기반 RTDETRv2와 합성곱 신경망(CNN) YOLOX입니다. 두 모델 모두 실시간 탐지를 발전시켰지만, 시각 인식에는 근본적으로 다른 접근 방식을 사용합니다.
이 가이드에서는 두 모델의 아키텍처, 성능 지표, 이상적인 배포 시나리오를 살펴보고, Ultralytics YOLO26이 이러한 기반을 바탕으로 정확도, 효율성, 사용 편의성을 어떻게 높이는지 설명합니다.
RTDETRv2: 실시간 탐지 Transformer#
기존 RT-DETR의 후속 모델로 소개된 RTDETRv2는 실시간 객체 탐지를 위해 Transformer 아키텍처를 사용합니다. 비최대 억제(NMS)가 필요하지 않아 추론 파이프라인을 간소화합니다.
- 저자: Wenyu Lv, Yian Zhao, Qinyao Chang, Kui Huang, Guanzhong Wang, Yi Liu
- 기관: Baidu
- 날짜: 2024-07-24
- 링크: arXiv 논문, 공식 GitHub, 문서
아키텍처 및 설계#
RTDETRv2는 Transformer의 셀프 어텐션 메커니즘을 활용해 이미지 전체의 전역 컨텍스트를 포착하므로, 바운딩 박스와 클래스 확률을 직접 예측할 수 있습니다. 멀티스케일 특징은 복잡한 환경에서 작은 객체를 인식하는 데 도움이 됩니다.
Transformer는 전역 컨텍스트를 포착하는 데 뛰어나지만, 셀프 어텐션 메커니즘의 연산량은 시퀀스 길이에 따라 제곱으로 증가합니다. 따라서 기존 CNN보다 학습 중 CUDA 메모리 사용량이 크게 늘어나는 경우가 많습니다.
장점과 단점#
RTDETRv2의 주요 강점은 네이티브 엔드투엔드 설계입니다. NMS를 생략함으로써 밀집되고 서로 겹치는 예측과 관련된 지연 시간 급증을 방지합니다. 그러나 Transformer 블록은 계산 비용이 크고 학습과 배포 모두에서 상당한 GPU 리소스를 요구하므로, 리소스가 제한된 엣지 디바이스나 구형 모바일 하드웨어에는 적합성이 떨어집니다.
YOLOX: 앵커 프리 CNN의 발전#
학술 연구와 산업 응용 간의 격차를 해소하기 위해 개발된 YOLOX는 대중적인 YOLO 모델 제품군에 분리형 헤드와 앵커 프리 설계를 도입했습니다.
- 저자: Zheng Ge, Songtao Liu, Feng Wang, Zeming Li, Jian Sun
- 기관: Megvii
- 날짜: 2021년 7월 18일
- 링크: arXiv 논문, 공식 GitHub, 문서
아키텍처 및 설계#
YOLOX는 사전 정의된 앵커 박스 없이 객체 위치를 직접 예측해 기존 앵커 기반 탐지기와 차별화됩니다. 이 방식은 네트워크 설계를 간소화하고 최적의 성능을 얻기 위해 필요한 휴리스틱 튜닝 파라미터 수를 줄입니다. 또한 YOLOX는 분류와 회귀 작업을 분리하는 디커플드 헤드를 사용해 학습 중 수렴 속도를 높입니다.
장점과 단점#
앵커 프리 설계 덕분에 YOLOX는 다양한 컴퓨터 비전 작업에 맞게 조정할 수 있고, 사용자 지정 데이터셋으로 학습하기도 더 쉽습니다. YOLOX-Nano와 같은 가장 경량화된 변형 모델은 모바일 및 저전력 IoT 디바이스에 적합합니다. 그러나 YOLOX는 NMS가 필요 없는 탐지기보다 먼저 등장했으며, 여전히 후처리에 NMS를 사용하므로 복잡한 장면에서는 배포 복잡성과 지연 시간이 증가합니다.
성능 및 지표 비교#
아래 표에서는 COCO 데이터셋을 기준으로 모델 크기별 속도, 정확도(mAP), 파라미터 효율성을 비교합니다.
| 모델 | 크기 (픽셀) | mAPval50-95 | 속도 CPU ONNX (ms) | 속도 T4 TensorRT10 (ms) | 파라미터 (M) | FLOPs (B) |
|---|---|---|---|---|---|---|
| RTDETRv2-s | 640 | 48.1 | - | 5.03 | 20 | 60 |
| RTDETRv2-m | 640 | 51.9 | - | 7.51 | 36 | 100 |
| RTDETRv2-l | 640 | 53.4 | - | 9.76 | 42 | 136 |
| RTDETRv2-x | 640 | 54.3 | - | 15.03 | 76 | 259 |
| YOLOXnano | 416 | 25.8 | - | - | 0.91 | 1.08 |
| YOLOXtiny | 416 | 32.8 | - | - | 5.06 | 6.45 |
| YOLOXs | 640 | 40.5 | - | 2.56 | 9.0 | 26.8 |
| YOLOXm | 640 | 46.9 | - | 5.43 | 25.3 | 73.8 |
| YOLOXl | 640 | 49.7 | - | 9.04 | 54.2 | 155.6 |
| YOLOXx | 640 | 51.1 | - | 16.1 | 99.1 | 281.9 |
RTDETRv2는 비교 가능한 모든 모델 크기에서 더 높은 정확도를 보입니다. RTDETRv2-x는 YOLOXx의 51.1에 비해 54.3 mAP를 기록하며, 파라미터 수도 더 적고(76M 대 99.1M) T4 GPU에서도 더 빠릅니다(15.03ms 대 16.1ms). YOLOX는 소형 모델에서 강점을 보입니다. YOLOXs는 9.0M 파라미터로 2.56ms에 실행되며(40.5 mAP), YOLOX-Nano와 YOLOX-Tiny는 RTDETRv2에는 없는 6M 미만 파라미터 옵션을 제공합니다.
Ultralytics의 장점: YOLO26 출시#
많은 프로젝트에는 높은 정확도, 빠른 추론, 접근성 높은 생태계를 결합한 단일 모델이 필요합니다. 2026년 1월에 출시된 Ultralytics YOLO26은 이러한 목적에 맞게 설계되었습니다.
YOLO26의 주요 혁신#
- 엔드투엔드 NMS 프리 설계: YOLOv10이 YOLO 모델에 도입한 NMS 프리 학습을 바탕으로, YOLO26은 선택적 NMS 프리 헤드(
nms=False)를 제공합니다. 이를 통해 트랜스포머의 높은 메모리 요구 사항 없이 RTDETRv2의 엔드투엔드 추론을 구현합니다. - MuSGD 옵티마이저: 대규모 언어 모델(LLM) 학습에서 영감을 얻은 하이브리드 MuSGD 옵티마이저(SGD와 Muon 결합)는 학습을 안정화하고 수렴 속도를 높입니다.
- 최대 43% 빠른 CPU 추론: Distribution Focal Loss(DFL) 모듈을 제거해 엣지 컴퓨팅 및 저전력 디바이스에 맞게 헤드를 간소화함으로써, YOLO26n은 YOLO11n보다 CPU(ONNX)에서 최대 43% 더 빠르게 실행됩니다.
- ProgLoss + STAL: Progressive Loss와 작은 객체를 고려한 레이블 할당(STAL)은 항공 이미지와 로보틱스 애플리케이션에서 흔히 발생하는 문제인 작은 객체 인식 성능을 향상합니다.
다재다능함과 생태계#
원시 성능을 넘어, Ultralytics Platform은 데이터부터 프로덕션까지 전체 과정을 지원합니다. 정적인 학술용 저장소와 달리 Ultralytics 모델은 지속적으로 유지 관리되며 단일 API를 통해 여러 작업을 지원합니다. 인스턴스 분할, 포즈 추정, 회전 바운딩 박스(OBB) 탐지 중 어떤 작업을 수행하든 워크플로는 동일합니다.
Ultralytics YOLO 모델은 학습 및 추론 중 메모리 요구량도 낮으므로, 메모리를 많이 사용하는 Transformer 기반 아키텍처보다 소비자용 하드웨어에서 더 큰 배치 크기를 사용할 수 있습니다.
학습 코드 예제#
YOLO26 모델 학습에는 몇 줄의 코드만 필요하며, Ultralytics 패키지가 데이터 로딩과 기본 하이퍼파라미터 설정을 처리합니다.
from ultralytics import YOLO
# Initialize the YOLO26 Nano model
model = YOLO("yolo26n.pt")
# Train the model on the standard COCO8 dataset
results = model.train(data="coco8.yaml", epochs=100, imgsz=640, batch=16)
# Validate the model's performance
metrics = model.val()
print(f"Validation mAP: {metrics.box.map}")
# Export to ONNX or TensorRT for rapid deployment
model.export(format="engine", device=0)실제 애플리케이션과 적합한 사용 사례#
적합한 아키텍처는 배포 제약 조건과 사용 가능한 하드웨어에 따라 달라집니다.
고정밀 클라우드 처리#
고사양 서버 GPU에서 애플리케이션을 실행하고 최고 정확도를 우선시하는 경우, 예를 들어 밀집된 군중 장면을 분석하거나 고해상도 의료 이미지를 처리한다면 RTDETRv2의 어텐션 메커니즘이 효과적일 수 있습니다.
레거시 엣지 배포#
최소 FLOPs가 필수 조건인 구형 휴대폰이나 제약이 큰 임베디드 하드웨어에서는 단순한 CNN 아키텍처를 갖춘 경량 YOLOX-Nano(0.91M 파라미터, 1.08B FLOPs)가 여전히 유용한 대안입니다.
현대 표준: AIoT 및 로봇 공학#
스마트 시티 인프라, 리테일 분석, 자율 주행 내비게이션을 비롯한 대부분의 최신 사용 사례에는 Ultralytics YOLO26을 권장합니다. YOLO26n은 YOLO11n보다 CPU 추론이 최대 43% 빨라 엣지 컴퓨팅에 적합하며, 선택형 NMS 프리 헤드는 낮고 일관된 지연 시간을 제공합니다. Ultralytics 문서 및 활발한 커뮤니티와 함께 사용하면 팀이 데이터셋 어노테이션부터 배포까지 빠르게 진행할 수 있습니다.
Ultralytics Platform을 사용해 데이터셋을 관리하고, 클라우드에서 모델을 학습하고, 대규모로 배포할 수 있습니다.
고려해 볼 만한 다른 Ultralytics 모델로는 커뮤니티 통합 기능이 폭넓은 YOLOv8과 기존 파이프라인에서 안정적으로 사용되는 YOLOv5가 있습니다. 새 프로젝트에는 YOLO26을 시작 모델로 권장합니다.
댓글6
질문을 하거나 결과를 공유하거나 다른 사람을 도와주세요.
UltralyticsAssistantUltralytics
👋 Hello, thank you for opening a discussion and engaging with Ultralytics 🚀! For new users, we recommend visiting the Docs where you'll find detailed Python and CLI usage examples, as well as answers to many common questions.
If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us investigate further.
If your question is about custom training or model comparison ❓, please share as much detail as possible—such as dataset samples, training logs, or what specific performance metrics you're interested in. Don't forget to check out our Tips for Best Training Results for optimal guidance.
Join the Ultralytics community where you feel most comfortable:
- For real-time chat, head to Discord 🎧
- For in-depth discussions, visit Discourse
- Or explore threads on our Subreddit to share and learn with others
Upgrade
Please ensure you're using the latest
ultralyticspackage and all requirements in a Python>=3.8 environment with PyTorch>=1.8:pip install -U ultralyticsEnvironments
YOLO models can be run in any of the following up-to-date verified environments (with all dependencies, including CUDA/CUDNN, Python and PyTorch preinstalled):
- Notebooks with free GPU:
- Google Cloud Deep Learning VM. See GCP Quickstart Guide
- Amazon Deep Learning AMI. See AWS Quickstart Guide
- Docker Image. See Docker Quickstart Guide
Status
If this badge is green, all Ultralytics CI tests are currently passing! CI tests verify correct operation of all YOLO Modes and Tasks across macOS, Windows, and Ubuntu every 24 hours and on every commit.
This is an automated response and an Ultralytics engineer will assist you soon 😊
Glenn JocherUltralytics(수정됨)This page offers a valuable comparison between RTDETRv2 and YOLOX, highlighting their different strengths. If you have specific questions about these models, feel free to ask here. RTDETRv2 excels in accuracy (reaching 54.3% mAP) but demands more computational resources, while YOLOX stands out for efficiency and speed, making it ideal for edge devices. For those seeking alternatives with a balance of performance and usability, you might also consider Ultralytics YOLO26, which offers excellent performance across various computer vision tasks. What specific aspect of these models are you most interested in learning more about?
UltralyticsAssistantUltralytics
👋 Hello, thank you for starting this comparison discussion about RTDETRv2 and YOLOX! 🚀 For detailed guidance, we recommend checking out our Docs, which contain in-depth information, benchmarks, and usage examples that may help answer many of your questions.
If this is a 🐛 Bug Report, please provide a minimum reproducible example so we can assist you efficiently.
For model training or evaluation ❓ Questions, please share as many details as possible, such as dataset samples, training logs, or specific requirements, and review our Tips for Best Training Results.
Join the Ultralytics community in your preferred space! For real-time chat, visit our Discord 🎧. For topic-based discussions, check out Discourse, or connect with others on our Subreddit.
Upgrade
Make sure your
ultralyticspackage and all requirements are up to date in a Python>=3.8 environment with PyTorch>=1.8:pip install -U ultralyticsEnvironments
YOLO models can be run in these verified environments:
- Notebooks with free GPU:
- Google Cloud Deep Learning VM: GCP Quickstart Guide
- Amazon Deep Learning AMI: AWS Quickstart Guide
- Docker Image: Docker Quickstart Guide
Status
A green badge means all Ultralytics CI tests are passing. CI covers all YOLO Modes and Tasks across macOS, Windows, and Ubuntu.
This is an automated response 🤖. An Ultralytics engineer will review your discussion and provide further assistance soon!
Glenn JocherUltralytics(수정됨)Welcome to the RTDETRv2 vs YOLOX comparison discussion! This page highlights two powerful object detection approaches with different strengths: RTDETRv2 leverages transformer architecture for higher accuracy in complex scenes (54.3% mAP for RTDETRv2-x), while YOLOX offers exceptional efficiency with faster inference speed (2.56ms for YOLOX-s on T4 TensorRT).
Your use case should guide your choice - RTDETRv2 excels when maximum accuracy is critical and GPU resources are available, while YOLOX is ideal for edge devices and real-time applications with limited resources.
If you're looking for models within a comprehensive ecosystem, you might also consider Ultralytics YOLO26 which balances performance with ease of use.
Feel free to post any questions about these models or their implementation in your specific applications. The Ultralytics team is here to help!
- Notebooks with free GPU:
UltralyticsAssistantUltralytics
👋 Hello, thank you for starting this discussion and sharing your interest in comparing object detection models like RTDETRv2 and YOLOX 🚀! For a detailed overview, the Ultralytics Docs offer a wealth of information, including the comparison page you linked, which highlights model strengths, performance, and use cases.
If you have specific questions or encounter any issues related to these models, please provide as much detail as possible.
- If this is a 🐛 Bug Report, please include a minimum reproducible example to help us assist you.
- For custom training ❓ questions, adding dataset samples and training logs can be very helpful. Make sure to review our Training Tips for best results.
Connect with the Ultralytics community in your preferred way! For real-time help, join our Discord 🎧. In-depth posts and discussions are found on Discourse, and our Subreddit is great for sharing experiences and solutions.
Upgrade
To ensure the best experience and access to the latest features and fixes, please upgrade the
ultralyticspackage and all requirements in a Python>=3.8 environment with PyTorch>=1.8:pip install -U ultralyticsEnvironments
YOLO models can be run in any of these verified environments with all dependencies preinstalled:
- Notebooks with free GPU:
- Google Cloud Deep Learning VM (GCP Quickstart Guide)
- Amazon Deep Learning AMI (AWS Quickstart Guide)
- Docker Image (Docker Quickstart Guide)
Status
A green badge means all Ultralytics CI tests are passing, ensuring YOLO Modes and Tasks work across macOS, Windows, and Ubuntu.
This is an automated response 🤖—an Ultralytics engineer will review your discussion and assist you soon!
Glenn JocherUltralytics(수정됨)Welcome to the discussion about RTDETRv2 and YOLOX object detection models! Both offer different strengths - RTDETRv2 provides higher accuracy through its transformer architecture, while YOLOX excels in speed and efficiency on resource-constrained devices.
If you have specific questions about implementing either model, performance tuning, or need help choosing between them for your particular use case, please share your questions here. Our team monitors these discussions to provide technical guidance and support.
For hands-on users interested in similar models with Ultralytics integration, YOLO26 offers an excellent balance of speed and accuracy with full support in our ecosystem.