{"id":51066828,"url":"https://github.com/dalgona039/fog-detection-semg","last_synced_at":"2026-06-23T07:02:43.017Z","repository":{"id":332824752,"uuid":"1135097348","full_name":"dalgona039/fog-detection-semg","owner":"dalgona039","description":"Personalized FOG (Freezing of Gait) Detection System for Parkinson's Disease using Multimodal Biosignals (sEMG, EEG, IMU) and Hybrid Deep Learning.","archived":false,"fork":false,"pushed_at":"2026-01-15T16:26:56.000Z","size":7902,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-15T20:18:23.776Z","etag":null,"topics":["biosignals","deep-learning","eeg","fog-detection","healthcare-ai","imu","lstm","parkinsons-disease","semg","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/dalgona039.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-15T16:25:48.000Z","updated_at":"2026-01-15T16:31:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dalgona039/fog-detection-semg","commit_stats":null,"previous_names":["dalgona039/fog-detection-semg"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/dalgona039/fog-detection-semg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalgona039%2Ffog-detection-semg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalgona039%2Ffog-detection-semg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalgona039%2Ffog-detection-semg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalgona039%2Ffog-detection-semg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dalgona039","download_url":"https://codeload.github.com/dalgona039/fog-detection-semg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalgona039%2Ffog-detection-semg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34678931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"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":["biosignals","deep-learning","eeg","fog-detection","healthcare-ai","imu","lstm","parkinsons-disease","semg","tensorflow"],"created_at":"2026-06-23T07:02:39.530Z","updated_at":"2026-06-23T07:02:43.000Z","avatar_url":"https://github.com/dalgona039.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"[DeepL Translation of dalgona039/fog-detection-semg]\n\n# 🧠 FOG Detection using Multimodal Biosignals (sEMG, EEG, IMU)\n\n\u003e **파킨슨병 환자의 보행 동결(FOG) 탐지를 위한 하이브리드 딥러닝 및 개인화 모델 연구 프로젝트**\n\n[![Python](https://img.shields.io/badge/Python-3.12-blue?logo=python\u0026logoColor=white)](https://www.python.org/)\n[![TensorFlow](https://img.shields.io/badge/TensorFlow-2.14%2B-orange?logo=tensorflow\u0026logoColor=white)](https://www.tensorflow.org/)\n[![Poetry](https://img.shields.io/badge/Poetry-Package%20Manager-blueviolet?logo=poetry\u0026logoColor=white)](https://python-poetry.org/)\n[![License](https://img.shields.io/badge/License-MIT-green)](LICENSE)\n\n## 📋 프로젝트 개요 (Overview)\n\n**보행 동결(Freezing of Gait, FOG)**은 파킨슨병 환자가 보행을 시작하거나 방향을 전환할 때 발이 바닥에 붙은 것처럼 움직이지 못하는 현상으로, 낙상 사고의 주원인이 됩니다.\n\n본 프로젝트는 **58채널의 멀티모달 생체 신호(sEMG, EEG, IMU)**를 융합하여 FOG 이벤트를 실시간으로 탐지하는 딥러닝 시스템을 구축합니다. 특히, 환자 간 생체 신호의 편차가 심한 문제를 해결하기 위해 **'일반화 모델(Generalized)'**과 **'개인화 모델(Personalized)'**의 성능을 비교 분석하고, 최적의 탐지 전략을 제시합니다.\n\n### 🎯 핵심 목표\n- **Multimodal Fusion**: sEMG(근전도), EEG(뇌파), IMU(관성) 데이터의 융합 분석\n- **Model Comparison**: CNN-LSTM(하이브리드) vs LSTM vs Random Forest 성능 비교\n- **Personalization**: 환자별 맞춤형 학습을 통한 FOG 탐지 정확도(Recall) 극대화 (92.5% 달성)\n\n---\n\n## 📊 데이터셋 (Dataset)\n\n본 프로젝트는 **Mendeley Data**의 공개 데이터셋을 활용하였습니다.\n\n- **데이터셋 명**: Multimodal Dataset of Freezing of Gait in Parkinson's Disease\n- **출처 (DOI)**: [10.17632/r8gmbtv7w2.3](https://doi.org/10.17632/r8gmbtv7w2.3)\n- **피험자**: 파킨슨병 환자 12명\n- **데이터 구성 (총 58채널, 500Hz Sampling)**\n  - 🧠 **EEG (25 ch)**: 뇌 활동 모니터링\n  - 💪 **sEMG (5 ch)**: 다리 근육(Gastrocnemius, Tibialis Anterior 등) 활동 측정\n  - 👟 **IMU (28 ch)**: 가속도(Acc), 자이로(Gyro) - 양발, 다리, 골반 부착\n\n---\n\n## 🏗️ 프로젝트 구조 (Directory Structure)\n\n```\nfog-detection-semg/\n├── data/\n│   ├── Labeled Data/          # 레이블링된 원본 데이터 (.txt, .csv)\n│   ├── Preprocessed Data/     # 전처리(정규화, 다운샘플링) 완료된 데이터\n│   └── Segmented Data/        # 시계열 윈도우(Sliding Window)로 분할된 데이터\n├── notebooks/\n│   ├── 01_initial_data_exploration.ipynb    # 데이터 EDA, 시각화, 클래스 불균형 확인\n│   ├── 02_deep_learning_models.ipynb        # CNN-LSTM 및 LSTM 모델 학습 및 평가\n│   ├── Randon_forest_pakinsin.ipynb         # Random Forest 기반 ML 분류 실험\n│   ├── multimodal_fog_model.keras           # 학습 완료된 딥러닝 모델 파일\n│   ├── model_history.npy                    # 학습 Loss/Accuracy 히스토리\n│   ├── X_test_scaled.npy                    # 테스트용 입력 데이터 (전처리됨)\n│   └── y_test.npy                           # 테스트용 정답 레이블\n├── src/\n│   └── fog_detection_semg/    # 데이터 로더 및 전처리 유틸리티 소스\n├── tests/                     # 유닛 테스트 코드\n├── pyproject.toml             # Poetry 의존성 설정 파일\n└── README.md                  # 프로젝트 문서\n```\n\n---\n\n## 🚀 시작하기 (Getting Started)\n\n### 필수 요구사항 (Prerequisites)\n- **Python**: \u003e= 3.12\n- **Package Manager**: Poetry\n\n### 설치 및 실행 (Installation)\n\n1. **저장소 클론**\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd fog-detection-semg\n   ```\n\n2. **Poetry를 이용한 의존성 설치**\n   ```bash\n   poetry install\n   ```\n\n3. **가상환경 활성화**\n   ```bash\n   poetry shell\n   ```\n\n4. **Jupyter Lab 실행**\n   ```bash\n   jupyter lab\n   ```\n\n---\n\n## 🧪 연구 방법 및 실험 결과 (Methodology \u0026 Results)\n\n### 1. 딥러닝 모델 아키텍처 (02_deep_learning_models.ipynb)\n\n- **CNN-LSTM Hybrid**:\n  - **Conv1D**: 다채널 센서 데이터의 공간적 특징(Spatial Feature) 추출\n  - **LSTM**: 시계열 데이터의 시간적 흐름(Temporal Feature) 학습\n  - **Dropout (0.3)**: 과적합 방지\n- **Windowing**: 1초 윈도우 (Window size 32 @ Downsampled 25Hz), 50% Overlap\n\n### 2. 실험 결과: 일반화 vs 개인화\n\nFOG 탐지의 난제인 '환자 간 개인차'를 극복하기 위한 비교 실험 결과입니다.\n\n| 모델 접근 방식 | 알고리즘 | 결과 (Recall) | 분석 |\n|--------------|---------|--------------|------|\n| **일반화 모델\u003cbr\u003e(Generalized)** | CNN-LSTM | ❌ **Failure**\u003cbr\u003e(21 ~ 57%) | 환자 A의 데이터로 B를 예측할 경우, 생체 신호 패턴의 차이로 인해 심각한 성능 저하 발생 |\n| **개인화 모델\u003cbr\u003e(Personalized)** | LSTM | ✅ **Success**\u003cbr\u003e(92.5%) | 특정 환자 데이터를 기반으로 미세 튜닝(Fine-tuning) 시 FOG 이벤트를 정확하게 포착 |\n\n**결론**: 복잡한 모델보다 환자 맞춤형(Personalized) 학습 전략이 임상 적용에 훨씬 유효함을 입증했습니다.\n\n---\n\n## 📦 기술 스택 (Tech Stack)\n\n- **Language**: Python 3.12\n- **Deep Learning**: TensorFlow, Keras (\u003e= 2.14.0)\n- **Machine Learning**: Scikit-learn, Imbalanced-learn (SMOTE 등)\n- **Data Analysis**: Pandas, NumPy, SciPy (Signal Processing)\n- **Visualization**: Matplotlib, Seaborn\n- **Environment**: Poetry, Jupyter Lab\n\n---\n\n## 🔬 사용 예시 (Usage)\n\n학습된 `.keras` 모델을 로드하여 새로운 센서 데이터에 대한 추론을 수행할 수 있습니다.\n\n```python\nimport numpy as np\nfrom tensorflow.keras.models import load_model\n\n# 1. 모델 로드\nmodel = load_model('notebooks/multimodal_fog_model.keras')\n\n# 2. 테스트 데이터 로드 (형상: [samples, time_steps, features])\nX_test = np.load('notebooks/X_test_scaled.npy')\n\n# 3. 예측 수행\npredictions = model.predict(X_test)\npredicted_classes = (predictions \u003e 0.5).astype(int)\n\nprint(f\"Detected FOG Events: {np.sum(predicted_classes)}\")\n```\n\n---\n\n## 📝 개발 로드맵 (Roadmap)\n\n- [x] 멀티모달 데이터 전처리 파이프라인 구축\n- [x] CNN-LSTM 및 Random Forest 모델 비교 평가\n- [x] 개인화 모델의 유효성 검증 (Recall 92.5% 달성)\n- [ ] 실시간 스트리밍 데이터 처리 (Real-time Inference)\n- [ ] 모바일/임베디드 환경을 위한 모델 경량화 (TFLite)\n- [ ] 웹 기반 보행 분석 대시보드 구축\n\n---\n\n## 🤝 기여하기 (Contributing)\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n---\n\n## 📄 라이센스 (License)\n\nThis project is licensed under the MIT License.\n\n---\n\n## 👨‍💻 작성자 (Author)\n\n**Lee Won Seok**\n- Dept. of Biomedical Engineering, Kyung Hee University\n- Contact: [icpuff83@khu.ac.kr]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdalgona039%2Ffog-detection-semg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdalgona039%2Ffog-detection-semg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdalgona039%2Ffog-detection-semg/lists"}