Skip to content

Cannot import custom features #5

Closed

Description

@meder411

Using the pre-built Windows binary, I am unable to load my custom features into the project. Regardless of the path entered, it gives a "Path is a not a directory" error on pressing "Extract." However, if I switch between the 'extract' and 'import' tabs and then try to press the "Extract" button, it begins to run, but then colmap stops responding and shuts down.

My images are in a dataset_root/images folder (e.g. dataset_root/images/_MG_9859.JPG).
My features are 4096 dimensional and formatted according to the documentation (x y scale orientation dim_1 ...dim_4096) and located in dataset_root/features (e.g. dataset_root/images/_MG_9859.JPG.txt).

colmap

Activity

  1. ahojnnes commented on Apr 30, 2016

    @ahojnnes
    Contributor

    Hi Marc,

    Thanks for the report. The feature import is fixed now, but you would have to recompile yourself for now.

    At this point, COLMAP only supports 128-dimensional features, since the matching is based on SiftGPU. To use 4096-dimensional features, do the matching yourself and write the inlier_matches to the database manually. Should be relatively easy to do. Let me know if you need help.

    Cheers, Johannes

  2. meder411 commented on Apr 30, 2016

    @meder411
    Author

    Hey Johannes,

    Sounds good. Thanks for the quick repair. I was looking through the 'base' directory source code but couldn't find where it was restricted. Either way, I too figured that writing directly to the DB might circumvent the issue and am working on that now.

    Thanks again!

    Marc

    On Apr 30, 2016, at 5:59 AM, Johannes Schönberger [email protected] wrote:

    Hi Marc,

    Thanks for the report. The feature import is fixed now, but you would have to recompile yourself for now.

    At this point, COLMAP only supports 128-dimensional features, since the matching is based on SiftGPU. To use 4096-dimensional features, do the matching yourself and write the inlier_matches to the database manually. Should be relatively easy to do. Let me know if you need help.

    Cheers, Johannes

    —
    You are receiving this because you authored the thread.
    Reply to this email directly or view it on GitHub

  3. ahojnnes commented on May 1, 2016

    @ahojnnes
    Contributor

    That requirement is imposed by SiftGPU, see base/feature.h and base/feature_matching.h. A CPU matcher could solve the problem, but for any non-standard feature type, it's not clear what distance metric to use anyway. So, it will be hard to generalize for features other than SURF/SIFT or binary features. I suggest to simply write to inlier_matches in the database.

  4. meder411 commented on May 1, 2016

    @meder411
    Author

    That's what I thought. It might be worth adding functionality for users to provide their own matching function as well. Basically just have a user provide a function handle. This way people can use Colmap for evaluating different metrics for SfM. Perhaps for version 2.0...?

    On May 1, 2016, at 4:22 AM, Johannes Schönberger [email protected] wrote:

    That requirement is imposed by SiftGPU, see base/feature.h and base/feature_matching.h. A CPU matcher could solve the problem, but for any non-standard feature type, it's not clear what distance metric to use anyway. So, it will be hard to generalize for features other than SURF/SIFT or binary features. I suggest to simply write to inlier_matches in the database.

    —
    You are receiving this because you authored the thread.
    Reply to this email directly or view it on GitHub

  5. ahojnnes commented on May 8, 2016

    @ahojnnes
    Contributor

    Hi Marc, if you need this feature and want to contribute, I am happy to accept a PR. Otherwise, I'll be closing this issue as fixed for now. Feel free to reopen if you disagree :-)
    Cheers, Johannes

  6. MarcelloAgostini commented on Jul 12, 2018

    @MarcelloAgostini

    Hello Marc and Johannes,
    I'm also interested in importing my own matching points. I'm making a comparison between different feature extraction/matching algorithms, show how the SFM results can differ using SIFT, SURF and others from Opencv.
    How did you manage to write the inlier_matches in the database? My matching points are structured as the following example.

    matching_points

    Points with same id can be visible in multiple images, x and y are pixel coordinates.
    Is it somehow feasible to fill in the database with these points and run the SFM?

    Cheers, Marcello

  7. MarcelloAgostini commented on Jul 17, 2018

    @MarcelloAgostini

    Anyone having any suggests?

  8. ahojnnes commented on Jul 17, 2018

    @ahojnnes
    Contributor

    @MarcelloAgostini Please have a look here for an example on how to write matches to the database: https://github.com/colmap/colmap/blob/dev/scripts/python/database.py#L196 - other than that, there is also the matches_importer command, which allows you to import raw or inlier matches.

  9. MarcelloAgostini commented on Jul 20, 2018

    @MarcelloAgostini

    Thanks Johannes, I'll try these solutions.

  10. zhoux121 commented on Oct 28, 2021

    @zhoux121

    Hi,
    Sorry for reopening this issue again. I plan to switch SIFTGPU feature extraction to ASIFT feature extraction instead of importing custom features to the database. However, I am not sure where to start it. :-(

  11. BrianG13 commented on May 28, 2022

    @BrianG13

    @MarcelloAgostini Did u wrote any code to add the matches like you have?

    Sorry for raising an old issue, but I am looking for a piece of code that adds manually the 2d keypoints matches between images.
    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions