yeah - pip can be nasty. Apparently it resolved to install numpy 2.4 but opencv needs <2.3.
Hence, you may be fine by just installing that. pip install --force-reinstall "numpy==2.2.6"
Yeah, looks like dependency issues. I could probably relax the requirements in the toml to make that easier as well.
Yeah, I’d really like to do without torch. ONNX might come in the future to avoid that, but it adds other complexities…
Ok, that’s great! So pidng failed, but the new version worked on windows? Excellent!
…it was about 24 MB…the DNG was 48Mb
Hmm, it’s probably not saving it as the CFA option, which should have roughly the same size as the original file.
Dang, I’ve only tested in Debian based OSes (particularly Ubuntu)
Unless I missed it from the copy to the terminal. I thought I copied and just edited the source file. I just did the one image as proof that it was working. I will try it out on a couple more…
Hi all, the CLI now has a test feature to blend in lumi and chroma noise as suggested by @jandren.
rawforge TreeNetDenoiseSuperLight test.CR2 test_lumi_0p5_chroma_0p0.dng --lumi 0.5 --chroma 0.0
Comparison of original noisy image and output at 100% magnification (I wonder if any of can guess the origin of the raw image haha)
So I’ve played a little more with your impressive implementation @RawRefinery and stumbled over the --cfa option.
Do I understand it correctly, that using the --cfa switch creates a Bayer-like pixel representation in the dng? I assume so, because
- size of the denoised
dngwithout--cfa=> 120MB, using--cfa=> 40MB - without
--cfathe picture is not recognized as a RAW by the demosaic module in darktable, thus this module is not activated. - when using
--cfa, the demosaic module is activated and capture sharpening can be used on top to provide even more sharpness, which is amazing.
I’m indeed already deeply impressed by the output of the TreeNetDenoiseSuperLight model. After seeing results from the TreeNetDenoiseHeavy model, I’m even more impressed
and adding capture sharpening, it even pushes me towards being overwhelmed ![]()
Still some questions on my side:
- what do I have to do to get the EXIF data of the original written to the output? Currently after denoising finished, I always get the message “Could not safe EXIF”…
- the original RAW size is 20MB (it’s an ARW), why is the
--cfaoutput still double sized?
And a Happy New Year to all of you being already “on the other side of the year” ![]()
Much thanks, and I’m glad you like it!
Yes, the CFA option saves it back as a bayer array. In most cases, there is no noticeable difference, you just get a much smaller file! This is not well documented at the moment however.
capture sharpening
Ah, did you use the deepsharpen or deblur model? What did you think? They are very early in development, but I like to use the deep sharpen after denoising to add some contrast back in.
- EXIF is a work in progress. Frankly my implementation of EXIF is very fragile at the moment, and if any tag fails, it just quits out. Maybe a short term solution would be to use exiftool to copy the exif from the original to the new image. I think something like this would work:
exiftool -TagsFromFile source_image.ARW destination_image.dng
- I…don’t know. That’s unexpected. Do you know if you are using the pidng or tifffile version? Do you know the bit depth of the original ARW?
Thanks for your instant reply ![]()
Works & thanks a lot
Would it be feasible to integrate such step in your code after dng creation completed, i.e. to add everything that was given in the source?
Huh - I unfortunately cannot answer this, but perhaps @hannoschwalm who implemented Ingo Weyrich’s capture sharpening algorithm in the darktable denoise module…
I assume that I’m using the pidng version (I installed it via pip install rawforge). The ARW RAW file has 12bits/sample according to exiftool.
Works & thanks a lot
Glad that works! It should be possible to implement, but I’m hesitant to include another external dependency to manage right now, but I’m sure we could write a simple bash script to automate it into one command.
I assume that I’m using the pidng version (I installed it via
pip install rawforge). TheARWRAW file has 12bits/sample according toexiftool.
Ah, that might explain it. The output dng saved as a 16 bit raw image. It should also be possible to save it back as a 12 bit raw to save space.
I guess it would be easier to switch to a different exif library. There is exiv2, which has python bindings and can read a lot more formats. Only drawback is, that the data structure looks a bit different. I commented that already here: ISO not recognized on CR3 files · Issue #20 · rymuelle/RawRefinery · GitHub
That looks promising. I like that they include libexiv2 in the wheel. I’ll test it out. I’m currently working on just that, as well as testing ONNX runtimes.
More python dependencies issues on macOS here.
When I run pip install rawforge I get the following:
ERROR: Cannot install rawforge and rawhandler==0.0.3 because these package versions have conflicting dependencies.
The conflict is caused by:
rawhandler 0.0.3 depends on rawpy>=0.24.0
rawhandler 0.0.2 depends on rawpy>=0.24.0
Additionally, some packages in these conflicts have no matching distributions available for your environment:
rawpy
i.e., rawhandler depends on rawpy, which is nowhere to be found. How did folks solve this?
Using a python 3.14 venv on Tahoe.
There are apparently MacOS binaries on pypi but not sure if they work for your Mac… Interesting that pip does not try to build it from source - perhaps you don’t have the -dev stuff installed. Maybe that’s the only option though…
I would try python 3.12 or 3.13. I’m not sure if rawpy supports 3.14 yet.
Thanks, that did it ![]()
Really looking forward to try this out if it ever gets an AppImage or Flatpak. As soon as i see “Python” or “pip” my mind melts and immediately goes xkcd. ![]()
In the meantime, you are welcome to join me in bashing our heads with containerization, I’m currently trying to find out why compiling Arch Linux results in an image that lacks pacman or any package manager entirely. I think I’ll have to find a fix for some 50 things before I end up actually creating a system stable enough to download & run RawRefinery on:D
Let me recommend Aurora if you want to get things done. Homebrew and Flatpak are the package managers and they are definitely not missing after installation. ![]()
