sampepose / flownet2-tf

FlowNet 2.0: Evolution of Optical Flow Estimation with Deep Networks
MIT License
403 stars 195 forks source link

There was a problem in successive calling to the function that generated the optical flow #75

Open TaowzzZ opened 5 years ago

TaowzzZ commented 5 years ago

Hi.At first,thank you four your wonderful work.I want to use this project to deal with a video,I have split the video into frames,then I want to call the function of generating flow cyclically.But the follow problem has occurred,Could you please give me some advice?Thanks!

Traceback (most recent call last): File "/home/t907/PycharmProjects/flownet/main.py", line 228, in btn5func self.GenerateFlow(img1Path,img2Path,flowPath,uPath,vPath) File "/home/t907/PycharmProjects/flownet/main.py", line 244, in GenerateFlow uPath=uPath,vPath=vPath, File "/home/t907/PycharmProjects/flownet/src/net.py", line 63, in test predictions = self.model(inputs, training_schedule) File "/home/t907/PycharmProjects/flownet/src/flownet2/flownet2.py", line 22, in model net_css_predictions = self.net_css.model(inputs, training_schedule, trainable=False) File "/home/t907/PycharmProjects/flownet/src/flownet_css/flownet_css.py", line 18, in model net_cs_predictions = self.net_cs.model(inputs, training_schedule, trainable=False) File "/home/t907/PycharmProjects/flownet/src/flownet_cs/flownet_cs.py", line 18, in model net_c_predictions = self.net_c.model(inputs, training_schedule, trainable=False) File "/home/t907/PycharmProjects/flownet/src/flownet_c/flownet_c.py", line 30, in model conv_a_1 = slim.conv2d(pad(inputs['input_a'], 3), 64, 7, scope='conv1') File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 181, in func_with_args return func(*args, *current_args) File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/layers/python/layers/layers.py", line 947, in convolution outputs = layer.apply(inputs) File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/python/layers/base.py", line 492, in apply return self.call(inputs, args, **kwargs) .......

Iamanorange commented 5 years ago

Paste full error log. Or at least one line including the error.

TaowzzZ commented 5 years ago

The full log: Traceback (most recent call last): File "/home/t907/PycharmProjects/flownet/main.py", line 228, in btn5func self.GenerateFlow(img1Path,img2Path,flowPath,uPath,vPath) File "/home/t907/PycharmProjects/flownet/main.py", line 244, in GenerateFlow uPath=uPath,vPath=vPath, File "/home/t907/PycharmProjects/flownet/src/net.py", line 63, in test predictions = self.model(inputs, training_schedule) File "/home/t907/PycharmProjects/flownet/src/flownet2/flownet2.py", line 22, in model net_css_predictions = self.net_css.model(inputs, training_schedule, trainable=False) File "/home/t907/PycharmProjects/flownet/src/flownet_css/flownet_css.py", line 18, in model net_cs_predictions = self.net_cs.model(inputs, training_schedule, trainable=False) File "/home/t907/PycharmProjects/flownet/src/flownet_cs/flownet_cs.py", line 18, in model net_c_predictions = self.net_c.model(inputs, training_schedule, trainable=False) File "/home/t907/PycharmProjects/flownet/src/flownet_c/flownet_c.py", line 30, in model conv_a_1 = slim.conv2d(pad(inputs['input_a'], 3), 64, 7, scope='conv1') File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 181, in func_with_args return func(*args, current_args) File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/layers/python/layers/layers.py", line 947, in convolution outputs = layer.apply(inputs) File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/python/layers/base.py", line 492, in apply return self.call(inputs, *args, *kwargs) File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/python/layers/base.py", line 434, in call self.build(input_shapes[0]) File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/python/layers/convolutional.py", line 137, in build dtype=self.dtype) File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/python/layers/base.py", line 374, in add_variable trainable=trainable and self.trainable) File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 1065, in get_variable use_resource=use_resource, custom_getter=custom_getter) File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 962, in get_variable use_resource=use_resource, custom_getter=custom_getter) File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 360, in get_variable validate_shape=validate_shape, use_resource=use_resource) File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/layers/python/layers/layers.py", line 1370, in layer_variable_getter return _model_variable_getter(getter, args, kwargs) File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/layers/python/layers/layers.py", line 1362, in _model_variable_getter custom_getter=getter, use_resource=use_resource) File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 181, in func_with_args return func(*args, *current_args) File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 261, in model_variable use_resource=use_resource) File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 181, in func_with_args return func(args, **current_args) File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 216, in variable use_resource=use_resource) File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 352, in _true_getter use_resource=use_resource) File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/variable_scope.py", line 664, in _get_single_variable name, "".join(traceback.format_list(tb)))) ValueError: Variable FlowNet2/FlowNetCSS/FlowNetCS/FlowNetC/conv1/weights already exists, disallowed. Did you mean to set reuse=True in VarScope? Originally defined at:

