Skip to content

Latest commit

 

History

History
352 lines (283 loc) · 13.6 KB

File metadata and controls

352 lines (283 loc) · 13.6 KB

Exercise Implementation Documentation

This document tracks all exercises implemented in the Araise Backend fitness tracking system, organized by muscle groups.

Implementation Overview

Total Exercises Implemented: 54
Last Updated: December 16, 2025


Exercise Categories

1. Chest Exercises (10 exercises) ✅

All chest exercises are located in exercises/chest/ and exercises/upper_body/

# Exercise Name File Status Video
1 Push-ups upper_body/pushup.py ✅ Implemented Available
2 Incline Dumbbell Press chest/incline_dumbbell_press.py ✅ Implemented Available
3 Incline Barbell Bench Press chest/incline_barbell_bench_press.py ✅ Implemented Available
4 Flat Barbell Bench Press chest/flat_barbell_bench_press.py ✅ Implemented Available
5 Rope Pulldowns (Chest) chest/rope_pulldown_chest.py ✅ Implemented Available
6 Chest Flyes chest/chest_flyes.py ✅ Implemented Available
7 Dips (Chest-leaning) chest/chest_dips.py ✅ Implemented ⚠️ No video
8 Chest Dips (leaning forward) chest/chest_dips.py ✅ Implemented ⚠️ No video
9 Bench Press upper_body/bench_press.py ✅ Implemented Available
10 Rope Pulldown upper_body/rope_pulldown.py ✅ Implemented Available

Key Features:

  • All exercises use shoulder-elbow-wrist angle tracking
  • Configurable angle thresholds for different movement ranges
  • Smooth angle averaging for accurate rep counting
  • Real-time feedback for proper form

2. Back & Lats Exercises (15 exercises) ✅

All back exercises are located in exercises/back/ and exercises/upper_body/

# Exercise Name File Status Video
10 Wide Grip Pull-ups upper_body/wide_grip_pulldown.py ✅ Implemented Available
11 Neutral Grip Pull-ups back/neutral_grip_pullup.py ✅ Implemented Available
12 Chest Supported Rows upper_body/chest_supported_row.py ✅ Implemented Available
13 Cable Lat Pulldown back/cable_lat_pulldown.py ✅ Implemented Available
14 Neutral Grip Pulldown back/neutral_grip_pulldown.py ✅ Implemented Available
15 Horizontal Neutral Grip Row back/horizontal_neutral_grip_row.py ✅ Implemented Available
16 Weighted Pull-ups back/weighted_pullup.py ✅ Implemented Available
17 Barbell Bent-over Row back/barbell_bent_over_row.py ✅ Implemented Available
18 Lat Pulldown back/lat_pulldown.py ✅ Implemented Available
19 Pull-ups upper_body/pullup.py ✅ Implemented Available
20 Pull-ups (Weighted) back/weighted_pullup.py ✅ Implemented Available
21 Seated Cable Row back/seated_cable_row.py ✅ Implemented Available
22 Deadlifts (Conventional) back/deadlift.py ✅ Implemented ⚠️ No video
23 Deadlifts (Trap Bar) back/deadlift.py ✅ Implemented ⚠️ No video
24 Wide Grip Pulldown upper_body/wide_grip_pulldown.py ✅ Implemented Available

Key Features:

  • Multiple grip variations (wide, neutral, weighted)
  • Row variations for different back muscle targeting
  • Deadlift tracking using hip-knee-ankle angles
  • Progressive overload support for weighted variations

3. Legs Exercises (14 exercises) ✅

All leg exercises are located in exercises/lower_body/

# Exercise Name File Status Video
24 Squats lower_body/squat.py ✅ Implemented Available
25 Leg Press (Close Stance) lower_body/leg_press.py ✅ Implemented Available
26 Leg Press (Wide Stance) lower_body/leg_press_wide_stance.py ✅ Implemented Available
27 Leg Press (Feet High) lower_body/leg_press_feet_high.py ✅ Implemented Available
28 Leg Press lower_body/leg_press.py ✅ Implemented Available
29 Back Squat lower_body/back_squat.py ✅ Implemented Available
30 Romanian Deadlift (RDL) lower_body/romanian_deadlift.py ✅ Implemented ⚠️ No video
31 Hip Thrust lower_body/hip_thrust.py ✅ Implemented ⚠️ No video
32 Bulgarian Split Squat lower_body/bulgarian_split_squat.py ✅ Implemented ⚠️ No video
33 Light Squats lower_body/light_squats.py ✅ Implemented Available
34 Box Jumps lower_body/box_jumps.py ✅ Implemented ⚠️ No video

