자세 추정(Pose Estimation)

YOLO pose estimation with human body keypoint detection

자세 추정은 이미지 내 특정 지점(일반적으로 키포인트라고 함)의 위치를 식별하는 작업입니다. 키포인트는 관절, 랜드마크 또는 기타 특징적인 요소와 같은 객체의 다양한 부분을 나타낼 수 있습니다. 키포인트의 위치는 대개 2D [x, y] 또는 3D [x, y, visible] 좌표 세트로 표현됩니다.

자세 추정 모델의 출력은 이미지 내 객체의 키포인트를 나타내는 일련의 지점이며, 일반적으로 각 지점에 대한 신뢰도 점수가 함께 제공됩니다. 자세 추정은 장면 내 객체의 특정 부분과 서로에 대한 상대적 위치를 식별해야 할 때 적합한 선택입니다.



Watch: How to Run Real-Time Pose Estimation with Ultralytics YOLO26 | Tracking & Keypoints Extraction 🕺

YOLO26 pose 모델은 -pose 접미사를 사용합니다 (예: yolo26n-pose.pt). 이 모델들은 COCO keypoints 데이터셋으로 학습되었으며 다양한 자세 추정 작업에 적합합니다.

기본 YOLO26 pose 모델에는 17개의 키포인트가 있으며, 각 키포인트는 인체의 서로 다른 부분을 나타냅니다. 각 인덱스와 해당 신체 관절의 매핑은 다음과 같습니다:

  1. 왼쪽 눈
  2. 오른쪽 눈
  3. 왼쪽 귀
  4. 오른쪽 귀
  5. 왼쪽 어깨
  6. 오른쪽 어깨
  7. 왼쪽 팔꿈치
  8. 오른쪽 팔꿈치
  9. 왼쪽 손목
  10. 오른쪽 손목
  11. 왼쪽 엉덩이
  12. 오른쪽 엉덩이
  13. 왼쪽 무릎
  14. 오른쪽 무릎
  15. 왼쪽 발목
  16. 오른쪽 발목

모델

Ultralytics YOLO26 사전 학습된 Pose 모델은 여기에 표시됩니다. Detect, Segment 및 Pose 모델은 COCO 데이터셋으로 사전 학습되었으며, Semantic 모델은 Cityscapes로 사전 학습되었고, Classify 모델은 ImageNet 데이터셋으로 사전 학습되었습니다.

모델은 처음 사용할 때 최신 Ultralytics 릴리스에서 자동으로 다운로드됩니다.

모델크기
(픽셀)
mAPpose
50-95(e2e)
mAPpose
50(e2e)
속도
CPU ONNX
(ms)
속도
T4 TensorRT10
(ms)
파라미터
(M)
FLOPs
(B)
YOLO26n-pose64057.283.340.3 ± 0.51.8 ± 0.02.97.5
YOLO26s-pose64063.086.685.3 ± 0.92.7 ± 0.010.423.9
YOLO26m-pose64068.889.6218.0 ± 1.55.0 ± 0.121.573.1
YOLO26l-pose64070.490.5275.4 ± 2.46.5 ± 0.125.991.3
YOLO26x-pose64071.691.6565.4 ± 3.012.2 ± 0.257.6201.7
  • mAPval 값은 COCO Keypoints val2017 데이터셋에서 단일 모델 단일 스케일 기준으로 산출되었습니다.
    재현하려면 yolo val pose data=coco-pose.yaml device=0을 사용하십시오.
  • 속도Amazon EC2 P4d 인스턴스를 사용하여 COCO val 이미지에 대해 평균을 낸 값입니다.
    재현하려면 yolo val pose data=coco-pose.yaml batch=1 device=0|cpu를 사용하십시오.
  • 파라미터FLOPs 값은 model.fuse() 이후의 퓨즈된 모델에 대한 결과입니다. 이는 Conv 및 BatchNorm 레이어를 병합하며, end2end 모델의 경우 보조 일대다(one-to-many) 탐지 헤드를 제거합니다. 사전 학습된 체크포인트는 전체 학습 아키텍처를 유지하므로 더 높은 수치를 보일 수 있습니다.

Train

COCO8-pose 데이터셋에서 YOLO26-pose 모델을 학습합니다. COCO8-pose 데이터셋은 자세 추정 모델을 테스트하고 디버깅하는 데 최적인 소규모 샘플 데이터셋입니다.

예시
from ultralytics import YOLO

