{"id":24780574,"url":"https://github.com/silvano315/med-physics","last_synced_at":"2025-03-24T04:40:59.079Z","repository":{"id":266706670,"uuid":"888629381","full_name":"Silvano315/Med-Physics","owner":"Silvano315","description":"This would be a repository about medical physics. It will based on 4 paths: medical data to analyse, SOTA programs for medical purposes, computer vision and eXplainability. ","archived":false,"fork":false,"pushed_at":"2025-03-13T11:31:59.000Z","size":97727,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T12:32:10.363Z","etag":null,"topics":["computer-vision","data-analysis","data-science","explainable-ai","medical-imaging","medical-physics","medical-tool"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Silvano315.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-11-14T18:17:50.000Z","updated_at":"2025-03-13T11:32:06.000Z","dependencies_parsed_at":"2024-12-05T17:32:27.373Z","dependency_job_id":"89906694-4d2e-49dc-9628-2dcd27abcc72","html_url":"https://github.com/Silvano315/Med-Physics","commit_stats":null,"previous_names":["silvano315/med-physics"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Silvano315%2FMed-Physics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Silvano315%2FMed-Physics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Silvano315%2FMed-Physics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Silvano315%2FMed-Physics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Silvano315","download_url":"https://codeload.github.com/Silvano315/Med-Physics/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245212111,"owners_count":20578439,"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":["computer-vision","data-analysis","data-science","explainable-ai","medical-imaging","medical-physics","medical-tool"],"created_at":"2025-01-29T10:34:25.854Z","updated_at":"2025-03-24T04:40:59.068Z","avatar_url":"https://github.com/Silvano315.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Med-Physics\n\nA comprehensive repository combining Medical Physics with Data Science and AI Engineering, focused on medical data analysis, state-of-the-art healthcare applications, computer vision, and model explainability.\n\n## 🎯 Project Overview\n\nMed-Physics is a research-oriented repository that bridges the gap between Medical Physics and Advanced Data Science techniques. This is an evolving project that aims to:\n\n- Analyze and process various types of medical data (EEG, neuroimaging, cardiometabolic biomarkers, etc.)\n- Test and implement state-of-the-art AI models and tools for healthcare\n- Experiment with transfer learning and fine-tuning of pre-trained medical AI models\n- Develop computer vision solutions for medical imaging\n- Explore explainability techniques for healthcare AI systems\n- Create reproducible research workflows\n- Document best practices in medical data science\n\n## 🤖 AI Engineering Focus\n\nThe repository actively explores and implements cutting-edge AI solutions in healthcare:\n\n### Pre-trained Models \u0026 Tools\n- Integration and testing of SOTA healthcare models from HuggingFace\n- Experimentation with leading medical imaging models\n- Fine-tuning pre-trained models for specific medical tasks\n- Benchmarking different model architectures\n\n### Healthcare AI Applications\n- Medical image segmentation and classification\n- Disease prediction and progression modeling\n- Biomarker analysis and patient stratification\n- EEG signal processing and analysis\n\n\u003e Note: The list of models and applications will expand as new tools are tested and integrated. Each implementation will be documented in dedicated notebooks with performance analyses and use cases.\n\n## 🗂️ Repository Structure\n\n```\nMed-Physics/\n├── data/                      \n│   ├── raw/                   \n│   ├── processed/             \n│   └── external/             \n├── src/                    \n│   ├── data_processing/   \n│   ├── models/               \n│   │   ├── traditional/      \n│   │   └── deep_learning/ \n│   ├── visualization/        \n│   └── explainability/       \n├── notebooks/                 \n│   ├── exploratory/          \n│   ├── model_development/    \n│   └── results_analysis/    \n├── docs/                     \n│   ├── data_documentation/   \n│   ├── model_documentation/ \n│   └── research_papers/       \n├── tests/                    \n├── configs/                   \n├── mlflow/                   \n│   ├── mlruns/               \n│   └── artifacts/             \n└── results/               \n    ├── figures/            \n    ├── models/               \n    └── reports/              \n```\n\n## 📊 Data Sources\n\nThe repository works with various types of medical data:\n\n- **Health Examination Data**: Periodontal measurements, Clinical assessments\n- **Questionnaire Data**: Demographics, Health behaviors, Medical conditions\n- **Neuroimaging**: MRI\n\nPrimary data sources include:\n- NHANES (National Health and Nutrition Examination Survey)\n- ACDC (Automated Cardiac Diagnosis Challenge) dataset\n\n\n## 🛠️ project boards\n\n### Periodontal Status and Functional Domains Analysis\nThis [project](notebooks/NHANES_analysis.ipynb) investigates the relationship between periodontal disease severity and various functional domains using NHANES data. The analysis focuses on:\n- Assessment of periodontal status (None/Mild, Moderate, Severe) using CDC/AAP criteria\n- Evaluation of five key functional domains:\n  - Locomotion (standing difficulty)\n  - Cognitive function (concentration)\n  - Vitality (weight changes and appetite)\n  - Psychological status (depression and interest)\n  - Sensory capabilities (hearing and vision)\n\nThe analysis pipeline includes:\n- Data preprocessing and feature engineering\n- Descriptive statistics generation using TableOne\n- Univariate logistic regression analysis\n- Results visualization and reporting\n\nKey tools:\n- R version 4.4.2\n- Packages: tableone, dplyr, flextable\n- Statistical methods: logistic regression with odds ratios and 95% CI\n\nResults are presented in publication-ready tables showing associations between functional domains and periodontal disease severity, stratified by gender and overall population.\n\n### SAM Zero-Shot Segmentation from Scribbles and SegFormer Fine-tuning Pipeline\nIn the first part of the [project](notebooks/cardiac_MRI_segmentation_with_SAM.ipynb), I used SAM's zero-shot capabilities for cardiac segmentation:\n- Utilization of pre-trained SAM model without fine-tuning\n- Scribble-based prompt generation from existing annotations\n- Zero-shot generalization to cardiac structures\n\nIn the second part, I implemented a complete pipeline for SegFormer fine-tuning:\n- Base architecture: Pre-trained SegFormer-B0\n- Supervised training on cardiac slices\nThe pipeline includes:\n- Custom dataset with augmentation\n- Combined loss function (Dice + Cross Entropy)\n- Detailed logging with Weights \u0026 Biases\n- Checkpoint management and early stopping\n\nFrameworks and libraries:\n- PyTorch\n- HuggingFace Transformers\n- Albumentations for data augmentation\n\nThe code is structured with:\n- Modular component testing you can see in the [src folder](src/src_ACDC_ds/)\n- Incremental implementation\n\nThis second part has to be fully tested!\n\n### Other Medical Physics projects \n\nDuring my last years, I worked on other medical physics projects such as:\n1. \"An eXplainability Artificial Intelligence approach to brain connectivity in Alzheimer's disease\" published on [Frontiers](https://www.frontiersin.org/journals/aging-neuroscience/articles/10.3389/fnagi.2023.1238065/full)\n2. Deep Learning for Pneumonia Detection from Chest X-rays, you can see details [here](https://github.com/Silvano315/Pneumonia_Detection)\n\n\n## 🚀 Getting Started\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/yourusername/Med-Physics.git\ncd Med-Physics\n```\n\n2. Set up the environment:\n```bash\npython -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\npip install -r requirements.txt\n```\n\n3. Initialize MLflow:\n```bash\nmlflow ui\n```\n\n4. Start exploring the notebooks in the `notebooks/` directory\n\n## 🚧 Project Status\n\nThis repository is actively under development. New models, tools, and applications are being tested and integrated regularly. Check the project boards and issues for current focus areas and upcoming features.\n\n## 📝 License\n\nThis project is licensed under the Apache License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilvano315%2Fmed-physics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsilvano315%2Fmed-physics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilvano315%2Fmed-physics/lists"}