Code Monkey home page Code Monkey logo

lapsrn-tensorflow's People

Contributors

richardxiong avatar zjuela avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

lapsrn-tensorflow's Issues

Question on wrong results

Hello, zjuela.

First of all I really appreciate your source code.
Now I'm running this code on my computer (window10 64bit) by just modifying some parameters which should be changed in order to operate on the latest library version.
However, there is a problem as shown in the attached image.
This image is a 2x scaled image as an output of the code.
I couldn't find the reason why the image has wrong result data.
Did you experienced this problem before? or Do you have any idea to solve this problem?

test_out

test question

hello,zjuela. I want to test data (sample data)just,but when I test once,model will train once.
please tell me how to test and train separately, do I need to modify part of code?
i am looking forward to your reply.thanks very much.

train error

When i train the code,I meet an error like this:

Traceback (most recent call last):
File "main.py", line 210, in
tl.global_flag['mode'] = args.mode
File "main.py", line 124, in train

File "main.py", line 37, in load_file_list
ss=r'D:/CY/Super-resolution/LapSRN-tensorflow-master'
NameError: name 'os' is not defined

So how can i do to run your code correctly?

One channel pictures

Hi, thanks for your code. I wonder if the code can be used to deal with gray pictures with only Y channel.

some scaling problems

I would like to ask you some questions: I used some data sets of depth map to train the model, but the program kept making mistakes: could not broadcast input array from shape(256,253,3) (or other dimensions) into shape(256,256,3), how should I modify the code? Looking forward to your reply

SR Video

Thank you for your code. I have read your thesis, saying that you can perform real-time super-resolution on the video. How do you implement this part?

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe1 in position 0: ordinal not in range(128)?

I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:01:00.0)
Traceback (most recent call last):
File "/home/stephen/tf_3.6/lib/python3.6/site-packages/numpy/lib/format.py", line 640, in read_array
array = pickle.load(fp, **pickle_kwargs)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe1 in position 0: ordinal not in range(128)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 212, in
train()
File "main.py", line 123, in train
tl.files.load_and_assign_npz(sess=sess, name=checkpoint_dir+'/params_{}.npz'.format(tl.global_flag['mode']), network=net_image2)
File "/home/stephen/test/LapSRN-tensorflow/tensorlayer/files.py", line 722, in load_and_assign_npz
params = load_npz(name=name)
File "/home/stephen/test/LapSRN-tensorflow/tensorlayer/files.py", line 634, in load_npz
return d['params']
File "/home/stephen/tf_3.6/lib/python3.6/site-packages/numpy/lib/npyio.py", line 233, in getitem
pickle_kwargs=self.pickle_kwargs)
File "/home/stephen/tf_3.6/lib/python3.6/site-packages/numpy/lib/format.py", line 646, in read_array
"to numpy.load" % (err,))
UnicodeError: Unpickling a python object failed: UnicodeDecodeError('ascii', b'\xe1\x1e\x99=%!U\xbd(}%=\xc0\x15R\xbdp\xb8\xb2\xbd\xc4I\xa3\xbc8\x87\x99\xbd\xf4\xd1t=k\x04Q;a\x8f\x06\xbd\xc5\xbc\xbf=\x1b\x8e\x8f\xbd\x08\xb1'\xbb8\xbf=\xbd\x95=W=$I\x80;\xd1\x8f\x9f=\xd5'\xe6\xbc|Si\xbc?\x8b\xc1\xbc\x008\xfb=}\x85\xf5<\xf5\x0b:\xbc\xc4\xbe\x91\xbc\xb5\xf1\x81\xbd\xe3\xdc%\xbd75\x9a\xbbu\xdaM=?
...........................
......................
/\x98:\xbdL\xb11=\x88\xb9\xb9\xbd\x05\xa2t\xbdkF\xa7=\x03\xf2\xc9<\x02 \xc2\xbd\xf8\x88\x87\xbd\xc6>\xf0=j,\r\xbe\xa3'\xcc\xbcA\x88B;r\x83\x8a\xbc_\x86\xc6\xbc\x94\xcd\xa7<\xd1\x06N=\x10\x05\xc5=\x80R\xac=f\x89\x10\xbc\xf0NF\xbdFi\x1f=\x0f\x17t\xbck\xd9\xfd;+f\xb8=\x07\x16O=)\xcd\xbb=\xf1^0=\x08w}\xbd\xf6\x19\x83\xbd\x8d\xf4\xc7\xbc\x85ax\xbd\xad\xf1\xbc;W\x9d\x1f<\xdc\xdd\xe2<%\xb8L\xbc\xd1\x0f\x82;\x94!\x00\xbc\\xb2\x9d<'\x13\x8b;-\xcb\x98<\x8c\x10\xae<\xa4\xf4_<8\n\xe3\xbcE\x1e6=\xbe\xee\xe7\xbc\xda\xf3\xcc=^\xe0\x9e\xbc\xfe\xb5j<\x8du\x9a\xbc\xe0\xf7\xec<8\xa1'\xbd&g\xff\xbc!-\x8b=\x93\x8d\xe6\xbbzL\xbc\xbc\xb2D\x9a<t\xbel\xbd\xc0\x11F9\r\xd6\x86\xbc', 0, 1, 'ordinal not in range(128)')
You may need to pass the encoding= option to numpy.load

