Jump to content

  •  

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Photo

New free open source AI denoise framework and GUI tool - AstroDenoisePy

  • Please log in to reply
91 replies to this topic

#76 mjanzou

mjanzou

    Viking 1

  • *****
  • Posts: 949
  • Joined: 29 Nov 2017
  • Loc: So. Oregon

Posted 10 July 2023 - 08:08 PM

First light using my new antlia tri-band RGB ultra filter on setup below.

I just loaded this up on my newish win11 laptop/rtx3060, still need to get cuda dialed in but am totally impressed for the price.

Iris Neb, 4hrs integration, 120, 2-min shots with regular seeing and dismal guiding that I hopefully addressed with my worm pre-load being to tight on my DEC axis.

Note to self, check your worm preloads after changing/tensioning your new drive belts.... DOH!

Processed with siril/starnet++/astrosharp/astrodenoisepy.

 

astrosharp-light stretch on star recomp

 

NGC7023-recomp-crop-asharp.jpg

 

added adenoisepy to workflow, first attempt with a quick overstretched recomp...

 

ngc7023-recomp2-asharp-APDN-2-crop.jpg


Edited by mjanzou, 10 July 2023 - 08:10 PM.

  • Sky King and Craigar like this

#77 mjanzou

mjanzou

    Viking 1

  • *****
  • Posts: 949
  • Joined: 29 Nov 2017
  • Loc: So. Oregon

Posted 10 July 2023 - 10:32 PM

So much for tomorrow night. I got it working and on my 980ti, a denoise without normalize of a starless (starnet++)16bit tif of 36MP takes less than 18 seconds. This is over 3x faster than using an Intel I7-12700K, a 20 core processor from 2021. My 6gb card was able to process a 144MP drizzled image but not without complaining about lack of memory and having to resort to a fallback method of some sort. My task manager also reported a pretty severe shared memory usage of 31.9GB but I have no idea if that's needed or if CUDA is using it because it's there.

 

Here's what I needed.

I had to install CUDAToolKit 11.2.0 from this link; https://developer.nv...toolkit-archive

 

Install the CUDA toolkit but select the custom install and deselect all options except the toolkit. If you miss this step the toolkit will downgrade your video driver. This works with the latest 526.98 driver so no need to downgrade it to an older one. It will also warn you about not having MS Visual Studio, select continue anyway.

 

Next I had to join the NVidia developers network and download cuDNN 8.1.0.77 from here; https://developer.nv...p/cudnn-archive

 

Copy the contents of the cuDNN zip to the CUDAToolkit folder C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2 It will add the contents of the 3 folders into the existing folders.

 

Restart AstroDenoisePY

 

As a side bonus, I have confirmed that Starnet++ V2 GUI will run with CUDA 11.2 following only the very first bit of the instructions at this link; https://www.williaml...om/starnet-cuda and simply replacing the tensorflow.dll in the StarNetV2GUI_Win folder with the one here; https://storage.goog...86_64-2.7.0.zip and no other steps. Using the same test image the compute time went from 1m20s on my pretty fast processor to 26 seconds on my pretty old video card. Happy days.

Many thanks for this tutorial...

I got to doing the deal and stumbled across a link to the nvidia compute redist site.

Bonus, no need to join the Nvidia developers network to download cuDNN (11.2) 8.1.0.77, get it directly here:

 

 https://developer.do...t/cudnn/v8.1.0/


Edited by mjanzou, 10 July 2023 - 10:38 PM.

  • Craigar likes this

#78 mjanzou

mjanzou

    Viking 1

  • *****
  • Posts: 949
  • Joined: 29 Nov 2017
  • Loc: So. Oregon

Posted 12 July 2023 - 02:41 PM

Played around with the ADN sliders a little more on iris and called it quits here.

I think I got better results using normalize with a lightly stretched input file.....???

With 4 hrs. at 300mm, using free utilities plus donations of course, certainly cant complain.

 

Iris Nebula-adn-90-2.jpg

 

 


  • Craigar likes this

