{"id":29227411,"url":"https://github.com/royerlab/ssi-code","last_synced_at":"2025-07-03T09:10:39.980Z","repository":{"id":37653183,"uuid":"268889465","full_name":"royerlab/ssi-code","owner":"royerlab","description":"Image Deconvolution via Noise-Tolerant Self-Supervised Inversion","archived":false,"fork":false,"pushed_at":"2022-06-22T02:13:03.000Z","size":109768,"stargazers_count":25,"open_issues_count":3,"forks_count":10,"subscribers_count":7,"default_branch":"master","last_synced_at":"2023-03-04T04:04:42.429Z","etag":null,"topics":["deconvolve","denoise-images","python"],"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/royerlab.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-06-02T19:23:59.000Z","updated_at":"2023-01-16T07:18:37.000Z","dependencies_parsed_at":"2022-09-04T20:13:51.715Z","dependency_job_id":null,"html_url":"https://github.com/royerlab/ssi-code","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/royerlab/ssi-code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royerlab%2Fssi-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royerlab%2Fssi-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royerlab%2Fssi-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royerlab%2Fssi-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/royerlab","download_url":"https://codeload.github.com/royerlab/ssi-code/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/royerlab%2Fssi-code/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263296638,"owners_count":23444499,"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":["deconvolve","denoise-images","python"],"created_at":"2025-07-03T09:10:39.874Z","updated_at":"2025-07-03T09:10:39.949Z","avatar_url":"https://github.com/royerlab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](https://raw.githubusercontent.com/royerlab/ssi-code/master/videos/release/ssi-paper-release_twitter.gif)\n\n# Image Deconvolution via Noise-Tolerant Self-Supervised Inversion\n\nYou can find the latest version of our paper [here](https://royerlab.github.io/ssi-code/paper/Noise_Tolerant_Self_Supervised_Inversion.pdf).\n\n## Authors\n\nHirofumi Kobayashi [@liilii_tweet](https://twitter.com/liilii_tweet)\n\nAhmet Can Solak [@_ahmetcansolak](https://twitter.com/_ahmetcansolak)\n\nJoshua Batson [@thebasepoint](https://twitter.com/thebasepoint)\n\nLoic A. Royer [@loicaroyer](https://twitter.com/loicaroyer)\n\n## Abstract\n\nWe propose a general framework for solving inverse problems in the presence of noise that requires no signal prior, no noise estimate, and no clean training data. The only assumptions are that the forward model is available, differentiable and that the noise exhibits statistical independence across different measurement dimensions. We build upon the theory of 'J-invariant' functions  [Batson \u0026 Royer 2019](https://arxiv.org/abs/1901.11365) and show how self-supervised denoising *à la* Noise2Self is a special case of learning a noise-tolerant pseudo-inverse of the identity. We demonstrate our approach by showing how a convolutional neural network can be taught in a self-supervised manner to deconvolve images and surpass in image quality classical inversion schemes such as Lucy-Richardson deconvolution.\n\n## Get started\n\n##### Get the project:\n```bash\n$ git clone https://github.com/royerlab/ssi-code\n$ cd ssi-code\n```\n\n#### Setting up an environment:\nWe recommend that you create a dedicated conda environment for SSI:\n\n```bash\n$ conda create --name ssi python=3.7\n$ conda activate ssi\n```\n\n#### Install the generic dependencies:\n```bash\n$ pip install -r requirements.txt\n\n# (For CUDA 10.0)\n$ pip install cupy-cuda100\n\n# (For CUDA 10.1)\n$ pip install cupy-cuda101\n\n# (For CUDA 10.2)\n$ pip install cupy-cuda102\n```\n\n#### Install CUDA dependencies:\n\nIf you are using a conda environment:\n```bash\n$ conda install cudatoolkit=CUDA_VERSION\n```\n\nIf you are NOT using a conda environment make \nsure you have all CUDA drivers installed properly\non your system for the later options.\n\n#### Run the demo:\nYou can find the demos in `code/demo/demo2D.py` and \n`code/demo/demo3D.py` files.\nYou can run the demos by:\n```bash\npython -m ssi.demo.demo2D\npython -m ssi.demo.demo3D\n```\n\nThis should go fast if your GPU is reasonably recent.\n\nOnce done, a [napari](https://napari.org/) window will open to let you compare\nthe images. Please note that due to the stochastic nature of CNN training, and\nbecause we use so little training data, and also because perhaps we have not fully\nunderstood how to train our nets, we occasionally observe failed runs.\n\nThings to observe: Varying the number of iterations for Lucy-Richardson (LR) lets you explore the trade-off between sharpness and noise reduction. Yet, LR has trouble to acheive both. In particular, you can see that the Spectral Mutual Information (SMI) goes down dramatically as you go towards low iterations (particularly true for image 'drosophila'), but the PSNR varies in the opposite way. That's because while you have good noise reduction at low iterations, you loose fidelity in the high-frequencies of the image. Why? LR reconstructs images by first starting with the low frequencies and then slowly refines the higher ones -- that's when trouble arises and noise gets amplified. Different comparison metrics quantify different aspects of image similarity, SMI (introduced in this paper) is good at telling us if the images are dissimilar (or similar) in the frequency domain. Our approach, Self-Supervised Inversion (SSI) will acheive a good trade-off in comparison. \n\n\nYou can also try other images with:\n```bash\npython -m code.demo.demo2D characters\n```\n\nWe recommend to try the following images: 'drosophila' (default), 'usaf', 'characters'.\n\n\n## Feedback welcome!\n\nFeedback, pull-requests, and ideas to improve this work are very welcome and will be duly acknowledged.\n\n## How to cite this work?\n\n[Image Deconvolution via Noise-Tolerant Self-Supervised Inversion.](http://arxiv.org/abs/2006.06156)\nHirofumi Kobayashi, Ahmet Can Solak, Joshua Batson, Loic A. Royer. arXiv 2020.\n\n[arxiv.org/abs/2006.06156](http://arxiv.org/abs/2006.06156)\n\n## License\n\nBSD 3-Clause\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froyerlab%2Fssi-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froyerlab%2Fssi-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froyerlab%2Fssi-code/lists"}