Steffenhir / GraXpert

GraXpert is an astronomical image processing program for extracting and removing gradients from the background of your astrophotos.
https://www.graxpert.com/
GNU General Public License v3.0
167 stars 22 forks source link

Denoise Image fails consistently (and quickly) - Win10, 3.0.2 #184

Closed RedLionNJ closed 3 months ago

RedLionNJ commented 3 months ago

I have been unable to get Denoise Image to complete successfully. I've tried several versions and multiple denoise AI models. Shortly after initiating DeNoise Image, I am presented with a dialog box (Windows 10) prompting me to check the GraXpert log. The relevant part of the log appears to be:

2024-08-06 12:31:06,442 MainProcess root INFO Starting denoising 2024-08-06 12:31:06,443 MainProcess root INFO mapping batch_size of 3 to 2 2024-08-06 12:31:11,899 MainProcess root INFO Available inference providers : ['CPUExecutionProvider'] 2024-08-06 12:31:11,899 MainProcess root INFO Used inference providers : ['CPUExecutionProvider'] 2024-08-06 12:31:11,907 MainProcess root ERROR [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Got invalid dimensions for input: gen_input_image for the following indices index: 3 Got: 4 Expected: 3 Please fix either the inputs/outputs or the model. Traceback (most recent call last): File "D:\a\GraXpert\GraXpert\graxpert\application\app.py", line 350, in on_denoise_request File "D:\a\GraXpert\GraXpert\graxpert\denoising.py", line 118, in denoise File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 220, in run onnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Got invalid dimensions for input: gen_input_image for the following indices index: 3 Got: 4 Expected: 3 Please fix either the inputs/outputs or the model.

Obviously this works for other users. I have tweaked nothing to produce the log above. This is a fresh install of 3.0.2.

Thank you

RedLionNJ commented 3 months ago

If it's any help, the input RGB PNG was the output from Siril.

schmelly commented 3 months ago

Hi @RedLionNJ,

in GraXpert we currently only support .png images having three channels, i.e., without an alpha channel.

My general advice would be: as long as you work with linear data do your processing in 32-bit .fits format. After stretching I recommend 16-bit fits or, to work with tools like Photoshop, 16-bit .tif. If you want to stick with .png for now, you would have to remove the alpha channel first before importing into GraXpert.

Best regards David

RedLionNJ commented 3 months ago

Aha! Thank you, David. Now that part of the log (3 vs 4) makes sense to me.

Much appreciated.