How should I do?

UnicodeDecodeError

Sorry,when I run the code,I got a UnicodeDecodeError

UnicodeDecodeError Traceback (most recent call last)
D:\Anaconda\lib\site-packages\numpy\lib\format.py in read_array(fp, allow_pickle, pickle_kwargs)
639 try:
--> 640 array = pickle.load(fp, **pickle_kwargs)
641 except UnicodeError as err:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe1 in position 0: ordinal not in range(128)

During handling of the above exception, another exception occurred:

UnicodeError Traceback (most recent call last)
E:\jupyterNote\图像分辨率\LapSRN-tensorflow-master\main.py in ()
210 tl.global_flag['mode'] = args.mode
211 if tl.global_flag['mode'] == 'train':
--> 212 train()
213 elif tl.global_flag['mode'] == 'test':
214 if (args.file is None):

E:\jupyterNote\图像分辨率\LapSRN-tensorflow-master\main.py in train()
121 sess = tf.Session(config=tf.ConfigProto(allow_soft_placement=True, log_device_placement=False))
122 tl.layers.initialize_global_variables(sess)
--> 123 tl.files.load_and_assign_npz(sess=sess, name=checkpoint_dir+'/params_{}.npz'.format(tl.global_flag['mode']), network=net_image2)
124
125 ###========================== PRE-LOAD DATA ===========================###

E:\jupyterNote\图像分辨率\LapSRN-tensorflow-master\tensorlayer\files.py in load_and_assign_npz(sess, name, network)
720 return False
721 else:
--> 722 params = load_npz(name=name)
723 assign_params(sess, params, network)
724 print("[*] Load {} SUCCESS!".format(name))

E:\jupyterNote\图像分辨率\LapSRN-tensorflow-master\tensorlayer\files.py in load_npz(path, name)
632 # params = val
633 # return params
--> 634 return d['params']
635 # print(d.items()[0][1]['params'])
636 # exit()

D:\Anaconda\lib\site-packages\numpy\lib\npyio.py in getitem(self, key)
231 return format.read_array(bytes,
232 allow_pickle=self.allow_pickle,
--> 233 pickle_kwargs=self.pickle_kwargs)
234 else:
235 return self.zip.read(key)

D:\Anaconda\lib\site-packages\numpy\lib\format.py in read_array(fp, allow_pickle, pickle_kwargs)
644 raise UnicodeError("Unpickling a python object failed: %r\n"
645 "You may need to pass the encoding= option "
--> 646 "to numpy.load" % (err,))
647 raise
648 else:

UnicodeError: Unpickling a python object failed: UnicodeDecodeError('ascii', b'\xe1……
I don't know how to deal with it……

About loss function

Hi,
thanks for your nice code! I want to ask a question.

###========================== DEFINE TRAIN OPS ==========================###
loss2 = compute_charbonnier_loss(net_image2.outputs, t_target_image, is_mean=True)
loss1 = compute_charbonnier_loss(net_image1.outputs, t_target_image_down, is_mean=True)
g_loss = loss1 + loss2 * 4

I don't understand why loss2 should multiply 4.
Look forward your kind reply!
Thank you!

The psnr result is terrible

Thanks for your tensorflow implement at first. But When I use the BSD100 data set to test the pre-trained model, the result is terrible, its psnr is only 24.7dB. Have you ever test the model using BSD100 ?

Loss function

I'm sorry that I don't understand the loss function in your code, it's different with paper.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.