{"id":23165855,"url":"https://github.com/fk128/sarcopenia-ai","last_synced_at":"2025-08-18T05:31:55.909Z","repository":{"id":44868196,"uuid":"291105589","full_name":"fk128/sarcopenia-ai","owner":"fk128","description":"Code for paper Kanavati, F. et al. (2020). Fully-automated deep learning slice-based muscle estimation from CT images for sarcopenia assessment. arXiv preprint arXiv:2006.06432.","archived":false,"fork":false,"pushed_at":"2023-05-26T20:18:46.000Z","size":73333,"stargazers_count":29,"open_issues_count":4,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-06T21:19:11.907Z","etag":null,"topics":["ct-slice-detection","deep-learning","medical-image-analysis","muscle-estimation","sarcopenia-assessment"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/2006.06432","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fk128.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}},"created_at":"2020-08-28T17:23:30.000Z","updated_at":"2024-11-14T07:31:44.000Z","dependencies_parsed_at":"2022-09-11T15:41:08.675Z","dependency_job_id":"cfec25c9-05b2-4665-8391-f01cdb469b40","html_url":"https://github.com/fk128/sarcopenia-ai","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/fk128%2Fsarcopenia-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fk128%2Fsarcopenia-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fk128%2Fsarcopenia-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fk128%2Fsarcopenia-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fk128","download_url":"https://codeload.github.com/fk128/sarcopenia-ai/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230203916,"owners_count":18189694,"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":["ct-slice-detection","deep-learning","medical-image-analysis","muscle-estimation","sarcopenia-assessment"],"created_at":"2024-12-18T01:29:15.224Z","updated_at":"2024-12-18T01:29:15.807Z","avatar_url":"https://github.com/fk128.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sarcopenia AI\n\nCode for papers:\n\nKanavati, F., Islam, S., Aboagye, E. O., \u0026 Rockall, A. (2018). Automatic L3 slice detection in 3D CT images using fully-convolutional networks. arXiv preprint arXiv:1811.09244.\n\nKanavati, F., Islam, S., Arain, Z., Aboagye, E. O., \u0026 Rockall, A. (2020). \nFully-automated deep learning slice-based muscle estimation from CT images for sarcopenia assessment. arXiv preprint arXiv:2006.06432.\n\n### Models\n\nTrained models for slice detection and slice segmentation are provided in `models/`\n\n### Dev\n\n```\nconda create -y --name sarcopenia-ai python=3.6.2\n```\n\nInstall\n\n```bash\npip install -e .\n```\n\n### Docker\n\n#### Build docker image\n```bash\ndocker build -t sarcopeniaai -f ./Dockerfile .\n```\n\nor `make build`\n\n#### Slice detection trainer\n\nDownload the training data from [here](https://imperialcollegelondon.box.com/s/0vt07mxy0re4zwao0sk76ywdt2s1pclm) \nto your data folder. \n\n```\ndocker run --rm -it  -v \u003cyour_data_folder\u003e:/data -v $(pwd)/configs:/configs sarcopeniaai python -m sarcopenia_ai.apps.slice_detection.trainer --config /configs/slice_detection.cfg\n```\n\nTraining output preview on validation images\n\n![](slice_training1.gif) ![](slice_training2.gif)\n\n#### Segmentation trainer\n\nLabelled segmentation data is not provided. Once you get your own data, you can train a segmentation model with\n\n```bash\ndocker run --rm -it -v \u003cyour_data_folder\u003e:/data -v $(pwd)/configs:/configs sarcopeniaai python -m sarcopenia_ai.apps.segmentation.trainer --config /configs/segmentation.cfg\n```\n\n#### Run as API server\n\n`docker run --rm -it -p 5000:5000 sarcopeniaai python -m sarcopenia_ai.apps.server.run_local_server`\n\nor `make server`\n\nThen head to http://localhost:5000 for web UI\n\n![](sarcopenia-ai.png)\n\nYou can also get results from command line. Example:\n\n`curl -X POST -F image=@data/volume.nii.gz http://localhost:5000/predict`\n\nExpected result\n```json\n{\n   \"prediction\":{\n      \"id\":\"64667bf3482d4ee5a0e8af6c67b2fa0d\",\n      \"muscle_area\":\"520.15\",\n      \"muscle_attenuation\":\"56.00 HU\",\n      \"slice_prob\":\"69.74%\",\n      \"slice_z\":90,\n      \"str\":\"Slice detected at position 90 of 198 with 69.74% confidence \"\n   },\n   \"success\":true\n}\n```\n\n\n### L3 annotated dataset\n\nThe dataset was collected from multiple sources:\n\n 1. 3 sets were obtained from [the Cancer Imaging Archive (TCIA)](http://www.cancerimagingarchive.net/): \n \n     - [head and neck](http://doi.org/10.7937/K9/TCIA.2017.umz8dv6s)\n     - [ovarian](http://dx.doi.org/10.7937/K9/TCIA.2016.NDO1MDFQ) \n     - [colon](http://doi.org/10.7937/K9/TCIA.2015.NWTESAY1)\n       \n 2. a liver tumour dataset was obtained from the \n [LiTS segmentation challenge](https://competitions.codalab.org/competitions/17094).\n \n\nThe dataset is available for download in MIPs format from \n[here](https://imperialcollegelondon.box.com/s/0vt07mxy0re4zwao0sk76ywdt2s1pclm).\n\nThe subset of transitional vertabrae cases can be downloaded from \n[here](https://imperialcollegelondon.box.com/s/mw7ysamajjcp1ot0721e6nl36xku0acv).\n\n\n\n```\n@article{kanavati2018automatic,\n  title={Automatic L3 slice detection in 3D CT images using fully-convolutional networks},\n  author={Kanavati, Fahdi and Islam, Shah and Aboagye, Eric O and Rockall, Andrea},\n  journal={arXiv preprint arXiv:1811.09244},\n  year={2018}\n}\n\n\n@article{kanavati2020fullyautomated,\n    title={Fully-automated deep learning slice-based muscle estimation from CT images for sarcopenia assessment},\n    author={Fahdi Kanavati and Shah Islam and Zohaib Arain and Eric O. Aboagye and Andrea Rockall},\n    year={2020},\n    eprint={2006.06432},\n    archivePrefix={arXiv},\n    primaryClass={eess.IV}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffk128%2Fsarcopenia-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffk128%2Fsarcopenia-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffk128%2Fsarcopenia-ai/lists"}