Closed YoungJ-Baek closed 4 years ago
I think the .flo
outputs should be in the root folder, not in ./data
.
You are not getting any error messages, right?
Does nvidia-smi
show any GPU usage while the docker script is running?
What is your system configuration?
when I first wrote this thread, there was no error message however after I saw your comment, I try one more time, and there's an error message
for first example
Using GPU: 0 Running network: FlowNet2 Working dir: /flownet2/flownet2/scripts First input: data/0000000-imgL.png Second input: data/0000001-imgL.png Output: flow.flo /flownet2/flownet2/scripts Network forward pass using /flownet2/flownet2/models/FlowNet2/FlowNet2_weights.caffemodel.h5. WARNING: Logging before InitGoogleLogging() is written to STDERR F0217 09:36:22.549010 9 syncedmem.cpp:56] Check failed: error == cudaSuccess (2 vs. 0) out of memory *** Check failure stack trace: *** /bin/bash: line 1: 9 Aborted (core dumped) python run-flownet-docker.py --gpu 0 /flownet2/flownet2/models/FlowNet2/FlowNet2_weights.caffemodel* /flownet2/flownet2/models/FlowNet2/FlowNet2_deploy.prototxt.template data/0000000-imgL.png data/0000001-imgL.png flow.flo
for second example
Using GPU: 1 Running network: FlowNet2-s 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 WARNING: Logging before InitGoogleLogging() is written to STDERR F0217 09:34:26.699080 11 common.cpp:166] Check failed: error == cudaSuccess (10 vs. 0) invalid device ordinal *** Check failure stack trace: *** /bin/bash: line 1: 11 Aborted (core dumped) python run-flownet-docker.py --verbose --gpu 1 /flownet2/flownet2/models/FlowNet2-s/FlowNet2-s_weights.caffemodel* /flownet2/flownet2/models/FlowNet2-s/FlowNet2-s_deploy.prototxt.template data/flow-first-images.txt data/flow-second-images.txt data/flow-outputs.txt
Also I can't see any .flo
file in the root folder if your root folder means 'flownet2-docker' folder.
I'm sorry about bringing new problem
Your first error is out of memory
, so your "GPU 0" does not have enough VRAM for the images you are trying to process. Try smaller images.
Your second error is invalid device ordinal
which suggests that "GPU 1" does not exist in your system, or that it is not a GPU that can be used by CUDA.
Thank you for your comment!
After I change the command
./run-network.sh -n FlowNet2-s -g 1 -vv data/flow-first-images.txt data/flow-second-images.txt data/flow-outputs.txt
into
./run-network.sh -n FlowNet2-s -g 0 -vv data/flow-first-images.txt data/flow-second-images.txt data/flow-outputs.txt
I can get the result.
However I still get same error on first example. I think it is caused by model difference between flownet2 and flownet2-s So I changed flownet2 to flownet2-s and it worked
P.S. I was able to convert .flo file into png file by your help on other people Thanks for these great help!
I have another question but I think it is not suitable for this topic So I close this issue and open another one.
Again, thank you for your comment
FlowNet2-s is a much smaller model than FlowNet2. It uses less memory (that's why it works on your GPU), but the results are not as good. If you want the best results, it might be worth to invest in a GPU with more VRAM :slightly_smiling_face:
Thank you for your comment! I have tried some models to test the limit of my GPU it worked well until flownet2-css but made out of memory on flownet2 so I try many things such as downsampling , resize the images, etc Resizing works well I think, and it makes flownet2 to work in some test images
now I'm happy to learn how flownet2 work in obtaining optical flow I'll do my project on better GPU env so it will be wonderful.
however, I want to know one thing about result.
in result log, there is a comment
max motion: 17.1839 motion range: u = -17.037 .. 0.510; v = -2.670 .. 1.063
which part of the code provide these information?
That sounds like an evaluation (and if it is, that's easily done in numpy), but I do not see it in my outputs. Is it printed when you execute a network?
Sorry for mistake I added some code to convert .flo file to .png file from your advice in other issue http://vision.middlebury.edu/flow/data/
In that process, there's evaluation which I mentioned.
I added that code to visualize optical flow easily.
I installed nvidia docker and entered
make
. After that, I follow your examplescommand
./run-network.sh -n FlowNet2 -v data/0000000-imgL.png data/0000001-imgL.png flow.flo
result00000-imgL.png data/0000001-imgL.png flow.flo Using GPU: 0 Running network: FlowNet2 Working dir: /flownet2/flownet2/scripts First input: data/0000000-imgL.png Second input: data/0000001-imgL.png Output: flow.flo
command
./run-network.sh -n FlowNet2-s -g 1 -vv data/flow-first-images.txt data/flow-second-images.txt data/flow-outputs.txt
resultUsing GPU: 1 Running network: FlowNet2-s Working dir: /flownet2/flownet2/scripts First input: data/flow-first-images.txt Second input: data/flow-second-images.txt Output: data/flow-outputs.txt
but I can't see any flo.flo file in data folder. I'm sorry about asking this silly question but I'm a newbie in docker. So I don't know much about it. My goal is calculating optical flow by flownet2 If I can see the results, it will help me a lot.
So how can I find my results and convert them into readable format?