A.I. based Open Source De-noiser for Daz Studio PC and MACs

1246

Comments

  • SevrinSevrin Posts: 6,309
    edited September 2019
    mCasual said:
    Sevrin said:

    I notice that you can input images as HDR.  Can one use this on EXR canvases then?  And can you get high dynamic range images out?

    just now i tested the hdr option and it doesnt seem to work maybe i dont have the latest imagemagick ..

    now do i have an exr image ... yes ... and denoise doesnt work, imagemagick has problems with it ...

    here is the trace/log for my hdr and exr failed attempts

    ...

    INFO: Loading input
    Error: invalid PFM image

    ....

    looks like the way i ask imagemagick to convert the hdr/exr files to the pfm format produces pfm files that Intel's denoiser utility rejects

     

    ------------

    by the way when you click the button, it produces a batch/command file in your daz studio temp folder

    in my case that's C:\Users\Jacques\AppData\Roaming\DAZ 3D\Studio4\temp

    if you know what that means, maybe you could fix it there using notepad.exe

    "C:/imagemagick/convert.exe" "I:/jlgreatroom1.exr" -endian LSB "C:/Users/Jacques/AppData/Roaming/DAZ 3D/Studio4/temp/temp_inp.pfm""F:/inteldenoyz/oidn-0.9.0.x64.vc14.windows/bin/denoise.exe" -ldr  "C:/Users/Jacques/AppData/Roaming/DAZ 3D/Studio4/temp/temp_inp.pfm" -o "C:/Users/Jacques/AppData/Roaming/DAZ 3D/Studio4/temp/temp_out.pfm""C:/imagemagick/convert.exe" "C:/Users/Jacques/AppData/Roaming/DAZ 3D/Studio4/temp/temp_out.pfm" "I:/jlgreatroom1_out.exr"

    i recently discovered that Daz Studio can handle pfm images and in the futur, maybe i'll have a version of the script that doesnt require imagemagick

    maybe tonight ( just maybe !! ) i'll see if i can patch my script so that it can process hdr, exr and what was the other one uhh .... ibl images

     

    Thank you for all your efforts.  I've started using canvases pretty much exclusively, and there's usually one that's underlit and it's either mask the noise to keep some highlight or ditch it.  I don't find that the denoiser is suitable for most of what I do, but for that kind of situation it would be a great tool to have in the old back pocket.

    Un gros merci pour tous ce que tu fais.  J'apprecie beaucoup! :)

    Post edited by Sevrin on
  • mCasualmCasual Posts: 4,607
    just now i dowloaded a few exr enviroments and imagemagick seemed to be able to convert them to pfm http://www.cgchannel.com/2015/06/download-six-free-high-resolution-interior-hdris/ this is needed because intel's utility only accepts images in pfm format but but when i give it to intel's denoise utility my computer froze, it's been 5 minutes so i'll reboot i'll see if smaller exr files produce more elegant crashes on peut discuter en francais mais quand c'est technique, au fond je suis plus a l'aise en anglais et je fais moins de fautes de francais :)
  • mCasualmCasual Posts: 4,607
    edited September 2019

    here's a test

    i  downloaded 6Kx3K equirectangular exr images from http://www.cgchannel.com/2015/06/download-six-free-high-resolution-interior-hdris/

    then i ran a batch file to use imagemagick freeware command-line utility to convert it to .pfm

    c:\imagemagick\convert "I:/IBL/__MACOSX/canada_montreal_loft_max_sunny.exr" "I:/IBL/__MACOSX/test1.pfm"

    then i applied this pfm image as an environment for iRay renderer

    for unknown reasons it was upside down

    so i rotated the environment around the X axis by 180 degrees

    and we can see the image is valid, i reduced luminosity from 2 to 1

    Now when i try to denoise this pfm image using the denoiser, i get this message: 

    Error: big-endian PFM images are not supported

    so i have to tell imagemagick to convert it to little-endian ( 16 bit numbers RGB are in fact two 8-bit bytes, and the endian thing determines which of the 2 bytes comes first )

    ... and if i try using the mcjdenoise script to process the exr file ... imagemagick produces the little endian pfm file, the the intel denoise utility accepts it, starts denoising it 0%...3%...6%... and it freeze-crashes my pc

     

    ommanoma.jpg
    900 x 540 - 229K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited September 2019
    good news intel or whoever maintains denoise added a memory limit option and some crash prevention, so maybe that will save me ... unless my script can convert exr to hdr to pfm ... nah ... https://github.com/OpenImageDenoise/oidn/releases
    Post edited by mCasual on
  • Wow, that would be great. HDR denoising! Great work

  • mCasualmCasual Posts: 4,607
    edited September 2019

    as you may know you can get a daz script that uses the power of Intel's Open Denoise utility to denoise images rendered by renderers like Daz Iray

    https://sites.google.com/site/mcasualsdazscripts9/mcjdenoise

    but when using the old versions of the Intel denoiser  ( v0.9?) to denoise big images like 6000x3000 pixels, you may run out of memory and your PC may freeze ( it did for me )

    but version 1.0 of the denoiser will make it less likely ( it did for me )

    https://openimagedenoise.github.io/downloads.html

     

    for this test i used one of the 6 free exr environment maps from here:

    https://gumroad.com/l/hdri-free-pack

     

    in other news i didnt work on the HDR format issue

    i mean denoising an .hdr file ... didnt work when i tried it

    but i may fix that today

     

    sm.jpg
    960 x 540 - 93K
    Post edited by mCasual on
  •  

    1547/5000

     

    I want to ask for help. I installed mcjDenoise. Unfortunately, it doesn't work for me. I get this error message. INFO:
    C: \ Program Files \ DAZ 3D \ DAZStudio4> "C: /Denoise/ImageMagick-7.0.10-Q16/magick.exe" "C: / Users / Carpathian / Documents / DAZ 3D / Studio / Render Library / Merci.jpg "-endian LSB" C: / Users / Carpathian / AppData / Roaming / DAZ 3D / Studio4 / temp / temp_inp.pfm "

    INFO:
    C: \ Program Files \ DAZ 3D \ DAZStudio4> "C: /Denoise/oidn-1.2.0.x64.vc14.windows/bin/denoise.exe" -ldr C: / Users / Carpathian / AppData / Roaming / DAZ 3D / Studio4 / temp / temp_inp.pfm "-o" C: / Users / Carpathian / AppData / Roaming / DAZ 3D / Studio4 / temp / temp_out.pfm "

    ERROR magick.exe: unable to open image 'C: / Users / Karparti / Documents / DAZ 3D / Studio / Render Library / Merci.jpg': No such file or directory @ error / blob.c / OpenBlob / 3496th

    INFO: Loading input

    C: \ Program Files \ DAZ 3D \ DAZStudio4> "C: /Denoise/ImageMagick-7.0.10-Q16/magick.exe" "C: / Users / Carpathian / AppData / Roaming / DAZ 3D / Studio4 / temp / temp_out. pfm "-quality 100%" C: / Users / Carpathian / Documents / DAZ 3D / Studio / Render Library / Merci_out.jpg "

    ERROR Error: cannot open image file: C: / Users / Kßrpßti / AppData / Roaming / DAZ 3D / Studio4 / temp / temp_inp.pfm
    magick.exe: unable to open image 'C: / Users / Kárpßti / AppData / Roaming / DAZ 3D / Studio4 / temp / temp_out.pfm': No such file or directory @ error / blob.c / OpenBlob / 3496th
    process exited

  • Someone please help me. I'm getting this error message from Denoise.

    C: \ Program Files \ DAZ 3D \ DAZStudio4> "C: /Denoise/ImageMagick-7.0.10-Q16/magick.exe" "C: /Denoise/Images/2.jpg" -endian LSB "C: / Users / Carpathian / AppData / Roaming / DAZ 3D / Studio4 / temp / temp_inp.pfm "

     

  • N-RArtsN-RArts Posts: 1,496

    It's working perfectly on my desktop, but I'm getting an error on my laptop:

    INFO: 
    H:\DAZ 3D\DAZ 3D\DAZStudio4>"C:/Program Files/ImageMagick-7.0.10-Q16/magick.exe" "D:/Render Library/ner5test.png" -endian LSB "C:/Users/Win 10/AppData/Roaming/DAZ 3D/Studio4/temp/temp_inp.pfm" 

    INFO: 
    H:\DAZ 3D\DAZ 3D\DAZStudio4>"C:/Users/Win 10/Desktop/3D/Daz3D Postwork Helpers/Denoiser/oidn-1.2.1.x64.vc14.windows/bin/oidnDenoise.exe" -ldr  "C:/Users/Win 10/AppData/Roaming/DAZ 3D/Studio4/temp/temp_inp.pfm" -o "C:/Users/Win 10/AppData/Roaming/DAZ 3D/Studio4/temp/temp_out.pfm" 

    INFO: Loading input

    INFO: Resolution: 1080x1920

    INFO: Initializing

    H:\DAZ 3D\DAZ 3D\DAZStudio4>"C:/Program Files/ImageMagick-7.0.10-Q16/magick.exe" "C:/Users/Win 10/AppData/Roaming/DAZ 3D/Studio4/temp/temp_out.pfm" "D:/Render Library/ner5test_out.png" 

    ERROR Error: SSE4.1 support is required at minimum

    ERROR magick.exe: unable to open image 'C:/Users/Win 10/AppData/Roaming/DAZ 3D/Studio4/temp/temp_out.pfm': No such file or directory @ error/blob.c/OpenBlob/3539.

  • SevrinSevrin Posts: 6,309
    N_R Arts said:

    It's working perfectly on my desktop, but I'm getting an error on my laptop:

    INFO: 
    H:\DAZ 3D\DAZ 3D\DAZStudio4>"C:/Program Files/ImageMagick-7.0.10-Q16/magick.exe" "D:/Render Library/ner5test.png" -endian LSB "C:/Users/Win 10/AppData/Roaming/DAZ 3D/Studio4/temp/temp_inp.pfm" 

    INFO: 
    H:\DAZ 3D\DAZ 3D\DAZStudio4>"C:/Users/Win 10/Desktop/3D/Daz3D Postwork Helpers/Denoiser/oidn-1.2.1.x64.vc14.windows/bin/oidnDenoise.exe" -ldr  "C:/Users/Win 10/AppData/Roaming/DAZ 3D/Studio4/temp/temp_inp.pfm" -o "C:/Users/Win 10/AppData/Roaming/DAZ 3D/Studio4/temp/temp_out.pfm" 

    INFO: Loading input

    INFO: Resolution: 1080x1920

    INFO: Initializing

    H:\DAZ 3D\DAZ 3D\DAZStudio4>"C:/Program Files/ImageMagick-7.0.10-Q16/magick.exe" "C:/Users/Win 10/AppData/Roaming/DAZ 3D/Studio4/temp/temp_out.pfm" "D:/Render Library/ner5test_out.png" 

    ERROR Error: SSE4.1 support is required at minimum

    ERROR magick.exe: unable to open image 'C:/Users/Win 10/AppData/Roaming/DAZ 3D/Studio4/temp/temp_out.pfm': No such file or directory @ error/blob.c/OpenBlob/3539.

    You can download CPUID to see if your processor supports SSE4.1.  If it does not, you are out of luck.

    Annotation 2020-07-01 215145.jpg
    415 x 410 - 72K
  • N-RArtsN-RArts Posts: 1,496
    Sevrin said:
    N_R Arts said:

    It's working perfectly on my desktop, but I'm getting an error on my laptop:

    INFO: 
    H:\DAZ 3D\DAZ 3D\DAZStudio4>"C:/Program Files/ImageMagick-7.0.10-Q16/magick.exe" "D:/Render Library/ner5test.png" -endian LSB "C:/Users/Win 10/AppData/Roaming/DAZ 3D/Studio4/temp/temp_inp.pfm" 

    INFO: 
    H:\DAZ 3D\DAZ 3D\DAZStudio4>"C:/Users/Win 10/Desktop/3D/Daz3D Postwork Helpers/Denoiser/oidn-1.2.1.x64.vc14.windows/bin/oidnDenoise.exe" -ldr  "C:/Users/Win 10/AppData/Roaming/DAZ 3D/Studio4/temp/temp_inp.pfm" -o "C:/Users/Win 10/AppData/Roaming/DAZ 3D/Studio4/temp/temp_out.pfm" 

    INFO: Loading input

    INFO: Resolution: 1080x1920

    INFO: Initializing

    H:\DAZ 3D\DAZ 3D\DAZStudio4>"C:/Program Files/ImageMagick-7.0.10-Q16/magick.exe" "C:/Users/Win 10/AppData/Roaming/DAZ 3D/Studio4/temp/temp_out.pfm" "D:/Render Library/ner5test_out.png" 

    ERROR Error: SSE4.1 support is required at minimum

    ERROR magick.exe: unable to open image 'C:/Users/Win 10/AppData/Roaming/DAZ 3D/Studio4/temp/temp_out.pfm': No such file or directory @ error/blob.c/OpenBlob/3539.

    You can download CPUID to see if your processor supports SSE4.1.  If it does not, you are out of luck.

    Thanks for that. I've just run the program, and the processor only goes up to SSE4A. Although I could've sworn that I had denoiser running on my laptop before the last wipe :/

    Thanks again. :)

     

  • mCasualmCasual Posts: 4,607
    It's not the same but, before i made that intel denoiser frontend, i made mcjDespeckle which detects abnormally light pixels and replaces them with the average value of neighboring pixels https://sites.google.com/site/mcasualsdazscripts7/mcjdespeckle
  • manekiNekomanekiNeko Posts: 1,408
    edited July 2020

    so... here comes the idiot retard in the thread... sorry TT'

    i'm NOT tech versed.

    nonetheless, i managed to:
    - read your installation instructions/your OP and maybe probably understand a little... i think. at least some words made sense...
    - download CPUID and run it, hurray my laptop supports SSE4.1 like in your jpg
    - download your zip and install it in daz' scripts
    - download the zip imagemagick and install it in program files
    - download the zip intel open image denoiser (oidn-1.2.1.x64.vc14.windows.zip)

    hey, this is actually a real feat for me, i must be in an especially brainy day. unlike the other days where i came here, saw all the to-do's, and ran away XD
    but now i'm stuck, i have not the slightest idea where to "install" the bits from the oidn zip.
    and not helping, whatever is written on their website or the included pdf doc is making me want to run away screaming tearing at my hair, or sit on the floor and cry. it's written in tech-english, but for me it would make just as much sense in mandarin chinese... also in the pdf they explain a trillion things i really, really don't wanna know... except where to install it... >_<

    HALP?

    EDIT: ok i re-read your instructions. does "any folder where your OS allows execution" mean anywhere BUT NOT program files?

    Post edited by manekiNeko on
  • mCasualmCasual Posts: 4,607
    you can place the intel denoiser files anywhere on your hard disks as long as your windows security allows execution of programs. Same goes for imagemagick When you run the daz script you have to tell where those programs are located by browsing up to them
  • manekiNekomanekiNeko Posts: 1,408
    edited July 2020
    mCasual said:
    you can place the intel denoiser files anywhere on your hard disks as long as your windows security allows execution of programs. Same goes for imagemagick When you run the daz script you have to tell where those programs are located by browsing up to them

    ok i created a folder to put all those special progs, far away from program files where no admin is needed...

    EDIT: WOW! it worked! and the result is awesome!

    thank you so much for creating this little gem, you have no idea how happy i am! i can go back to renders i had discarded as total failures and denoise them so they look great! thx thx thx thx! :)))))))))))

    Post edited by manekiNeko on
  • GETSXGETSX Posts: 39
    edited July 2020

    With all due respect (I use many of your scripts), but ... this one is too inconvenient.


     Firstly, it requires ImageMagic, which is completely useless if we already have other 2D editors.
     Secondly - it is not needed at all. Alas. Declan Russell has long written a CLI utility that doesn't require third-party software for Intel OpenImage Denoiser (also for Nvidia AI) and you just need to add a few lines to the registry to get denoise in 1 click.

    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\*\shell\intel_denoise_png]
    @="Denoise in PNG (Intel)"

    [HKEY_CLASSES_ROOT\*\shell\intel_denoise_png\Command]
    @="cmd /c \"D:\\3D\\intel_denoiser\\denoiser.exe -i \"%1\" -o \"%1.denoised.png\"\""


     Agree that this is much easier.

    Post edited by GETSX on
  • DigiDotzDigiDotz Posts: 515
    edited July 2020

    I'm happy to have it as a Daz studio script tbh yes But yeah, I already had ImageMagic installed i think.

    Post edited by DigiDotz on
  • mCasual said:
    you can place the intel denoiser files anywhere on your hard disks as long as your windows security allows execution of programs. Same goes for imagemagick When you run the daz script you have to tell where those programs are located by browsing up to them

    Welcome!  Denoise and its components have been installed as described. I also provided the paths. When I start the script, it also loads the image and then I get the error message "File or directory does not exist" 

     

  • Me, and my Intel UHD620, are forever in your debt. 

  • Looks great! And another vote for implementing into standard Daz.

    Has anyone here used this on macos? When I try to browse to select the path for imagemagick and oi denoise it will not let me select anything - have changed the browsing selection from exe to all files, but cannot select the binary unix executable files for them (or any files).

  • mCasualmCasual Posts: 4,607
    edited January 2021

     looks like my macbook is so old i wont be able to install imagemagick

    but i will look into the selection issue

    here you can see on a PC how i selected imagemagick's convert utility which is now named magick

    and the intel denoiser is oidenoise

     

    come to think of it, since you said you cant select the exe ... it may mean you did not download the intel denoiser for Mac but instead the one for PCs

     

    anyway i will return to the scary world of my old macbook and see if i can install the denoiser package

    Son of the Raven said:

    Looks great! And another vote for implementing into standard Daz.

    Has anyone here used this on macos? When I try to browse to select the path for imagemagick and oi denoise it will not let me select anything - have changed the browsing selection from exe to all files, but cannot select the binary unix executable files for them (or any files).

    aking.jpg
    1248 x 1174 - 179K
    Post edited by mCasual on
  • mCasual said:

     

    come to think of it, since you said you cant select the exe ... it may mean you did not download the intel denoiser for Mac but instead the one for PCs

    thank you - i installed the binary package for mac, no exe files

     

  • mCasualmCasual Posts: 4,607

     on my PC, i downloaded the macos version as a tar  or gz

    and oidnDenoise is in

    D:\denoise\oidn-1.2.4.x86_64.macos.tar\oidn-1.2.4.x86_64.macos\bin

    in the Daz script when came time to select it

    i browsed to D:\denoise\oidn-1.2.4.x86_64.macos.tar\oidn-1.2.4.x86_64.macos\bin

    i type * on the entry line

    and i clicked on oidnDenoise

    of course i cant use that denoiser on a pc, but it shows something :)

     

    ok ok i go back to the mac

    Son of the Raven said:

    mCasual said:

     

    come to think of it, since you said you cant select the exe ... it may mean you did not download the intel denoiser for Mac but instead the one for PCs

    thank you - i installed the binary package for mac, no exe files

     

  • mCasualmCasual Posts: 4,607

    ok now i see the 3 binaries are grayed outr and cant be selected

    they are maked as Unix Executable files

    so i google "cant select unix ececutable files" 

    Son of the Raven said:

    mCasual said:

     

    come to think of it, since you said you cant select the exe ... it may mean you did not download the intel denoiser for Mac but instead the one for PCs

    thank you - i installed the binary package for mac, no exe files

     

  • mCasualmCasual Posts: 4,607

    ok now i see the 3 binaries are grayed outr and cant be selected

    they are maked as Unix Executable files

    so i google "cant select unix ececutable files" 

    Son of the Raven said:

    mCasual said:

     

    come to think of it, since you said you cant select the exe ... it may mean you did not download the intel denoiser for Mac but instead the one for PCs

    thank you - i installed the binary package for mac, no exe files

     

  • mCasualmCasual Posts: 4,607

    ok i found the solution

    in the script, which you can open in a notepad or in the daz script IDE tab

    if you search for the 2 lines that read 

    "exe Files (*.exe)" 

    you replace this with

    "Any File" 

    and the mac will now let you click on the denoiser oidnDenoise

    i will update the version on my web site in the next mninutes

    ( though this takes longer with the new web page format that gopogle forced us to adopt )

     

    Son of the Raven said:

    mCasual said:

     

    come to think of it, since you said you cant select the exe ... it may mean you did not download the intel denoiser for Mac but instead the one for PCs

    thank you - i installed the binary package for mac, no exe files

     

  • mCasualmCasual Posts: 4,607
    edited January 2021

    new for 2021 - Mac Compatibility

    January 19th 2021 15:15 the file type for imagemagick and Intel Open Denoise was changed from (*.exe) to "Any File" for MAC issues with opendenoise which is extensionless

    mcjDenoise.dsa.png
    182 x 182 - 45K
    Post edited by mCasual on
  • Son of the RavenSon of the Raven Posts: 119
    edited January 2021

    mCasual said:

    ok i found the solution

    in the script, which you can open in a notepad or in the daz script IDE tab

    if you search for the 2 lines that read 

    "exe Files (*.exe)" 

    you replace this with

    "Any File" 

    and the mac will now let you click on the denoiser oidnDenoise

    Right on, thank you. I changed the lines in the script (used TextEdit), will check it when my current renders are done (or after I sleep).

    Post edited by Son of the Raven on
  • Son of the RavenSon of the Raven Posts: 119
    edited January 2021

    mCasual said:

    ok i found the solution

    in the script, which you can open in a notepad or in the daz script IDE tab

    if you search for the 2 lines that read 

    "exe Files (*.exe)" 

    you replace this with

    "Any File" 

    and the mac will now let you click on the denoiser oidnDenoise

    That worked to let me select the binaries, but I'm getting the message "Could not start the process" when clicking on Apply/Create Output Image. The binaries selected are "magick" and "oidnDenoise"

    Post edited by Son of the Raven on
  • mCasualmCasual Posts: 4,607

     i'll see if i can fix this

    Son of the Raven said:

    mCasual said:

    ok i found the solution

    in the script, which you can open in a notepad or in the daz script IDE tab

    if you search for the 2 lines that read 

    "exe Files (*.exe)" 

    you replace this with

    "Any File" 

    and the mac will now let you click on the denoiser oidnDenoise

    That worked to let me select the binaries, but I'm getting the message "Could not start the process" when clicking on Apply/Create Output Image. The binaries selected are "magick" and "oidnDenoise"

Sign In or Register to comment.