AttributeError: 'int' object has no attribute 'decimal'
dhalnon opened this issue · 4 comments
I'm getting this output and error both when I try to run your code on my local machine and when I try to run your online demo.
RAW images are taken with a Galaxy S22+
DR=dr-limule-docker-gpu
Non-zero exit code (1): Parameters:
Upscaling factor: 2
Super-resolution with 25 images.
Robustness: enabled
-------------------------
t: 0.12
s1: 2.00
s2: 12.00
Mt: 0.80
Robustness denoising: enabled
Alignment:
-------------------------
ICA Iterations: 3
Fusion:
-------------------------
Kernel shape: handheld
k_stretch: 4.00
k_shrink: 2.00
k_detail: SNR based
k_denoise: SNR based
Processing with handheld super-resolution
Traceback (most recent call last):
File "/workdir/bin//demo.py", line 185, in
handheld_output, debug_dict = process(args.impath, options, params)
File "/workdir/bin/handheld_super_resolution/super_resolution.py", line 360, in process
black_levels = np.array([int(x.decimal()) for x in black_levels.values])
File "/workdir/bin/handheld_super_resolution/super_resolution.py", line 360, in
black_levels = np.array([int(x.decimal()) for x in black_levels.values])
AttributeError: 'int' object has no attribute 'decimal'
Hello, I may have fixed the issue with the last commit: it had something to do the metada format which was slightly different from what we used during testing. The online demo has been updated too.
Please let me know is similar issues are persisting
Running it again and it results in this error:
DR=dr-limule-docker-gpu
Non-zero exit code (1): Parameters:
Upscaling factor: 2
Super-resolution with 25 images.
Robustness: enabled
-------------------------
t: 0.12
s1: 2.00
s2: 12.00
Mt: 0.80
Robustness denoising: enabled
Alignment:
-------------------------
ICA Iterations: 3
Fusion:
-------------------------
Kernel shape: handheld
k_stretch: 4.00
k_shrink: 2.00
k_detail: SNR based
k_denoise: SNR based
Processing with handheld super-resolution
Traceback (most recent call last):
File "/workdir/bin//demo.py", line 185, in
handheld_output, debug_dict = process(args.impath, options, params)
File "/workdir/bin/handheld_super_resolution/super_resolution.py", line 370, in process
ISO = int(str(tags['Image ISOSpeedRatings']))
KeyError: 'Image ISOSpeedRatings'
When I print the list of tags it tells me that the EXIF tag for the ISOSpeedRatings is EXIF ISOSpeedRatings
not Image ISOSpeedRatings
After fixing that with a workaround (simply replacing Image with EXIF in that tag) and running it again I get this error:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\USER\\Handheld-Multi-Frame-Super-Resolution\\data\\noise_model_std_ISO_125.npy'
My workaround for this is to simply change line 370 of super_resolution.py from
ISO = max(100, ISO)
to
ISO = max(200, ISO)
After this I run into a CUDA support error as I don't have access to a machine with an NVIDIA GPU at the moment
Thank you for the feedback, I have updated the code so that the ISO can be read more consistently. It should also now be rounded when reading the noise curve, so this type of error should not happen.
Online demo runs successfully, now with good results