Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Datajuicer Data juicer ImageMMPoseMapper

From Leeroopedia
Knowledge Sources
Domains Data_Processing, Mapping
Last Updated 2026-02-14 16:00 GMT

Overview

Concrete tool for performing human keypoint detection (pose estimation) on images using MMPose provided by Data-Juicer.

Description

ImageMMPoseMapper is a mapper operator that performs human keypoint detection inference using MMPose models deployed via MMDeploy. It requires three essential components: a deployment config (deploy_cfg), a model config (model_cfg), and model weight files (model_files). The operator automatically installs required packages (openmim, mmpose, mmdet) if not present. It processes each image to extract keypoints, keypoint scores, bounding boxes, and bbox scores, storing results in sample metadata under a configurable pose key. Supports optional visualization output. Requires CUDA acceleration.

Usage

Use when you need to extract skeletal keypoint data from images for human-centric computer vision datasets and body-aware data filtering.

Code Reference

Source Location

Signature

@OPERATORS.register_module("image_mmpose_mapper")
class ImageMMPoseMapper(Mapper):
    def __init__(self,
                 deploy_cfg: str = None,
                 model_cfg: str = None,
                 model_files: Optional[Union[str, Sequence[str]]] = None,
                 pose_key: str = MetaKeys.pose_info,
                 visualization_dir: str = None,
                 *args, **kwargs):

Import

from data_juicer.ops.mapper.image_mmpose_mapper import ImageMMPoseMapper

I/O Contract

Inputs

Name Type Required Description
deploy_cfg str Yes MMPose deployment config file path
model_cfg str Yes MMPose model config file path
model_files Optional[Union[str, Sequence[str]]] Yes Path to model weight files
pose_key str No Key to store pose information in metadata, defaults to MetaKeys.pose_info
visualization_dir str No Directory to save visualization results; if None, no visualization is saved

Outputs

Name Type Description
samples Dict Transformed samples with pose keypoint data stored in meta field

Usage Examples

process:
  - image_mmpose_mapper:
      deploy_cfg: "/path/to/deploy_cfg.py"
      model_cfg: "/path/to/model_cfg.py"
      model_files: "/path/to/model.pth"

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment