{"id":30222750,"url":"https://github.com/andrewdarnall/mslesseg-4-icpr","last_synced_at":"2025-08-14T11:09:43.292Z","repository":{"id":306842525,"uuid":"977110274","full_name":"AndrewDarnall/MSLesSeg-4-ICPR","owner":"AndrewDarnall","description":"Proposed SegFormer3D and SegFormer3DMoE-based architectures for automated segmentation and annotation of Multiple Sclerosis lesions in medical imaging.","archived":false,"fork":false,"pushed_at":"2025-07-27T23:03:16.000Z","size":1109669,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-28T01:05:52.623Z","etag":null,"topics":["deep-learning","medical-imaging","mixture-of-experts","multiple-sclerosis","segformer","semantic-segmentation"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndrewDarnall.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}},"created_at":"2025-05-03T12:55:31.000Z","updated_at":"2025-07-27T23:03:20.000Z","dependencies_parsed_at":"2025-07-28T01:20:56.263Z","dependency_job_id":null,"html_url":"https://github.com/AndrewDarnall/MSLesSeg-4-ICPR","commit_stats":null,"previous_names":["andrewdarnall/mslesseg-4-icpr"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/AndrewDarnall/MSLesSeg-4-ICPR","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewDarnall%2FMSLesSeg-4-ICPR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewDarnall%2FMSLesSeg-4-ICPR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewDarnall%2FMSLesSeg-4-ICPR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewDarnall%2FMSLesSeg-4-ICPR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrewDarnall","download_url":"https://codeload.github.com/AndrewDarnall/MSLesSeg-4-ICPR/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewDarnall%2FMSLesSeg-4-ICPR/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270407963,"owners_count":24578345,"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","status":"online","status_checked_at":"2025-08-14T02:00:10.309Z","response_time":75,"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":["deep-learning","medical-imaging","mixture-of-experts","multiple-sclerosis","segformer","semantic-segmentation"],"created_at":"2025-08-14T11:09:41.943Z","updated_at":"2025-08-14T11:09:43.255Z","avatar_url":"https://github.com/AndrewDarnall.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MSLesSeg 4 ICPR\n\n![Project-Header](./assets/imgs/01-Project-Header.jpeg)\n\n---\n\n## Overview\n\nThis project is based on the recently concluded **ICPR challenge** organized by the **[IP Lab](https://iplab.dmi.unict.it/)** at the **University of Catania**, led by **Dr. F. Guarnera** and **Dr. A. Rondinella**. The challenge introduced a **carefully curated** and **refined dataset** of **brain MRI scans** from patients diagnosed with various forms of **Multiple Sclerosis**. All patients are from the city of **Catania**; however, the scans were acquired using **different MRI machines** across **multiple hospitals**, introducing valuable **inter-scanner variability**.\n\nThe primary objectives of the challenge were twofold: to contribute a **novel**, **versatile dataset** to the **research community** and to **benchmark** the performance of **state-of-the-art (SOTA) models**. Participants were encouraged to explore **advanced strategies** such as **sophisticated preprocessing pipelines**, **variations in image registration spaces**, and **ensemble methods** involving **independently trained models**.\n\nYou may find the **published paper [here](https://arxiv.org/abs/2410.07924)** and the **challenge’s homepage [here](https://iplab.dmi.unict.it/mfs/ms-les-seg/)**.\n\n---\n\n## Our Solution\n\n- After performing extensive tests with several architectures, such as U-Net, Trans-U-Net and SegFormer3D-based architectures, we found that not only do we obtain comparable results with the SegFormer3D models (compared to larger and more computationally-hungry models such as U-Net) but having less parameters (4.5M) there are practical applications in the medical industry for said model\n- Both SegFormer3D and SegFormer3DMoE obtained a *DiceScore* of ***60*** on the ***MSLesSeg Dataset***\n\n## Setup \u0026 Replication\n\nTo replicate the experiments you will need to:\n\n1) Acquire the `.zip` of the `MSLesSeg` dataset from the authors of the `challenge` @ [IP Lab](https://iplab.dmi.unict.it/people/)\n\n2) Extract the dataset into the `data` directory, specifically into the `/data/01-Pre-Processed-Data/` subdirectory\n\n3) Then apply the proper preprocessing `scripts`\n\n- You can find more details on how to apply the initial `preprocessing` the data [here](./data/README.md).\n- You can find a `terraform` script for the provisioning of a `cloud instance` to replicate the training and experiments performed in this project [here](./cloud_infrastructure/).\n\n### Environment Setup\n\nThe code presented in the repo has the following `dependencies`\n\n| `Component` | `Version` |\n|-------------|-----------|\n| `conda`     | `25.1.1`  |\n| `Python`    | `3.11`    |\n| `pip`       | `25.1`    |\n\n\nTo manually setup the `environment` for experiment `replication`:\n\n1) Download and install [`conda`](https://www.anaconda.com/docs/getting-started/miniconda/main)\n\n2) Create the `virtual environment` with `conda`\n\n```bash\nconda create --name mslesseg4icpr python=3.11\n```\n3) Download all the required modules `modules` (make sure you are in the root of the project `~/MSLesSeg-4-ICPR`)\n\n```bash\npython -m pip install -r requirements.txt\n```\n\n4) Go into the `notebooks` directory \u0026 launch a `jupyter notebook` session\n\n```bash\njupyter-notebook mslesseg-4-icpr.ipynb\n```\n\n5) Run the entire `notebook`\n\n---\n\n# Extended Reality Applications\n\nSince our main proposed model ***SegFormer3D*** has about 4.5M parameters and requires around 17 GFLOPs to perform inference, considering a hardware platform such as the ***META Quest 3*** which can perform up to 2.4 TFLOPs, we developed a simple PoC that shows how a surgeon, ***without compromising the sterility of the operating room*** can perform inference on a newly received ***MRI scan***, in this case ***Brain MRI*** and using the recognized hand gestures with the ***quest 3***, can visualize the inference performed on the MRI scan and better asses the treatment that the patient needs, thus saving precious time and bringing ever closer two of main pillars of our society, ***technology*** and ***healthcare***\n\n![Brain MRI VR Analysis](./assets/gifs/VR-Brain-MRI-Scan-Analysis.gif)\n\n---\n\n![Brain MRI VR Analysis - Inference](./assets/gifs/VR-Brain-MRI-Inference-Analysis.gif)\n\n---\n\n\n# System Specks\n\n### Hardware\n\n- **CPU:** Intel i7-8700 (12) @ 4.600GHz  \n- **GPU:** NVIDIA GeForce RTX 4070 12GB  \n- **RAM:** 32G total \n\n### Software\n\n- **NVIDIA-DRIVERS:** 550.54.14\n- **CUDA:** 12.4\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewdarnall%2Fmslesseg-4-icpr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewdarnall%2Fmslesseg-4-icpr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewdarnall%2Fmslesseg-4-icpr/lists"}