{"id":24738393,"url":"https://github.com/astro-informatics/quantifai","last_synced_at":"2025-10-10T07:32:36.755Z","repository":{"id":210278830,"uuid":"595062857","full_name":"astro-informatics/QuantifAI","owner":"astro-informatics","description":"PyTorch-based radio-interferometric imaging reconstruction package with scalable Bayesian uncertainty quantification relying on data-driven (learned) priors","archived":false,"fork":false,"pushed_at":"2025-02-17T16:57:50.000Z","size":252322,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-09-09T11:52:57.953Z","etag":null,"topics":["high-dimensional-data","machine-learning","pytorch","radio-interferometry","uncertainty-quantification"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/astro-informatics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-01-30T10:12:16.000Z","updated_at":"2025-02-17T16:57:54.000Z","dependencies_parsed_at":"2024-05-29T17:04:41.756Z","dependency_job_id":"c3285d54-fe72-4fcb-bcfc-acdbd16020b7","html_url":"https://github.com/astro-informatics/QuantifAI","commit_stats":null,"previous_names":["astro-informatics/quantifai"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/astro-informatics/QuantifAI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astro-informatics%2FQuantifAI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astro-informatics%2FQuantifAI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astro-informatics%2FQuantifAI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astro-informatics%2FQuantifAI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astro-informatics","download_url":"https://codeload.github.com/astro-informatics/QuantifAI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astro-informatics%2FQuantifAI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003189,"owners_count":26083533,"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-10-10T02:00:06.843Z","response_time":62,"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":["high-dimensional-data","machine-learning","pytorch","radio-interferometry","uncertainty-quantification"],"created_at":"2025-01-27T22:36:28.622Z","updated_at":"2025-10-10T07:32:33.781Z","avatar_url":"https://github.com/astro-informatics.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![image](https://img.shields.io/badge/GitHub-quantifai-brightgreen.svg?style=flat)](https://github.com/astro-informatics/quantifai) [![image](https://img.shields.io/badge/License-GPL-blue.svg?style=flat)](https://github.com/astro-informatics/quantifai/blob/main/LICENSE.txt) [![image](https://img.shields.io/badge/arXiv-2312.00125-red.svg?style=flat)]( https://arxiv.org/abs/2312.00125)  \n\n\n# QuantifAI\n\n`quantifai` is a PyTorch-based open-source radio interferometric imaging reconstruction package with scalable Bayesian uncertainty quantification relying on data-driven (learned) priors. This package was used to produce the results of [Liaudat et al. 2023](https://arxiv.org/abs/2312.00125). The `quantifai` model relies on the data-driven convex regulariser from [Goujon et al. 2022](https://arxiv.org/abs/2211.12461).\n\nIn this code, we bypass the need to perform Markov chain Monte Carlo (MCMC) sampling for Bayesian uncertainty quantification, and we rely on convex accelerated optimisation algorithms. The `quantifai` package also includes MCMC algorithms for posterior sampling as they were used to validate our approach.\n\n\u003e [!NOTE]  \n\u003e This Python package is built on top of PyTorch, so a GPU can considerably accelerate all computations. \n\n\n## Installation\n\nThe `quantifai` package relies on the convex ridge regulariser CRR from [Goujon et al. 2022](https://arxiv.org/abs/2211.12461). The version used to generate the results from the Liaudat et al. paper is the release `v0.1` from the fork [github.com/tobias-liaudat/convex_ridge_regularizers](https://github.com/tobias-liaudat/convex_ridge_regularizers). The PyTorch wavelet support relies on the release `v0.1` from the fork [github.com/tobias-liaudat/PyTorch-Wavelet-Toolbox](https://github.com/tobias-liaudat/PyTorch-Wavelet-Toolbox).\n\nWe have not yet pushed the Python package to PyPi; therefore, the easiest way to install `quantifai` is to start by cloning the repo\n\n```bash\ngit clone https://github.com/astro-informatics/QuantifAI\ncd QuantifAI\n```\n\nContinue by creating a conda environment with all the requirements already specified in `environment.yml` as follows\n\n```bash\nconda env create -f environment.yml\nconda activate quantifai_env\n```\n\nFinally, the `quantifai` package can be installed by running\n\n```bash\npip install -e .\n```\n\n\n\u003e [!NOTE]  \n\u003e If the user does not want to create a conda environment, they can install the dependencies in the `environment.yml` file. The specific version of the convex ridge regulariser, complex PyTorch support and the PyTorch wavelets used can be manually installed by running (in the following order)\n\u003e ```bash\n\u003e pip install git+https://github.com/tobias-liaudat/convex_ridge_regularizers@v0.1\n\u003e pip install git+https://github.com/tobias-liaudat/complexPyTorch@v0.1\n\u003e pip install git+https://github.com/tobias-liaudat/PyTorch-Wavelet-Toolbox@v0.1\n\u003e ```\n\nThe paper's numerical results were obtained using PyTorch version `1.13.1`.\n\n\n## Examples \u0026 usage\n\nThe easiest way to get into using `quantifai` is to check the different notebooks in the `example/` directory, which includes:\n\n- Compute the MAP estimation with the `QuantifAI` model ([Notebook](https://github.com/astro-informatics/QuantifAI/blob/main/examples/RI_imaging_QuantifAI_MAP_estimation.ipynb)).\n- Compute the MAP estimation with the wavelet-based model ([Notebook](https://github.com/astro-informatics/QuantifAI/blob/main/examples/RI_imaging_wavelets_MAP_estimation.ipynb)).\n\n- Compute the MAP-based LCIs with the `QuantifAI` model ([Notebook](https://github.com/astro-informatics/QuantifAI/blob/main/examples/RI_imaging_QuantifAI_LCIs.ipynb)).\n- Compute the MAP-based LCIs with the wavelet-based model ([Notebook](https://github.com/astro-informatics/QuantifAI/blob/main/examples/RI_imaging_wavelets_MAP_estimation.ipynb)).\n- Compute the MAP-based fast pixel uncertainty quantification method with `QuantifAI` ([Notebook](https://github.com/astro-informatics/QuantifAI/blob/main/examples/RI_imaging_QuantifAI_fast_pixel_UQ.ipynb)).\n- Compute a hypothesis test on an inpainted surrogate image with `QuantifAI` ([Notebook](https://github.com/astro-informatics/QuantifAI/blob/main/examples/RI_imaging_QuantifAI_hypothesis_test)).\n- Sample from the posterior distribution of the `QuantifAI` model using the SK-ROCK algorithm ([Pereyra et al. 2020](https://doi.org/10.1137/19M1283719)) and compare the results with sample-based LCIs ([Notebook](https://github.com/astro-informatics/QuantifAI/blob/main/examples/RI_imaging_QuantifAI_sampling)).\n\n\n## Reproducibility\n\nAll the scripts and notebooks used to generate the plots of [Liaudat et al. 2023](https://arxiv.org/abs/2312.00125) can be found in the `paper/Liaudat2023/` directory and the data in the `data/` directory.\n\nThe most computationally intensive results of the paper can be obtained by running the two scripts in `paper/Liaudat2023/scripts/`, where `UQ_SKROCK_CRR.py` corresponds to the `QuantifAI` model and `UQ_SKROCK_wavelets.py` to the wavelet-based model. The rest of the results and plots can be generated by running the different notebooks in `paper/Liaudat2023/notebooks/`.\n\n\n## Attribution\n\nShould this code be used in any way, we kindly request that the following article be referenced. A BibTeX entry for this reference may look like:\n\n```\n@article{liaudat2023:quantifai, \n    author = {Tobías~I.~Liaudat and Matthijs~Mars and Matthew~A.~Price and Marcelo~Pereyra and Marta~M.~Betcke and Jason~D.~McEwen},\n    title = {Scalable Bayesian uncertainty quantification with data-driven priors for radio interferometric imaging},\n    journal = \"RAS Techniques and Instruments (RASTI), submitted\",\n    eprint = \"arXiv:2312.00125\",\n    year = \"2023\",\n}\n```\n\n## License\n\n`quantifai` is released under the GPL-3 license (see [LICENSE.txt](https://github.com/astro-informatics/QuantifAI/blob/main/LICENSE.txt)).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastro-informatics%2Fquantifai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastro-informatics%2Fquantifai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastro-informatics%2Fquantifai/lists"}