Key Features:

  • Hip-knee-ankle angle tracking for compound movements
  • Multiple stance variations for leg press
  • Hip thrust uses shoulder-hip-knee tracking
  • Box jump detection with explosive movement tracking
  • Progressive depth tracking for squats

4. Shoulders Exercises (13 exercises) ✅

All shoulder exercises are located in exercises/shoulders/

# Exercise Name File Status Video
35 Chest Supported Shoulder Press shoulders/chest_supported_shoulder_press.py ✅ Implemented Available
36 Cable Lateral Raises shoulders/cable_lateral_raises.py ✅ Implemented Available
37 Overhead Shoulder Press shoulders/overhead_shoulder_press.py ✅ Implemented Available
38 Cable Rope Press shoulders/cable_rope_press.py ✅ Implemented Available
39 Front Raises shoulders/front_raises.py ✅ Implemented Available
40 Dumbbell Lateral Raises shoulders/dumbbell_lateral_raises.py ✅ Implemented Available
41 Rear Delt Fly shoulders/rear_delt_fly.py ✅ Implemented Available
42 Shoulder Press shoulders/shoulder_press.py ✅ Implemented Available
43 Seated Overhead Press shoulders/seated_overhead_press.py ✅ Implemented Available
44 Cable Rope Face Pull shoulders/cable_rope_face_pull.py ✅ Implemented Available
45 Rear Delt Fly (Machine) shoulders/rear_delt_fly.py ✅ Implemented Available
46 Overhead Press shoulders/overhead_shoulder_press.py ✅ Implemented Available

Key Features:

  • Complete shoulder development (front, side, rear delts)
  • Multiple pressing variations (seated, standing, cable)
  • Isolation movements (lateral raises, front raises)
  • Rear delt specific exercises for balanced development

5. Biceps Exercises (5 exercises) ✅

All biceps exercises are located in exercises/biceps/ and exercises/upper_body/

# Exercise Name File Status Video
47 EZ Bar Preacher Curls biceps/ez_bar_preacher_curls.py ✅ Implemented Available
48 Incline Dumbbell Curls biceps/incline_dumbbell_curls.py ✅ Implemented Available
49 Hammer Curls biceps/hammer_curls.py ✅ Implemented Available
50 Barbell Curls biceps/barbell_curls.py ✅ Implemented Available
51 Bicep Curl upper_body/bicep_curl.py ✅ Implemented Available

Key Features:

  • Multiple curl variations for complete bicep development
  • Preacher curls for peak contraction
  • Hammer curls for forearm and brachialis development
  • Incline curls for maximum stretch
  • Standard barbell and dumbbell variations

6. Triceps Exercises (5 exercises) ✅

All triceps exercises are located in exercises/triceps/ and exercises/upper_body/

# Exercise Name File Status Video
51 Tricep Extension Push-ups triceps/tricep_extension_pushups.py ✅ Implemented Available
52 Bent Tricep Pull upper_body/bent_tricep_pull.py ✅ Implemented Available
53 Tricep Rope Pulldown triceps/tricep_rope_pulldown.py ✅ Implemented Available
54 Tricep Rope Pushdown triceps/tricep_rope_pushdown.py ✅ Implemented Available

Key Features:

  • Bodyweight and cable variations
  • Close-grip push-up variations for triceps
  • Cable rope exercises for complete tricep development
  • Overhead and pushdown movements

Technical Architecture

Base Exercise Class

All exercises inherit from BaseExercise class located in utils/base_exercise.py:

class BaseExercise:
    - coordinate validation
    - angle calculation
    - angle smoothing (rolling average)
    - rep counting logic
    - stage tracking (up/down/extended/flexed)
    - Redis state persistence (optional)

Common Coordinate Patterns

  1. Upper Body (Arms): shoulder → elbow → wrist
  2. Lower Body (Legs): hip → knee → ankle
  3. Hip Thrust: shoulder → hip → knee
  4. Deadlift: hip → knee → ankle (hip extension)

Angle Thresholds

Each exercise defines:

  • min_angle_threshold: Minimum angle for rep completion
  • max_angle_threshold: Maximum angle for starting position
  • buffer_size: Smoothing window (default: 5 frames)

Directory Structure

