ankurhanda / gvnn

gvnn: Geometric Vision with Neural Networks
445 stars 71 forks source link

How to install the package #3

Closed amiltonwong closed 8 years ago

amiltonwong commented 8 years ago

Hi, @ankurhanda ,

I issue the command: "luarocks make gvnn-scm-1.rockspec" , but nothing has happened.

Is the package ready to be installed?

THX~

ankurhanda commented 8 years ago

seems to work on my machine. What does it do on yours? Can you elaborate? BTW, I'm still uploading the coding slowly...

amiltonwong commented 8 years ago

Hi, @ankurhanda ,

The following is the output after command "luarocks make gvnn-scm-1.rockspec"

root@milton-OptiPlex-9010:~/gvnn# luarocks make gvnn-scm-1.rockspec

Error: File not found: gvnn-scm-1.rockspec

And I search through the package "gvnn", no file named "gvnn-scm-1.rockspec" was found.

Is the rockspec file compulsory?

(PS. The torch package was installed successfully before as guided from http://torch.ch/docs/getting-started.html)

ankurhanda commented 8 years ago

pushed now

amiltonwong commented 8 years ago

Hi, @ankurhanda ,

Thanks!, the updated repository can be installed without error.

Now , I try some command such as require 'gvnn', but came across the following error:

th> require 'gvnn'
/root/torch/install/share/lua/5.1/trepl/init.lua:384: cannot open /root/torch/install/share/lua/5.1/gvnn/TransformationRotationSO3.lua: No such file or directory
stack traceback:
    [C]: in function 'error'
    /root/torch/install/share/lua/5.1/trepl/init.lua:384: in function 'require'
    [string "_RESULT={require 'gvnn'}"]:1: in main chunk
    [C]: in function 'xpcall'
    /root/torch/install/share/lua/5.1/trepl/init.lua:651: in function 'repl'
    /root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main chunk
    [C]: at 0x00406670  
                                                                      [2.9741s]
th> 

And I search through the package "gvnn", no file named "TransformationRotationSO3.lua" was found. It seems that file is missing~

ankurhanda commented 8 years ago

added! Try reinstalling it. Sorry, I'm still in the process of adding files and putting together the whole library.

amiltonwong commented 8 years ago
th> require 'gvnn'
/root/torch/install/share/lua/5.1/trepl/init.lua:384: cannot open /root/torch/install/share/lua/5.1/gvnn/TransformationMatrix3x4GeneratorQuat.lua: No such file or directory
stack traceback:
    [C]: in function 'error'
    /root/torch/install/share/lua/5.1/trepl/init.lua:384: in function 'require'
    [string "_RESULT={require 'gvnn'}"]:1: in main chunk
    [C]: in function 'xpcall'
    /root/torch/install/share/lua/5.1/trepl/init.lua:651: in function 'repl'
    /root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main chunk
    [C]: at 0x00406670  
                                                                      [1.3466s]
th>

The file "TransformationMatrix3x4GeneratorQuat.lua" is missing.

Maybe I'll wait some time for you to upload the entire library. Keep calm and carry on ~

ankurhanda commented 8 years ago

I've deleted that from the init.lua so you should be able to now reinstall and let me know if any of the other files are missing. do git pull and luarocks make gvnn-scm-1.rockspec

amiltonwong commented 8 years ago

Here is the new error:

th> require 'gvnn'
/root/torch/install/share/lua/5.1/trepl/init.lua:384: /root/torch/install/share/lua/5.1/trepl/init.lua:384: /root/torch/install/share/lua/5.1/luarocks/loader.lua:117: error loading module 'libgvnn' from file '/root/torch/install/lib/lua/5.1/libgvnn.so':
    /root/torch/install/lib/lua/5.1/libgvnn.so: undefined symbol: luaopen_libgvnn
stack traceback:
    [C]: in function 'error'
    /root/torch/install/share/lua/5.1/trepl/init.lua:384: in function 'require'
    [string "_RESULT={require 'gvnn'}"]:1: in main chunk
    [C]: in function 'xpcall'
    /root/torch/install/share/lua/5.1/trepl/init.lua:651: in function 'repl'
    /root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main chunk
    [C]: at 0x00406670  
                                                                      [1.4744s]
th> 
ankurhanda commented 8 years ago

git pull and reinstall -- it should work now.

amiltonwong commented 8 years ago

It works now. Thanks @ankurhanda

amiltonwong commented 8 years ago

Hi, @ankurhanda ,

I git clone the updated version and start to install it.

It seems the file "Huber.cu" is missing ...

root@milton-OptiPlex-9010:~/new-gvnn/gvnn# luarocks make gvnn-scm-1.rockspec
cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/root/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/root/torch/install/lib/luarocks/rocks/gvnn/scm-1" && make

-- Found Torch7 in /root/torch/install
-- Compiling with OpenMP support
-- Configuring done
-- Generating done
-- Build files have been written to: /root/new-gvnn/gvnn/build
[ 25%] Building NVCC (Device) object CMakeFiles/cugvnn.dir/cugvnn_generated_init.cu.o
/root/new-gvnn/gvnn/init.cu:7:20: fatal error: Huber.cu: No such file or directory
 #include "Huber.cu"
                    ^
compilation terminated.
CMake Error at cugvnn_generated_init.cu.o.Release.cmake:207 (message):
  Error generating
  /root/new-gvnn/gvnn/build/CMakeFiles/cugvnn.dir//./cugvnn_generated_init.cu.o

make[2]: *** [CMakeFiles/cugvnn.dir/cugvnn_generated_init.cu.o] Error 1
make[1]: *** [CMakeFiles/cugvnn.dir/all] Error 2
make: *** [all] Error 2

Error: Build error: Failed building.
root@milton-OptiPlex-9010:~/new-gvnn/gvnn#
ankurhanda commented 8 years ago

sorry :) just comment it out from init.cu - I will add it soon. Also, curious to know what are you trying to implement with this library :)

ankurhanda commented 8 years ago

I just updated the repo - you should be able to pull and compile again

amiltonwong commented 8 years ago

Thanks @ankurhanda , it compiles smoothly now. Here, I'd like to test it for comparison with conventional geometric approach. One more question, would it be possible to integrate with conventional SfM/SLAM framework? I'm concerned about the bridging interface between lua output with existing C++ / python / matlab framework.

ankurhanda commented 8 years ago

Not sure if it can beat pure geometric approach but it can help the standard SLAM/sfM approach to be a lot more robust e.g. able to match features across images taken at different times of the day which isn't possible with standard sfm/SLAM