{"id":28186753,"url":"https://github.com/sing1ee/my-pose","last_synced_at":"2025-05-16T07:10:48.051Z","repository":{"id":282362942,"uuid":"872348562","full_name":"sing1ee/my-pose","owner":"sing1ee","description":"RehabMotion is an AI-powered rehabilitation exercise platform that uses pose detection to guide users through their exercises.","archived":false,"fork":false,"pushed_at":"2025-03-14T07:27:07.000Z","size":46424,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-14T07:32:25.878Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sing1ee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-14T09:30:14.000Z","updated_at":"2025-03-14T07:16:50.000Z","dependencies_parsed_at":"2025-03-14T07:43:24.749Z","dependency_job_id":null,"html_url":"https://github.com/sing1ee/my-pose","commit_stats":null,"previous_names":["sing1ee/my-pose"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sing1ee%2Fmy-pose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sing1ee%2Fmy-pose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sing1ee%2Fmy-pose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sing1ee%2Fmy-pose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sing1ee","download_url":"https://codeload.github.com/sing1ee/my-pose/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254485042,"owners_count":22078767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-16T07:10:47.898Z","updated_at":"2025-05-16T07:10:48.023Z","avatar_url":"https://github.com/sing1ee.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# My Pose\n\nMy Pose is an AI-powered rehabilitation and fitness platform that uses advanced pose detection to guide users through exercises with real-time feedback.\n\n## Technology Stack\n\n### Frontend\n\n- **Next.js 14** (App Router) - React framework for building the web application\n- **TypeScript** - Type-safe JavaScript for improved developer experience\n- **Tailwind CSS** - Utility-first CSS framework for styling\n- **Radix UI** - Unstyled, accessible UI components\n- **Shadcn UI** - Component library built on top of Radix UI\n\n### AI \u0026 Computer Vision\n\n- **TensorFlow.js** - JavaScript library for machine learning\n- **MediaPipe** - Framework for building multimodal ML pipelines\n- **BlazePose** - Real-time pose detection model\n\n### Package Management\n\n- **pnpm** - Fast, disk space efficient package manager\n\n## Pose Detection Model\n\nThis project uses the BlazePose model from MediaPipe through TensorFlow.js for real-time human pose detection.\n\n### Model Details\n\n- **Model**: BlazePose (via TensorFlow.js pose-detection API)\n- **Type**: Full body pose detection model\n- **Runtime**: MediaPipe\n- **Features**:\n  - Detects 33 key body landmarks\n  - Supports 3D pose detection (x, y, z coordinates)\n  - Real-time performance on browser\n  - High accuracy with low computational requirements\n\n### Implementation\n\nThe pose detection is implemented using the following approach:\n\n1. **Model Initialization**:\n\n   ```typescript\n   const model = poseDetection.SupportedModels.BlazePose\n   const detectorConfig: poseDetection.BlazePoseMediaPipeModelConfig = {\n     runtime: 'mediapipe',\n     modelType: 'full',\n     solutionPath: 'https://cdn.jsdelivr.net/npm/@mediapipe/pose',\n     enableSmoothing: true,\n   }\n   const detector = await poseDetection.createDetector(model, detectorConfig)\n   ```\n\n2. **Pose Normalization**:\n   The detected poses are normalized to account for different body orientations, making the pose comparison more robust.\n\n3. **Similarity Calculation**:\n   Multiple strategies are used to calculate the similarity between poses:\n\n   - Key Angles: Comparing angles between key body joints\n   - Relative Angles: Comparing the relative angles between body segments\n   - Invariant Features: Using position-invariant features for comparison\n\n4. **Visualization**:\n   Detected poses are visualized on a canvas overlay with:\n   - Color-coded keypoints\n   - Connecting lines for the skeleton\n   - 3D visualization capabilities\n\n## Features\n\n- **Real-time Pose Detection**: Analyze user movements through webcam\n- **Exercise Guidance**: Visual feedback on correct form\n- **Pose Comparison**: Compare user's pose with reference poses\n- **3D Visualization**: View poses with depth information\n- **Performance Metrics**: Track FPS and detection accuracy\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js (v18 or later)\n- pnpm\n\n### Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/your-username/my-pose.git\n   cd my-pose\n   ```\n\n2. Install dependencies:\n\n   ```bash\n   pnpm install\n   ```\n\n3. Run the development server:\n\n   ```bash\n   pnpm dev\n   ```\n\n4. Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\n## Project Structure\n\n- `app/`: Main application code (Next.js App Router)\n  - `components/`: Reusable React components\n    - `pose-detection/`: Components for pose detection functionality\n    - `pose-detection-3d/`: Components for 3D pose visualization\n    - `ui/`: UI components built with Radix and Shadcn\n  - `contexts/`: React contexts for state management\n  - `lib/`: Utility functions and helpers\n    - `poseDrawing.ts`: Functions for drawing poses on canvas\n    - `normPose.ts`: Pose normalization utilities\n    - `simPose.ts`: Pose similarity calculation\n    - `squatDetection.ts`: Exercise-specific detection logic\n  - `page.tsx`: Main page component\n  - `layout.tsx`: Root layout component\n- `public/`: Static assets including reference pose images\n\n## Available Scripts\n\n- `pnpm dev`: Run development server\n- `pnpm build`: Build for production\n- `pnpm start`: Start production server\n- `pnpm lint`: Run linter\n- `pnpm lint:fix`: Fix linting issues\n- `pnpm fix`: Run linter and prettier\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsing1ee%2Fmy-pose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsing1ee%2Fmy-pose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsing1ee%2Fmy-pose/lists"}