File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 216, in variable use_resource=use_resource) File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 181, in func_with_args return func(*args, **current_args) File "/home/t907/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 261, in model_variable use_resource=use_resource)

Thank you!

TaowzzZ commented 5 years ago

Paste full error log. Or at least one line including the error.

Could you please give me some advice?Thank you!

zhangtongtong528 commented 5 years ago

Paste full error log. Or at least one line including the error.

Could you please give me some advice?Thank you! Hi!Have you solved it?

TaowzzZ commented 5 years ago

Paste full error log. Or at least one line including the error.

Could you please give me some advice?Thank you! Hi!Have you solved it?

Yeah,I changed a parameter,then it is Ok

TaowzzZ commented 5 years ago

Paste full error log. Or at least one line including the error.

Could you please give me some advice?Thank you! Hi!Have you solved it?

But another problem occured Code loop execution takes up a lot of memory Run for a while will crash back

zhangtongtong528 commented 5 years ago

恩我在src/flownet2/test.py中添加的一个循环,最后test.py的参数变成了文件夹路径和输出光流图路径,然后在命令行执行这个代码出现了valueerror,请问要怎么解决呢?先不考虑内存问题呢

--------------原始邮件-------------- 发件人:"wangtao "notifications@github.com; 发送时间:2019年1月21日(星期一) 晚上10:27 收件人:"sampepose/flownet2-tf" flownet2-tf@noreply.github.com; 抄送:"zhangtongtong528 "zyn@njust.edu.cn;"Comment "comment@noreply.github.com; 主题:Re: [sampepose/flownet2-tf] There was a problem in successive calling to the function that generated the optical flow (#75)

Paste full error log. Or at least one line including the error.

Could you please give me some advice?Thank you! Hi!Have you solved it?

But another problem occured Code loop execution takes up a lot of memory Run for a while will crash back

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

TaowzzZ commented 5 years ago

恩我在src/flownet2/test.py中添加的一个循环,最后test.py的参数变成了文件夹路径和输出光流图路径,然后在命令行执行这个代码出现了valueerror,请问要怎么解决呢?先不考虑内存问题呢 --------------原始邮件-------------- 发件人:"wangtao "notifications@github.com; 发送时间:2019年1月21日(星期一) 晚上10:27 收件人:"sampepose/flownet2-tf" flownet2-tf@noreply.github.com; 抄送:"zhangtongtong528 "zyn@njust.edu.cn;"Comment "comment@noreply.github.com; 主题:Re: [sampepose/flownet2-tf] There was a problem in successive calling to the function that generated the optical flow (#75) ----------------------------------- Paste full error log. Or at least one line including the error. Could you please give me some advice?Thank you! Hi!Have you solved it? But another problem occured Code loop execution takes up a lot of memory Run for a while will crash back — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

你加我QQ吧

zhangtongtong528 commented 5 years ago

嗯嗯

--------------原始邮件-------------- 发件人:"wangtao "notifications@github.com; 发送时间:2019年1月21日(星期一) 晚上10:33 收件人:"sampepose/flownet2-tf" flownet2-tf@noreply.github.com; 抄送:"zhangtongtong528 "zyn@njust.edu.cn;"Comment "comment@noreply.github.com; 主题:Re: [sampepose/flownet2-tf] There was a problem in successive calling to the function that generated the optical flow (#75)

恩我在src/flownet2/test.py中添加的一个循环,最后test.py的参数变成了文件夹路径和输出光流图路径,然后在命令行执行这个代码出现了valueerror,请问要怎么解决呢?先不考虑内存问题呢 … --------------原始邮件-------------- 发件人:"wangtao "notifications@github.com; 发送时间:2019年1月21日(星期一) 晚上10:27 收件人:"sampepose/flownet2-tf" flownet2-tf@noreply.github.com; 抄送:"zhangtongtong528 "zyn@njust.edu.cn;"Comment "comment@noreply.github.com; 主题:Re: [sampepose/flownet2-tf] There was a problem in successive calling to the function that generated the optical flow (#75) ----------------------------------- Paste full error log. Or at least one line including the error. Could you please give me some advice?Thank you! Hi!Have you solved it? But another problem occured Code loop execution takes up a lot of memory Run for a while will crash back — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

你加我QQ吧

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

Talegqz commented 4 years ago

hello, have you solved this problem? I want to test on a video, but I can not write using loop.