#79 mjanzou

mjanzou

    Viking 1

  • *****
  • Posts: 949
  • Joined: 29 Nov 2017
  • Loc: So. Oregon

Posted 14 July 2023 - 04:41 PM

This is a great tool however not necessarily the best fit for every target.

Almost everyone (non-astro folks) I have shown these pics prefers the astrosharp version. I kinda do as well.

I took 4 hrs. of M27 this AM and did a quick siril stack/2x crop/GHS, stanet++, recomp and processed using this tool and astrosharp individually. Unfortunately I haven't yet figured out a consistent way to use both together and open for suggestions.

 

Curious, why is this the only astro software package (I'm aware of) not moved to in the astronomy software and computers sub-forum, seems more appropriate to me?

 

Output file from siril

M27-recomp-dhs.jpg

 

astrodenoisepy processed

M27-recomp-dhs-adn.jpg

 

astrosharp processed

M27-recomp-dhs-asharp.jpg


Edited by mjanzou, 14 July 2023 - 04:55 PM.


#80 mjanzou

mjanzou

    Viking 1

  • *****
  • Posts: 949
  • Joined: 29 Nov 2017
  • Loc: So. Oregon

Posted 27 July 2023 - 02:00 PM

Has anyone ever tried a second (back-to-back) AstroDenoisePy pass?

I just did with my ic1396 photo and got some interesting results. I did throttle back the STF B stretch and denoise strength a bit in the second pass but got an unexpected result and kinda like it...

Whadayah think???

 

1st Pass

 

ET-test-adn8-asharp-grn-final-small.jpg

 

2nd Pass

 

et-final-asharp-SB-adn-small.jpg

 


  • Craigar likes this

#81 Craigar

Craigar

    Messenger

  • *****
  • Posts: 476
  • Joined: 03 Jul 2021
  • Loc: Lawndale, CA

Posted 28 July 2023 - 12:39 AM

I like the "two pass" better because of the increase in blue - is ic1396 supposed to have more blue like this?

 

The colors in the one pass remind me of my Los Angeles air pollution, the second one looks like no air pollution!


Edited by Craigar, 28 July 2023 - 12:41 AM.


#82 mjanzou

mjanzou

    Viking 1

  • *****
  • Posts: 949
  • Joined: 29 Nov 2017
  • Loc: So. Oregon

Posted 28 July 2023 - 07:39 AM

I like the "two pass" better because of the increase in blue - is ic1396 supposed to have more blue like this?

 

The colors in the one pass remind me of my Los Angeles air pollution, the second one looks like no air pollution!

No, I don't believe its natural for ic1396 to have more blues but it certainly gives the pic a different vibe.

The first pass brings out more orange/yellow midtones along with the natural Ha dominate.

It kinda reminds me of the PI processed pic my buddy did using the same data, a whopping 76 minutes worth of saved 2-minute (200 gain) EAA subs from sharpcap here:

 

Scots-ET2_web-PI-small.jpg

 

Only using siril I got the first pass image above by running PCC then BE and used the Max Neutral SCNR instead of the default Avg Neutral option which appears to leave just a hint of green tones in the final ghs stretch(s).

However, if I reverse the order to BE then PCC, SCNR I get this image:

 

ET2-dhs-recomp-adn8-asharp-small.jpg

 

Which I believe is the most natural of the bunch?

 

It also makes a significant difference if I run astrosharp or astrodenoisepy individually or if I run both astrosharp/astrodenoisepy (usually in that order) together on the same image, if I denoise first then sharpen it sometimes trashes my image but works well with targets like cocoon and dumbbell.

If I plan to run a back-to-back astrodenoisepy process, I use the default values with normalize option but throttle back the STF stretch B to around .2 instead of default .250.

On the second pass I throttle back STF stretch further to .100-ish (to your liking) and bring the denoise strength way down to around .200-ish and get the significant boost in overall blue tones.

Keep in mind I'm running a OSC with my Duo or Triband filter...

The final note I would add is that you do an overall medium level stretch before running it through astrosharp/astrodenoisepy, bringing in a hard stretch is very counterproductive.

It certainly aint no PI, Blur/Noise/StarXterminator but the price is right. I don't need a supporting mainframe level PC and can run/process everything on my gaming laptop taking minutes instead of hours to get results.


Edited by mjanzou, 28 July 2023 - 10:32 AM.


#83 thesti

thesti

    Sputnik

  • -----
  • Posts: 35
  • Joined: 06 Jul 2023

Posted 16 October 2023 - 02:57 AM

I like this application. 

But everytime I run this application I see this in the console:

[INFO   ] [Text        ] Provider: sdl2
2023-10-16 15:55:07.542467: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2023-10-16 15:55:07.544475: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
AutoGraph is not available in this environment: functions lack code information. This is typical of some environments like the interactive Python shell. See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/autograph/g3doc/reference/limitations.md#access-to-source-code for more information.
[INFO   ] [GL          ] NPOT texture support is available
[INFO   ] [Base        ] Start application main loop

Not sure if everyone also seeing the same, I install the application from the msi file. I use RTX 3060 TI, which is an NVIDIA GPU and does have CUDA. 

Now, everytime I run this application and I check in taskmgr, it seems it is using CPU instead of GPU (cpu usage shows above 80% while no change on GPU usage).



#84 mjanzou

mjanzou

    Viking 1

  • *****
  • Posts: 949
  • Joined: 29 Nov 2017
  • Loc: So. Oregon

Posted 26 May 2024 - 01:11 PM

FYI, new version released here:

 

https://github.com/p...sbdeep/releases

 

New in AstroDenoise 0.5.2:

Overview video: https://www.youtube....h?v=mCIbBox8Uzs

GUI | New Right click slider preview for before and after
GUI | New Right click slider preview between current and snapshot
CLI | CLI options included, no need for GUI
New model v0.5.0-01 using msssimhdr loss
Refactor and clean-up GUI and CLI
Updates from CSBDeep origin repo



#85 mjanzou

mjanzou

    Viking 1

  • *****
  • Posts: 949
  • Joined: 29 Nov 2017
  • Loc: So. Oregon

Posted 26 May 2024 - 01:34 PM

I like this application. 

But everytime I run this application I see this in the console:

[INFO   ] [Text        ] Provider: sdl2
2023-10-16 15:55:07.542467: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2023-10-16 15:55:07.544475: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
AutoGraph is not available in this environment: functions lack code information. This is typical of some environments like the interactive Python shell. See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/autograph/g3doc/reference/limitations.md#access-to-source-code for more information.
[INFO   ] [GL          ] NPOT texture support is available
[INFO   ] [Base        ] Start application main loop

Not sure if everyone also seeing the same, I install the application from the msi file. I use RTX 3060 TI, which is an NVIDIA GPU and does have CUDA. 

Now, everytime I run this application and I check in taskmgr, it seems it is using CPU instead of GPU (cpu usage shows above 80% while no change on GPU usage).

You definitely have a CUDA install issue likely with the tensorflow and/or versions thereof....

It will run fine but not run nearly as fast as if you had CUDA working on your system.

My cpu usage is similar but my gpu usage is clearly active during the image processing time.

Here is a full copy of my log for comparison.

 

 

[INFO   ] [Logger      ] Record log in C:\Users\mjanz\.kivy\logs\kivy_24-05-26_2.txt
[INFO   ] [Kivy        ] v2.1.0
[INFO   ] [Kivy        ] Installed at "C:\Users\mjanz\AppData\Local\Programs\astrodenoisepygui\lib\kivy\__init__.pyc"
[INFO   ] [Python      ] v3.9.10 (tags/v3.9.10:f2f3f53, Jan 17 2022, 15:14:21) [MSC v.1929 64 bit (AMD64)]
[INFO   ] [Python      ] Interpreter at "C:\Users\mjanz\AppData\Local\Programs\astrodenoisepygui\astrodenoisepygui.exe"
[INFO   ] [Logger      ] Purge log fired. Processing...
[INFO   ] [Logger      ] Purge finished!
[INFO   ] [Factory     ] 189 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored)
[INFO   ] [Window      ] Provider: sdl2
[INFO   ] [GL          ] Using the "OpenGL" graphics system
[INFO   ] [GL          ] GLEW initialization succeeded
[INFO   ] [GL          ] Backend used <glew>
[INFO   ] [GL          ] OpenGL version <b'4.6.0 - Build 31.0.101.3251'>
[INFO   ] [GL          ] OpenGL vendor <b'Intel'>
[INFO   ] [GL          ] OpenGL renderer <b'Intel® Iris® Xe Graphics'>
[INFO   ] [GL          ] OpenGL parsed version: 4, 6
[INFO   ] [GL          ] Shading version <b'4.60 - Build 31.0.101.3251'>
[INFO   ] [GL          ] Texture max size <16384>
[INFO   ] [GL          ] Texture max units <32>
[INFO   ] [Window      ] auto add sdl2 input provider
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
[INFO   ] [Text        ] Provider: sdl2
AutoGraph is not available in this environment: functions lack code information. This is typical of some environments like the interactive Python shell. See https://github.com/t...-to-source-code for more information.
[INFO   ] [GL          ] NPOT texture support is available
[INFO   ] [Base        ] Start application main loop



