Gamer-Tech Lifestyle
Automated VTuber Character Measurement Tool with MediaPipe
TL;DR
- vThree_Sizes uses Google MediaPipe Pose to automatically extract height, bust, waist, underbust, and hip measurements from character images.
- Modular Python architecture with unit tests, configurable reference heights, and batch processing for multiple outfit variations.
- Open-source Jupyter notebook ready for Google Colab—no local setup required. Perfect for VTuber creators and 3D artists.
The Problem: Manual Measurement is Error-Prone
When designing VTuber characters or creating 3D models, accurate body measurements are crucial. Traditional methods involve manual pixel counting, guesswork, or expensive 3D scanning equipment. For anime-style characters with multiple outfit variations, this becomes tedious and inconsistent.

I needed a way to extract precise measurements from promotional art and character renders automatically—something that could handle batch processing and produce consistent results across different images.
The Solution: MediaPipe Pose Detection
Google's MediaPipe Pose provides 33 body keypoints that can detect human (and humanoid) poses in 2D images. By leveraging these keypoints, we can calculate horizontal distances between anatomical landmarks and convert them to real-world measurements.
The tool processes images through a pipeline:
- Pose Detection: MediaPipe identifies 33 body keypoints (shoulders, hips, nose, ankles, etc.)
- Keypoint Extraction: Extract pixel coordinates for specific landmarks
- Width Calculation: Measure horizontal distances between keypoints (bust, waist, hip widths)
- Circumference Estimation: Convert widths to circumferences using the π/2 formula (assuming elliptical cross-sections)
- Unit Conversion: Scale pixel measurements to centimeters using a reference height
- Cup Size Estimation: Calculate cup size from bust-underbust difference using standard thresholds
Architecture & Code Quality
After initial development, I refactored the notebook into a modular architecture following enterprise standards:
- measurements.py: Core measurement logic extracted into a reusable Python module with proper error handling
- Unit Tests: Comprehensive pytest suite validating circumference calculations, cup size estimation, and reference height conversion
- Configuration: Configurable reference heights via
MeasurementConfigclass—no more hard-coded magic numbers - Dependency Management: Pinned versions in
requirements.txtensuring reproducible builds
The notebook now imports these helpers, making it easier to maintain and extend. Each measurement calculation is validated against known inputs, and the code follows Python best practices with docstrings and type hints.
Key Features
Batch Processing: Process entire folders of character images in one run. Perfect for comparing measurements across different outfit variations or promotional art.
Configurable Reference Height: The tool uses a reference character height (default 175 cm) to scale pixel measurements. You can adjust this for different character proportions—the conversion ratio is calculated per image, so scaled or cropped art still produces accurate results.
Cup Size Calculation: Automatically estimates cup size from bust-underbust difference using standard thresholds (AA through O). The calculation follows established sizing guidelines and handles edge cases gracefully.
Google Colab Ready: No local setup required. Click the "Open in Colab" badge, upload your images, and run. MediaPipe and all dependencies are pre-installed in the Colab environment.
Technical Implementation
The measurement engine uses MediaPipe's PoseLandmark enum to identify key anatomical points:
- Height: Nose to ankle distance (vertical pixel difference)
- Bust Width: Left shoulder to right shoulder (horizontal distance)
- Waist Width: Left hip to right hip (horizontal distance)
- Underbust Width: Estimated from waist width with a small offset (MediaPipe doesn't have rib landmarks)
- Hip Width: Left hip to right hip (same as waist, but can be adjusted for different poses)
Circumferences are calculated using the formula: circumference = width × π / 2, which assumes an elliptical cross-section. This is a standard approximation for body measurements from 2D images.
Limitations & Future Improvements
The tool works best with clear full-body views in standard poses. Unusual angles, heavy clothing, or obscured landmarks can affect accuracy. The current implementation assumes elliptical cross-sections—future versions could incorporate more sophisticated 3D estimation models.
Potential enhancements include:
- Support for additional measurement types (thigh, arm circumference, etc.)
- 3D pose estimation using multiple camera angles
- Machine learning models trained on anime character proportions
- Export to CSV/JSON for integration with 3D modeling software
Ask Celeste
Q: How accurate are these measurements compared to real-world sizing?
A: The tool provides estimates based on 2D images and standard anthropometric formulas. Accuracy depends on image quality, pose clarity, and correct reference height calibration. For costume design and 3D modeling, these measurements are typically sufficient—but always verify critical measurements manually for production work.
Q: Can I use this for non-anime characters?
A: Yes! MediaPipe Pose works on any humanoid figure, including realistic characters, stylized designs, or even cosplay photos. Just adjust the reference height to match your character's proportions.