hellloxiaotian / brdnet Goto Github PK
View Code? Open in Web Editor NEWImage denoising using deep CNN with batch renormalization(Neural Networks,2020)
Home Page: https://www.sciencedirect.com/science/article/pii/S0893608019302394
Image denoising using deep CNN with batch renormalization(Neural Networks,2020)
Home Page: https://www.sciencedirect.com/science/article/pii/S0893608019302394
Thank you for your code.
I just found a small problem.The Readme says requiring keras 2.0, but in keras 2.0 there is no Subtract and the code could not run on my device.
I change keras to 2.1.0 and make some small changes then the code worked, I suggest the requirements should be changed.
田教授您好,请问您训练真实噪声图像的代码链接是这个吗?http://www.yongxu.org/lunwen.html,这个网站显示已经被拦截。可否将代码分享至百度网盘?
Hi, helloxiaotian,
It is more question or suggestion rather than a bug:
Did you try your net with Mish activation function (https://github.com/digantamisra98/Mish)?
As per paper and repo- it is better than Relu.
Another question:
which tf version are you using?
I am struggling with batch_renorm - I can not make it work with tf2.0
Cheers,
senovr
Hello,
I got this error after executing the code,
Thank you for your help.
Exception has occurred: ValueError
in user code:
D:\Python37\lib\site-packages\tensorflow\python\keras\engine\training.py:806 train_function *
return step_function(self, iterator)
e:\BRDNet\BRDNet12_2\BRDNet12\grayimage\batch_renorm.py:180 call *
self.add_update([K.update(self.r_max, r_val),
D:\Python37\lib\site-packages\tensorflow\python\keras\backend.py:959 variable **
constraint=constraint)
D:\Python37\lib\site-packages\tensorflow\python\ops\variables.py:262 call
return cls._variable_v2_call(*args, **kwargs)
D:\Python37\lib\site-packages\tensorflow\python\ops\variables.py:256 _variable_v2_call
shape=shape)
D:\Python37\lib\site-packages\tensorflow\python\ops\variables.py:67 getter
return captured_getter(captured_previous, **kwargs)
D:\Python37\lib\site-packages\tensorflow\python\distribute\distribute_lib.py:2857 creator
return next_creator(**kwargs)
D:\Python37\lib\site-packages\tensorflow\python\ops\variables.py:67 getter
return captured_getter(captured_previous, **kwargs)
D:\Python37\lib\site-packages\tensorflow\python\distribute\distribute_lib.py:2857 creator
return next_creator(**kwargs)
D:\Python37\lib\site-packages\tensorflow\python\ops\variables.py:67 getter
return captured_getter(captured_previous, **kwargs)
D:\Python37\lib\site-packages\tensorflow\python\distribute\distribute_lib.py:2857 creator
return next_creator(**kwargs)
D:\Python37\lib\site-packages\tensorflow\python\ops\variables.py:67 getter
return captured_getter(captured_previous, **kwargs)
D:\Python37\lib\site-packages\tensorflow\python\eager\def_function.py:702 invalid_creator_scope
"tf.function-decorated function tried to create "
ValueError: tf.function-decorated function tried to create variables on non-first call.
File "E:\BRDNet\BRDNet12_2\BRDNet12\grayimage\mainimprovement.py", line 130, in train
callbacks=[ckpt, csv_logger, lr])
File "E:\BRDNet\BRDNet12_2\BRDNet12\grayimage\mainimprovement.py", line 187, in
model = train()
hi i am tring to run your code in pycharm but there is many error as you use ubuntu so kindly tell me is this working on window and if yes then in which software we have to use it
parser.add_argument('--model', default='BRDNet', type=str, help='choose a type of model')
in this line can we change method from change BRDNet to DnCNN[60]?or any other method that you give the value in result
您好, x 是脏图片, 标答是干净图片,训练完了,psnr30, 但是图片并没有去噪效果,请问这是什么问题呢。
TypeError: add_weight() got multiple values for argument 'name'
this is about the version of tensorflow or keras?
in grayimage/mainimprovement.py , the following error occurs..
get_batch_y = get_batch_y.astype('float32')/255.0
ValueError: setting an array element with a sequence.
I tried printing out 'get_batch_y' and found that its getting only the batch size and no other information.
get_batch_y.shape = (20,)
type(get_batch_y) = np.array
Do you know any possible solution for these problems?
Hello!I have test the BRDnet on provided test set, I found that the BRDnet add the noise on the clear image based the on a fixed sigma and then remove the noise, it works really well. However, if I want to remove the noise of a daily image that I don't know its noise sigma, what should I do with BRDnet?
I try to set the --sigma = 0 and try the model of different levels, and the test results are much worse than the results on the given-sigma-noise image. I think that this network is not practical if it could only work on the given-sigma-noise images.
Thanks anyway
hello sir , could you tell me where you used cuda used in your programme or cuda is just requirment of system to run the code and if it is so then tell me can this programme run on gpu ?
真实噪声图像训练数据集和训练代码呢?
您好 您分享的real noisy images denosing code 又失效了 请问能否再提供一个新的链接 非常感谢!
I've tried test mainimprovementcolor.py
but in line 158 I got this error:
tracking <tf.Variable 'batch_renormalization_2/batch_renormalization_2_r_max:0' shape=(1,) dtype=float32> r_max
tracking <tf.Variable 'batch_renormalization_2/batch_renormalization_2_d_max:0' shape=(1,) dtype=float32> d_max
tracking <tf.Variable 'batch_renormalization_2/batch_renormalization_2_t:0' shape=(1,) dtype=float32> t
tracking <tf.Variable 'batch_renormalization_3/batch_renormalization_3_r_max:0' shape=(1,) dtype=float32> r_max
tracking <tf.Variable 'batch_renormalization_3/batch_renormalization_3_d_max:0' shape=(1,) dtype=float32> d_max
tracking <tf.Variable 'batch_renormalization_3/batch_renormalization_3_t:0' shape=(1,) dtype=float32> t
tracking <tf.Variable 'batch_renormalization_4/batch_renormalization_4_r_max:0' shape=(1,) dtype=float32> r_max
tracking <tf.Variable 'batch_renormalization_4/batch_renormalization_4_d_max:0' shape=(1,) dtype=float32> d_max
tracking <tf.Variable 'batch_renormalization_4/batch_renormalization_4_t:0' shape=(1,) dtype=float32> t
tracking <tf.Variable 'batch_renormalization_5/batch_renormalization_5_r_max:0' shape=(1,) dtype=float32> r_max
tracking <tf.Variable 'batch_renormalization_5/batch_renormalization_5_d_max:0' shape=(1,) dtype=float32> d_max
tracking <tf.Variable 'batch_renormalization_5/batch_renormalization_5_t:0' shape=(1,) dtype=float32> t
tracking <tf.Variable 'batch_renormalization_17/batch_renormalization_17_r_max:0' shape=(1,) dtype=float32> r_max
tracking <tf.Variable 'batch_renormalization_17/batch_renormalization_17_d_max:0' shape=(1,) dtype=float32> d_max
tracking <tf.Variable 'batch_renormalization_17/batch_renormalization_17_t:0' shape=(1,) dtype=float32> t
tracking <tf.Variable 'batch_renormalization_6/batch_renormalization_6_r_max:0' shape=(1,) dtype=float32> r_max
tracking <tf.Variable 'batch_renormalization_6/batch_renormalization_6_d_max:0' shape=(1,) dtype=float32> d_max
tracking <tf.Variable 'batch_renormalization_6/batch_renormalization_6_t:0' shape=(1,) dtype=float32> t
tracking <tf.Variable 'batch_renormalization_7/batch_renormalization_7_r_max:0' shape=(1,) dtype=float32> r_max
tracking <tf.Variable 'batch_renormalization_7/batch_renormalization_7_d_max:0' shape=(1,) dtype=float32> d_max
tracking <tf.Variable 'batch_renormalization_7/batch_renormalization_7_t:0' shape=(1,) dtype=float32> t
tracking <tf.Variable 'batch_renormalization_8/batch_renormalization_8_r_max:0' shape=(1,) dtype=float32> r_max
tracking <tf.Variable 'batch_renormalization_8/batch_renormalization_8_d_max:0' shape=(1,) dtype=float32> d_max
tracking <tf.Variable 'batch_renormalization_8/batch_renormalization_8_t:0' shape=(1,) dtype=float32> t
tracking <tf.Variable 'batch_renormalization_9/batch_renormalization_9_r_max:0' shape=(1,) dtype=float32> r_max
tracking <tf.Variable 'batch_renormalization_9/batch_renormalization_9_d_max:0' shape=(1,) dtype=float32> d_max
tracking <tf.Variable 'batch_renormalization_9/batch_renormalization_9_t:0' shape=(1,) dtype=float32> t
tracking <tf.Variable 'batch_renormalization_10/batch_renormalization_10_r_max:0' shape=(1,) dtype=float32> r_max
tracking <tf.Variable 'batch_renormalization_10/batch_renormalization_10_d_max:0' shape=(1,) dtype=float32> d_max
tracking <tf.Variable 'batch_renormalization_10/batch_renormalization_10_t:0' shape=(1,) dtype=float32> t
tracking <tf.Variable 'batch_renormalization_11/batch_renormalization_11_r_max:0' shape=(1,) dtype=float32> r_max
tracking <tf.Variable 'batch_renormalization_11/batch_renormalization_11_d_max:0' shape=(1,) dtype=float32> d_max
tracking <tf.Variable 'batch_renormalization_11/batch_renormalization_11_t:0' shape=(1,) dtype=float32> t
tracking <tf.Variable 'batch_renormalization_18/batch_renormalization_18_r_max:0' shape=(1,) dtype=float32> r_max
tracking <tf.Variable 'batch_renormalization_18/batch_renormalization_18_d_max:0' shape=(1,) dtype=float32> d_max
tracking <tf.Variable 'batch_renormalization_18/batch_renormalization_18_t:0' shape=(1,) dtype=float32> t
tracking <tf.Variable 'batch_renormalization_12/batch_renormalization_12_r_max:0' shape=(1,) dtype=float32> r_max
tracking <tf.Variable 'batch_renormalization_12/batch_renormalization_12_d_max:0' shape=(1,) dtype=float32> d_max
tracking <tf.Variable 'batch_renormalization_12/batch_renormalization_12_t:0' shape=(1,) dtype=float32> t
tracking <tf.Variable 'batch_renormalization_13/batch_renormalization_13_r_max:0' shape=(1,) dtype=float32> r_max
tracking <tf.Variable 'batch_renormalization_13/batch_renormalization_13_d_max:0' shape=(1,) dtype=float32> d_max
tracking <tf.Variable 'batch_renormalization_13/batch_renormalization_13_t:0' shape=(1,) dtype=float32> t
tracking <tf.Variable 'batch_renormalization_14/batch_renormalization_14_r_max:0' shape=(1,) dtype=float32> r_max
tracking <tf.Variable 'batch_renormalization_14/batch_renormalization_14_d_max:0' shape=(1,) dtype=float32> d_max
tracking <tf.Variable 'batch_renormalization_14/batch_renormalization_14_t:0' shape=(1,) dtype=float32> t
tracking <tf.Variable 'batch_renormalization_15/batch_renormalization_15_r_max:0' shape=(1,) dtype=float32> r_max
tracking <tf.Variable 'batch_renormalization_15/batch_renormalization_15_d_max:0' shape=(1,) dtype=float32> d_max
tracking <tf.Variable 'batch_renormalization_15/batch_renormalization_15_t:0' shape=(1,) dtype=float32> t
tracking <tf.Variable 'batch_renormalization_16/batch_renormalization_16_r_max:0' shape=(1,) dtype=float32> r_max
tracking <tf.Variable 'batch_renormalization_16/batch_renormalization_16_d_max:0' shape=(1,) dtype=float32> d_max
tracking <tf.Variable 'batch_renormalization_16/batch_renormalization_16_t:0' shape=(1,) dtype=float32> t
tracking <tf.Variable 'batch_renormalization_19/batch_renormalization_19_r_max:0' shape=(1,) dtype=float32> r_max
tracking <tf.Variable 'batch_renormalization_19/batch_renormalization_19_d_max:0' shape=(1,) dtype=float32> d_max
tracking <tf.Variable 'batch_renormalization_19/batch_renormalization_19_t:0' shape=(1,) dtype=float32> t
Traceback (most recent call last):
File "mainimprovementcolor.py", line 158, in <module>
model = load_model(args.pretrain, compile=False)
File "C:\Users\127051\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\saving.py", line 492, in load_wrapper
return load_function(*args, **kwargs)
File "C:\Users\127051\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\saving.py", line 584, in load_model
model = _deserialize_model(h5dict, custom_objects, compile)
File "C:\Users\127051\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\saving.py", line 334, in _deserialize_model
' elements.')
ValueError: Layer #1 (named "batch_renormalization_1" in the current model) was found to correspond to layer b'batch_renormalization_1' in the save file. However the new layer batch_renormalization_1 expects 7 weights, but the saved weights have 4 elements.
田教授,请问你们的真实噪声训练的批次epochs为多少呢?
Hi as you run your code on python 2.7 but in python 3.7 there is no mentioned version 1.3.0 so can you please specify which tensor flow versions are compatible as per your code requirement to run this code as i am facing issue in this
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.