{"id":25527384,"url":"https://github.com/epfl-center-for-imaging/mouselungseg","last_synced_at":"2025-08-21T03:16:03.972Z","repository":{"id":254293927,"uuid":"745163220","full_name":"EPFL-Center-for-Imaging/mouselungseg","owner":"EPFL-Center-for-Imaging","description":"Lungs segmentation in mice CT scans","archived":false,"fork":false,"pushed_at":"2024-08-23T13:55:12.000Z","size":825,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-23T18:34:45.193Z","etag":null,"topics":["cancer-imaging-research","image-segmentation","napari-plugin","ultralytics","yolo"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EPFL-Center-for-Imaging.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":"2024-01-18T19:07:13.000Z","updated_at":"2024-08-23T13:55:15.000Z","dependencies_parsed_at":"2024-08-22T16:12:26.451Z","dependency_job_id":"4b63dcce-1935-4257-9b03-ead1a16fe257","html_url":"https://github.com/EPFL-Center-for-Imaging/mouselungseg","commit_stats":null,"previous_names":["epfl-center-for-imaging/mouselungseg"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/EPFL-Center-for-Imaging/mouselungseg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EPFL-Center-for-Imaging%2Fmouselungseg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EPFL-Center-for-Imaging%2Fmouselungseg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EPFL-Center-for-Imaging%2Fmouselungseg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EPFL-Center-for-Imaging%2Fmouselungseg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EPFL-Center-for-Imaging","download_url":"https://codeload.github.com/EPFL-Center-for-Imaging/mouselungseg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EPFL-Center-for-Imaging%2Fmouselungseg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271420155,"owners_count":24756491,"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-21T02:00:08.990Z","response_time":74,"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":["cancer-imaging-research","image-segmentation","napari-plugin","ultralytics","yolo"],"created_at":"2025-02-19T22:18:29.740Z","updated_at":"2025-08-21T03:16:03.935Z","avatar_url":"https://github.com/EPFL-Center-for-Imaging.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![EPFL Center for Imaging logo](https://imaging.epfl.ch/resources/logo-for-gitlab.svg)\n# 🫁 Lungs segmentation in mice CT scans\n\n![screenshot](images/screenshot.png)\n\nWe provide a [YoloV8](https://docs.ultralytics.com/) model for the segmentation of the lungs region in mice CT scans. The model was trained on 2D slices and can be applied slice by slice to produce 3D segmentations.\n\n[[`Installation`](#installation)] [[`Model weights`](#model)] [[`Usage`](#usage)]\n\nThis project is part of a collaboration between the [EPFL Center for Imaging](https://imaging.epfl.ch/) and the [De Palma Lab](https://www.epfl.ch/labs/depalma-lab/).\n\n## Installation\n\nWe recommend performing the installation in a clean Python environment. Install our package from PyPi:\n\n```sh\npip install mouselungseg\n```\n\nor from the repository:\n\n```sh\npip install git+https://github.com/EPFL-Center-for-Imaging/mouselungseg.git\n```\n\nor clone the repository and install with:\n\n```sh\ngit clone git+https://github.com/EPFL-Center-for-Imaging/mouselungseg.git\ncd mouselungseg\npip install -e .\n```\n\n## Model weights\n\nThe model weights (~6 Mb) are automatically downloaded from [this repository on Zenodo](https://zenodo.org/records/13268683) the first time you run inference. The model files are saved in the user home folder in the `.mousetumornet` directory.\n\n## Usage\n\n**In Napari**\n\nTo use our model in Napari, start the viewer with\n\n```sh\nnapari -w mouselungseg\n```\n\nOpen an image using `File \u003e Open files` or drag-and-drop an image into the viewer window.\n\n**Sample data**: To test the model, you can run it on our provided sample image. In Napari, open the image from `File \u003e Open Sample \u003e Mouse lung CT scan`.\n\nNext, in the menu bar select `Plugins \u003e Lungs segmentation (mouselungseg)` to start our plugin.\n\n**As a library**\n\nYou can run a model in just a few lines of code to produce a segmentation mask from an image (represented as a numpy array).\n\n```py\nfrom mouselungseg import LungsPredictor\n\nlungs_predict = LungsPredictor()\n\nsegmentation = lungs_predict.predict(your_image)\n```\n\n**As a CLI**\n\nRun inference on an image from the command-line. For example:\n\n```sh\nuls_predict_image -i /path/to/folder/image_001.tif\n```\n\nThe command will save the segmentation next to the image:\n\n```\nfolder/\n    ├── image_001.tif\n    ├── image_001_mask.tif\n```\n\nTo run inference in batch on all images in a folder, use:\n\n```sh\nuls_predict_folder -i /path/to/folder/\n```\n\nThis will produce:\n\n```\nfolder/\n    ├── image_001.tif\n    ├── image_001_mask.tif\n    ├── image_002.tif\n    ├── image_002_mask.tif\n```\n\n## Issues\n\nIf you encounter any problems, please file an issue along with a detailed description.\n\n## License\n\nThis project is licensed under the [AGPL-3](LICENSE) license.\n\nThis project depends on the [ultralytics](https://github.com/ultralytics/ultralytics) package which is licensed under AGPL-3.\n\n## Related projects\n\n- [Mouse Tumor Net](https://github.com/EPFL-Center-for-Imaging/mousetumornet) | Detect tumor nodules in mice CT scans.\n- [Mouse Tumor Track](https://github.com/EPFL-Center-for-Imaging/mousetumortrack) | Track tumor nodules in mice CT scans.\n\n## Acknowledgements\n\nSpecial thanks go to **Quentin Chappuis** for his contribution to the ideation and exploration of the data and for developing the preliminary code that laid the foundations for this project during the course of his Bachelor project in Fall 2023.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepfl-center-for-imaging%2Fmouselungseg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepfl-center-for-imaging%2Fmouselungseg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepfl-center-for-imaging%2Fmouselungseg/lists"}