assafshocher / zssr Goto Github PK
View Code? Open in Web Editor NEW"Zero-Shot" Super-Resolution using Deep Internal Learning
License: Other
"Zero-Shot" Super-Resolution using Deep Internal Learning
License: Other
Since the [BlindSR; Michaeli&Irani2013] code is not released.
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
Hello Assaf,
"python run_ZSSR.py" runs perfectly but I got the below message when I was running "python run_ZSSR.py X2_GRADUAL_IDEAL_CONF". Would you please help me to debug it?
Thanks a lot.
Traceback (most recent call last):
File "run_ZSSR.py", line 79, in
main(conf_str, gpu_str)
File "run_ZSSR.py", line 73, in main
run_ZSSR_single_input.main(input_file, ground_truth_file, kernel_files_str, gpu, conf_name, res_dir)
File "/home/nnabizad/workspace/SR/ZSSR/ZSSR-master/run_ZSSR_single_input.py", line 25, in main
net.run()
File "/home/nnabizad/workspace/SR/ZSSR/ZSSR-master/ZSSR.py", line 107, in run
self.train()
File "/home/nnabizad/workspace/SR/ZSSR/ZSSR-master/ZSSR.py", line 311, in train
self.train_output = self.forward_backward_pass(self.lr_son, self.hr_father)
File "/home/nnabizad/workspace/SR/ZSSR/ZSSR-master/ZSSR.py", line 221, in forward_backward_pass
feed_dict)
File "/home/nnabizad/.conda/envs/nooshEnv35/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 877, in run
run_metadata_ptr)
File "/home/nnabizad/.conda/envs/nooshEnv35/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1100, in _run
feed_dict_tensor, options, run_metadata)
File "/home/nnabizad/.conda/envs/nooshEnv35/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1272, in _do_run
run_metadata)
File "/home/nnabizad/.conda/envs/nooshEnv35/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1291, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: transpose expects a vector of size 3. But input(1) is a vector of size 4
[[Node: gradients/layer_1_grad/Conv2DBackpropFilter-0-TransposeNHWCToNCHW-LayoutOptimizer = Transpose[T=DT_FLOAT, Tperm=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](_arg_lr_son_0_2/_3, PermConstNHWCToNCHW-LayoutOptimizer)]]
[[Node: Mean/_13 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_326_Mean", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
Run run_ZSSR.py according to your README.md file, and the result is the code already in the project, such as configs.py;imresize.py;run_ZSSR.py and so on,no pictures are generated? How is this going ?
Hello Assaf,
I am wondering if you have a pre-trained model for your method. If so, I appreciate if you point me to it.
Thanks,
N
hi,
thanks a lot for your work,I want to know if I can save the weights for the model of a single image,and load it to quickly inference it ?
Hi, thanks for making your great work available to everyone.
Is it possible to train the model with my own custom dataset ?
If so, could you kindly give me some clues on which lines of codes need to be changed to make this possible?
Thank you very much
Hi, do you have X4 configuration? I want to do x4 experiment for your work? Thanks.
Hello, i meet a problem:KeyError: 'Kernel' , i think the problem is caused by following function. I wish for your reply. Thank you very much.
def preprocess_kernels(kernels, conf):
# Load kernels if given files. if not just use the downscaling method from the configs.
# output is a list of kernel-arrays or a a list of strings indicating downscaling method.
# In case of arrays, we shift the kernels (see next function for explanation why).
# Kernel is a .mat file (MATLAB) containing a variable called 'Kernel' which is a 2-dim matrix.
if kernels is not None:
return [kernel_shift(loadmat(kernel)['Kernel'], sf)
for kernel, sf in zip(kernels, conf.scale_factors)]
else:
return [conf.downscale_method] * len(conf.scale_factors)
Hello,
Congratulations for your nice work. Just two questions.
1.) My dataset is composed of 128 x 128 images. I am wondering whether I need to change the default crop_size
from 128 to some smaller value (e.g. 64 x 64).
2.) I am not able to run the all
gpu config because I do not have xterm installed. I am running on RedHat Linux. And I am not allowed to install xterm. Hence, this line:
os.system("xterm -hold -e " + conf.python_path +
" %s/run_ZSSR_single_input.py '%s' '%s' '%s' '%s' '%s' '%s' alias python &"
% (local_dir, input_file, ground_truth_file, kernel_files_str, cur_gpu, conf_name, res_dir))
gives this error: sh: xterm: command not found
.
Can you tell me how to solve this?
Thank you.
I am using 2272271 gray scale images as test images.
no kernel loaded
kernel_files
***** 0
WARNING:tensorflow:From C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
WARNING:tensorflow:From C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\util\tf_should_use.py:193: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use tf.global_variables_initializer
instead.
2019-12-02 15:04:22.376582: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
** Start training for sf= [2.0, 2.0] **
2019-12-02 15:04:22.481045: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at conv_ops.cc:437 : Invalid argument: input must be 4-dimensional[1,128,128]
Traceback (most recent call last):
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1334, in _do_call
return fn(*args)
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1319, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1407, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: input must be 4-dimensional[1,128,128]
[[{{node layer_1}}]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "run_ZSSR.py", line 75, in
main(conf_str, gpu_str)
File "run_ZSSR.py", line 69, in main
run_ZSSR_single_input.main(input_file, ground_truth_file, kernel_files_str, gpu, conf_name, res_dir)
File "D:\Python\ZSSR-master\run_ZSSR_single_input.py", line 25, in main
net.run()
File "D:\Python\ZSSR-master\ZSSR.py", line 107, in run
self.train()
File "D:\Python\ZSSR-master\ZSSR.py", line 313, in train
self.train_output = self.forward_backward_pass(self.lr_son, self.hr_father)
File "D:\Python\ZSSR-master\ZSSR.py", line 221, in forward_backward_pass
feed_dict)
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 929, in run
run_metadata_ptr)
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1152, in _run
feed_dict_tensor, options, run_metadata)
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1328, in _do_run
run_metadata)
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1348, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: input must be 4-dimensional[1,128,128]
[[node layer_1 (defined at D:\Python\ZSSR-master\ZSSR.py:156) ]]
Caused by op 'layer_1', defined at:
File "run_ZSSR.py", line 75, in
main(conf_str, gpu_str)
File "run_ZSSR.py", line 69, in main
run_ZSSR_single_input.main(input_file, ground_truth_file, kernel_files_str, gpu, conf_name, res_dir)
File "D:\Python\ZSSR-master\run_ZSSR_single_input.py", line 24, in main
net = ZSSR.ZSSR(input_img, conf, ground_truth, kernels)
File "D:\Python\ZSSR-master\ZSSR.py", line 78, in init
self.build_network(conf)
File "D:\Python\ZSSR-master\ZSSR.py", line 156, in build_network
[1, 1, 1, 1], "SAME", name='layer_%d' % (l + 1)))
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_nn_ops.py", line 1112, in conv2d
data_format=data_format, dilations=dilations, name=name)
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 788, in _apply_op_helper
op_def=op_def)
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\util\deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 3300, in create_op
op_def=op_def)
File "C:\Users\admin\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1801, in init
self._traceback = tf_stack.extract_stack()
InvalidArgumentError (see above for traceback): input must be 4-dimensional[1,128,128]
[[node layer_1 (defined at D:\Python\ZSSR-master\ZSSR.py:156) ]]
Getting the following error when using imresize(image, scale_factor=0.5, kernel="box", antialiasing=False):
Traceback (most recent call last):
File "/home/razor27/.local/share/JetBrains/Toolbox/apps/PyCharm-P/ch-0/183.5429.31/helpers/pydev/pydevd.py", line 1741, in
main()
File "/home/razor27/.local/share/JetBrains/Toolbox/apps/PyCharm-P/ch-0/183.5429.31/helpers/pydev/pydevd.py", line 1735, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "/home/razor27/.local/share/JetBrains/Toolbox/apps/PyCharm-P/ch-0/183.5429.31/helpers/pydev/pydevd.py", line 1135, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/razor27/.local/share/JetBrains/Toolbox/apps/PyCharm-P/ch-0/183.5429.31/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/hdd/temp/image_downsample.py", line 82, in
main()
File "/hdd/temp/image_downsample.py", line 42, in main
rescaled_image = resize_func(source_img, scale)
File "/hdd/temp/zssr_imresize.py", line 43, in imresize
out_im = resize_along_dim(out_im, dim, weights, field_of_view)
File "/hdd/temp/zssr_imresize.py", line 139, in resize_along_dim
tmp_im = np.swapaxes(im, dim, 0)
File "/hdd/venv_py367_tf110/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 585, in swapaxes
return _wrapfunc(a, 'swapaxes', axis1, axis2)
File "/hdd/venv_py367_tf110/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 56, in _wrapfunc
return getattr(obj, method)(*args, **kwds)
numpy.AxisError: axis1: axis 1 is out of bounds for array of dimension 1
This appears to be due to the weights returned from the contributions() function, being one dimensional (line 39).
I'm using ubuntu 17, python 3.6.7, numpy 1.16.0, scipy 1.2.0.
The tested image is 512x512, one channel.
EDIT:
The same error occurs when using "cubic" and "linear" kernels for scale=1/3.0 (also only when antialiasing=False).
Hi, the code works fine with all 24-bit images (both jpg & png) but when I tried to run it for 8 bit images (including the boat image in set14 i.e. 'img_003_SRF_2_LR.png'), I am getting some errors.
run run_ZSSR.py
C:\ProgramData\Anaconda3\lib\site-packages\h5py_init_.py:72: UserWarning: h5py is running against HDF5 1.10.2 when it was built against 1.10.3, this may cause problems
'{0}.{1}.{2}'.format(*version.hdf5_built_version_tuple)
no kernel loaded
['C:\Users\bhara\Downloads\socher_original\ZSSR-master/test_data\img_003_SRF_2_LR_0.mat;']
***** 0
WARNING:tensorflow:From C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\util\tf_should_use.py:193: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use tf.global_variables_initializer instead.
** Start training for sf= [2.0, 2.0] **
Traceback (most recent call last):
File "C:\Users\bhara\Downloads\socher_original\ZSSR-master\run_ZSSR.py", line 75, in
main(conf_str, gpu_str)
File "C:\Users\bhara\Downloads\socher_original\ZSSR-master\run_ZSSR.py", line 69, in main
run_ZSSR_single_input.main(input_file, ground_truth_file, kernel_files_str, gpu, conf_name, res_dir)
File "C:\Users\bhara\Downloads\socher_original\ZSSR-master\run_ZSSR_single_input.py", line 25, in main
net.run()
File "C:\Users\bhara\Downloads\socher_original\ZSSR-master\ZSSR.py", line 107, in run
self.train()
File "C:\Users\bhara\Downloads\socher_original\ZSSR-master\ZSSR.py", line 311, in train
self.train_output = self.forward_backward_pass(self.lr_son, self.hr_father)
File "C:\Users\bhara\Downloads\socher_original\ZSSR-master\ZSSR.py", line 222, in forward_backward_pass
feed_dict)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 950, in run
run_metadata_ptr)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1173, in _run
feed_dict_tensor, options, run_metadata)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1350, in _do_run
run_metadata)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1370, in _do_call
raise type(e)(node_def, op, message)
InvalidArgumentError: 2 root error(s) found.
(0) Invalid argument: transpose expects a vector of size 3. But input(1) is a vector of size 4
[[{{node layer_1-0-TransposeNHWCToNCHW-LayoutOptimizer}}]]
[[add/_15]]
(1) Invalid argument: transpose expects a vector of size 3. But input(1) is a vector of size 4
[[{{node layer_1-0-TransposeNHWCToNCHW-LayoutOptimizer}}]]
0 successful operations.
0 derived errors ignored.
Just to be sure, I ran in it in the command line and got the same error messages.
Any ideas?
Thanks.
Hi! Thank you for your sharing the code first. Recently, I tried to run your code with python3.7, after some modification such as range and print functions, the code can run normally. But the results are weired, the PSNR values are far away from those results shown in the paper. I wonder that is there any tricks when I use python3.7 to run? Do I need to change the framework to python2?
BTW, I re-implemented ZSSR using Pytorch1.0, but there is about 0.4dB drop with Set14x2 from your paper and 0.2dB drop with BSD100x2 from your paper. Do you have any additional tricks to get such a high results? If so, could you please give me a hand for re-implementation?
Thank you very much!
Hi,
Thanks for sharing your fantastic work.
Can you let me know what are the software requirements to run your codes,
For example the Python version and the Pytorch version needed ?
thank you
Hi, Thank you for sharing the code.
I am running the KernelGAN + ZSSR. It seems that the ZSSR part runs on the CPU, so it is very time-consuming. How can I run it on the GPU?
The enviroment is as follows: windows 10, pytorch 1.0, python 3.6. Thanks.
Dear Assaf,
I'm using ZSSR as benchmark for my paper. Could you please provide the kernels for 4x upscaling for BSD100?
Best regards,
Andreas
In your README.md, it looks like the command for "Visualization while running (Recommended for one image, interactive mode, for debugging)" should be:
python run_ZSSR.py X2_IDEAL_WITH_PLOT_CONF
Not as it is currently
python run_ZSSR.py X2_IDEAL_ONE_JUMP_IDEAL_CONF
When I run ZSSR several times on the same image and the same estimated kernel separately from KernelGAN (I used both [k_2, k_4] gradual super-resolution and [k_4, k_4] direct x4 estimated SR), it outputs images of different quality and runs for a different amount of time each time. Have you also encountered such behavior? What can be the reason for that?
Hi,
this is a really good method. So, I try to run your code on my machine, but I fail to complete it. I want to reference your method in my paper, and want to get the results from your method. So could you help me test my image? I mean I can send you my testing image, and you can run it in your machine, and then you can send me the result back.
Hi @assafshocher ,
Thanks for your great work and fancy idea in CVPR paper. I have a question when I try to reproduce your work. As title shown, I can not get the ideal performance results as Table 1 shown, which get 37.37/0.9570 for PSNR and SSIM. But I can only get about 34.91/0.9424. Please allow me to introduce the details of my training:
scipy.misc.imresize()
(which is similar to matlab imresize I think.), then I can get the output SR images by configs.X2_GRADUAL_IDEAL_CONF and configs.X2_ONE_JUMP_IDEAL_CONF, both only get around 34dB PSNR.Hi,thanks for making your great work available to everyone.
maybe I cant comprehend this method clearly,so i‘m very puzzled :
Thank you very much If you making time from your busy schedule to answer my question。
Hi I writed a question again,about currently I run the code with python run_ZSSR.py X2_GRADUAL_IDEAL_CONF
Is this using backprojection technology?Is the output of the previous round the input of the next round?
I am reall appreciative if you could answer my question。
Thank you very very very much (^▽^)
And I fix the 's' run python run_ZSSR.py is ok .
But using the Quick usage examples that you write has error,such as python run_ZSSR.py X2_IDEAL_WITH_PLOT_CONF,
python run_ZSSR.py X2_GIVEN_KERNEL_CONF,
File "run_ZSSR.py", line 18, in main
res_dir = prepare_result_dir(conf)
File "C:\Users\15479\Desktop\ZSSR\utils.py", line 192, in prepare_result_dir
if conf.create_results_dir:
AttributeError: 'NoneType' object has no attribute 'create_results_dir'
this error comes again.
iteration: 1050 reconstruct mse: 0.0011823893 , true mse: None
sf: [2. 2.] , iteration: 1060 , loss: 0.027000174
slope: -1.1418480426072724e-08 STD: 1.9960531624398594e-08
learning rate updated: 1.0000000000000002e-06
** Done training for sf= [2.0, 2.0] **
no kernel loaded
['E:\ZSSR/set14\img_003_SRF_2_LR_0.mat;', 'E:\ZSSR/set14\img_003_SRF_2_LR_1.mat;', 'E:\ZSSR/set14\img_003_SRF_2_LR_2.mat;', 'E:\ZSSR/set14\img_003_SRF_2_LR_3.mat;', 'E:\
ZSSR/set14\img_003_SRF_2_LR_4.mat;', 'E:\ZSSR/set14\img_003_SRF_2_LR_5.mat;']
***** 0
** Start training for sf= [2.0, 2.0] **
Traceback (most recent call last):
File "D:\Anaconda3\envs\srtf\lib\site-packages\tensorflow\python\client\session.py", line 1278, in _do_call
return fn(*args)
File "D:\Anaconda3\envs\srtf\lib\site-packages\tensorflow\python\client\session.py", line 1263, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "D:\Anaconda3\envs\srtf\lib\site-packages\tensorflow\python\client\session.py", line 1350, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: input must be 4-dimensional[1,128,128]
[[Node: layer_1 = Conv2D[T=DT_FLOAT, data_format="NHWC", dilations=[1, 1, 1, 1], padding="SAME", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _
device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_lr_son_0_2, filter_0/read)]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "run_ZSSR.py", line 81, in
main(conf_str, gpu_str)
File "run_ZSSR.py", line 74, in main
run_ZSSR_single_input.main(input_file, ground_truth_file, kernel_files_str, gpu, conf_name, res_dir)
File "E:\ZSSR\run_ZSSR_single_input.py", line 25, in main
net.run()
File "E:\ZSSR\ZSSR.py", line 107, in run
self.train()
File "E:\ZSSR\ZSSR.py", line 316, in train
self.train_output = self.forward_backward_pass(self.lr_son, self.hr_father)
File "E:\ZSSR\ZSSR.py", line 221, in forward_backward_pass
feed_dict)
File "D:\Anaconda3\envs\srtf\lib\site-packages\tensorflow\python\client\session.py", line 877, in run
run_metadata_ptr)
File "D:\Anaconda3\envs\srtf\lib\site-packages\tensorflow\python\client\session.py", line 1100, in _run
feed_dict_tensor, options, run_metadata)
File "D:\Anaconda3\envs\srtf\lib\site-packages\tensorflow\python\client\session.py", line 1272, in _do_run
run_metadata)
File "D:\Anaconda3\envs\srtf\lib\site-packages\tensorflow\python\client\session.py", line 1291, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: input must be 4-dimensional[1,128,128]
[[Node: layer_1 = Conv2D[T=DT_FLOAT, data_format="NHWC", dilations=[1, 1, 1, 1], padding="SAME", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _
device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_lr_son_0_2, filter_0/read)]]
Caused by op 'layer_1', defined at:
File "run_ZSSR.py", line 81, in
main(conf_str, gpu_str)
File "run_ZSSR.py", line 74, in main
run_ZSSR_single_input.main(input_file, ground_truth_file, kernel_files_str, gpu, conf_name, res_dir)
File "E:\ZSSR\run_ZSSR_single_input.py", line 24, in main
net = ZSSR.ZSSR(input_img, conf, ground_truth, kernels)
File "E:\ZSSR\ZSSR.py", line 78, in init
self.build_network(conf)
File "E:\ZSSR\ZSSR.py", line 156, in build_network
[1, 1, 1, 1], "SAME", name='layer_%d' % (l + 1)))
File "D:\Anaconda3\envs\srtf\lib\site-packages\tensorflow\python\ops\gen_nn_ops.py", line 1042, in conv2d
data_format=data_format, dilations=dilations, name=name)
File "D:\Anaconda3\envs\srtf\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "D:\Anaconda3\envs\srtf\lib\site-packages\tensorflow\python\util\deprecation.py", line 454, in new_func
return func(*args, **kwargs)
File "D:\Anaconda3\envs\srtf\lib\site-packages\tensorflow\python\framework\ops.py", line 3155, in create_op
op_def=op_def)
File "D:\Anaconda3\envs\srtf\lib\site-packages\tensorflow\python\framework\ops.py", line 1717, in init
self._traceback = tf_stack.extract_stack()
InvalidArgumentError (see above for traceback): input must be 4-dimensional[1,128,128]
[[Node: layer_1 = Conv2D[T=DT_FLOAT, data_format="NHWC", dilations=[1, 1, 1, 1], padding="SAME", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _
device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_lr_son_0_2, filter_0/read)]]
Hi, thank you for sharing the code.
which downsampling method do you use to generate the LR image from the testing image?
Hello,
Congratulation for your nice work.
I wan to train ZSSR for medical data but the training details are not provided. Can you please provide how to train ZSSR on medical data?
hello @assafshocher, I run the code with this command on Set5
python run_ZSSR.py X2_ONE_JUMP_IDEAL_CONF 0
The LR images processing step as follow
First I used opencv convert Set5 HR images to YCbCr format, only saved Y channel of this images to calculate PSNR with SR images. Then, resized the Y channel with tool "assafshocher/Resizer", saved resized image as LR images, which are the inputs of ZSSR.
The final average PSNR of Set 5 I obtained is 35.3 much lower than 37.3
Is that my processing wrong?
Very appreciate for your help.
And I fix the 's' run python run_ZSSR.py is ok .
But using the Quick usage examples that you write has error,such as python run_ZSSR.py X2_IDEAL_WITH_PLOT_CONF,
python run_ZSSR.py X2_GIVEN_KERNEL_CONF,
File "run_ZSSR.py", line 18, in main
res_dir = prepare_result_dir(conf)
File "C:\Users\15479\Desktop\ZSSR\utils.py", line 192, in prepare_result_dir
if conf.create_results_dir:
AttributeError: 'NoneType' object has no attribute 'create_results_dir'
this error comes again.
Hi, I am wondering why 'filters.correlate' instead of 'convolution' is used in the function of 'numeric_kernel' in imresize.py. Is the kernel be filipped somewhere? In 'numeric_kernel', it is not.
I check the code, seems only png LR image support SR.
Is other format image support (eg: jpg).
Hi
Is it possible to initialize weights with your build function "build_network" or "init_sess" ?
Or i need to write full function to do so?
I want to perform fine-tunning/transfer learning
So maybe just initializing the last layer
thanks
Traceback (most recent call last):
File "C:/Users/15479/Desktop/ZSSR/run_ZSSR.py", line 75, in
main(conf_str, gpu_str)
File "C:/Users/15479/Desktop/ZSSR/run_ZSSR.py", line 18, in main
res_dir = prepare_result_dir(conf)
File "C:\Users\15479\Desktop\ZSSR\utils.py", line 192, in prepare_result_dir
if conf.create_result_dir:
AttributeError: 'Config' object has no attribute 'create_result_dir'
Process finished with exit code 1
Hi, I ran the code run_ZSSR_single_input.py
on charlie.png but the results seemed to be about the same with EDSR, this is what I ran:
python run_ZSSR_single_input.py real_example/charlie.png 0 0 0 X2_GRADUAL_IDEAL_CONF output_real
I am wondering if I misunderstood the code?
Dear assafshocher,
I have read your paper and the paper "non-parametric blind super-resolution" and I am very interested in non-parametric kernel estimation. How can I find the code of this part ? thx!
When I run the program,it always exists the problem ''no kernel loaded'', can you tell me what should I do to solve this problem,thank you very much.
Hello
could you provide the test model weights? I want to reference your method and test on my dataset, but I can not find your weights.
Hello, little new to the code. I put a sample 128x128 low-resolution image in the test_data
folder and for quick first run ran the command run run_ZSSR.py
in my spyder IDE. The code runs without any error/interruptions, but I am unable to find the scaled-up image in the results/<date_name>
folder.
Can you kindly help me with this issue? Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.