# Load a model
model = YOLO("yolo26n-pose.yaml")  # build a new model from YAML
model = YOLO("yolo26n-pose.pt")  # load a pretrained model (recommended for training)
model = YOLO("yolo26n-pose.yaml").load("yolo26n-pose.pt")  # build from YAML and transfer weights

# Train the model
results = model.train(data="coco8-pose.yaml", epochs=100, imgsz=640)

전체 train 모드 상세 정보는 Train 페이지를 참조하십시오. Pose 모델은 Ultralytics Platform을 통해 클라우드 GPU에서 학습할 수도 있습니다.

데이터셋 형식

YOLO pose 데이터셋 형식에 대한 자세한 내용은 Dataset Guide에서 확인할 수 있습니다. 기존 데이터셋을 다른 형식(예: COCO 등)에서 YOLO 형식으로 변환하려면 Ultralytics에서 제공하는 JSON2YOLO 도구를 사용하십시오. Ultralytics Platform은 사람, 손, 얼굴 및 사용자 정의 키포인트 레이아웃을 위한 내장 스켈레톤 템플릿과 함께 자세 주석(annotation)도 지원합니다.

사용자 정의 자세 추정 작업을 위해 동물 자세 추정을 위한 Tiger-Pose, 손 추적을 위한 Hand Keypoints, 또는 개 자세 분석을 위한 Dog-Pose와 같은 특수 데이터셋을 탐색할 수도 있습니다.

Val

COCO8-pose 데이터셋에서 학습된 YOLO26n-pose 모델의 accuracy를 검증합니다. model이 학습된 data 및 인수를 모델 속성으로 유지하므로 추가 인수는 필요하지 않습니다.

예시
from ultralytics import YOLO

