Skip to content

​The Chimera v2.0 repository is a comprehensive, modular platform designed for the development and deployment of brain-computer interface (BCI)-controlled exoskeletons. It integrates clinical trial design, regulatory compliance, and AI-driven signal processing to support both supervised clinical and unsupervised home use across India and the world.

License

Notifications You must be signed in to change notification settings

chimera-org/chimera_v2.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

454 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

CHIMERA Version 2.0

Machine Learning for Mind-Controlled Exoskeletons

Restoring mobility through brain-computer interface technology

OverviewFeaturesArchitectureGet StartedUsageRegulatoryContributeRoadmap

Build Status Last Commit License Python Version

Code Size Repo Size Issues Release

Chimera System Architecture

Typing SVG

Chimera is a comprehensive machine learning platform for brain-controlled exoskeletons, designed to restore mobility for individuals with quadriplegia. The platform processes Electroencephalography (EEG) signals to decode movement intentions and translate them into precise exoskeleton control commands.


📋 Table of Contents

Getting Started
Development
Resources

🧠 Overview

Chimera encompasses the entire ML pipeline from raw data ingestion and preprocessing to model training, evaluation, and deployment-ready inference logic. It is designed with regulatory compliance in mind, following FDA guidelines for Software as a Medical Device (SaMD) with AI/ML components.

🔍 Why Chimera?
  • Comprehensive Solution: Covers the entire BCI pipeline from signal acquisition to exoskeleton control
  • Regulatory Focus: Built from the ground up with medical device compliance in mind
  • Research to Production: Bridges the gap between academic research and clinical deployment
  • Open Collaboration: Enables researchers and engineers to build on a common platform
  • Reproducibility: Ensures consistent results across different environments and studies
Repo Card

✨ Key Features

🔄 End-to-End EEG Pipeline

  • Data Loading: Flexible data ingestion from various EEG devices
  • Signal Processing: Robust filtering, artifact removal, and preprocessing
  • Feature Extraction: CSP, PSD, and advanced feature engineering
  • Dataset Creation: Standardized dataset preparation for ML models

🧠 Flexible Modeling

  • Classical ML: LDA, SVM, and other traditional approaches
  • Deep Learning: EEGNet, ShallowConvNet, and custom architectures
  • Framework Support: PyTorch and TensorFlow integration
  • Transfer Learning: Cross-subject and cross-session adaptation

⚙️ Configuration Driven

  • Hydra Integration: Complex configuration management
  • Experiment Tracking: MLflow / Weights & Biases integration
  • Hyperparameter Optimization: Automated tuning capabilities
  • Reproducibility: Consistent experiment reproduction

🏥 Clinical & Regulatory Ready

  • FDA Compliance: Designed for SaMD regulatory requirements
  • Risk Management: ISO 14971-compliant risk management
  • Clinical Validation: Protocols for clinical testing
  • Human Factors: Human-in-the-loop validation

🔒 Quality & Security

  • Code Quality: Black, isort, Flake8, mypy via pre-commit
  • Testing: Comprehensive unit, integration, and system tests
  • Security Framework: Threat modeling and secure coding
  • Documentation: Extensive API and architecture documentation

🚀 Deployment Ready

  • Real-time Inference: Online BCI inference capabilities
  • Embedded Systems: Deployment to exoskeleton hardware
  • Monitoring: Performance tracking and drift detection
  • OTA Updates: Safe over-the-air update mechanisms

🏗️ System Architecture

Chimera follows a modular architecture designed for flexibility, maintainability, and regulatory compliance:

  1. Data Acquisition: Interfaces with EEG hardware to collect brain signals
  2. Signal Processing: Filters and preprocesses raw EEG data
  3. Feature Extraction: Transforms processed signals into meaningful features
  4. Model Training: Trains ML/DL models on extracted features
  5. Inference Engine: Performs real-time prediction of movement intentions
  6. Control Interface: Translates predictions into exoskeleton commands
  7. Monitoring System: Ensures safe operation and detects anomalies
  8. Regulatory Framework: Ensures compliance with medical device regulations
Architecture Diagram

📁 Repository Structure

```
chimera_v2.0/
├── 📂 .github/                          # GitHub Actions & CI/CD workflows
│   ├── 📂 workflows/                    # Automated workflow definitions
│   │   ├── 📄 codeql.yml               # Code quality analysis
│   │   ├── 📄 ci.yml                   # Continuous integration pipeline
│   │   └── 📄 security-scan.yml        # Security vulnerability scanning
│   ├── 📄 ISSUE_TEMPLATE.md            # Issue reporting templates
│   └── 📄 PULL_REQUEST_TEMPLATE.md     # Pull request guidelines
│
├── 📂 architecture/                     # System architecture documentation
│   ├── 📂 diagrams/                    # Architecture diagrams and flowcharts
│   ├── 📂 specifications/              # Technical specifications
│   ├── 📄 api_design_guide.md          # API design principles and standards
│   ├── 📄 system_overview.md           # High-level system architecture
│   └── 📄 integration_patterns.md      # Integration and communication patterns
│
├── 📂 benchmarks/                       # Performance benchmarking suite
│   ├── 📂 datasets/                    # Benchmark datasets
│   ├── 📂 results/                     # Benchmark results and comparisons
│   ├── 📂 scripts/                     # Benchmarking automation scripts
│   └── 📄 performance_metrics.md       # Performance evaluation criteria
│
├── 📂 clinical/                         # Clinical validation and trials
│   ├── 📂 advisory_board/              # Advisory board documentation
│   │   ├── 📄 charter.md               # Board charter and responsibilities
│   │   ├── 📄 meeting_minutes/         # Board meeting records
│   │   └── 📄 recommendations.md       # Clinical recommendations
│   ├── 📂 data_collection/             # Clinical data collection protocols
│   │   ├── 📂 protocols/               # Data collection procedures
│   │   ├── 📂 forms/                   # Clinical assessment forms
│   │   └── 📂 guidelines/              # Data collection guidelines
│   ├── 📂 ethics/                      # Ethics and IRB documentation
│   │   ├── 📄 irb_approval.pdf         # Institutional Review Board approval
│   │   ├── 📄 consent_forms.pdf        # Patient consent documentation
│   │   └── 📄 ethics_framework.md      # Research ethics guidelines
│   ├── 📂 protocols/                   # Clinical trial protocols
│   │   ├── 📄 study_design.md          # Clinical study design
│   │   ├── 📄 inclusion_criteria.md    # Patient inclusion/exclusion criteria
│   │   └── 📄 outcome_measures.md      # Primary and secondary outcomes
│   ├── 📂 validation/                  # Clinical validation studies
│   │   ├── 📂 pilot_studies/           # Pilot study results
│   │   ├── 📂 efficacy_trials/         # Efficacy validation trials
│   │   └── 📂 safety_studies/          # Safety assessment studies
│   └── 📄 clinical_overview.md         # Clinical program overview
│
├── 📂 config/                          # Configuration management
│   ├── 📂 experiments/                 # Experiment configurations
│   │   ├── 📄 experiment_01.yaml       # Motor imagery experiment config
│   │   ├── 📄 experiment_02.yaml       # Cross-subject validation config
│   │   └── 📄 baseline_config.yaml     # Baseline experiment parameters
│   ├── 📂 models/                      # Model configuration files
│   │   ├── 📄 eegnet_config.yaml       # EEGNet model parameters
│   │   ├── 📄 lda_config.yaml          # Linear Discriminant Analysis config
│   │   └── 📄 svm_config.yaml          # Support Vector Machine config
│   ├── 📂 deployment/                  # Deployment configurations
│   │   ├── 📄 production.yaml          # Production environment config
│   │   ├── 📄 staging.yaml             # Staging environment config
│   │   └── 📄 development.yaml         # Development environment config
│   └── 📄 default_config.yaml          # Default system configuration
│
├── 📂 data/                            # Data management and governance
│   ├── 📂 01_raw/                      # Raw EEG data (DVC tracked)
│   │   ├── 📂 subject-001/             # Individual subject data
│   │   │   ├── 📂 session_01/          # Recording session data
│   │   │   │   ├── 📄 eeg_data.fif     # Raw EEG recordings
│   │   │   │   ├── 📄 events.txt       # Event markers
│   │   │   │   └── 📄 metadata.json    # Session metadata
│   │   │   └── 📂 session_02/          # Additional sessions
│   │   ├── 📂 subject-002/             # Additional subjects
│   │   └── 📂 calibration/             # System calibration data
│   ├── 📂 02_processed/                # Preprocessed data
│   │   ├── 📂 filtered/                # Filtered EEG signals
│   │   ├── 📂 artifacts_removed/       # Artifact-cleaned data
│   │   └── 📂 epoched/                 # Epoched trial data
│   ├── 📂 03_features/                 # Extracted features
│   │   ├── 📂 csp_features/            # Common Spatial Pattern features
│   │   ├── 📂 psd_features/            # Power Spectral Density features
│   │   └── 📂 time_domain/             # Time domain features
│   ├── 📂 04_datasets/                 # ML-ready datasets
│   │   ├── 📂 training/                # Training datasets
│   │   ├── 📂 validation/              # Validation datasets
│   │   └── 📂 testing/                 # Test datasets
│   ├── 📂 governance/                  # Data governance documentation
│   │   ├── 📄 data_dictionary.md       # Data field definitions
│   │   ├── 📄 privacy_policy.md        # Data privacy guidelines
│   │   └── 📄 retention_policy.md      # Data retention policies
│   └── 📄 data_quality_metrics.md      # Data quality assessment
│
├── 📂 deployment/                      # Deployment infrastructure
│   ├── 📂 embedded/                    # Embedded system deployment
│   │   ├── 📄 ci_cd_pipeline.yml       # Embedded CI/CD pipeline
│   │   ├── 📄 verification.md          # Deployment verification
│   │   └── 📂 firmware/                # Firmware deployment scripts
│   ├── 📂 hardware_integration/        # Hardware integration scripts
│   │   ├── 📂 exoskeleton/             # Exoskeleton integration
│   │   ├── 📂 eeg_devices/             # EEG device interfaces
│   │   └── 📂 communication/           # Device communication protocols
│   ├── 📂 ota_updates/                 # Over-the-air update system
│   │   ├── 📂 update_packages/         # Update package management
│   │   ├── 📂 rollback/                # Rollback mechanisms
│   │   └── 📄 update_protocol.md       # Update deployment protocol
│   ├── 📂 cloud/                       # Cloud deployment configurations
│   │   ├── 📄 docker-compose.yml       # Docker containerization
│   │   ├── 📄 kubernetes.yaml          # Kubernetes deployment
│   │   └── 📂 terraform/               # Infrastructure as code
│   └── 📄 deployment_guide.md          # Deployment documentation
│
├── 📂 docs/                            # Comprehensive documentation
│   ├── 📂 _static/                     # Static documentation assets
│   │   ├── 📂 images/                  # Documentation images
│   │   ├── 📂 css/                     # Custom styling
│   │   └── 📂 js/                      # Interactive elements
│   ├── 📂 api/                         # API documentation
│   │   ├── 📄 endpoints.md             # API endpoint reference
│   │   ├── 📄 authentication.md        # Authentication methods
│   │   └── 📄 examples.md              # API usage examples
│   ├── 📂 developer_guides/            # Developer documentation
│   │   ├── 📄 getting_started.md       # Quick start guide
│   │   ├── 📄 contributing.md          # Contribution guidelines
│   │   ├── 📄 coding_standards.md      # Code style guidelines
│   │   └── 📄 testing_guide.md         # Testing best practices
│   ├── 📂 troubleshooting/             # Troubleshooting guides
│   │   ├── 📄 common_issues.md         # Frequently encountered issues
│   │   ├── 📄 debugging_guide.md       # Debugging procedures
│   │   └── 📄 error_codes.md           # Error code reference
│   ├── 📂 user_guides/                 # End-user documentation
│   │   ├── 📄 installation.md          # Installation instructions
│   │   ├── 📄 configuration.md         # Configuration guide
│   │   └── 📄 operation_manual.md      # Operation procedures
│   ├── 📄 architecture.md              # System architecture overview
│   ├── 📄 data.md                      # Data handling documentation
│   ├── 📄 deployment.md                # Deployment procedures
│   ├── 📄 index.md                     # Documentation index
│   ├── 📄 models.md                    # Model documentation
│   └── 📄 usage_guide.md               # Usage instructions
│
├── 📂 models/                          # ML models and artifacts
│   ├── 📂 classifiers/                 # Trained classification models
│   │   ├── 📄 eeg_cnn_v1_final.h5      # CNN model for EEG classification
│   │   ├── 📄 lda_subject001_session02.pkl # Subject-specific LDA model
│   │   ├── 📄 svm_motor_imagery.pkl    # SVM for motor imagery
│   │   └── 📄 ensemble_model.pkl       # Ensemble classification model
│   ├── 📂 documentation/               # Model documentation
│   │   ├── 📂 model_cards/             # Model performance cards
│   │   │   ├── 📄 eeg_cnn_v1.md        # CNN model card
│   │   │   ├── 📄 lda_baseline.md      # LDA baseline model card
│   │   │   └── 📄 ensemble_v2.md       # Ensemble model documentation
│   │   ├── 📂 performance_reports/     # Model performance analysis
│   │   │   ├── 📄 cross_validation.md  # Cross-validation results
│   │   │   ├── 📄 subject_transfer.md  # Transfer learning analysis
│   │   │   └── 📄 real_time_performance.md # Real-time inference metrics
│   │   └── 📄 limitations.md           # Model limitations and constraints
│   ├── 📂 signal_processing/           # Signal processing models
│   │   ├── 📄 ica_subject001_weights.fif # ICA artifact removal weights
│   │   ├── 📄 csp_filters.pkl          # Common Spatial Pattern filters
│   │   └── 📄 bandpass_coefficients.pkl # Digital filter coefficients
│   ├── 📂 checkpoints/                 # Training checkpoints
│   │   ├── 📂 eegnet/                  # EEGNet training checkpoints
│   │   ├── 📂 lstm/                    # LSTM model checkpoints
│   │   └── 📂 transformer/             # Transformer model checkpoints
│   └── 📄 model_registry.json          # Model version registry
│
├── 📂 notebooks/                       # Jupyter notebooks for analysis
│   ├── 📂 exploratory/                 # Exploratory data analysis
│   │   ├── 📄 data_exploration.ipynb   # Initial data exploration
│   │   ├── 📄 signal_visualization.ipynb # EEG signal visualization
│   │   └── 📄 feature_analysis.ipynb   # Feature importance analysis
│   ├── 📂 experiments/                 # Experimental notebooks
│   │   ├── 📄 baseline_models.ipynb    # Baseline model experiments
│   │   ├── 📄 hyperparameter_tuning.ipynb # Model optimization
│   │   └── 📄 cross_subject_validation.ipynb # Cross-subject studies
│   ├── 📂 tutorials/                   # Educational notebooks
│   │   ├── 📄 eeg_preprocessing.ipynb  # EEG preprocessing tutorial
│   │   ├── 📄 feature_extraction.ipynb # Feature extraction guide
│   │   └── 📄 model_training.ipynb     # Model training tutorial
│   └── 📄 template.ipynb               # Notebook template
│
├── 📂 quality/                         # Quality assurance framework
│   ├── 📂 testing/                     # Testing infrastructure
│   │   ├── 📂 unit_tests/              # Unit test suites
│   │   ├── 📂 integration_tests/       # Integration testing
│   │   ├── 📂 performance_tests/       # Performance benchmarks
│   │   └── 📂 regression_tests/        # Regression test suites
│   ├── 📂 code_review/                 # Code review guidelines
│   │   ├── 📄 review_checklist.md      # Code review checklist
│   │   ├── 📄 style_guide.md           # Code style guidelines
│   │   └── 📄 best_practices.md        # Development best practices
│   ├── 📂 metrics/                     # Quality metrics tracking
│   │   ├── 📄 code_coverage.md         # Test coverage reports
│   │   ├── 📄 complexity_metrics.md    # Code complexity analysis
│   │   └── 📄 technical_debt.md        # Technical debt tracking
│   └── 📄 quality_standards.md         # Quality assurance standards
│
├── 📂 regulatory/                      # Regulatory compliance documentation
│   ├── 📂 fda/                         # FDA compliance materials
│   │   ├── 📄 510k_submission.md       # 510(k) premarket submission
│   │   ├── 📄 samd_classification.md   # Software as Medical Device classification
│   │   ├── 📄 clinical_evaluation.md   # Clinical evaluation report
│   │   └── 📄 predicate_analysis.md    # Predicate device analysis
│   ├── 📂 iso_standards/               # ISO standard compliance
│   │   ├── 📄 iso_14971_risk_management.md # Risk management standard
│   │   ├── 📄 iso_13485_qms.md         # Quality management system
│   │   ├── 📄 iso_62304_software.md    # Medical device software standard
│   │   └── 📄 iso_27001_security.md    # Information security standard
│   ├── 📂 international/               # International regulatory compliance
│   │   ├── 📄 ce_marking.md            # European CE marking
│   │   ├── 📄 health_canada.md         # Health Canada requirements
│   │   └── 📄 cdsco_india.md           # Indian regulatory compliance
│   ├── 📄 risk_controls.md             # Risk control measures
│   ├── 📄 validation_protocols.md      # Validation and verification protocols
│   └── 📄 regulatory_strategy.md       # Overall regulatory strategy
│
├── 📂 research/                        # Research collaboration and publications
│   ├── 📂 publications/                # Research publications
│   │   ├── 📂 papers/                  # Published research papers
│   │   ├── 📂 conferences/             # Conference presentations
│   │   ├── 📂 patents/                 # Patent applications
│   │   └── 📂 preprints/               # Preprint manuscripts
│   ├── 📂 collaborations/              # Research collaborations
│   │   ├── 📂 academic_partners/       # University partnerships
│   │   ├── 📂 industry_partners/       # Industry collaborations
│   │   └── 📂 clinical_sites/          # Clinical research sites
│   ├── 📂 datasets/                    # Research datasets
│   │   ├── 📂 public_datasets/         # Publicly available datasets
│   │   ├── 📂 synthetic_data/          # Synthetic data generation
│   │   └── 📂 benchmark_datasets/      # Standardized benchmarks
│   ├── 📄 research_roadmap.md          # Research development roadmap
│   └── 📄 ethics_framework.md          # Research ethics guidelines
│
├── 📂 scripts/                         # Automation and utility scripts
│   ├── 📂 data_processing/             # Data processing automation
│   │   ├── 📄 preprocess_eeg.py        # EEG preprocessing pipeline
│   │   ├── 📄 extract_features.py      # Feature extraction script
│   │   └── 📄 create_datasets.py       # Dataset creation automation
│   ├── 📂 training/                    # Model training scripts
│   │   ├── 📄 train_eegnet.py          # EEGNet training script
│   │   ├── 📄 train_lda.py             # LDA training script
│   │   ├── 📄 hyperparameter_search.py # Automated hyperparameter tuning
│   │   └── 📄 tune_hyperparameters.py  # Hyperparameter optimization
│   ├── 📂 evaluation/                  # Model evaluation scripts
│   │   ├── 📄 evaluate_models.py       # Model performance evaluation
│   │   ├── 📄 cross_validation.py      # Cross-validation analysis
│   │   └── 📄 statistical_tests.py     # Statistical significance testing
│   ├── 📂 deployment/                  # Deployment automation
│   │   ├── 📄 deploy_model.py          # Model deployment script
│   │   ├── 📄 health_check.py          # System health monitoring
│   │   └── 📄 backup_restore.py        # Data backup and restore
│   └── 📂 utilities/                   # General utility scripts
│       ├── 📄 data_validation.py       # Data integrity validation
│       ├── 📄 system_diagnostics.py    # System diagnostic tools
│       └── 📄 performance_monitor.py   # Performance monitoring
│
├── 📂 security/                        # Security framework and policies
│   ├── 📂 policies/                    # Security policies
│   │   ├── 📄 access_control.md        # Access control policies
│   │   ├── 📄 data_protection.md       # Data protection guidelines
│   │   ├── 📄 incident_response.md     # Security incident response
│   │   └── 📄 vulnerability_management.md # Vulnerability management
│   ├── 📂 threat_modeling/             # Security threat analysis
│   │   ├── 📄 threat_assessment.md     # Threat landscape analysis
│   │   ├── 📄 attack_vectors.md        # Potential attack vectors
│   │   └── 📄 mitigation_strategies.md # Security mitigation measures
│   ├── 📂 compliance/                  # Security compliance
│   │   ├── 📄 hipaa_compliance.md      # HIPAA privacy compliance
│   │   ├── 📄 gdpr_compliance.md       # GDPR data protection
│   │   └── 📄 cybersecurity_framework.md # Cybersecurity standards
│   ├── 📄 security_policy.md           # Overall security policy
│   └── 📄 security_architecture.md     # Security architecture design
│
├── 📂 src/                             # Core source code
│   └── 📂 chimera/                     # Main Python package
│       ├── 📂 data/                    # Data handling and loading
│       │   ├── 📄 __init__.py          # Package initialization
│       │   ├── 📄 loaders.py           # Data loading utilities
│       │   ├── 📄 validators.py        # Data validation functions
│       │   └── 📄 transforms.py        # Data transformation utilities
│       ├── 📂 processing/              # Signal processing modules
│       │   ├── 📄 __init__.py          # Package initialization
│       │   ├── 📄 filters.py           # Digital filtering functions
│       │   ├── 📄 artifacts.py         # Artifact removal algorithms
│       │   ├── 📄 preprocessing.py     # EEG preprocessing pipeline
│       │   └── 📄 quality_control.py   # Signal quality assessment
│       ├── 📂 features/                # Feature extraction modules
│       │   ├── 📄 __init__.py          # Package initialization
│       │   ├── 📄 spatial.py           # Spatial feature extraction (CSP)
│       │   ├── 📄 spectral.py          # Spectral feature extraction (PSD)
│       │   ├── 📄 temporal.py          # Temporal feature extraction
│       │   └── 📄 connectivity.py      # Connectivity feature extraction
│       ├── 📂 models/                  # ML model implementations
│       │   ├── 📄 __init__.py          # Package initialization
│       │   ├── 📄 base.py              # Base model classes
│       │   ├── 📄 classical.py         # Classical ML models (LDA, SVM)
│       │   ├── 📄 deep_learning.py     # Deep learning models
│       │   ├── 📄 ensemble.py          # Ensemble methods
│       │   └── 📄 transfer_learning.py # Transfer learning utilities
│       ├── 📂 training/                # Model training infrastructure
│       │   ├── 📄 __init__.py          # Package initialization
│       │   ├── 📄 trainers.py          # Training loop implementations
│       │   ├── 📄 optimizers.py        # Optimization algorithms
│       │   ├── 📄 schedulers.py        # Learning rate schedulers
│       │   └── 📄 callbacks.py         # Training callbacks
│       ├── 📂 evaluation/              # Model evaluation modules
│       │   ├── 📄 __init__.py          # Package initialization
│       │   ├── 📄 metrics.py           # Evaluation metrics
│       │   ├── 📄 cross_validation.py  # Cross-validation utilities
│       │   ├── 📄 statistical_tests.py # Statistical testing
│       │   └── 📄 visualization.py     # Results visualization
│       ├── 📂 inference/               # Real-time inference engine
│       │   ├── 📄 __init__.py          # Package initialization
│       │   ├── 📄 predictor.py         # Real-time prediction engine
│       │   ├── 📄 streaming.py         # Streaming data processing
│       │   ├── 📄 monitoring.py        # Model performance monitoring
│       │   └── 📄 safety_checks.py     # Safety validation checks
│       ├── 📂 hardware/                # Hardware interface modules
│       │   ├── 📄 __init__.py          # Package initialization
│       │   ├── 📄 eeg_interface.py     # EEG device communication
│       │   ├── 📄 exoskeleton_control.py # Exoskeleton control interface
│       │   ├── 📄 communication.py     # Device communication protocols
│       │   └── 📄 hardware_interface.py # Generic hardware interface
│       ├── 📂 deployment/              # Deployment utilities
│       │   ├── 📄 __init__.py          # Package initialization
│       │   ├── 📄 model_server.py      # Model serving infrastructure
│       │   ├── 📄 containerization.py  # Docker containerization
│       │   ├── 📄 monitoring.py        # Deployment monitoring
│       │   └── 📄 health_checks.py     # System health validation
│       ├── 📂 utils/                   # Shared utility functions
│       │   ├── 📄 __init__.py          # Package initialization
│       │   ├── 📄 logging.py           # Logging configuration
│       │   ├── 📄 config.py            # Configuration management
│       │   ├── 📄 io_utils.py          # Input/output utilities
│       │   ├── 📄 math_utils.py        # Mathematical utilities
│       │   └── 📄 visualization.py     # Visualization utilities
│       └── 📄 __init__.py              # Main package initialization
│
├── 📂 tests/                           # Comprehensive test suite
│   ├── 📂 unit/                        # Unit tests
│   │   ├── 📂 data/                    # Data module tests
│   │   ├── 📂 processing/              # Processing module tests
│   │   ├── 📂 features/                # Feature extraction tests
│   │   ├── 📂 models/                  # Model implementation tests
│   │   └── 📂 utils/                   # Utility function tests
│   ├── 📂 integration/                 # Integration tests
│   │   ├── 📂 pipeline/                # End-to-end pipeline tests
│   │   ├── 📂 hardware/                # Hardware integration tests
│   │   └── 📂 deployment/              # Deployment integration tests
│   ├── 📂 performance/                 # Performance tests
│   │   ├── 📂 benchmarks/              # Performance benchmarks
│   │   ├── 📂 stress_tests/            # System stress testing
│   │   └── 📂 load_tests/              # Load testing scenarios
│   ├── 📂 fixtures/                    # Test data and fixtures
│   │   ├── 📂 sample_data/             # Sample EEG data for testing
│   │   ├── 📂 mock_models/             # Mock model implementations
│   │   └── 📂 test_configs/            # Test configuration files
│   ├── 📄 conftest.py                  # Pytest configuration
│   └── 📄 test_requirements.txt        # Testing dependencies
│
├── 📄 .gitignore                       # Git ignore patterns
├── 📄 .pre-commit-config.yaml          # Pre-commit hooks configuration
├── 📄 .dvcignore                       # DVC ignore patterns
├── 📄 pyproject.toml                   # Python project configuration
├── 📄 poetry.lock                      # Poetry dependency lock file
├── 📄 requirements.txt                 # Python dependencies
├── 📄 environment.yml                  # Conda environment specification
├── 📄 Dockerfile                       # Docker containerization
├── 📄 docker-compose.yml               # Multi-container Docker setup
├── 📄 Makefile                         # Build automation
├── 📄 dvc.yaml                         # DVC pipeline configuration
├── 📄 params.yaml                      # DVC parameters
├── 📄 README.md                        # Project documentation
├── 📄 LICENSE                          # Apache 2.0 license
├── 📄 CHANGELOG.md                     # Version change history
├── 📄 CONTRIBUTING.md                  # Contribution guidelines
├── 📄 CODE_OF_CONDUCT.md               # Community code of conduct
└── 📄 SECURITY.md                      # Security policy and reporting
```
      

🏗️ Architecture Overview

The repository follows a modular, enterprise-grade architecture designed for:

  • 🔬 Research & Development: Comprehensive notebooks and experimental frameworks
  • 🏥 Clinical Validation: Robust clinical trial infrastructure and regulatory compliance
  • 🚀 Production Deployment: Scalable deployment pipelines and monitoring systems
  • 🔒 Security & Compliance: Enterprise-level security and regulatory frameworks
  • 📊 Quality Assurance: Comprehensive testing and quality management systems

🎯 Key Directory Functions

Directory Purpose Key Features
src/chimera/ Core ML platform Modular BCI pipeline, real-time inference
clinical/ Clinical validation IRB protocols, advisory board, ethics framework
regulatory/ Compliance framework FDA 510(k), ISO standards, international regulations
data/ Data management DVC-tracked datasets, governance, quality metrics
models/ ML artifacts Trained models, documentation, performance reports
deployment/ Production systems Hardware integration, OTA updates, monitoring
security/ Security framework Threat modeling, compliance, incident response
quality/ QA infrastructure Testing suites, code review, metrics tracking

This structure ensures scalability, maintainability, and regulatory compliance while supporting both research innovation and production deployment.


🚀 Getting Started

Prerequisites

  • Git Git (>=2.0)
  • Python Python (>=3.9, <3.12)
  • Poetry Poetry (>=1.2)
  • DVC DVC (>=2.0)
  • Make Make (optional)

Quick Start Guide

  1. Activate the virtual environment:
    poetry shell
  2. Run the example EEG processing pipeline:
    python scripts/run_pipeline.py --config-name=example
  3. Train a model on the example dataset:
    python scripts/train_model.py --config-name=eegnet
  4. Evaluate model performance:
    python scripts/evaluate_model.py --model-path=models/eegnet_latest.pt
Installation & Setup
# Clone the repository
git clone https://github.com/chimera-org/chimera_v2.0.git
cd chimera_v2.0

# Install dependencies
poetry install

# Set up pre-commit hooks
poetry run pre-commit install

# Download example datasets
poetry run dvc pull

📊 Usage Examples

Data Processing

from chimera.data import EEGDataLoader
from chimera.processing import Preprocessor

# Load EEG data
loader = EEGDataLoader(dataset_path="data/example_dataset")
raw_data = loader.load()

# Preprocess the data
preprocessor = Preprocessor(
    filters=["bandpass", "notch"],
    filter_params={"bandpass": {"l_freq": 1, "h_freq": 40}}
)
processed_data = preprocessor.process(raw_data)

Model Training

from chimera.features import FeatureExtractor
from chimera.models import EEGNet
from chimera.training import Trainer

# Extract features
extractor = FeatureExtractor(method="csp")
features = extractor.extract(processed_data)

