ROI Performance Metrics
These metrics measure the face detection component’s speed and efficiency.Detection Time Metrics
Average time to detect a face in a single frame, measured in milliseconds.Typical values:
- MediaPipe: 5-10 ms
- Haar Cascade: 2-5 ms
- MTCNN: 15-30 ms
- YOLOv11: 8-15 ms
Standard deviation of detection times. Measures consistency.Lower values indicate more predictable performance.
Median detection time. More robust to outliers than average.
Worst-case detection time. Important for real-time requirements.
Best-case detection time.
Throughput Metrics
Frames per second that can be processed by the face detector.Calculated as:
1000 / avg_detection_time_msTypical values:- Desktop: 100-400 FPS
- Raspberry Pi 4: 20-80 FPS
Total number of frames processed during the benchmark.
EVM Performance Metrics
These metrics measure the Eulerian Video Magnification processing efficiency.Chunk Processing Metrics
Number of frame chunks processed.Each chunk contains
BUFFER_SIZE frames (typically 200).Average time to process one chunk of frames, in seconds.Typical values:
- Desktop: 0.5-1.5 seconds
- Raspberry Pi 4: 2-5 seconds
Standard deviation of chunk processing times.
Median chunk processing time.
Per-Frame EVM Metrics
Average EVM processing time per frame within a chunk.Calculated as:
(avg_chunk_time_s * 1000) / buffer_sizeTypical values:- Desktop: 2-7 ms per frame
- Raspberry Pi 4: 10-25 ms per frame
Equivalent FPS if processing frames sequentially through EVM.Calculated as:
1000 / avg_time_per_frame_msNote: This is theoretical - EVM processes chunks, not individual frames.End-to-End Performance Metrics
These metrics measure the complete pipeline from video input to heart rate output.Overall system throughput in frames per second.Includes both ROI detection and EVM processing time.Typical values:
- Desktop (MediaPipe): 100-150 FPS
- Desktop (Haar): 150-250 FPS
- Raspberry Pi 4: 15-40 FPS
Percentage of total time spent on ROI detection.Typical values: 40-60%Higher percentages indicate ROI detection is the bottleneck.
Percentage of total time spent on EVM processing.Typical values: 40-60%Complement of detection_time_percentage.
Example Time Breakdown
ROI Quality Metrics
These metrics assess the reliability and stability of face detection.Detection Reliability
Percentage of frames where a face was successfully detected.Target: >95% for reliable operationLower values indicate the detector struggles with the video conditions.
Number of frames with successful face detection.
Number of frames where face detection failed.
Stability Metrics
Average spatial movement of ROI center between consecutive frames.Measured in pixels. Lower is better.Typical values:
- Stable detectors: 0-2 pixels
- Jittery detectors: 5+ pixels
Standard deviation of ROI width across frames.Lower values indicate more consistent sizing.
Standard deviation of ROI height across frames.
Failure Pattern Metrics
Maximum number of consecutive frames where detection failed.Concern threshold: >10 framesLong failure sequences interrupt measurements.
Average length of failure sequences.
Number of separate failure sequences.Many short failures vs. few long failures indicate different issues.
Heart Rate Accuracy Metrics
These metrics compare predicted heart rates against ground truth from the pulse oximeter.Error Metrics
Mean Absolute Error in beats per minute.Average of
|predicted_hr - true_hr| across all measurements.Performance levels:- Excellent: Less than 5 BPM
- Good: 5-10 BPM
- Acceptable: 10-15 BPM
- Poor: Greater than 15 BPM
Mean Error (signed) in BPM.Shows systematic bias:
- Positive: Tends to over-predict
- Negative: Tends to under-predict
- Near zero: Unbiased
Root Mean Square Error in BPM.Calculated as:
sqrt(mean(errors^2))Penalizes large errors more than MAE.Standard deviation of errors.Measures prediction consistency.
Maximum absolute error encountered.
Minimum absolute error encountered.
Accuracy Within Thresholds
Percentage of predictions within 5 BPM of ground truth.Target: >70% for clinical applications
Percentage of predictions within 10 BPM of ground truth.Target: >85%
Percentage of predictions within 15 BPM of ground truth.Target: >95%
Statistical Metrics
Pearson correlation coefficient between predictions and ground truth.Range: -1 to 1
- 1.0: Perfect positive correlation
- 0.0: No correlation
- -1.0: Perfect negative correlation
Minimum predicted heart rate value.
Maximum predicted heart rate value.
Minimum ground truth heart rate value.
Maximum ground truth heart rate value.
System Resource Metrics
These metrics monitor hardware utilization, critical for embedded deployment on Raspberry Pi 4.CPU Metrics
Average CPU utilization during processing.Raspberry Pi 4: 40-80% typical
Peak CPU utilization.
Average CPU frequency in MHz.Raspberry Pi 4: 1500 MHz (normal), less than 1500 MHz indicates throttling
Minimum CPU frequency observed.Significantly below max indicates throttling occurred.
True if CPU frequency variance suggests throttling.Triggered when
cpu_freq_std_mhz > 100Memory Metrics
Average memory utilization.
Peak memory utilization.Watch for: >85% on Raspberry Pi 4
Temperature Metrics
Average CPU temperature in Celsius.Raspberry Pi 4:
- Normal: Below 70°C
- Warm: 70-75°C
- Hot: 75-80°C
- Throttling: Above 80°C
Peak temperature observed.
True if temperature exceeded 75°C.
True if temperature exceeded 80°C.At this point, Raspberry Pi 4 throttles CPU to protect hardware.
Example Results Structure
Here’s a complete example of metrics from a single video:Interpreting Results
Good Performance Indicators
Good Performance Indicators
detection_rate_percent> 95%mae_bpm< 10within_10bpm_percent> 85%correlation> 0.8jitter_avg_pixels< 2.0- No temperature warnings
Performance Bottlenecks
Performance Bottlenecks
detection_time_percentage> 70% - ROI detection is bottleneck, try faster detectorevm_time_percentage> 70% - EVM processing is bottleneck, reduce buffer sizepotential_throttling= true - CPU overheating, improve cooling
Accuracy Issues
Accuracy Issues
- High
mae_bpmbut lowjitter- EVM parameters may need tuning - High
mae_bpmand highjitter- ROI stability is affecting accuracy - Negative
me_bpm- Systematic under-prediction, check frequency range - Positive
me_bpm- Systematic over-prediction, check noise filtering
Next Steps
Learn About the Dataset
Understand the UBFC-RPPG dataset structure and ground truth data