{"id":13745442,"url":"https://github.com/HiLab-git/CA-Net","last_synced_at":"2025-05-09T06:30:50.370Z","repository":{"id":37757201,"uuid":"290734864","full_name":"HiLab-git/CA-Net","owner":"HiLab-git","description":"Code for Comprehensive Attention Convolutional Neural Networks for Explainable Medical Image Segmentation.","archived":false,"fork":false,"pushed_at":"2021-01-20T07:48:22.000Z","size":39064,"stargazers_count":175,"open_issues_count":10,"forks_count":39,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T03:31:55.874Z","etag":null,"topics":["attention-mechanism"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HiLab-git.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-27T09:34:21.000Z","updated_at":"2025-03-09T12:20:36.000Z","dependencies_parsed_at":"2022-08-19T02:10:48.712Z","dependency_job_id":null,"html_url":"https://github.com/HiLab-git/CA-Net","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/HiLab-git%2FCA-Net","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiLab-git%2FCA-Net/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiLab-git%2FCA-Net/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiLab-git%2FCA-Net/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HiLab-git","download_url":"https://codeload.github.com/HiLab-git/CA-Net/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253205856,"owners_count":21871158,"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":["attention-mechanism"],"created_at":"2024-08-03T06:00:18.541Z","updated_at":"2025-05-09T06:30:45.358Z","avatar_url":"https://github.com/HiLab-git.png","language":"Python","readme":"## CA-Net: Comprehensive Attention Convolutional Neural Networks for Explainable Medical Image Segmentation\nThis repository provides the code for \"CA-Net: Comprehensive attention Convolutional Neural Networks for Explainable Medical Image Segmentation\". Our work now is available on [Arxiv][paper_link]. Our work is accepted by [TMI][tmi_link].\n\n[paper_link]:https://arxiv.org/pdf/2009.10549.pdf\n\n[tmi_link]:https://ieeexplore.ieee.org/document/9246575\n\n![mg_net](./pictures/canet_framework.png)\nFig. 1. Structure of CA-Net.\n\n![uncertainty](./pictures/skin_results.png)\nFig. 2. Skin lesion segmentation.\n\n![refinement](./pictures/fetal_mri_results.png)\n\nFig. 3. Placenta and fetal brain segmentation.\n\n### Requirementss\nSome important required packages include:\n* [Pytorch][torch_link] version \u003e=0.4.1.\n* Visdom\n* Python == 3.7 \n* Some basic python packages such as Numpy.\n\nFollow official guidance to install [Pytorch][torch_link].\n\n[torch_link]:https://pytorch.org/\n\n## Usages\n### For skin lesion segmentation\n1. First, you can download the dataset at [ISIC 2018][data_link]. We only used ISIC 2018 task1 training dataset, To preprocess the dataset and save as \".npy\", run:\n\n[data_link]:https://challenge.isic-archive.com/data#2018\n\n```\npython isic_preprocess.py \n```\n2. For conducting 5-fold cross-validation, split the preprocessed data into 5 fold and save their filenames. run:\n```\npython create_folder.py \n```\n\n\n2. To train CA-Net in ISIC 2018 (taking 1st-fold validation for example), run:\n```\npython main.py --data ISIC2018 --val_folder folder1 --id Comp_Atten_Unet\n```\n\n3. To evaluate the trained model in ISIC 2018 (we added a test data in folder0, testing the 0th-fold validation for example), run:\n```\npython validation.py --data ISIC2018 --val_folder folder0 --id Comp_Atten_Unet\n```\nOur experimental results are shown in the table:\n![refinement](./pictures/skin_segmentation_results_table.png)\n\n4. You can save the attention weight map in the middle step of the network to '/result' folder. Visualizing the attention weight above the original images, run:\n```\npython show_fused_heatmap.py\n```\nVisualzation of spatial attention weight map:\n![refinement](./pictures/spatial_atten_weight.png)\n\nVisualzation of scale attention weight map:\n![refinement](./pictures/scale_atten_weight.png)\n## Citation\nIf you find our work is helpful for your research, please consider to cite:\n```\n@article{gu2020net,\n  title={CA-Net: Comprehensive Attention Convolutional Neural Networks for Explainable Medical Image Segmentation},\n  author={Gu, Ran and Wang, Guotai and Song, Tao and Huang, Rui and Aertsen, Michael and Deprest, Jan and Ourselin, S{\\'e}bastien and Vercauteren, Tom and Zhang, Shaoting},\n  journal={IEEE Transactions on Medical Imaging},\n  year={2020},\n  publisher={IEEE}\n}\n```\n## Acknowledgement\nPart of the code is revised from [Attention-Gate-Networks][AG].\n\n[AG]:https://github.com/ozan-oktay/Attention-Gated-Networks\n","funding_links":[],"categories":["Segmentation"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHiLab-git%2FCA-Net","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHiLab-git%2FCA-Net","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHiLab-git%2FCA-Net/lists"}