# Load a model
model = YOLO("yolo26n-pose.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 for box with precision, recall, F1, TP, FP, and FN
metrics.pose.map  # map50-95(P)
metrics.pose.map50  # map50(P)
metrics.pose.map75  # map75(P)
metrics.pose.maps  # a list containing mAP50-95(P) for each category
metrics.pose.image_metrics  # per-image metrics dictionary for pose with precision, recall, F1, TP, FP, and FN

예측(Predict)

학습된 YOLO26n-pose 모델을 사용하여 이미지에서 예측을 수행합니다. predict 모드를 사용하면 이미지, 비디오 또는 실시간 스트림에서 추론을 수행할 수 있습니다.

예시
from ultralytics import YOLO

# Load a model
model = YOLO("yolo26n-pose.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:
    xy = result.keypoints.xy  # x and y coordinates
    xyn = result.keypoints.xyn  # normalized
    kpts = result.keypoints.data  # x, y, visibility (if available)

전체 predict 모드 상세 정보는 예측(Predict) 페이지를 참조하십시오.

Export

YOLO26n Pose 모델을 ONNX, CoreML 등과 같은 다른 형식으로 내보냅니다. 이를 통해 다양한 플랫폼과 기기에서 실시간 추론을 위해 모델을 배포할 수 있습니다.

예시
from ultralytics import YOLO

# Load a model
model = YOLO("yolo26n-pose.pt")  # load an official model
model = YOLO("path/to/best.pt")  # load a custom-trained model

# Export the model
model.export(format="onnx")

사용 가능한 YOLO26-pose 내보내기 형식은 아래 표와 같습니다. format 인수를 사용하여 모든 형식으로 내보낼 수 있습니다(예: format='onnx' 또는 format='engine'). 내보낸 모델에서 직접 예측하거나 검증할 수 있습니다(예: yolo predict model=yolo26n-pose.onnx). 모델 내보내기가 완료된 후 사용 예시가 표시됩니다.

형식format 인수모델메타데이터인수
PyTorch-yolo26n-pose.pt-
TorchScripttorchscriptyolo26n-pose.torchscriptimgsz, half, dynamic, optimize, nms, batch, device
ONNXonnxyolo26n-pose.onnximgsz, half, dynamic, simplify, opset, nms, batch, device
OpenVINOopenvinoyolo26n-pose_openvino_model/imgsz, half, dynamic, int8, nms, batch, data, fraction, device
TensorRTengineyolo26n-pose.engineimgsz, half, dynamic, simplify, workspace, int8, nms, batch, data, fraction, device
CoreMLcoremlyolo26n-pose.mlpackageimgsz, dynamic, half, int8, nms, batch, device
TF SavedModelsaved_modelyolo26n-pose_saved_model/imgsz, keras, int8, nms, batch, data, fraction, device
TF GraphDefpbyolo26n-pose.pbimgsz, batch, device
TF Litetfliteyolo26n-pose.tfliteimgsz, half, int8, nms, batch, data, fraction, device
TF Edge TPUedgetpuyolo26n-pose_edgetpu.tfliteimgsz, int8, data, fraction, device
TF.jstfjsyolo26n-pose_web_model/imgsz, half, int8, nms, batch, data, fraction, device
PaddlePaddlepaddleyolo26n-pose_paddle_model/imgsz, batch, device
MNNmnnyolo26n-pose.mnnimgsz, batch, int8, half, device
NCNNncnnyolo26n-pose_ncnn_model/imgsz, half, batch, device
IMX500imxyolo26n-pose_imx_model/imgsz, int8, data, fraction, nms, device
RKNNrknnyolo26n-pose_rknn_model/imgsz, batch, name, device
ExecuTorchexecutorchyolo26n-pose_executorch_model/imgsz, batch, device
Axeleraaxelerayolo26n-pose_axelera_model/imgsz, batch, int8, data, fraction, device
DeepXdeepxyolo26n-pose_deepx_model/imgsz, int8, data, optimize, device

export에 대한 자세한 내용은 Export 페이지를 참조하십시오.

FAQ

Ultralytics YOLO26을 사용한 자세 추정이란 무엇이며 어떻게 작동합니까?

Pose estimation with Ultralytics YOLO26 involves identifying specific points, known as keypoints, in an image. These keypoints typically represent joints or other important features of the object. The output includes the [x, y] coordinates and confidence scores for each point. YOLO26-pose models are specifically designed for this task and use the -pose suffix, such as yolo26n-pose.pt. These models are pretrained on datasets like COCO keypoints and can be used for various pose estimation tasks. For more information, visit the Pose Estimation Page.

사용자 정의 데이터셋에서 YOLO26-pose 모델을 어떻게 학습할 수 있습니까?

사용자 정의 데이터셋에서 YOLO26-pose 모델을 학습하려면 YAML 파일로 정의된 새 모델 또는 사전 학습된 모델을 로드해야 합니다. 그런 다음 지정된 데이터셋과 매개변수를 사용하여 학습 프로세스를 시작할 수 있습니다.

from ultralytics import YOLO

# Load a model
model = YOLO("yolo26n-pose.yaml")  # build a new model from YAML
model = YOLO("yolo26n-pose.pt")  # load a pretrained model (recommended for training)

# Train the model
results = model.train(data="your-dataset.yaml", epochs=100, imgsz=640)

학습에 대한 포괄적인 내용은 학습 섹션을 참조하십시오. Ultralytics Platform을 사용하여 코딩 없이 사용자 정의 자세 추정 모델을 학습할 수도 있습니다.

학습된 YOLO26-pose 모델을 어떻게 검증합니까?

YOLO26-pose 모델의 검증은 학습 중에 유지된 동일한 데이터셋 매개변수를 사용하여 정확도를 평가하는 과정입니다. 다음은 예시입니다:

from ultralytics import YOLO

# Load a model
model = YOLO("yolo26n-pose.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

자세한 내용은 검증 섹션을 참조하십시오.

YOLO26-pose 모델을 다른 형식으로 내보낼 수 있습니까? 내보내는 방법은 무엇입니까?

네, YOLO26-pose 모델을 ONNX, CoreML, TensorRT 등 다양한 형식으로 내보낼 수 있습니다. 이는 Python 또는 명령줄 인터페이스(CLI)를 사용하여 수행할 수 있습니다.

from ultralytics import YOLO

# Load a model
model = YOLO("yolo26n-pose.pt")  # load an official model
model = YOLO("path/to/best.pt")  # load a custom-trained model

# Export the model
model.export(format="onnx")

Refer to the Export Section for more details. Exported models can be deployed on edge devices for real-time applications like fitness tracking, sports analysis, or robotics.

사용 가능한 Ultralytics YOLO26-pose 모델과 그 성능 지표는 무엇입니까?

Ultralytics YOLO26은 YOLO26n-pose, YOLO26s-pose, YOLO26m-pose 등 다양한 사전 학습된 포즈 모델을 제공합니다. 이 모델들은 크기, 정확도(mAP) 및 속도 면에서 차이가 있습니다. 예를 들어, YOLO26n-pose 모델은 50.0의 mAPpose50-95와 81.0의 mAPpose50을 달성합니다. 전체 목록 및 성능 세부 정보는 모델 섹션을 참조하십시오.

댓글