{"id":50072734,"url":"https://github.com/void2610/python-remote-photoplethysmography","last_synced_at":"2026-05-22T03:32:41.571Z","repository":{"id":327521473,"uuid":"1109628643","full_name":"void2610/python-remote-photoplethysmography","owner":"void2610","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-04T05:09:27.000Z","size":169,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-07T10:42:52.224Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/void2610.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-04T04:17:05.000Z","updated_at":"2025-12-04T05:09:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/void2610/python-remote-photoplethysmography","commit_stats":null,"previous_names":["void2610/python-remote-photoplethysmography"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/void2610/python-remote-photoplethysmography","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/void2610%2Fpython-remote-photoplethysmography","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/void2610%2Fpython-remote-photoplethysmography/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/void2610%2Fpython-remote-photoplethysmography/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/void2610%2Fpython-remote-photoplethysmography/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/void2610","download_url":"https://codeload.github.com/void2610/python-remote-photoplethysmography/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/void2610%2Fpython-remote-photoplethysmography/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33327422,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"online","status_checked_at":"2026-05-22T02:00:06.671Z","response_time":265,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2026-05-22T03:32:39.956Z","updated_at":"2026-05-22T03:32:41.558Z","avatar_url":"https://github.com/void2610.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# リモート心拍数測定システム (Remote Heart Rate Monitoring)\n\nWebカメラ動画から人間の皮膚の色変化を検出し、非接触で心拍数を測定するPythonシステムです。\n\n## 概要\n\nこのプロジェクトは、rPPG (remote photoplethysmography) 技術を使用して、カメラ映像から心拍数をリアルタイムで推定します。論文「Remote Heart Rate Sensing and Projection to Renew Traditional Board Games and Foster Social Interactions」のアイデアを基に実装されています。\n\n### 主要機能\n\n- 🎥 **Webカメラからのリアルタイム心拍数測定**\n- 👤 **MediaPipeによる高精度顔検出**\n- 📊 **複数のrPPGアルゴリズム実装**\n  - GREEN法（最もシンプル）\n  - CHROM法（実用的精度）\n  - POS法（最高精度）\n  - ICA法（独立成分分析）\n- 📈 **リアルタイム可視化**\n- 🔬 **連続ウェーブレット変換による瞬時心拍数推定**\n\n## セットアップ\n\n### 必要な環境\n\n- Python 3.8以上\n- Webカメラ\n\n### インストール\n\n```bash\n# リポジトリのクローン\ncd remoteHeartRate\n\n# 仮想環境の作成と依存ライブラリのインストール\nuv sync\n```\n\n## 使用方法\n\n### 基本的な使い方\n\n```bash\n# Webカメラからリアルタイム測定\nuv run rppg-webcam\n\n# 動画ファイルから測定\nuv run rppg-video --input path/to/video.mp4\n\n# オプション指定の例\nuv run rppg-webcam --algorithm green --buffer-size 300 --fps 30\n\n# ヘルプを表示\nuv run rppg-webcam --help\n```\n\n### Pythonコードでの使用例\n\n```python\nfrom src.main import HeartRateMonitor\n\n# モニターの初期化（CHROM法を使用）\nmonitor = HeartRateMonitor(algorithm='chrom', buffer_size=300)\n\n# Webカメラから測定開始\nmonitor.run_webcam()\n```\n\n### アルゴリズムの選択\n\n```python\n# GREEN法（最もシンプル、学習用）\nmonitor = HeartRateMonitor(algorithm='green')\n\n# CHROM法（推奨、バランスの良い精度と速度）\nmonitor = HeartRateMonitor(algorithm='chrom')\n\n# POS法（最高精度、照明変化に強い）\nmonitor = HeartRateMonitor(algorithm='pos')\n\n# ICA法（独立成分分析）\nmonitor = HeartRateMonitor(algorithm='ica')\n```\n\n## プロジェクト構造\n\n```\nremoteHeartRate/\n├── README.md                    # このファイル\n├── requirements.txt             # 依存ライブラリ\n├── docs/\n│   └── IMPLEMENTATION_PLAN.md   # 詳細な実装計画書\n├── src/\n│   ├── core/                   # 顔検出、信号抽出\n│   ├── algorithms/             # rPPGアルゴリズム\n│   ├── signal_processing/      # フィルタ、周波数解析\n│   ├── utils/                  # ユーティリティ\n│   └── main.py                 # メインアプリケーション\n├── tests/                      # テストコード\n├── examples/                   # サンプルスクリプト\n└── data/                       # テストデータ、結果保存\n```\n\n## 技術詳細\n\n### アルゴリズムの仕組み\n\n1. **顔検出**: MediaPipe Face Meshで468個のランドマークを検出\n2. **ROI抽出**: 額と頬領域から皮膚色の変化を抽出\n3. **信号処理**: RGB信号をバンドパスフィルタで処理（0.75-3.5 Hz = 45-210 BPM）\n4. **rPPG処理**: CHROM/POS法などで血液容積脈波（BVP）信号を抽出\n5. **心拍数推定**: FFTまたはウェーブレット変換で周波数解析\n\n### 推奨される測定条件\n\n- ✅ 明るい照明（自然光または均一な室内照明）\n- ✅ 顔全体がカメラに映っている\n- ✅ 頭部を比較的安定させる\n- ✅ カメラから50-100cm程度の距離\n- ❌ 過度な動き、表情の変化を避ける\n- ❌ 逆光、極端な照明変化を避ける\n\n## 実装計画\n\n詳細な実装計画は [`docs/IMPLEMENTATION_PLAN.md`](docs/IMPLEMENTATION_PLAN.md) を参照してください。\n\n### 実装フェーズ\n\n- **フェーズ1 (5日)**: MVP - 基本的な心拍数測定\n- **フェーズ2 (4日)**: 精度向上 - CHROM/POS法実装\n- **フェーズ3 (3日)**: ロバスト性向上 - GUI、動きアーティファクト除去\n- **フェーズ4 (7日)**: 高度な機能 - 深層学習、複数人測定（オプション）\n\n## テスト\n\n```bash\n# 単体テスト実行\nuv run pytest tests/ -v\n\n# 特定のテストのみ実行\nuv run pytest tests/test_basic.py -v\n```\n\n## 参考文献\n\n1. **Bousefsaf et al. (2013)** - \"Continuous wavelet filtering on webcam photoplethysmographic signals\"\n2. **De Haan \u0026 Jeanne (2013)** - \"Robust Pulse Rate From Chrominance-Based rPPG\"\n3. **Wang et al. (2016)** - \"Algorithmic Principles of Remote PPG\"\n\n## ライセンス\n\nMIT License\n\n## 貢献\n\nプルリクエストを歓迎します。大きな変更を行う場合は、まずissueを開いて変更内容を議論してください。\n\n## 注意事項\n\nこのシステムは研究・教育目的です。医療用途には使用しないでください。正確な心拍数測定が必要な場合は、医療機器を使用してください。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoid2610%2Fpython-remote-photoplethysmography","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoid2610%2Fpython-remote-photoplethysmography","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoid2610%2Fpython-remote-photoplethysmography/lists"}