Closed ahmedbilal closed 5 years ago
run-network.sh
, try changing nvidia-docker run
into docker run --runtime=nvidia
docker run --runtime=nvidia -it flownet2 /bin/bash
, does the file /usr/local/cuda/lib64/libcudart.so.8.0
exist?Strange. The file exists but is not found?
Hm, here's one more idea: after source set-env.sh;
in the run-network.sh
script, add export LD_LIBRARY_PATH=/usr/local/cuda/lib64/$LD_LIBRARY_PATH;
If this does not work, I'm not sure what to do. It could be that Ubuntu 18.10 is not officially supported by nvidia-docker..
I should note that the Docker image works fine on my system:
It says "./run-network.sh: 165: ./run-network.sh: LD_LIBRARY_PATH: parameter not set"
I tried removing the $LD_LIBRARY_PATH. Now, it is saying ImportError: libGL.so.1: cannot open shared object file: No such file or directory
After adding
"export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:/usr/lib/x86_64-linux-gnu/mesa/:/usr/local/nvidia/lib:/usr/local/nvidia/lib64/;"
next to set-env.sh;
It proceed. But, now I am getting "Check failed: error == cudaSuccess (35 vs. 0) CUDA driver version is insufficient for CUDA runtime version"
Ok. That's definitely an issue either with your local nvidia driver, or with nvidia-docker... AFAIK CUDA 8 requires a driver >= 367.4.
At last, with your help I am able to run it. It creates .flo files successfully. I used the following
if test $VERBOSITY -ge 2; then
nvidia-docker run \
--rm \
--volume "${PWD}:/input-output:rw" \
--workdir "${WORKDIR}" \
-it "$CONTAINER" /bin/bash -c "cd ..; source set-env.sh; ldconfig ; export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:/usr/lib/x86_64-linux-gnu/mesa/:/usr/local/nvidia/lib:/usr/local/nvidia/lib64/; cd -; python run-flownet-docker.py --verbose --gpu ${GPU_IDX} ${WEIGHTS} ${DEPLOYPROTO} ${FIRST_INPUT} ${SECOND_INPUT} ${OUTPUT}"
else
nvidia-docker run \
--rm \
--volume "${PWD}:/input-output:rw" \
--workdir "${WORKDIR}" \
-it "$CONTAINER" /bin/bash -c "cd ..; source set-env.sh; ldconfig ; export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:/usr/lib/x86_64-linux-gnu/mesa/:/usr/local/nvidia/lib:/usr/local/nvidia/lib64/; cd -; python run-flownet-docker.py --gpu ${GPU_IDX} ${WEIGHTS} ${DEPLOYPROTO} ${FIRST_INPUT} ${SECOND_INPUT} ${OUTPUT}"
> /dev/null;
fi
Notice the ldconfig and export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:/usr/lib/x86_64-linux-gnu/mesa/:/usr/local/nvidia/lib:/usr/local/nvidia/lib64/.
The last thing is that I was expecting output would be some image but it is unreadable by image viewer. How can I convert these .flo files to images?
Thanks.
Nice! The outputs are floating-point flow fields which is far too niche to be understood by normal image viewers. You can convert them to colorful images with the help of the Middlebury group's code: http://vision.middlebury.edu/flow/data/ (search for "flow-code" or "flow-code-matlab").
@nikolausmayer Thanks. But, flow-code isn't taking .flo as command line argument. Its README also doesn't specifies how to pass the name of .flo file.
@nikolausmayer Thank you very much for helping. I can be able to generate the image using the following command
./color_flow 10 0000000-flow.flo out.png
@nikolausmayer The last thing I want to ask why it has wired result when run on these two frames. (My guess is that there is some issue in these frames)
What network did you use to process that image pair? This image pair contains mostly zero and some small motions. This is a good candidate for "FlowNet2-SD" which specializes in small flows.
Earlier I used Flownet2-s. But, now I used FlowNet2-SD as you suggested and It is pretty good. Thanks again.
ran successfully. It created two images flownet2 and nvidia/cuda. But, when i try to run
or
It says ImportError: libcudart.so.8.0: cannot open shared object file: No such file or directory.
Specification Distribution: Ubuntu 18.10 (PopOS) CPU: Intel i7-3840QM GPU: Nvidia Quadro k2000m (Dedicated 2GB) RAM: 8 GB