yu4u / noise2noise

An unofficial and partial Keras implementation of "Noise2Noise: Learning Image Restoration without Clean Data"
MIT License
1.07k stars 237 forks source link

StreamExecutor device (0): <undefined>, <undefined> : cannot connect to X server #33

Open YangSN0719 opened 5 years ago

YangSN0719 commented 5 years ago

First of all, thank you very much for your contributionI'm sorry to bother youWhen I run the test, I encountered the following troubles. I sincerely hope that you can help me. Thank you very much! QQ截图20190403190700

YangSN0719 commented 5 years ago

@yu4u (n2n) [410@mu01 n2n2]$ python test_model.py --weight_file clean/weights.001-109.759-28.05869.hdf5 --image_dir dataset/Set14 /home/410/anaconda3/lib/python3.6/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters Using TensorFlow backend. WARNING:tensorflow:From /home/410/anaconda3/lib/python3.6/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. 2019-04-03 18:57:29.385352: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 2019-04-03 18:57:29.394111: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2095014999 Hz 2019-04-03 18:57:29.395846: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x2b90ea0637c0 executing computations on platform Host. Devices: 2019-04-03 18:57:29.396044: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (0): , : cannot connect to X server 112.38.217.89:10.0

yu4u commented 5 years ago

Please use --output_dir option to output results images or run the script on a local PC instead of running on a server.

YangSN0719 commented 5 years ago

Your source test results are up and running, and the model is up and running. Thank you very much for your contribution.Thanks for your help. I have a question right now @yu4u I only have a polluted picture here, I want to use your source code to directly test whether it can be repaired, but I have not found a way to input your source code to go, in this request for your help, thank you very much!

yu4u commented 5 years ago

If you want to perform denoising to already noisy images, use --test_noise_model clean.

As described in readme.

YangSN0719 commented 5 years ago

I have tried the following input,but there is no output,so I would like to consult you, thank you for your reply @yu4u python3 test_model.py --weight_file model/weights.047-2.317-24.30238_impulse_noise.hdf5 --image_dir teat_img/baby.png --test_noise_model clean --output_dir img/

YangSN0719 commented 5 years ago

QQ截图20190409145057

yu4u commented 5 years ago

image_dir should be directory.

YangSN0719 commented 5 years ago

Thank you for your reply @yu4u Thank you for your help. I have successfully run it. But I still have some questions to ask you. Because my photo is badly damaged, I cannot tell which type of noise it is. Adopting your pretrain model doesn't seem to work. Should I train with more of these images and try to see if it works?

YangSN0719 commented 5 years ago

If I type the following command, is it correct? python3 train.py --image_dir dataset/mydata --test_dir dataset/mytes --image_size 128 --batch_size 8 --lr 0.001 --source_noise_model clean --target_noise_model clean --val_noise_model clean --loss l0 --output_path mymodel

yu4u commented 5 years ago

Might correct.

I cannot tell which type of noise it is

But, it would not work. This repository aims at reproducing noise2noise training, and not trying to remove various types of noises. For general purpose, you might be able to find other more appropriate repository.

yu4u commented 5 years ago

Please read original paper about the restrictions of noise2noise approach.

Anisha007 commented 4 years ago

image_dir should be directory.

It would be great if you be more specific. What exactly causes this error and how can we solve it if we are deploying from the server? thanks in advance @yu4u

yu4u commented 4 years ago

--image_dir should be directory that contains test images.