#86 MarMax

MarMax

    Fly Me to the Moon

  • *****
  • Posts: 5,648
  • Joined: 27 May 2020
  • Loc: SoCal

Posted 11 June 2024 - 09:10 PM

First - Great app . . . thank you p7ayfu77 waytogo.gif 

 

I just tried 0.5.2 for the first time and not knowing anything other than briefly scanning this topic. I'm running a Windows 11 HP Envy laptop, i7-13700H 2.4GHz, and it worked great. I have no idea what I'm doing and only adjusted the stretch and left everything else default.

 

It's amazing and has anyone written up a workflow for using it?

 

Based on my results it seems best to run at the end of my current workflow which is very basic since I'm doing EAA and not AP. My Q&D workflow:

 

- open 32-bit FITS in APP, stretch, run light pollution tool and save as TIFF

(if there are really bad gradients I'll precede the above with GraXpert)

- open TIFF in Photoshop and run RC Astro plugins [GxT, SxT and NxT]

(if stars are eggy in the corners I'll save the stars only layer, open in Siril, and run Full Resynthesis)

- Photoshop levels, curves and color balance

- AstroDenoise 0.5.2 and save as TIFF

 

Feel free to say my workflow is lame or flawed and please suggest any modifications. Just note that I don't have PI, nor do I plan on getting it.



#87 Tapio

Tapio

    Voyager 1

  • -----
  • Posts: 11,082
  • Joined: 24 Sep 2006
  • Loc: Tampere, Finland

Posted 11 June 2024 - 10:40 PM

You do denoising twice (NxT and AstroDenoise).
Have you noticed there's denoising in GraXpert too?

#88 MarMax

MarMax

    Fly Me to the Moon

  • *****
  • Posts: 5,648
  • Joined: 27 May 2020
  • Loc: SoCal

Posted 12 June 2024 - 01:35 AM

You do denoising twice (NxT and AstroDenoise).
Have you noticed there's denoising in GraXpert too?

I've had to be selective of the images I denoise twice (NxT and AstroDenoise) because as others have suggested you can make things worse. I'm not using the denoise feature in GraXpert because it takes about 2-4x as long as AstroDenoise.

 

I was spending quite a bit of time after running NxT to eliminate the remaining noise using Photoshop and selecting a color range and adjusting levels. So far, on the images best suited for AstroDenoise, it seems to partially replace the iterative color range adjustments. You also have to be careful with the NxT settings and not go too aggressive with the reduction and detail.

 

With my 60 minute or less EAA integrations there is less signal and more noise to start with so finding a workflow that's as easy and quick as possible has been my goal. I've been using a couple of canned features in several different apps versus fully learning the complex apps. AstroDenoise seems to fit well and it's quick and easy to see if it helps.



#89 Der_Pit

Der_Pit

    Mercury-Atlas

  • *****
  • Posts: 2,982
  • Joined: 07 Jul 2018
  • Loc: La Palma

Posted 15 June 2024 - 11:31 AM

Uhm - so where do I get the models? They don't seem to be in the GIT repo, nor the source files of the releases confused1.gif



#90 MarMax

MarMax

    Fly Me to the Moon

  • *****
  • Posts: 5,648
  • Joined: 27 May 2020
  • Loc: SoCal

Posted 15 June 2024 - 01:11 PM

Following up on denoising twice I'll link to a reply I made in a different topic with an example.

 

https://www.cloudyni...tor/?p=13507761



#91 SteveCollyer

SteveCollyer

    Mariner 2

  • -----
  • Posts: 261
  • Joined: 24 Sep 2023

Posted 07 July 2024 - 07:19 AM

Hi all.

 

Great tool, but I have a couple of questions.

 

Why does the image save & export as the less contrasty version, rather than the one in the window that's been denoised?

 

How come the processed image flips horizontally, and as to be flipped back to correct the orientation in MS Paint?  A bit needless, unless I'm missing something.



#92 bbasiaga

bbasiaga

    Skylab

  • *****
  • Posts: 4,273
  • Joined: 10 May 2006

Posted 11 August 2024 - 09:32 AM

You definitely have a CUDA install issue likely with the tensorflow and/or versions thereof....

It will run fine but not run nearly as fast as if you had CUDA working on your system.

My cpu usage is similar but my gpu usage is clearly active during the image processing time.

Here is a full copy of my log for comparison.

 

 

[INFO   ] [Logger      ] Record log in C:\Users\mjanz\.kivy\logs\kivy_24-05-26_2.txt
[INFO   ] [Kivy        ] v2.1.0
[INFO   ] [Kivy        ] Installed at "C:\Users\mjanz\AppData\Local\Programs\astrodenoisepygui\lib\kivy\__init__.pyc"
[INFO   ] [Python      ] v3.9.10 (tags/v3.9.10:f2f3f53, Jan 17 2022, 15:14:21) [MSC v.1929 64 bit (AMD64)]
[INFO   ] [Python      ] Interpreter at "C:\Users\mjanz\AppData\Local\Programs\astrodenoisepygui\astrodenoisepygui.exe"
[INFO   ] [Logger      ] Purge log fired. Processing...
[INFO   ] [Logger      ] Purge finished!
[INFO   ] [Factory     ] 189 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored)
[INFO   ] [Window      ] Provider: sdl2
[INFO   ] [GL          ] Using the "OpenGL" graphics system
[INFO   ] [GL          ] GLEW initialization succeeded
[INFO   ] [GL          ] Backend used <glew>
[INFO   ] [GL          ] OpenGL version <b'4.6.0 - Build 31.0.101.3251'>
[INFO   ] [GL          ] OpenGL vendor <b'Intel'>
[INFO   ] [GL          ] OpenGL renderer <b'Intel® Iris® Xe Graphics'>
[INFO   ] [GL          ] OpenGL parsed version: 4, 6
[INFO   ] [GL          ] Shading version <b'4.60 - Build 31.0.101.3251'>
[INFO   ] [GL          ] Texture max size <16384>
[INFO   ] [GL          ] Texture max units <32>
[INFO   ] [Window      ] auto add sdl2 input provider
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
[INFO   ] [Text        ] Provider: sdl2
AutoGraph is not available in this environment: functions lack code information. This is typical of some environments like the interactive Python shell. See https://github.com/t...-to-source-code for more information.
[INFO   ] [GL          ] NPOT texture support is available
[INFO   ] [Base        ] Start application main loop

Just finding I have the same error.   Should I have installed this tensorflow software at some point?  




CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Recent Topics






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics