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

module 'libcustn' not found:No LuaRocks module found for libcustn #7

Closed
LAccordeur opened this issue Jun 29, 2018 · 8 comments
Closed

Comments

@LAccordeur
Copy link

Hi, I am running your demo code but I meet this error.
module 'libcustn' not found:No LuaRocks module found for libcustn
I tried to use luarocks install libcustn. It dosen't work. What is libcustn and how to install it? Please help me.

@anchen1011
Copy link
Owner

anchen1011 commented Jul 9, 2018

It's the CUDA library for bilinear sampling, from this repository:

https://github.com/qassemoquab/stnbhwd

You can install it like this:

cd toflow/src/stnbhwd
luarocks make

Please let us know if it doesn't work!

Thanks!

@LAccordeur
Copy link
Author

LAccordeur commented Jul 10, 2018

When I installed it, it installed successfully, but I can't find the lib named 'libcustn' and meet the following info. The error above still exists
`-- Found Torch7 in /data/guo/torch/install
-- Compiling with OpenMP support
-- Could NOT find CUDA (missing: CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (found suitable version "8.0", minimum required is "5.5")
-- Configuring done
-- Generating done
-- Build files have been written to: /data/guo/toflow-master/src/stnbhwd/build
[100%] Built target stn

@anchen1011
Copy link
Owner

Let me try to help you on this.

Would you like to give me your system configuration? Are you using CUDA / GPU or not?
Could you run require 'stn' by itself and see whether it works?

Make sure you run everything with flag -nocuda if you are not using CUDA/GPU.
For example th demo.lua -mode interp -inpath ../data/example/low_frame_rate -nocuda

@LAccordeur
Copy link
Author

I run require 'stn' and th demo.lua -mode interp -inpath ../data/example/low_frame_rate -nocuda, but they all throw out the same error.
/data/guo/torch/install/share/lua/5.1/trepl/init.lua:389: /data/guo/torch/install/share/lua/5.1/trepl/init.lua:389: module 'libcustn' not found:No LuaRocks module found for libcustn no field package.preload['libcustn'] no file '/root/.luarocks/share/lua/5.1/libcustn.lua' no file '/root/.luarocks/share/lua/5.1/libcustn/init.lua' no file '/data/guo/torch/install/share/lua/5.1/libcustn.lua' no file '/data/guo/torch/install/share/lua/5.1/libcustn/init.lua' no file '/data/ivenhyxu/stereo_match_dl/distro/install/share/lua/5.1/libcustn.lua' no file '/data/ivenhyxu/stereo_match_dl/distro/install/share/lua/5.1/libcustn/init.lua' no file './libcustn.lua' no file '/data/ivenhyxu/stereo_match_dl/distro/install/share/luajit-2.1.0-beta1/libcustn.lua' no file '/usr/local/share/lua/5.1/libcustn.lua' no file '/usr/local/share/lua/5.1/libcustn/init.lua' no file '/root/.luarocks/lib/lua/5.1/libcustn.so' no file '/data/guo/torch/install/lib/lua/5.1/libcustn.so' no file '/data/guo/torch/install/lib/libcustn.so' no file '/data/ivenhyxu/stereo_match_dl/distro/install/lib/libcustn.so' no file '/data/ivenhyxu/stereo_match_dl/distro/install/lib/lua/5.1/libcustn.so' no file './libcustn.so' no file '/usr/local/lib/lua/5.1/libcustn.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'error' /data/guo/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require' [string "_RESULT={require 'stn'}"]:1: in main chunk [C]: in function 'xpcall' /data/guo/torch/install/share/lua/5.1/trepl/init.lua:661: in function 'repl' ...rguo/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:204: in main chunk [C]: at 0x004064f0

Yes, I am using GPU.
The version of CUDA is 8.0.61
And the version of cudnn is 6.0.21

@LAccordeur
Copy link
Author

LAccordeur commented Jul 16, 2018

I tried this algorithm in another machine which system is Ubuntu with nocuda mode (This machine is no GPU and The system of the machine used before is CentOS ). It worked and the result was awesome, but it corrupted when I test deblock mode with my own picture(resolution:540x960 format:png). Are there some limits to the picture format?
==> initializing... input sequence: ../data/example/block result stored in: ../demo_output ==> loading... /home/guoyang/torch/install/bin/luajit: ./main/loader.lua:45: attempt to index local 'inputpath' (a nil value) stack traceback: ./main/loader.lua:45: in function 'get_file' demo.lua:75: in main chunk [C]: in function 'dofile' ...yang/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x00406670

@anchen1011
Copy link
Owner

Thanks!

We have only tested our project on Ubuntu, so we currently will not be able to help with problems on CentOS.

For the deblock problem, would you like to send us the command u execute and the file structure (specifically the location of the input image)? It looks more like a missing file error.

@LAccordeur
Copy link
Author

The command I used was one of your examples.
th demo.lua -mode deblock -nocuda -inpath ../data/example/block
I just replaced the pictures in the input directory.
When I added the number of pictures to 7, this error hadn't happen. In the function 'gen_path' of the file 'loader.lua', I find the value of the parameter 'num' is 7, is this the cause of this problem?

@anchen1011
Copy link
Owner

Yes! Our algorithm works with sequences of 7 frames in deblock task.

I will first close this issue (one issue per problem), feel free to open another issue if you need further help!

Thanks for your interest in your project!

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

2 participants