# Create and train model
model = EEGNet(
    num_channels=64,
    num_classes=4,
    dropout_rate=0.5
)

trainer = Trainer(
    model=model,
    optimizer="adam",
    learning_rate=0.001,
    batch_size=64,
    num_epochs=100
)

trainer.train(features)

Evaluation

from chimera.evaluation import Evaluator

# Evaluate model performance
evaluator = Evaluator(metrics=["accuracy", "f1", "confusion_matrix"])
results = evaluator.evaluate(model, test_data)
print(f"Accuracy: {results['accuracy']:.4f}")

Deployment

from chimera.deployment import ModelDeployer

# Package model for deployment
deployer = ModelDeployer(
    model=model,
    target="embedded",
    optimization="quantization"
)

deployment_package = deployer.package()
deployer.deploy(deployment_package, target_device="exoskeleton_v1")

🏥 Regulatory Compliance

FDA Compliance

Chimera is designed to meet FDA requirements for Software as a Medical Device (SaMD) with AI/ML components:

  • Premarket Submissions: Documentation templates for 510(k) or De Novo pathways
  • Quality System Regulation: Compliance with 21 CFR Part 820
  • Software Validation: Following General Principles of Software Validation
  • Cybersecurity: Implementation of FDA cybersecurity guidance
  • AI/ML Specific: Adherence to proposed regulatory framework for AI/ML-based SaMD

CDSCO Compliance

For the Indian market, Chimera complies with Central Drugs Standard Control Organization requirements:

  • Medical Device Rules, 2017: Documentation for Class C medical device registration
  • Quality Management System: ISO 13485 compliant processes
  • Clinical Investigation: Protocols following ISO 14155
  • Risk Management: ISO 14971 implementation
Risk Management

Comprehensive risk management following ISO 14971:

  • Risk Analysis: Systematic identification of hazards
  • Risk Evaluation: Assessment of severity and probability
  • Risk Controls: Implementation of mitigations
  • Residual Risk: Evaluation of acceptability
  • Post-Market Surveillance: Continuous monitoring plan

💻 Development Workflow

Code Quality Standards

  • Black Code formatting
  • isort Import sorting
  • Flake8 Linting
  • mypy Static type checking
  • pre-commit Automated checks

Testing Strategy

  • Unit Tests: Testing individual components
  • Integration Tests: Testing component interactions
  • System Tests: End-to-end testing
  • Performance Tests: Benchmarking critical operations
  • Regulatory Tests: Validation for compliance requirements

CI/CD Pipeline

  • GitHub Actions Automated testing
  • Artifact Generation: Versioned package creation
  • Documentation: Automatic documentation updates
  • Release Management: Structured release process
  • Deployment: Automated deployment to test environments

