{"id":13410630,"url":"https://github.com/iolag/UPD_study","last_synced_at":"2025-03-14T16:32:50.899Z","repository":{"id":129618921,"uuid":"496932058","full_name":"iolag/UPD_study","owner":"iolag","description":"This repository contains code from our comparative study on state of the art unsupervised pathology detection and segmentation methods. ","archived":false,"fork":false,"pushed_at":"2024-03-16T23:37:06.000Z","size":701427,"stargazers_count":22,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-07-31T20:43:27.059Z","etag":null,"topics":["anomaly-detection","anomaly-detection-models","anomaly-localization","anomaly-segmentation","brain-mri","chest-xray-images","deep-learning","retinal-fundus-images"],"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/iolag.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-27T09:12:15.000Z","updated_at":"2024-06-26T14:43:13.000Z","dependencies_parsed_at":"2024-01-11T17:34:46.309Z","dependency_job_id":"b41c34d1-ed92-4192-ae3b-be4c23cb5b5d","html_url":"https://github.com/iolag/UPD_study","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/iolag%2FUPD_study","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iolag%2FUPD_study/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iolag%2FUPD_study/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iolag%2FUPD_study/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iolag","download_url":"https://codeload.github.com/iolag/UPD_study/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243610353,"owners_count":20318947,"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":["anomaly-detection","anomaly-detection-models","anomaly-localization","anomaly-segmentation","brain-mri","chest-xray-images","deep-learning","retinal-fundus-images"],"created_at":"2024-07-30T20:01:08.065Z","updated_at":"2025-03-14T16:32:45.824Z","avatar_url":"https://github.com/iolag.png","language":"Python","funding_links":[],"categories":["Papers"],"sub_categories":["Reconstruction based"],"readme":"# Official Repository of: \"Unsupervised Pathology Detection: A Deep Dive Into the State of the Art\"\n\nThis repository contains code to reproduce experiments from the paper [\"Unsupervised Pathology Detection: A Deep Dive Into the State of the Art\"](https://ieeexplore.ieee.org/document/10197302) ([arXiv preprint](https://arxiv.org/abs/2303.00609)). \n\nIn this work, we perform a comprehensive evaluation of the state of the art in unsupervised pathology detection. We find that recent feature-modeling methods achieve increased performance compared to previous work and are capable of benefiting from recently developed self-supervised pre-training algorithms, further increasing their performance.\n\n\n### Citation\nIf you find our work useful for your research, please consider citing:\n```\n@ARTICLE{10197302,\n  author={Lagogiannis, Ioannis and Meissen, Felix and Kaissis, Georgios and Rueckert, Daniel},\n  journal={IEEE Transactions on Medical Imaging}, \n  title={Unsupervised Pathology Detection: A Deep Dive Into the State of the Art}, \n  year={2024},\n  volume={43},\n  number={1},\n  pages={241-252},\n  doi={10.1109/TMI.2023.3298093}}\n```\n\n# Usage\n\nDownload this repository by running\n\n```bash\ngit clone https://github.com/iolag/UPD_study/\n```\n\nin your terminal.\n\n## Environment\n\nCreate and activate the Anaconda environment:\n\n```bash\nconda env create -f environment.yml\nconda activate upd\n```\n\nAdditionally, you need to install the repository as a package:\n\n```bash\npython3 -m pip install --editable .\n```\n\nTo be able to use [Weights \u0026 Biases](https://wandb.ai) for logging follow the instructions at https://docs.wandb.ai/quickstart.\n\u003c!-- \nA quick guide on the folder and code structure can be found [here](structure.md). --\u003e\n\n## Data\n\n### CheXpert \n\n~To download CheXpert you must first register at https://stanfordmlgroup.github.io/competitions/chexpert/. After you receive the subscription confirmation e-mail, download the downsampled version (11G) and extract the CheXpert-v1.0-small folder in data/datasets/CXR. No other steps are required and all splits are provided.~\n\n#### Update 12/12/23\n\nIt seems that the small version of the dataset isn't available from the official source anymore. You can find it in [Kaggle](https://www.kaggle.com/datasets/ssttff/chexpertv10small).\n\n\n### DDR \n\nTo download and prepare the DDR dataset, run:\n\n```bash\nbash UPD_study/data/data_preprocessing/prepare_DDR.sh\n```\n\n### MRI: CamCAN, ATLAS, BraTS \n\nTo download and preprocess ATLAS and BraTS, first download ROBEX from https://www.nitrc.org/projects/robex  and extract it in data/data_preprocessing/ROBEX. Then run:\n\n```bash\nbash UPD_study/data/data_preprocessing/prepare_ATLAS.sh\nbash UPD_study/data/data_preprocessing/prepare_BraTS.sh\n```\nFor ATLAS you need to apply for the data at https://fcon_1000.projects.nitrc.org/indi/retro/atlas.html and receive the encryption password. During the run of prepare_ATLAS.sh you will be prompted to input the password.\n\nFor BraTS, Kaggle's API will be used to download the data. To be able to interact with the API, follow the instructions at https://www.kaggle.com/docs/api.\n\nTo download the CamCAN data, you need to apply for it at https://camcan-archive.mrc-cbu.cam.ac.uk/dataaccess/index.php. After you download them, put them in data/datasets/MRI/CamCAN and run:\n\n```bash\npython UPD_study/data/data_preprocessing/prepare_data.py --dataset CamCAN\n```\n\n## Experiments\n\nTo generate the \"Main Results\" from Tables 1 and 3 over all three seeds run:\n```bash\nbash UPD_study/experiments/main.sh \n```\nAlternatively, for a single seed run:\n\n```bash\nbash UPD_study/experiments/main_seed10.sh \n```\n\n\nTo generate the \"Self-Supervised Pre-training\" results from Tables 2 and 4 over all three seeds run:\n```bash\nbash UPD_study/experiments/pretrained.sh\n```\nAlternatively, for a single seed run:\n\n```bash\nbash UPD_study/experiments/pretrained_seed10.sh      \n```\n\nTo generate the \"Complexity Analysis\" results from Table 5 run:\n```bash\nbash UPD_study/experiments/benchmarks.sh\n```\n\nTo generate \"The Effects of Limited Training Data\" results from Fig. 3 run:\n```bash\nbash UPD_study/experiments/percentage.sh\n```\n##\n\nThe repository contains PyTorch implementations for [VAE](https://arxiv.org/abs/1907.02796), [r-VAE](https://arxiv.org/abs/2005.00031), [f-AnoGAN](https://www.sciencedirect.com/science/article/abs/pii/S1361841518302640), [H-TAE-S](https://arxiv.org/abs/2207.02059), [FAE](https://arxiv.org/abs/2208.10992), [PaDiM](https://arxiv.org/abs/2011.08785), [CFLOW-AD](https://arxiv.org/abs/2107.12571), [RD](https://arxiv.org/abs/2201.10703), [ExpVAE](https://arxiv.org/abs/1911.07389), [AMCons](https://arxiv.org/abs/2203.01671), [PII](https://arxiv.org/abs/2107.02622), [DAE](https://openreview.net/forum?id=Bm8-t_ggzPD) and [CutPaste](https://arxiv.org/abs/2104.04015).\n\n##\n![A )](figures/repo_samples.png)\n\nIf you face any issues or have any suggestions do not hesitate to contact me or open an issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiolag%2FUPD_study","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiolag%2FUPD_study","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiolag%2FUPD_study/lists"}