# Is there Julia library for AI Image Denoising?

**URL:** <https://discourse.julialang.org/t/is-there-julia-library-for-ai-image-denoising/75688>\
**Category:** Signal and Image Processing\
**Tags:** image-processing\
**Created:** [February 2, 2022, 10:15pm UTC](https://discourse.julialang.org/t/is-there-julia-library-for-ai-image-denoising/75688 "2022-02-02T22:15:20Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![j\_u](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j_u/32/219081_2.png) [@j\_u](https://discourse.julialang.org/u/j_u)\
**Post date:** [February 2, 2022, 10:15pm UTC](https://discourse.julialang.org/t/is-there-julia-library-for-ai-image-denoising/75688/1 "2022-02-02T22:15:20Z")

</div>

Actually, my question is like in the title. I am wondering if there is Julia library that makes Artificial Intelligence Image Denoising possible.

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [February 2, 2022, 10:54pm UTC](https://discourse.julialang.org/t/is-there-julia-library-for-ai-image-denoising/75688/2 "2022-02-02T22:54:52Z")

</div>

First, consider the fact that there is no such thing as “AI image denoising”. Second, do you have a specific method in mind? Have you tried searching the web before asking here?

Check:

> [@Please read: make it easier to help you](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757):
>
> Welcome to the Julia Discourse! We are enthusiastic about helping Julia programmers, both beginner and experienced. This public service announcement (PSA) outlines best practices when asking for help. Following these points makes it easier for us to help you and more likely you’ll get a prompt, useful answer. Keywords are highlighted to make it easier to refer to specific points. Choose a descriptive title that captures the key part of your question, eg “plots with multiple axes” instead of …

Take a look at the JuliaImages Github organization. There are various packages for image processing, some of which can be used for image denoising.

And if you are talking about neural-net-based methods, take a look at the neural-net libraries such as Flux.jl, Knet.jl etc.

Also, you asked the question in the Visualization subdomain on Discourse, which is not a good fit for discussions about image denoising.

---

<div class="post-metadata">

**Author:** ![j\_u](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j_u/32/219081_2.png) [@j\_u](https://discourse.julialang.org/u/j_u)\
**Post date:** [February 2, 2022, 11:54pm UTC](https://discourse.julialang.org/t/is-there-julia-library-for-ai-image-denoising/75688/3 "2022-02-02T23:54:19Z")

</div>

> First, consider the fact that there is no such thing as “AI image denoising”.

Definitely not an expert, however, if I am recalling correctly, I have been reading several times about C++ thing called AI Image Denoising or very similar.

> Have you tried searching the web before asking here?

Absolutely, of course! In [ecosia.org](http://ecosia.org) and [google.com](http://google.com). I found [GitHub - twMisc/Image-denoising-Julia: Using Julia to accomplish image deonising using the Julia programming Language](https://github.com/twMisc/Image-denoising-Julia), however, as far as I know it is not AI supported.

> Second, do you have a specific method in mind?

No, I do not. My question was very general, if there is any Julia package / library that enables AI supported image denoising (done in an easy way - I am not looking to write any - I was hoping that maybe there already is a package that does something like: input image =\> julia magic with ai supported denoising =\> output image).

> Take a look at the JuliaImages Github organization. There are various packages for image processing, some of which can be used for image denoising.

Thank you. I have been using some of JuliaImages packages before, however briefly, so I do not know them all in detail. Could you point me to any specific one?

> And if you are talking about neural-net-based methods, take a look at the neural-net libraries such as Flux.jl, Knet.jl etc.

Thank you. Could you point me to any specific one directly related to my question?

> Also, you asked the question in the Visualization subdomain on Discourse, which is not a good fit for discussions about image denoising.

What would be the most appropriate subdomain? The description of this particular subdomain includes “Discussion of visualization in Julia, including graphics, **images** , plotting, etc.” I have been taking into consideration also **Machine Learning** subdomain, however, frankly, decided to post to this one as among all of the listed subdomains (Statistics / Numerics / GPU / Biology, Health, and Medicine / Data / Visualization / Geo / Optimization (Mathematical) / Machine Learning / Modelling & Simulations / Signal Processing / Web Stack / Astro/Space / Finance and Economics / Julia at Scale / Probabilistic programming / Maker / Quantum / Chemistry / High Energy Physics) this one is directly listing **graphics** and **images**. And what is your position with regard to those facts if I may ask? 🙂

P.S. And by the way, **HI** , I have been watching some of your very interesting videos on topics related to geo statistics and reading some of your posts with particular interest on topics related to using Julia on HPC clusters.

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [February 3, 2022, 12:19am UTC](https://discourse.julialang.org/t/is-there-julia-library-for-ai-image-denoising/75688/4 "2022-02-03T00:19:30Z")

</div>

> [@j\_u](#):
>
> Definitely not an expert

I suggest asking in the beginners in Julia subdomain, or in a more general domain.

> [@j\_u](#):
>
> The description of this particular subdomain includes “Discussion of visualization in Julia, including graphics, **images** , plotting, etc.”

Maybe it is an issue of language. In English, this sentence is **not** saying that this subdomain is for anything related to images. It is saying that it is about **visualization of images**.

> [@j\_u](#):
>
> P.S. And by the way, **HI** , I have been watching some of your very interesting videos on topics related to geo statistics and reading some of your posts with particular interest on topics related to using Julia on HPC clusters.

Glad the videos are interesting and that previous posts on Discourse are helpful.

---

<div class="post-metadata">

**Author:** ![j\_u](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j_u/32/219081_2.png) [@j\_u](https://discourse.julialang.org/u/j_u)\
**Post date:** [February 3, 2022, 12:51am UTC](https://discourse.julialang.org/t/is-there-julia-library-for-ai-image-denoising/75688/5 "2022-02-03T00:51:44Z")

</div>

Thanks. Appreciate the time you took to provide the answer.

---

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [April 27, 2022, 9:48am UTC](https://discourse.julialang.org/t/is-there-julia-library-for-ai-image-denoising/75688/6 "2022-04-27T09:48:02Z")

</div>

I haven’t seen such in Julia, but I would like the 2022 state-of-the-art (SOTA) implemented in Julia (it’s one page of code, page 29 in the paper, for “Algorithm 1”, I didn’t see any number 2…):

> **[GitHub - google-research/maxim: \[CVPR 2022 Oral\] Official repository for "MAXIM:...](https://github.com/google-research/maxim)**
>
> \[CVPR 2022 Oral\] Official repository for "MAXIM: Multi-Axis MLP for Image Processing". SOTA for denoising, deblurring, deraining, dehazing, and enhancement.

The code seemed simple enough, but it does much more than denoicing, also e.g. deraining, which I didn’t know was a thing… All at the same time.

[EDIT: NAFNet, see at the bottom, from 10 April 2022, seemingly also claims SOTA on deblurring, and is very intriguing for technical reasons " Nonlinear Activation", and computational efficiency. Previous EDIT: It seems Restormer from 2021 is still SOTA for denoising, but even with MAXIM 5th, the competition at the top is very close. [DND Benchmark (Image Denoising) | Papers With Code](https://paperswithcode.com/sota/image-denoising-on-dnd?p=maxim-multi-axis-mlp-for-image-processing) I believe the latter may be better at denoising when combined with other tasks, but would still like to see both implemented or wrapped in Julia.]

It’s Python (or well JAX) code, and it could also just be wrapped from Julia (assuming you have all of it), but I thought it might still be a fun project to port, since seemingly simple… Does anyone see any hindrance in porting such JAX/Python code, to what Flux?

> [@juliohm](#):
>
> there is no such thing as “AI image denoising”

Well, traditional methods are not AI or ML, but certainly claimed “AI” solutions are offered:

> **[VanceAI Image Denoiser: Denoise AI & Remove Grain from Photo](https://vanceai.com/denoise-ai/)**
>
> Remove noise & grain from pictures in seconds with VanceAI's Denoise AI. Fix grainy photos and remove artifacts from images online for free.

The algorithm above is ML, a sub-field of AI, and ML/AI may be used in recent denoicing-only algs too, but at least deraining and having all together certainly seems AI to me… Superresolution, at least the good algorithms are also AI/ML, and I only find that missing, having that and the rest in one package would be cool. I suppose the superresolution could be done after (or before) in a separate phase, but I’m not sure if the manipulation of the former would interfere and thus need to be combined.

[https://image-upscaler.com/image-denoiser/](https://image-upscaler.com/image-denoiser/)

See also from Intel:  
[https://www.openimagedenoise.org](https://www.openimagedenoise.org)

Previous state-of-the-art from 2021 (and there some intriguing [newer] info and not [inceptioniai.org](http://inceptioniai.org) in the email address there):  
[GitHub - swz30/MPRNet: [CVPR 2021] Multi-Stage Progressive Image Restoration. SOTA results for Image deblurring, deraining, and denoising.](https://github.com/swz30/MPRNet)

> Our Related Works  
> Learning Enriched Features for Fast Image Restoration and Enhancement, TPAMI 2022. Paper | Code  
> Restormer: Efficient Transformer for High-Resolution Image Restoration, CVPR 2022. Paper | Code  
> Learning Enriched Features for Real Image Restoration and Enhancement, ECCV 2020. Paper | Code  
> CycleISP: Real Image Restoration via Improved Data Synthesis, CVPR 2020. Paper | Code

About Restormer

> **April 4, 2022:** Integrated into [Huggingface Spaces](https://huggingface.co/spaces) using [Gradio](https://github.com/gradio-app/gradio). Try out the web demo:  
> [Image Restoration with Restormer - a Hugging Face Space by swzamir](https://huggingface.co/spaces/swzamir/Restormer)

> **[GitHub - XPixelGroup/BasicSR: Open Source Image and Video Restoration Toolbox...](https://github.com/XPixelGroup/BasicSR)**
>
> Open Source Image and Video Restoration Toolbox for Super-resolution, Denoise, Deblurring, etc. Currently, it includes EDSR, RCAN, SRResNet, SRGAN, ESRGAN, EDVR, BasicVSR, SwinIR, ECBSR, etc. Also support StyleGAN2, DFDNet.

BasicVSR++ was added to the “19 hours ago” above repo and it’s very cool:

[![](https://global.discourse-cdn.com/julialang/original/3X/a/5/a5f48e5ce358fd2e2ef5a61b7fedb71f1f624564.jpeg "BasicVSR++: Improving Video Super-Resolution with Enhanced Propagation and Alignment") ](https://www.youtube.com/watch?v=iIDml09CUc4&t=37)

I did not know this was a thing:

> **[Papers with Code - NAFSSR: Stereo Image Super-Resolution Using NAFNet](https://paperswithcode.com/paper/nafssr-stereo-image-super-resolution-using)**
>
> 🏆 SOTA for Stereo Image Super-Resolution on KITTI2015 - 4x upscaling (PSNR metric)

> NAFSSR outperforms the state-of-the-art methods on the KITTI 2012, KITTI 2015, Middlebury, and Flickr1024 datasets.

it links to NAFNet code repo, which is also claimed SOTA for denoising (and deblurring) in 2022:

> ## NAFNet: Nonlinear Activation Free Network for Image Restoration
> 
> Although there have been significant advances in the field of image restoration recently, the system complexity of the state-of-the-art (SOTA) methods is increasing as well, which may hinder the convenient analysis and comparison of methods. In this paper, we propose a simple baseline that exceeds the SOTA methods and is computationally efficient. To further simplify the baseline, we reveal that the nonlinear activation functions, e.g. Sigmoid, ReLU, GELU, Softmax, etc. are **not necessary** : they could be replaced by multiplication or removed.

---

<div class="post-metadata">

**Author:** ![j\_u](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j_u/32/219081_2.png) [@j\_u](https://discourse.julialang.org/u/j_u)\
**Post date:** [April 27, 2022, 12:13pm UTC](https://discourse.julialang.org/t/is-there-julia-library-for-ai-image-denoising/75688/7 "2022-04-27T12:13:27Z")

</div>

Thank you for such detailed reply with specific examples! It was a very interesting reading. I do believe that heaving such algorithms implemented or wrapped in Julia could make the package quickly one of the most popular in the Community.

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [April 28, 2022, 9:20am UTC](https://discourse.julialang.org/t/is-there-julia-library-for-ai-image-denoising/75688/8 "2022-04-28T09:20:02Z")

</div>

There’s also:  
[https://github.com/GPUOpen-LibrariesAndSDKs/RadeonImageFilter](https://github.com/GPUOpen-LibrariesAndSDKs/RadeonImageFilter)  
They have: [AI Denoiser Filter — AMD Radeon ProRender](https://radeon-pro.github.io/RadeonProRenderDocs/en/rif/filters/ai_denoiser.html)

I’ve wrapped RadeonProRender which was not that hard, so I assume this could also be wrapped nicely for Julia 😉

[https://github.com/JuliaPackaging/Yggdrasil/blob/master/R/RadeonProRender/build\_tarballs.jl](https://github.com/JuliaPackaging/Yggdrasil/blob/master/R/RadeonProRender/build_tarballs.jl)  
[https://github.com/JuliaGraphics/RadeonProRender.jl/blob/master/build/generate-master.jl](https://github.com/JuliaGraphics/RadeonProRender.jl/blob/master/build/generate-master.jl)

One can also clone their repo and immediately ccall into their shared library to try things out quickly!

---

<div class="post-metadata">

**Author:** ![j\_u](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j_u/32/219081_2.png) [@j\_u](https://discourse.julialang.org/u/j_u)\
**Post date:** [April 28, 2022, 2:20pm UTC](https://discourse.julialang.org/t/is-there-julia-library-for-ai-image-denoising/75688/9 "2022-04-28T14:20:30Z")

</div>

Thank you for the information!

---

<div class="post-metadata">

**Author:** ![JohnnyChen94](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnnychen94/32/29979_2.png) [@JohnnyChen94](https://discourse.julialang.org/u/JohnnyChen94)\
**Post date:** [April 29, 2022, 2:50am UTC](https://discourse.julialang.org/t/is-there-julia-library-for-ai-image-denoising/75688/10 "2022-04-29T02:50:34Z")

</div>

JuliaImages does not contain anything related to AI, yet. We’ll still in the process of designing a solid ground for generalized image processing tasks and supporting basic operands for it. AI on image processing might be hosted in some not-yet-existed organization with people from FluxML, JuliaImages and more…

If you’re asking for an out-of-box SOTA model to use in Julia, then I don’t see anything like this. Calling python model via `PyCall` might be the most convinient solution so far.

---

<div class="post-metadata">

**Author:** ![j\_u](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j_u/32/219081_2.png) [@j\_u](https://discourse.julialang.org/u/j_u)\
**Post date:** [April 29, 2022, 11:58am UTC](https://discourse.julialang.org/t/is-there-julia-library-for-ai-image-denoising/75688/11 "2022-04-29T11:58:41Z")

</div>

Thank you for the information. My intention was to double check / confirm my preliminary findings (or a lack of them) in the forum. Sometimes the search does not reveal all existing options or there are persons working on such or similar topic but they do not advertise it. I understand AI assisted image processing is a relatively new field. I think that a package based on such technology directly present in Julia language ecosystem could be very useful for scientific as well as for personal purposes. Some of the examples included in papers and links provided by @Palli are just incredible.

---

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [July 18, 2022, 11:45am UTC](https://discourse.julialang.org/t/is-there-julia-library-for-ai-image-denoising/75688/12 "2022-07-18T11:45:24Z")

</div>

From June 2022 (note, not to be confused with Video Super-Resolution Transformer, from June 2021, that it improves upon):

> **[GitHub - JingyunLiang/VRT: VRT: A Video Restoration Transformer (official...](https://github.com/JingyunLiang/VRT)**
>
> VRT: A Video Restoration Transformer (official repository) - GitHub - JingyunLiang/VRT: VRT: A Video Restoration Transformer (official repository)

See pictures (there and in the paper) and:

> Following commands will download [pretrained models](https://github.com/JingyunLiang/VRT/releases) and [test datasets](https://github.com/JingyunLiang/VRT/releases) **automatically**  
> […]  
> We achieved state-of-the-art performance on video SR, video deblurring and video denoising. Detailed results can be found in the [paper](https://arxiv.org/abs/2201.12288).

> _outperforms the state-of-the-art methods by large margins_ _( **up to 2.16dB** ) on fourteen benchmark datasets_

> VRT achieves state-of-the-art performance on video restoration, including video super-resolution, deblurring, denoising, frame interpolation and space-time video super-resolution.

> reducing the computational complexity to O(T). […]  
> In contrast, VRT performs well on both short and long sequences.  
> […]  
> 4.3. Video Deblurring  
> […] It is clear that VRT achieves the best performance, outperforming the second best method ARVo by a remarkable improvement of 1.47dB and 0.0299 in terms of PSNR and SSIM. […]  
> The runtime is 2.2s per frame on 1280 × 720 blurred videos. Notably, during evaluation, we do not use any pre-processing techniques such as sequence truncation and image alignment […]

> 4.4. Video Denoising  
> […] Even though PaCNet [93] trains different models separately for different noise levels, VRT still improves the PSNR by 0.82∼2.16dB.
> 
> 4.5. Video Frame Interpolation  
> To show the generalizability of our framework, we conduct experiments on video frame interpolation. […] RT achieves best or competitive performance on all datasets compared with it competitors, including those using depth maps or optical flows. As for the model size, VRT only has 9.9M parameters, which is much smaller than the recent best model FLAVR (42.4M).

From the same people (previously state-of-the-art since from August 2021, but “JPEG compression artifact reduction” intriguing, and unclear if (their above) video de-noising code handles compressed video, and does something for analogous blocking artefacts):

> **[GitHub - JingyunLiang/SwinIR: SwinIR: Image Restoration Using Swin...](https://github.com/JingyunLiang/SwinIR)**
>
> SwinIR: Image Restoration Using Swin Transformer (official repository) - GitHub - JingyunLiang/SwinIR: SwinIR: Image Restoration Using Swin Transformer (official repository)

> We conduct experiments on three represen-  
> tative tasks: image super-resolution (including classical,  
> lightweight and real-world image super-resolution), image  
> denoising (including grayscale and color image denoising)  
> and JPEG compression artifact reduction. Experimental re-  
> sults demonstrate that SwinIR outperforms state-of-the-art  
> methods on different tasks by up to 0.14∼0.45dB, while the  
> total number of parameters can be reduced by up to 67%.

See also (now 3rd on quality, and fastest?):

> **[GitHub - m-tassano/fastdvdnet: FastDVDnet: A Very Fast Deep Video Denoising...](https://github.com/m-tassano/fastdvdnet)**
>
> FastDVDnet: A Very Fast Deep Video Denoising algorithm - GitHub - m-tassano/fastdvdnet: FastDVDnet: A Very Fast Deep Video Denoising algorithm

> **Fastdvdnet: Towards real-time deep video denoising without flow estimation.**

> FastDVDnet, shows similar or better performance than other state-of-the-art competitors with significantly lower computing times.

> featuring very fast running times—even thousands of times faster than other relevant methods.

Runtime is 0.1 sec. so not too far from real-time, hopefully can be improved, or just wait a short while until hardware makes up for the difference:

[![](https://global.discourse-cdn.com/julialang/original/3X/4/9/49277581106cef4bea70756b582d2c136a2f8b68.jpeg "FastDVDnet: Towards Real-Time Deep Video Denoising Without Flow Estimation") ](https://www.youtube.com/watch?v=Hu7ez10XOJo&t=260)

> **[Blind Image Super-Resolution: A Survey and Beyond](https://arxiv.org/abs/2107.03055)**
>
> Blind image super-resolution (SR), aiming to super-resolve low-resolution images with unknown degradation, has attracted increasing attention due to its significance in promoting real-world applications. Many novel and effective solutions have been...

> **[GitHub - cszn/BSRGAN: Designing a Practical Degradation Model for Deep Blind...](https://github.com/cszn/BSRGAN#main-idea)**
>
> Designing a Practical Degradation Model for Deep Blind Image Super-Resolution (ICCV, 2021) (PyTorch) - We released the training code! - GitHub - cszn/BSRGAN: Designing a Practical Degradation Model...

Web-demo here (upload photo or use your web camera):

> **[cszn/scunet – Run with an API on Replicate](https://replicate.com/cszn/scunet)**
>
> Practical Blind Denoising via Swin-Conv-UNet and Data Synthesis

---

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [July 18, 2022, 10:59pm UTC](https://discourse.julialang.org/t/is-there-julia-library-for-ai-image-denoising/75688/13 "2022-07-18T22:59:44Z")

</div>

FYI: See awesome pictures for this (then June 2021, and updated this year) seemingly best method (none of the prior art seem better), even adding color to black-and-white faces. It’s not just denoising, also more specific, as for faces (intrigued to know what happens if not fed with faces):

> **[GitHub - TencentARC/GFPGAN: GFPGAN aims at developing Practical Algorithms...](https://github.com/TencentARC/GFPGAN)**
>
> GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration. - GitHub - TencentARC/GFPGAN: GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration.

See pictures with link above, but also different versions v1 (from paper), v1.2 and v1.3: [https://github.com/TencentARC/GFPGAN/blob/master/Comparisons.md](https://github.com/TencentARC/GFPGAN/blob/master/Comparisons.md)

“degradation model” (eq 10) is “first convolved with Gaussian blur kernel kσ followed by a downsampling operation with a scale factor r. After that, additive white Gaussian noise nδ is added to the image and finally it is compressed by JPEG with quality factor q”

> # 2. Related Work
> 
> **Image Restoration** typically includes super-resolution [13, 48, 60, 49, 74, 68, 22, 50], denoising […]  
> **Face Restoration**. Based on general face hallucination [5, 30, 66, 70], two typical face-specific priors: geometry priors and reference priors, are incorporated to further improve the performance […]
> 
> # 4.4. Discussion and Limitations
> 
> **Training bias**. Our method performs well on most dark-  
> skinned faces and various population groups (Fig. 8), as  
> our method uses both the pretrained GAN and input image  
> features for modulation.

DeblurGANv2 is sometimes better on some metric according to the paper above (and sometimes also other methods):

Deblurgan-v2: Deblurring (orders-of-magnitude) faster and better. In ICCV, 2019

> DeblurGAN-v2 reaches 10-100 times faster than the nearest competitors, while maintaining close to state-of-the-art results, implying the option of real-time video deblurring.