👥 Contributing

We welcome contributions from the community! Please read our contribution guidelines before submitting pull requests.

Code of Conduct

This project adheres to a Code of Conduct to ensure a welcoming and inclusive environment for all contributors.

Contribution Guidelines

Please see our Contributing Guide for details on:

  • Code style and standards
  • Pull request process
  • Issue reporting
  • Feature requests
  • Documentation requirements

Development Setup

  1. Fork the repository
  2. Clone your fork:
    git clone https://github.com/YOUR_USERNAME/chimera_v2.0.git
  3. Set up development environment:
    cd chimera_v2.0
    poetry install --with dev
    pre-commit install
  4. Create a branch for your feature:
    git checkout -b feature/amazing-feature
  5. Make your changes and commit
  6. Push to your fork
  7. Open a pull request

🗺️ Roadmap

Roadmap
Timeline Milestone Description
Q2 202X Enhanced Transfer Learning Improved cross-subject and cross-session adaptation capabilities
Q3 202X Real-time Adaptive Algorithms Algorithms that adapt to changing brain signals during use
Q4 202X Multi-modal Integration Combined EEG + EMG signal processing for improved control
Q1 202X Expanded Hardware Support Support for additional EEG devices and exoskeleton platforms
Q2 202X Advanced Personalization Framework for personalized model adaptation
Q3 202X Federated Learning Privacy-preserving distributed learning implementation
Q4 202X Regulatory Submission Complete package for FDA and CDSCO submissions

