How arvkr/bodyscan works
Main Components
a) Input Processing Layer
• Image input handling
• EXIF data extraction for camera intrinsics
b) Parallel Processing Pipeline
• Depth Estimation Network Branch
• Object Detection Branch (RetinaNet)
c) Measurement Processing Layer
• Measurement calculation module
• Body fat percentage computation (Navy formula)
Detailed Component Breakdown
a) Core Processing Components:
• Data Loading Module (dataloader.py, loaders/)
• Model Module (models/)
• Options Module (options/)
• Utility Functions (util/)
• NMS Library (lib/nms/)
b) Model Architecture:
• Create two parallel branches:
1. Depth Estimation Network
• Based on Hourglass architecture (models/hourglass.py)
• Input/output tensors
2. RetinaNet Object Detection
• Feature extraction
• NMS post-processing
Data Flow Representation
• Image input → Data Loading
• Data → Parallel Processing (Depth + Detection)
• Processing Results → Measurement Calculation
• Measurements → Body Fat Estimation
Technical Details
Annotations showing:
• PyTorch as the primary framework
• CUDA support for GPU acceleration (based on NMS implementation)
• Key dependencies (OpenCV, scikit-image, etc.)
• File formats (.jpg input, .npy depth maps)
Implementation Details
Create subsections showing:
• Model checkpoint handling (checkpoints/)
• Data preprocessing pipeline
• Post-processing steps
• Measurement calculation logic
Additional Elements
Include:
• Input/Output specifications
• System requirements
• GPU/CPU processing indicators
• Error handling flow
• Key configuration parameters
• Parallel processing of depth estimation and body part detection
• Integration of camera intrinsics
• Measurement calculation pipeline
• Body fat percentage computation