{"id":20361120,"url":"https://github.com/reubendo/inextremis","last_synced_at":"2025-04-12T03:54:22.249Z","repository":{"id":117497094,"uuid":"381434900","full_name":"ReubenDo/InExtremIS","owner":"ReubenDo","description":"Official PyTorch implementation of InExtremIS","archived":false,"fork":false,"pushed_at":"2021-07-26T09:43:16.000Z","size":317,"stargazers_count":22,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T03:54:17.676Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ReubenDo.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}},"created_at":"2021-06-29T16:47:17.000Z","updated_at":"2024-09-08T22:21:20.000Z","dependencies_parsed_at":"2024-01-23T21:24:28.492Z","dependency_job_id":"3db3e466-d826-465d-8fc8-ff61943a4a57","html_url":"https://github.com/ReubenDo/InExtremIS","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReubenDo%2FInExtremIS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReubenDo%2FInExtremIS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReubenDo%2FInExtremIS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReubenDo%2FInExtremIS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ReubenDo","download_url":"https://codeload.github.com/ReubenDo/InExtremIS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514205,"owners_count":21116899,"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":[],"created_at":"2024-11-14T23:46:36.850Z","updated_at":"2025-04-12T03:54:22.230Z","avatar_url":"https://github.com/ReubenDo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  Inter Extreme Points Geodesics for End-to-End Weakly Supervised Image Segmentation\n\nPublic PyTorch implementation for our paper [Inter Extreme Points Geodesics for End-to-End Weakly Supervised Image Segmentation](https://arxiv.org/abs/2107.00583), \nwhich was accepted for presentation at [MICCAI 2021](https://www.miccai2021.org). \n\nIf you find this code useful for your research, please cite the following paper:\n\n```\n@article{InExtremIS2021Dorent,\n         author={Dorent, Reuben and Joutard, Samuel and Shapey, Jonathan and\n         Kujawa, Aaron and Modat, Marc and Ourselin, S\\'ebastien and Vercauteren, Tom},\n         title={Inter Extreme Points Geodesics for End-to-End Weakly Supervised Image Segmentation},\n         journal={MICCAI},\n         year={2021},\n}\n```\n\n## Method Overview\nWe introduce InExtremIS, a weakly supervised 3D approach to train a deep image segmentation network using particularly weak train-time annotations: only 6 extreme clicks at the boundary of the objects of interest. Our fully automatic method is trained end-to-end and does not require any test-time annotations. \n\n*Example of weak labels for our use case of Vestibular Schwannoma (VS) segmentation. Magenta: Background. Green: VS:*\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"figs/supervision_comparision.png\"\u003e\n\u003c/p\u003e\n\n\n\n## Virtual Environment Setup\n\nThe code is implemented in Python 3.6 using the PyTorch library. \nRequirements:\n\n * Set up a virtual environment (e.g. conda or virtualenv) with Python \u003e=3.6.9\n * Install all requirements using:\n  \n  ````pip install -r requirements.txt````\n * Install the CUDA implementation of the permutohedral lattice and the CRF Loss.\n````\ncd ScribbleDA/Permutohedral_attention_module/PAM_cuda/\npython3 setup.py build\npython3 setup.py install --user\n````\n  \n\n## Data\n\nThe data and annotations are publicly available. Details are provided in [data](/data/).\n\n## Running the code\n`train.py` is the main file for training the models.\n\nExample 1: Training InExtreMIS with manual extreme points:\n```` \npython3 train.py \\\n--model_dir ./models/manual_gradient_eucl_deep_crf/ \\\n--alpha 15 \\\n--beta 0.05 \\\n--weight_crf 0.0001 \\\n--mode extreme_points \\\n--label_postfix Extremes_man \\\n--img_gradient_postfix Sobel_man \\\n--path_data data/T2/ \\\n--path_labels data/extreme_points/manual/ \\\n--with_euclidean \\\n--with_prob\n````\nExample 2: Training InExtreMIS with simulated extreme points:\n````  \npython3 train.py \\\n--model_dir ./models/simulated_gradient_eucl_deep_crf/ \\\n--alpha 15 \\\n--beta 0.05 \\\n--weight_crf 0.0001 \\\n--mode extreme_points \\\n--label_postfix Extremes \\\n--img_gradient_postfix Sobel \\\n--path_data data/T2/ \\\n--path_labels data/extreme_points/simulated/ \\\n--with_euclidean \\\n--with_prob\n````\n\n`inference.py` is the main file for running the inference:\n````\npython3 inference.py \\\n--model_dir ./models/manual_gradient_eucl_deep_crf/ \\\n--path_data data/T2/ \\\n````\n \n## Using the code with your own data\n\nIf you want to use your own data, you just need to change the source and target paths, \nthe splits and potentially the modality used.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freubendo%2Finextremis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freubendo%2Finextremis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freubendo%2Finextremis/lists"}