See our project board for detailed development plans.


📚 Research Publications

Paper Title

Authors: (Authors name, Year)

Journal: (Journal's name, volume number-issue number, page range/article identification number)

Abstract: (One line abstract)

DOI

Paper Title

Authors: (Authors name, Year)

Journal: (Journal's name, volume number-issue number, page range/article identification number)

Abstract: (One line abstract)

DOI

Paper Title

Authors: (Authors name, Year)

Journal: (Journal's name, volume number-issue number, page range/article identification number)

Abstract: (One line abstract)

DOI

📄 License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Copyright (c) 2025 Chimera BCI Team

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

License: Apache 2.0

🙏 Acknowledgments

MNE-Python

EEG processing tools

MOABB

Benchmark datasets

Hydra

Configuration framework

Open Source Contributors

All contributors


📞 Contact & Support

Project Team

Project Lead: Ankit Gupta, Manthan Shinde
[email protected]

Technical Support:
[email protected]

Connect With Us

Website
Twitter
GitHub


Made with love

Built with ❤️ by the Chimera team and contributors worldwide

Back to Top

Project Status

Last Commit Open Issues Closed Issues
Discussions Milestones Commit Activity

Technology Stack

Python PyTorch TensorFlow scikit-learn NumPy

Docker GitHub Actions Poetry DVC MLflow

Demo & Visualization

EEG Signal Processing

EEG Signal Processing

Real-time EEG signal processing pipeline with artifact rejection

Model Performance

Model Performance

Classification accuracy across different movement intentions

Quick Reference

Command Description
make setup Set up development environment
make test Run all tests
make lint Run linting checks
make docs Generate documentation
make train Train models with default configuration

About

​The Chimera v2.0 repository is a comprehensive, modular platform designed for the development and deployment of brain-computer interface (BCI)-controlled exoskeletons. It integrates clinical trial design, regulatory compliance, and AI-driven signal processing to support both supervised clinical and unsupervised home use across India and the world.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published