Giter Club home page Giter Club logo

semantic_feature_points's Introduction

Semantic Feature Points

  • SuperPoint
  • GCNv2 features

Prerequisites

  • OpenCV 3

  • LibTorch

    • SuperPoint: LibTorch 1.2.0 wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.2.0.zip

    • GCNv2: LibTorch 1.10.0+cu102 (the latest)

Build

cmake -B build [-D BUILD_SP=0 -D BUILD_GCN=1] # select one
cmake --build build -j4

Run

./build/super_point
# or
./build/gcn_ftr

Algorithms

SuperPoint

Ref

GCNv2 Feature

Ref

semantic_feature_points's People

Contributors

cggos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

gatsby23

semantic_feature_points's Issues

Building error

Hi, I would like to use the work in the repository but when I compile I get
/usr/bin/ld: CMakeFiles/gcn_ftr.dir/src/main.cc.o: in function main': /home/michele/semantic_feature_points/src/main.cc:22: undefined reference to cv::imread(std::string const&, int)'
/usr/bin/ld: /home/michele/semantic_feature_points/src/main.cc:70: undefined reference to cv::imshow(std::string const&, cv::_InputArray const&)' /usr/bin/ld: CMakeFiles/gcn_ftr.dir/src/GCNextractor.cc.o: in function Mat':
/usr/local/include/opencv4/opencv2/core/mat.inl.hpp:591: undefined reference to cv::error(int, std::string const&, char const*, char const*, int)' /usr/bin/ld: /usr/local/include/opencv4/opencv2/core/mat.inl.hpp:577: undefined reference to cv::error(int, std::string const&, char const*, char const*, int)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/gcn_ftr.dir/build.make:129: gcn_ftr] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/gcn_ftr.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

Do you know why? (I'm using Opencv 4,Python 3.8 , Ubuntu 20.04, pytorch 1.12

Model load fails

Hi! and thank you for making this code available. i am building on Windows, with libtorch 2.0.0 / cuda 11.7.

The code compiles after I edit a few places, but i see a crash when loading the model you provide:

   model = make_shared<SuperPoint>();
    torch::load(model, str_model);  //crash here

The edits I made are:

auto fkpts = torch::from_blob(kpt_mat.data, {l**ong long**(keypoints.size()), 2}, torch::kFloat); //to get round a narrowing conversion error

and:

auto desc = torch::grid_sampler(mDesc, grid, 0, 0, **false**); // [1, 256, 1, n_keypoints] //to get rid of a 'invalid args' error

None of these should effect the model load though! What might be happening here?

EDIT: i see teh same crash when loading teh gcn2 model. On this line:

module = std::make_shared<torch::jit::script::Module>(torch::jit::load(net_fn));

Both of these have been tested with hardcoded and double checked model paths.

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.