exercises/
├── __init__.py
├── chest/                    # 6 new exercises
│   ├── __init__.py
│   ├── incline_dumbbell_press.py
│   ├── incline_barbell_bench_press.py
│   ├── flat_barbell_bench_press.py
│   ├── rope_pulldown_chest.py
│   ├── chest_flyes.py
│   └── chest_dips.py
├── back/                     # 9 new exercises
│   ├── __init__.py
│   ├── neutral_grip_pullup.py
│   ├── cable_lat_pulldown.py
│   ├── neutral_grip_pulldown.py
│   ├── horizontal_neutral_grip_row.py
│   ├── weighted_pullup.py
│   ├── barbell_bent_over_row.py
│   ├── lat_pulldown.py
│   ├── seated_cable_row.py
│   └── deadlift.py
├── lower_body/               # 8 new exercises
│   ├── __init__.py
│   ├── leg_press.py (existing)
│   ├── leg_press_wide_stance.py
│   ├── leg_press_feet_high.py
│   ├── squat.py (existing)
│   ├── back_squat.py
│   ├── romanian_deadlift.py
│   ├── hip_thrust.py
│   ├── bulgarian_split_squat.py
│   ├── light_squats.py
│   └── box_jumps.py
├── shoulders/                # 8 new exercises
│   ├── __init__.py
│   ├── chest_supported_shoulder_press.py (existing)
│   ├── overhead_shoulder_press.py (existing)
│   ├── cable_lateral_raises.py
│   ├── cable_rope_press.py
│   ├── front_raises.py
│   ├── dumbbell_lateral_raises.py
│   ├── rear_delt_fly.py
│   ├── shoulder_press.py
│   ├── seated_overhead_press.py
│   └── cable_rope_face_pull.py
├── biceps/                   # 4 new exercises
│   ├── __init__.py
│   ├── ez_bar_preacher_curls.py
│   ├── incline_dumbbell_curls.py
│   ├── hammer_curls.py
│   └── barbell_curls.py
├── triceps/                  # 3 new exercises
│   ├── __init__.py
│   ├── tricep_extension_pushups.py
│   ├── tricep_rope_pulldown.py
│   └── tricep_rope_pushdown.py
├── upper_body/               # existing
│   ├── __init__.py
│   ├── bench_press.py
│   ├── bent_tricep_pull.py
│   ├── bicep_curl.py
│   ├── chest_supported_row.py
│   ├── pullup.py
│   ├── pushup.py
│   ├── rope_pulldown.py
│   └── wide_grip_pulldown.py
└── core/                     # existing
    ├── __init__.py
    ├── crunch.py
    └── plank.py

Exercises Requiring Videos

The following exercises are marked as ⚠️ No video available and may need video demonstrations:

Chest (2)

  • Dips (Chest-leaning)
  • Chest Dips (leaning forward)

Back (2)

  • Deadlifts (Conventional or Trap Bar)
  • Deadlifts

Legs (4)

  • Romanian Deadlift (RDL)
  • Hip Thrust
  • Bulgarian Split Squat
  • Box Jumps

Total exercises without videos: 8


Implementation Summary

✅ Completed

  • 54 exercises implemented across 6 muscle groups
  • All exercises follow the BaseExercise pattern
  • Proper coordinate validation and angle tracking
  • Real-time feedback system
  • Rep counting with stage tracking
  • Smooth angle averaging for accuracy

🔄 Next Steps (Recommendations)

  1. Video Integration: Add demonstration videos for 8 exercises marked as "No video"
  2. API Integration: Register new exercises in main.py endpoints
  3. Testing: Create unit tests for new exercise classes
  4. Documentation: Add usage examples and integration guides
  5. Redis Integration: Ensure all exercises can save/load state from Redis
  6. Form Analysis: Add detailed form feedback for each exercise
  7. Mobile App Integration: Update mobile app to support new exercises

Usage Example

from exercises.chest.incline_dumbbell_press import InclineDumbbellPressCoordinates

# Initialize exercise tracker
exercise = InclineDumbbellPressCoordinates(user_id="user123")

# Process frame coordinates
coordinates = {
    'right_shoulder': [x1, y1],
    'right_elbow': [x2, y2],
    'right_wrist': [x3, y3]
}

counter, feedback, angle, stage = exercise.process_coordinates(coordinates)

print(f"Reps: {counter}")
print(f"Feedback: {feedback}")
print(f"Angle: {angle}°")
print(f"Stage: {stage}")

Notes

  • All exercises use the same BaseExercise inheritance pattern
  • Coordinate validation ensures proper body positioning
  • Angle smoothing prevents false rep counts from jittery tracking
  • Each exercise has customized thresholds for optimal tracking
  • Redis integration ready for persistent state across sessions

Document Version: 1.0
Created: December 16, 2025
Status: All 54 exercises implemented ✅