Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem about training #74

Closed
wangzhenglai opened this issue Oct 16, 2017 · 28 comments
Closed

problem about training #74

wangzhenglai opened this issue Oct 16, 2017 · 28 comments
Assignees

Comments

@wangzhenglai
Copy link

Hi,if I want to train flownet2 using my data sets, which should I prepare for? I do not know how to create .pfm files。

@nikolausmayer
Copy link
Contributor

Hi,
the "convert_imageset_and_flow" tool (which is made when compiling our Caffe) can also deal with .flo files.

Nikolaus

@wangzhenglai
Copy link
Author

OK,I mean that I want to train this using my dataset,and i found that yours training data has flow files and there are .pfm files in flow files. I want to know which method you use or if i can use any flow method to create this files.

@nikolausmayer
Copy link
Contributor

.pfm is a standard format, although hardly any applications seems to support it (http://netpbm.sourceforge.net/doc/pfm.html). You can use any method you want to create these files. I recommend the CImg library (http://cimg.eu/) which has native .pfm support.

Our flow files are three-layer .pfm files. The first layer contains x flow, the second layer contains y flow. The third layer is ignored (we fill it with zeroes).

@wangzhenglai
Copy link
Author

so can we use .flo files to train models ,or must .pfm files?

@nikolausmayer
Copy link
Contributor

If you use our conversion script to create the training databases, it does not matter. The script will handle both .pfm and .flo files.

@wangzhenglai
Copy link
Author

OK, I use a method create these files.But a new issue produced. I could not use make-lmdbs.sh.
I change it like this :
../build/tools/convert_imageset_and_flow.bin our_train.list our_lmdb 0 lmdb
I have produced our_train.list , and the error :
make-lmdbs.sh: line 9: ../build/tools/convert_imageset_and_flow.bin: Permission denied

@nikolausmayer
Copy link
Contributor

Did you run make tools?

@wangzhenglai
Copy link
Author

yes, I run make -j 5 all tools pycaffe , and I run again ,now show that nothing to do

@nikolausmayer
Copy link
Contributor

Hm, at least the executable exists then. Perhaps the permissions are wrong? If you cd into the ./data folder, what's the output of ls -la ../build/tools/convert_imageset_and_flow*?

@wangzhenglai
Copy link
Author

output is -rw------- 1

@wangzhenglai
Copy link
Author

ok,I can use it.
make-lmdbs.sh: ../build/tools/convert_imageset_and_flow.bin /opt/flownet2/data/our_train.list our_lmdb 0 lmdb
and my list like this : our/train/flow/00001_flow.flo our/train/t0/00001_img0.jpg our/train/t1/00001_img1.jpg
but error happened:F1102 11:08:44.170768 5101 convert_imageset_and_flow.cpp:378] Check failed: mkdir(argv[arg_offset+2], 0744) == 0 (-1 vs. 0) mkdir our_lmdbfailed

@nikolausmayer
Copy link
Contributor

Ok, mkdir our_lmdb failed. Do you have write permissions for the base folder? If the subfolder our_lmdb already exists, you might have to delete it (mkdir returns 1 if the target exists).

@wangzhenglai
Copy link
Author

OK,thanks. I make lmdb successfullly.
And when training the net.
Unknown bottom blob 'img0_a_org' (layer 'crop_params', bottom index 0)
Is this means the name of top of data layer error?

@nikolausmayer
Copy link
Contributor

That is an open issue at #12, and unrelated to the rest of this current issue. Please refer to #12.

@wangzhenglai
Copy link
Author

ok,I found that the net_train.prototxt.template of FlowNet2 and FlowNet2-c are different.In the FlowNet2-c, the net_train.prototxt.template do not have crop_params layer and bottom named img0_a_org.When I train my data using FlowNet2-c,the error like this : Check failed: mdb_cursor_get(mdb_cursor_, &mdb_key_, &mdb_value_, MDB_FIRST) == 0 (-30798 vs. 0) mdb_cursor_get failed

@wangzhenglai
Copy link
Author

I saw the #12 . He said he used train.prototxt.template to run FlowNet2 , and it is false. But I used used train.prototxt.template to train FlowNet2 .

@nikolausmayer
Copy link
Contributor

Is the mdb_cursor_get error related to the missing img0_a_org? Could it be a lmdb version issue?

About #12: Yes, but it's the same issue. We used a dataset mix in the final stages of FlowNet2 training, but the release code does not include this functionality.

@wangzhenglai
Copy link
Author

OK,i had solve the problem .but when I try training net then ,error like this : Check failed: top_shape[j] == bottom[i]->shape(j) (20 vs. 40) All inputs must have the same shape, except at concat_axis.

@wangzhenglai
Copy link
Author

OK i can training it

@wangzhenglai
Copy link
Author

hello, when I use runflownet.py , i can get a .flo file but there are some error : IOError: [Errno 2] No such file or directory: 'predict_flow_final'.is this file missing? I can not find it,

@nikolausmayer
Copy link
Contributor

Can you post the command that produces this error?

@wangzhenglai
Copy link
Author

commod:python run-flownet.py /opt/flownet2/models/FlowNet2-c/flow_iter_500000.caffemodel
/opt/flownet2/models/FlowNet2-c/FlowNet2-c_deploy.prototxt.template
/opt/flownet2/test/FlyingChairs_examples/0000008-img0.ppm /opt/flownet2/test/FlyingChairs_examples/0000008-img1.ppm /opt/flownet2/test/8.flo
and result:
Succeeded.
Traceback (most recent call last):
File "run-flownet.py", line 142, in
readFlow(name)
File "run-flownet.py", line 119, in readFlow
f = open(name, 'rb')
IOError: [Errno 2] No such file or directory: 'predict_flow_final'

@nikolausmayer
Copy link
Contributor

Your run-flownet.py seems to be different from the master version. We never call the readFlow function in which this error is raised. Can you attach your version of the script?

@wangzhenglai
Copy link
Author

I download my flownet from github,you can see https://github.com/lmb-freiburg/flownet2/blob/master/scripts/run-flownet.py ,line 100

@nikolausmayer
Copy link
Contributor

Yes, readFlow is defined; but that function is not actually called within the script... so no runtime error can occur within that function. But in your script readFlow must be called somewhere, with the argument "predict_flow_final".

@wangzhenglai
Copy link
Author

thanks, I update my code ,and succeed

@TusharNimbhorkar
Copy link

@wangzhenglai How did you solve Unknown bottom blob 'img0_a_org' (layer 'crop_params', bottom index 0) error in Flownet-2

@nikolausmayer nikolausmayer self-assigned this May 8, 2018
@vivasvan1
Copy link

@wangzhenglai How did you solve Unknown bottom blob 'img0_a_org' (layer 'crop_params', bottom index 0) error in Flownet-2

i am having the same issue ... how to fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants