lmb-freiburg / flownet2-docker

Dockerfile and runscripts for FlowNet 2.0 (estimation of optical flow)
https://lmb.informatik.uni-freiburg.de/Publications/2017/IMKDB17/
GNU General Public License v3.0
158 stars 52 forks source link

os.system error #19

Closed YoungJ-Baek closed 4 years ago

YoungJ-Baek commented 4 years ago

I'm trying to use os.system( ) to use FlowNet and convertion together by running one .py file. However there is a problem

this command works for me ( compare 2 images) os.system("bash run-network.sh -n FlowNet2-c -v data/0000000-imgL.png data/0000001-imgL.png flow.flo")

but another command doesn't work for me ( multiple comparison ) os.system("run-network.sh -n FlowNet2-s -g 0 -vv data/flow-first-images.txt data/flow-second-images.txt data/flow-outputs.txt")

after running that command, I get

Using GPU: 0 Running network: FlowNet2 Working dir: /flownet2/flownet2/scripts First input: data/flow-first-images.txt Second input: data/flow-second-images.txt Output: data/flow-outputs.txt /flownet2/flownet2/scripts Done!

However there's no result files. Also there's no log command while running. How can I solve this problem?

nikolausmayer commented 4 years ago

The second command should put its output files into the data/ subfolder. Did you check there? If this does not work, try changing some of the options (-n FlowNet2-s vs -n FlowNet2-c etc).

YoungJ-Baek commented 4 years ago

I check all but still don't work But it's strange because when I type same command in terminal directly, it works while it doesn't work when I use os.system() Hmm..I'll check other options.

nikolausmayer commented 4 years ago

Could it be because of the bash in your first run? I do not know which shell os.system uses by default. If I did not write the runscript to be properly portable (as may well be the case), using another shell may just not work.

YoungJ-Baek commented 4 years ago

Thank you for comment! I couldn't solve the problem but I decide to run the command in terminal, not by python file. Thank you again and your program is helping my project hugely