Pixel-Perfect Structure-from-Motion with Featuremetric Refinement (ICCV 2021, Oral)

Overview

Pixel-Perfect Structure-from-Motion

Best student paper award @ ICCV 2021

We introduce a framework that improves the accuracy of Structure-from-Motion (SfM) and visual localization by refining keypoints, camera poses, and 3D points using the direct alignment of deep features. It is presented in our paper:

Here we provide pixsfm, a Python package that can be readily used with COLMAP and our toolbox hloc. This makes it easy to refine an existing COLMAP model or reconstruct a new dataset with state-of-the-art image matching. Our framework also improves visual localization in challenging conditions.

The refinement is composed of 2 steps:

  1. Keypoint adjustment: before SfM, jointly refine all 2D keypoints that are matched together.
  2. Bundle adjustment: after SfM, refine 3D points and camera poses.

In each step, we optimize the consistency of dense deep features over multiple views by minimizing a featuremetric cost. These features are extracted beforehand from the images using a pre-trained CNN.

With pixsfm, you can:

  • reconstruct and refine a scene using hloc, from scratch or with given camera poses
  • localize and refine new query images using hloc
  • run the keypoint or bundle adjustments on a COLMAP database or 3D model
  • evaluate the refinement with new dense or sparse features on the ETH3D dataset

Our implementation scales to large scenes by carefully managing the memory and leveraging parallelism and SIMD vectorization when possible.

Installation

pixsfm requires Python >=3.6 and COLMAP installed from source at the latest commit. The core optimization is implemented in C++ with Ceres but we provide Python bindings with high granularity. The code is written for UNIX and has not been tested on Windows. The remaining dependencies are listed in requirements.txt and include PyTorch >=1.7 and pycolmap built from source:

# install COLMAP following colmap.github.io/install.html#build-from-source
sudo apt-get install libhdf5-dev
git clone https://github.com/cvg/pixel-perfect-sfm --recursive
cd pixel-perfect-sfm
pip install -r requirements.txt

To use other local features besides SIFT via COLMAP, we also require hloc:

git clone --recursive https://github.com/cvg/Hierarchical-Localization/
cd Hierarchical-Localization/
pip install -e .

Finally build and install the pixsfm package:

pip install -e .  # install pixsfm in develop mode

We highly recommend to use pixsfm with a working GPU for the dense feature extraction. All other steps can only run on the CPU. Having issues with compilation errors or runtime crashes? Want to use the codebase as a C++ library? Check our FAQ.

Tutorial

The Jupyter notebook demo.ipynb demonstrates a minimal usage example. It shows how to run Structure-from-Motion and the refinement, how to align and compare different 3D models, and how to localize and refine additional query images.


Visualizing mapping and localization results in the demo.

Structure-from-Motion

End-to-end SfM with hloc

Given keypoints and matches computed with hloc and stored in HDF5 files, we can run Pixel-Perfect SfM from a Python script:

from pixsfm.refine_hloc import PixSfM
refiner = PixSfM()
model, debug_outputs = refiner.reconstruction(
    path_to_working_directory,
    path_to_image_dir,
    path_to_list_of_image_pairs,
    path_to_keypoints.h5,
    path_to_matches.h5,
)
# model is a pycolmap.Reconstruction 3D model

or from the command line:

python -m pixsfm.refine_hloc reconstructor \
    --sfm_dir path_to_working_directory \
    --image_dir path_to_image_dir \
    --pairs_path path_to_list_of_image_pairs \
    --features_path path_to_keypoints.h5 \
    --matches_path path_to_matches.h5

Note that:

  • The final refined 3D model is written to path_to_working_directory in either case.
  • Dense features are automatically extracted (on GPU when available) using a pre-trained CNN, S2DNet by default.
  • The result debug_outputs contains the dense features and optimization statistics.

Configurations

We have fine-grained control over all hyperparameters via OmegaConf configurations, which have sensible default values defined in PixSfM.default_conf. See Detailed configuration for a description of the main configuration entries and their defaults.

[Click to see some examples]

For example, dense features are stored in memory by default. If we reconstruct a large scene or have limited RAM, we should instead write them to a cache file that is loaded on-demand. With the Python API, we can pass a configuration update:

refiner = PixSfM(conf={"dense_features": {"use_cache": True}})

or equivalently with the command line using a dotlist:

python -m pixsfm.refine_hloc reconstructor [...] dense_features.use_cache=true

We also provide ready-to-use configuration templates in pixsfm/configs/ covering the main use cases. For example, pixsfm/configs/low_memory.yaml reduces the memory consumption to scale to large scene and can be used as follow:

refiner = PixSfM(conf="low_memory")
# or
python -m pixsfm.refine_hloc reconstructor [...] --config low_memory

Triangulation from known camera poses

[Click to expand]

If camera poses are available, we can simply triangulate a 3D point cloud from an existing reference COLMAP model with:

model, _ = refiner.triangulation(..., path_to_reference_model, ...)

or

python -m pixsfm.refine_hloc triangulator [...] \
    --reference_sfm_model path_to_reference_model

By default, camera poses and intrinsics are optimized by the bundle adjustment. To keep them fixed, we can simply overwrite the corresponding options as:

conf = {"BA": {"optimizer": {
    "refine_focal_length": False,
    "refine_extra_params": False,  # distortion parameters
    "refine_extrinsics": False,    # camera poses
}}}
refiner = PixSfM(conf=conf)
refiner.triangulation(...)

or equivalently

python -m pixsfm.refine_hloc triangulator [...] \
  'BA.optimizer={refine_focal_length: false, refine_extra_params: false, refine_extrinsics: false}'

Keypoint adjustment

The first step of the refinement is the keypoint adjustment (KA). It refines the keypoints from tentative matches only, before SfM. Here we show how to run this step separately.

[Click to expand]

To refine keypoints stored in an hloc HDF5 feature file:

from pixsfm.refine_hloc import PixSfM
refiner = PixSfM()
keypoints, _, _ = refiner.refine_keypoints(
    path_to_output_keypoints.h5,
    path_to_input_keypoints.h5,
    path_to_list_of_image_pairs,
    path_to_matches.h5,
    path_to_image_dir,
)

To refine keypoints stored in a COLMAP database:

from pixsfm.refine_colmap import PixSfM
refiner = PixSfM()
keypoints, _, _ = refiner.refine_keypoints_from_db(
    path_to_output_database,  # pass path_to_input_database for in-place refinement
    path_to_input_database,
    path_to_image_dir,
)

In either case, there is an equivalent command line interface.

Bundle adjustment

The second contribution of the refinement is the bundle adjustment (BA). Here we show how to run it separately to refine an existing COLMAP 3D model.

[Click to expand]

To refine a 3D model stored on file:

from pixsfm.refine_colmap import PixSfM
refiner = PixSfM()
model, _, _, = refiner.refine_reconstruction(
    path_to_input_model,
    path_to_output_model,
    path_to_image_dir,
)

Using the command line interface:

python -m pixsfm.refine_colmap bundle_adjuster \
    --input_path path_to_input_model \
    --output_path path_to_output_model \
    --image_dir path_to_image_dir

Visual localization

When estimating the camera pose of a single image, we can also run the keypoint and bundle adjustments before and after PnP+RANSAC. This requires reference features attached to each observation of the reference model. They can be computed in several ways.

[Click to learn how to localize a single image]
  1. To recompute the references from scratch, pass the path to the reference images:
from pixsfm.localization import QueryLocalizer
localizer = QueryLocalizer(
    reference_model,  # pycolmap.Reconstruction 3D model
    image_dir=path_to_reference_image_dir,
    dense_features=cache_path,  # optional: cache to file for later reuse
)
pose_dict = localizer.localize(
    pnp_points2D      # keypoints with valid 3D correspondence (N, 2)
    pnp_point3D_ids,  # IDs of corresponding 3D points in the reconstruction
    query_camera,     # pycolmap.Camera
    image_path=path_to_query_image,
)
if pose_dict["success"]:
    # quaternion and translation of the query, from world to camera
    qvec, tvec = pose_dict["qvec"], pose_dict["tvec"]

The default localization configuration can be accessed with QueryLocalizer.default_conf.

  1. Alternatively, if dense reference features have already been computed during the pixel-perfect SfM, it is more efficient to reuse them:
refiner = PixSfM()
model, outputs = refiner.reconstruction(...)
features = outputs["feature_manager"]
# or load the features manually
features = pixsfm.extract.load_features_from_cache(
    refiner.resolve_cache_path(output_dir=path_to_output_sfm)
)
localizer = QueryLocalizer(
    reference_model,  # pycolmap.Reconstruction 3D model
    dense_features=features,
)

We can also batch-localize multiple queries equivalently to hloc.localize_sfm:

pixsfm.localize.main(
    dense_features,  # FeatureManager or path to cache file
    reference_model,  # pycolmap.Reconstruction 3D model
    path_to_query_list,
    path_to_image_dir,
    path_to_image_pairs,
    path_to_keypoints,
    path_to_matches,
    path_to_output_results,
    config=config,  # optional dict
)

Example: mapping and localization

We now show how to run the featuremetric pipeline on the Aachen Day-Night v1.1 dataset. First, download the dataset by following the instructions described here. Then run python examples/sfm+loc_aachen.py, which will perform mapping and localization with SuperPoint+SuperGlue. As the scene is large, with over 7k images, we cache the dense feature patches and therefore require about 350GB of free disk space. Expect the sparse feature matching to take a few hours on a recent GPU. We also show in examples/refine_sift_aachen.py how to start from an existing COLMAP database.

Evaluation

We can evaluate the accuracy of the pixel-perfect SfM and of camera pose estimation on the ETH3D dataset. Refer to the paper for more details.

First, we download the dataset with python -m pixsfm.eval.eth3d.download, by default to ./datasets/ETH3D/.

3D triangulation

[Click to expand]

We first need to install the ETH3D multi-view evaluation tool:

sudo apt install libpcl-dev  # linux only
git clone [email protected]:ETH3D/multi-view-evaluation.git
cd multi-view-evaluation && mkdir build && cd build
cmake .. && make -j

We can then evaluate the accuracy of the sparse 3D point cloud triangulated with Pixel-Perfect SfM, for example on the courtyard scene with SuperPoint keypoints:

python -m pixsfm.eval.eth3d.triangulation \
    --scenes courtyard \
    --methods superpoint \
    --tag pixsfm
  • omit --scenes and --methods to run all scenes with all feature detectors.
  • the results are written to ./outputs/ETH3D/ by default
  • use --tag some_run_name to distinguish different runs
  • add --config norefine to turn off any refinement or use the dotlist KA.apply=false BA.apply=false
  • add --config photometric to run the photometric BA (no KA)

To aggregate the results and compare different runs, for example with and without refinement, we run:

python -m pixsfm.eval.eth3d.plot_triangulation \
    --scenes courtyard \
    --methods superpoint \
    --tags pixsfm raw

Running on all scenes and all detectors should yield the following results (±1%):

----scene---- -keypoints- -tag-- -accuracy @ X cm- completeness @ X cm
                                  1.0   2.0   5.0   1.0   2.0   5.0 
----------------------------------------------------------------------
indoor        sift        raw    75.95 85.50 92.88  0.21  0.88  3.65
                          pixsfm 83.16 89.94 94.94  0.25  0.96  3.77
              superpoint  raw    78.96 87.77 94.55  0.64  2.36  9.39
                          pixsfm 89.93 94.09 97.04  0.76  2.62  9.85
              r2d2        raw    67.91 80.25 90.45  0.55  2.12  8.85
                          pixsfm 81.09 87.78 93.41  0.67  2.32  9.04
----------------------------------------------------------------------
outdoor       sift        raw    57.70 72.90 86.41  0.06  0.34  2.46
                          pixsfm 68.10 80.57 91.59  0.08  0.42  2.75
              superpoint  raw    53.63 68.93 83.27  0.11  0.64  4.43
                          pixsfm 71.83 82.65 92.06  0.18  0.89  5.40
              r2d2        raw    49.33 66.21 83.37  0.11  0.55  3.62
                          pixsfm 67.94 81.02 91.68  0.16  0.71  3.99

The results of this evaluation can be different from the numbers reported in the paper. The trends are however similar and the conclusions of the paper still hold. This difference is due to improvements of the pixsfm code and to changes in the SuperPoint implementation: we initially used the setup of PatchFlow and later switched to hloc, which is strictly better and easier to install.

Camera pose estimation

[Click to expand]

Similarly, we evaluate the accuracy of camera pose estimation given sparse 3D models triangulated from other views:

python -m pixsfm.eval.eth3d.localization --tag pixsfm

Again, we can also run on a subset of scenes or keypoint detectors. To aggregate the results and compare different runs, for example with and without KA and BA, we run:

python -m pixsfm.eval.eth3d.plot_localization --tags pixsfm raw

We should then obtain the following table and plot (±2%):

-keypoints- -tag-- -AUC @ X cm (%)--
                    0.1    1    10  
sift        raw    16.92 55.39 81.15
            pixsfm 23.08 60.47 84.01
superpoint  raw    15.38 63.41 87.24
            pixsfm 41.54 73.86 89.66
r2d2        raw     6.15 51.70 83.46
            pixsfm 23.85 62.41 86.89

SIFT (black), SuperPoint (red), R2D2 (green)

Results for the 0.1cm threshold can vary across setups and therefore differ from the numbers reported in the paper. This might be due to changes in the PyTorch and COLMAP dependencies. We are investigating this but any help is welcome!

Advanced usage

Detailed configuration

Here we explain the main configuration entries for mapping and localization along with their default values:

[Click to expand]
dense_features:  # refinement features
  model:  # the CNN that extracts the features
    name: s2dnet  # the name of one of the models defined in pixsfm/features/models/
    num_layers: 1  # the number of output layers (model-specific parameters)
  device: auto  # cpu, cuda, or auto-determined based on CUDA availability
  max_edge: 1600  # downscale the image such the largest dimension has this value
  resize: LANCZOS  # interpolation algorithm for the image resizing
  pyr_scales: [1.0]   # concat features extracted at multiple scales
  fast_image_load: false  # approximate resizing for large images
  l2_normalize: true  # whether to normalize the features so they have unit norm
  sparse: true  # whether to store sparse patches of features instead of the full feature maps
  patch_size: 8  # the size of the feature patches if sparse
  dtype: half  # the data type of features when stored, half float or double
  use_cache: false  # whether to cache the features on file or keep them in memory
  overwrite_cache: false  # whether to overwrite the cache file if it already exists
  cache_format: chunked
interpolation:
  nodes: [[0.0, 0.0]]  # grid over which to compute the cost, by default a single point
  mode: BICUBIC  # the interpolation algorithm
  l2_normalize: true
  ncc_normalize: false  # only works if len(nodes)>1, mostly for photometric
mapping:  # pixsfm.refine_colmap.PixSfM
  dense_features: ${..dense_features}
  KA:  # keypoint adjustment
    apply: true  # whether to apply or instead skip
    strategy: featuremetric  # regular, or alternatively topological_reference (much faster)
    interpolation: ${...interpolation}  # we can use a different interpolation for KA
    level_indices: null  # we can optimize a subset of levels, by default all
    split_in_subproblems: true  # parallelize the optimization
    max_kps_per_problem: 50  # parallelization, a lower value saves memory, conservative if -1
    optimizer:  # optimization problem and solving
      loss:
        name: cauchy  # name of the loss function, among {huber, soft_l1, ...}
        params: [0.25]  # loss-specific parameters
      solver:
        function_tolerance: 0.0
        gradient_tolerance: 0.0
        parameter_tolerance: 1.0e-05
        minimizer_progress_to_stdout: false  # print a progress bar
        max_num_iterations: 100  # maximum number of optimization iterations
        max_linear_solver_iterations: 200
        max_num_consecutive_invalid_steps: 10
        max_consecutive_nonmonotonic_steps: 10
        use_inner_iterations: false
        use_nonmonotonic_steps: false
        num_threads: 1
      root_regularize_weight: -1  # prevent drift by adding edges to the root node, disabled if -1
      print_summary: false  # whether to print a detailed summary after completion
      bound: 4.0  # constraint on the distance (in pixels) w.r.t. the initial values
      num_threads: -1  # number of threads if parallelize in subproblems
  BA:  # bundle adjustment
    apply: true  # whether to apply or instead skip
    strategy: feature_reference  # regular, or alternatively {costmaps, patch_warp}
    interpolation: ${...interpolation}  # we can use a different interpolation for BA
    level_indices: null  # we can optimize a subset of levels, by default all
    max_tracks_per_problem: 10  # parallelization of references/costmaps, a lower value saves memory
    num_threads: -1
    optimizer:
      loss:  # same config as KA.optimizer.loss
      solver:  # same config as KA.optimizer.solver
      print_summary: false
      refine_focal_length: true  # whether to optimize the focal length
      refine_principal_point: false  # whether to optimize the principal points
      refine_extra_params: true  # whether to optimize distortion parameters
      refine_extrinsics: true  # whether to optimize the camera poses
    references:  # if strategy==feature_reference
      loss:  # what to minimize to compute the robust mean
        name: cauchy
        params: [0.25]
      iters: 100  # number of iterations to compute the robust mean
      num_threads: -1
    repeats: 1
localization:  # pixsfm.localization.main.QueryLocalizer
  dense_features: ${..dense_features}
  target_reference: nearest  # how to select references, in {nearest, robust_mean, all_observations}
  overwrite_features_sparse: null  # overwrite dense_features.sparse in query localization only
  references:  # how to compute references
    loss:  # what to minimize to compute the robust mean, same as BA.references.loss
    iters: 100
    keep_observations: true  # required for target_reference in {nearest, all_observations}
    num_threads: -1
  max_tracks_per_problem: 50  # parallelization of references, a lower value saves memory
  unique_inliers: min_error  # how we select unique matches for each 3D point
  QKA:  # query keypoint adjustment
    apply: true  # whether to apply or instead skip
    interpolation: ${...interpolation}
    level_indices: null
    feature_inlier_thresh: -1  # discard points with high feature error, disabled if -1
    stack_correspondences: False # Stack references for equal keypoints
    optimizer:
      loss:  # same config as KA.optimizer.loss
        name: trivial  # L2, no robust loss function
        params: []
      solver:  # same config as KA.optimizer.solver
      print_summary: false
      bound: 4.0  # constraint on the distance (in pixels) w.r.t. the initial values
  PnP:
    estimation:  # pycolmap.absolute_pose_estimation
      ransac:
        max_error: 12  # inlier threshold in pixel reprojection error
        estimate_focal_length: false  # if the focal length is unknown
    refinement:  # refinement in pycolmap.absolute_pose_estimation
    	refine_focal_length: false
    	refine_extra_params: false
  QBA:  # query bundle adjuster
    apply: true  # whether to apply or instead skip
    interpolation: ${...interpolation}
    level_indices: null
    optimizer:
      loss:  # same config as KA.optimizer.loss
      solver:  # same config as KA.optimizer.solver
      print_summary: false
      refine_focal_length: false
      refine_principal_point: false
      refine_extra_params: false

Note that the config supports variable interpolation through omegaconf.

Large-scale refinement

When dealing with large scenes or with a large number of images, memory is often a bottleneck. The configuration low_memory shows how to decrease the memory consumption by trading-off accuracy and speed.

[Click to expand]

The main improvements are:

  • dense_features
    • store as sparse patches: sparse=true
    • reduce the size of the patches: patch_size=8 (or smaller)
    • store in a cache file: use_cache=true
  • KA
    • chunk the optimization, loading only a subset of features at once: split_in_subproblems=true
    • optimize at most around 50 keypoints per chunk: max_kps_per_problem=50
  • BA
    • use the costmap approximation: strategy=costmaps (described in Section C of the paper)

When runtime is a limitation, one can also reduce the runtime of KA by optimizing only costs with respect to the topological center of each track with KA.strategy=topological_reference.

Keypoints with large noise

[Click to expand]

Some keypoint detectors with low output resolution, like D2-Net, predict keypoints that are localized inaccurately. In this case, the refinement is highly beneficial but the default parameters are not optimal. It is necessary to increase the patch size and use multiple feature layers. An example configuration is given in pixsfm_eth3d_d2net to evaluate D2-Net on ETH3D.

Extending pixsfm

Still having questions about pixsfm? Anything in the doc is unclear? Are you unsure whether it fits your use case? Please let us know by opening an issue!

Contributing

We welcome external contributions, especially to improve the following points:

  • make pixsfm work on Windows
  • train and integrate dense features that are more compact with fewer dimensions
  • build a conda package for pixsfm and pycolmap to not require installing COLMAP from source
  • add examples on how to build featuremetric problems with pyceres

BibTex citation

Please consider citing our work if you use any code from this repo or ideas presented in the paper:

@inproceedings{lindenberger2021pixsfm,
  author    = {Philipp Lindenberger and
               Paul-Edouard Sarlin and
               Viktor Larsson and
               Marc Pollefeys},
  title     = {{Pixel-Perfect Structure-from-Motion with Featuremetric Refinement}},
  booktitle = {ICCV},
  year      = {2021},
}
Comments
  • [Announcements] Code release

    [Announcements] Code release

    Hit the subscribe button on the right of this issue if you wish to be notified of the code release. Please do not reply to this issue to not spam other subscribers. Please do not contact us to ask for early-access to the code.

    opened by Skydes 15
  • Build fails

    Build fails

    [ 43%] Built target pixsfm
    Scanning dependencies of target pypixsfm
    [ 50%] Building CXX object pixsfm/CMakeFiles/pypixsfm.dir/base/bindings.cc.o
    [ 87%] Building CXX object pixsfm/CMakeFiles/pypixsfm.dir/features/bindings.cc.o
    [ 87%] Building CXX object pixsfm/CMakeFiles/pypixsfm.dir/util/bindings.cc.o
    [ 90%] Building CXX object pixsfm/CMakeFiles/pypixsfm.dir/localization/bindings.cc.o
    [ 90%] Building CXX object pixsfm/CMakeFiles/pypixsfm.dir/keypoint_adjustment/bindings.cc.o
    [ 90%] Building CXX object pixsfm/CMakeFiles/pypixsfm.dir/residuals/bindings.cc.o
    [ 90%] Building CXX object pixsfm/CMakeFiles/pypixsfm.dir/bundle_adjustment/bindings.cc.o
    [ 90%] Building CXX object pixsfm/CMakeFiles/pypixsfm.dir/pyceres/cost_functions.cc.o
    [ 90%] Building CXX object pixsfm/CMakeFiles/pypixsfm.dir/pyceres/pyceres.cc.o
    [ 90%] Building CXX object pixsfm/CMakeFiles/pypixsfm.dir/pyceres/solver.cc.o
    [ 90%] Building CXX object pixsfm/CMakeFiles/pypixsfm.dir/pyceres/parameterization.cc.o
    [ 90%] Building CXX object pixsfm/CMakeFiles/pypixsfm.dir/pyceres/callbacks.cc.o
    [ 90%] Building CXX object pixsfm/CMakeFiles/pypixsfm.dir/pyceres/loss_functions.cc.o
    [ 90%] Building CXX object pixsfm/CMakeFiles/pypixsfm.dir/pyceres/types.cc.o
    [ 90%] Building CXX object pixsfm/CMakeFiles/pypixsfm.dir/pyceres/problem.cc.o
    [ 93%] Linking CXX static library libpypixsfm.a
    [ 93%] Built target pypixsfm
    Scanning dependencies of target _pixsfm
    [ 96%] Building CXX object pixsfm/CMakeFiles/_pixsfm.dir/_pixsfm/bindings.cc.o
    [100%] Linking CXX shared module ../../../pixsfm/_pixsfm.cpython-38-x86_64-linux-gnu.so
    /usr/bin/ld: /usr/local/lib/libceres.a(covariance_impl.cc.o): in function `ceres::internal::CovarianceImpl::GetCovarianceBlockInTangentOrAmbientSpace(double const*, double const*, bool, double*) const':
    covariance_impl.cc:(.text+0xa81b): undefined reference to `void Eigen::internal::call_dense_assignment_loop<Eigen::Matrix<double, -1, -1, 1, -1, -1>, Eigen::Matrix<double, -1, -1, 1, -1, -1>, Eigen::internal::assign_op<double, double> >(Eigen::Matrix<double, -1, -1, 1, -1, -1>&, Eigen::Matrix<double, -1, -1, 1, -1, -1> const&, Eigen::internal::assign_op<double, double> const&)'
    collect2: error: ld returned 1 exit status
    make[2]: *** [pixsfm/CMakeFiles/_pixsfm.dir/build.make:133: ../../pixsfm/_pixsfm.cpython-38-x86_64-linux-gnu.so] Error 1
    make[1]: *** [CMakeFiles/Makefile2:403: pixsfm/CMakeFiles/_pixsfm.dir/all] Error 2
    make: *** [Makefile:130: all] Error 2
    /usr/local/lib/python3.8/dist-packages/setuptools/command/easy_install.py:156: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    /usr/local/lib/python3.8/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/prajwal.chidananda/pixel-perfect-sfm/setup.py", line 112, in <module>
        setup(
      File "/usr/local/lib/python3.8/dist-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/local/lib/python3.8/dist-packages/setuptools/command/develop.py", line 34, in run
        self.install_for_development()
      File "/usr/local/lib/python3.8/dist-packages/setuptools/command/develop.py", line 114, in install_for_development
        self.run_command('build_ext')
      File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/home/prajwal.chidananda/pixel-perfect-sfm/setup.py", line 55, in run
        self.build_extension(ext)
      File "/home/prajwal.chidananda/pixel-perfect-sfm/setup.py", line 98, in build_extension
        subprocess.check_call(['cmake', '--build', '.'] + build_args,
      File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j']' returned non-zero exit status 2.
    ----------------------------------------
    

    ERROR: Command errored out with exit status 1: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/prajwal.chidananda/pixel-perfect-sfm/setup.py'"'"'; file='"'"'/home/prajwal.chidananda/pixel-perfect-sfm/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

    opened by prajwalchidananda 12
  • build failed:  pixsfm/CMakeFiles/pypixsfm.dir/keypoint_adjustment/bindings.cc.o

    build failed: pixsfm/CMakeFiles/pypixsfm.dir/keypoint_adjustment/bindings.cc.o

    Building CXX object pixsfm/CMakeFiles/pypixsfm.dir/keypoint_adjustment/bindings.cc.o In file included from /work/pixel-perfect-sfm/pixsfm/keypoint_adjustment/src/featuremetric_keypoint_optimizer.h:8:0, from /work/pixel-perfect-sfm/pixsfm/keypoint_adjustment/bindings.cc:8: /work/pixel-perfect-sfm/pixsfm/base/src/parallel_optimizer.h:90:6: error: prototype for ‘std::unordered_map<long unsigned int, decltype (static_cast<Optimizer*>(nullptr)->.RunSubset<Ns ...>(((pixsfm::ParallelOptimizer<Optimizer, idx_t>)this)->pixsfm::ParallelOptimizer<Optimizer, idx_t>::dummy, pixsfm::ParallelOptimizer::RunParallel::parameters ...))> pixsfm::ParallelOptimizer<Optimizer, idx_t>::RunParallel(std::vector, Param& ...)’ does not match any in class ‘pixsfm::ParallelOptimizer<Optimizer, idx_t>’ auto ParallelOptimizer<Optimizer, idx_t>::RunParallel( ^ /work/pixel-perfect-sfm/pixsfm/base/src/parallel_optimizer.h:78:8: error: candidate is: template<class Optimizer, class idx_t> template<int ...Ns, class ... Param> std::unordered_map<long unsigned int, decltype (static_cast<Optimizer>(nullptr)->.RunSubset<Ns ...>(((pixsfm::ParallelOptimizer<Optimizer, idx_t>*)this)->pixsfm::ParallelOptimizer<Optimizer, idx_t>::dummy, pixsfm::ParallelOptimizer::RunParallel::parameters ...))> pixsfm::ParallelOptimizer<Optimizer, idx_t>::RunParallel(std::vector, Param& ...) auto RunParallel(std::vector problem_labels, Param&... parameters) ^ pixsfm/CMakeFiles/pypixsfm.dir/build.make:134: recipe for target 'pixsfm/CMakeFiles/pypixsfm.dir/keypoint_adjustment/bindings.cc.o' failed


    gcc -v gcc version 4.8.5 (Ubuntu 4.8.5-4ubuntu8~16.04.1)

    opened by kenylai 9
  • Scaling PixSfM to thousands of images

    Scaling PixSfM to thousands of images

    First of all, thanks for the great work. In the paper and project page the authors mention scaling PixSfM to thousands of images. I'm however running into issues doing the same with datasets ranging in the 1600-3000 image range. Two of the datasets in question can be found at: https://meganerf.cmusatyalab.org/#data

    My code looks roughly like:

    def main(hparams: Namespace) -> None:
        output_path = Path(hparams.output_path)
        output_path.mkdir(exist_ok=True, parents=True)
    
        feature_conf = extract_features.confs['superpoint_max']
        matcher_conf = match_features.confs['superglue']
    
        images_path = Path(hparams.images_path)
    
        images = sorted(images_path.iterdir())
        references = [str(images[i].relative_to(images_path)) for i in range(len(images))]
        print(len(references), 'mapping images')
    
        features_path = output_path / 'features.h5'
        sfm_pairs_path = output_path / 'pairs-sfm.txt'
        matches_path = output_path / 'matches.h5'
    
        extract_features.main(feature_conf, images_path, image_list=references, feature_path=features_path)
        pairs_from_gps.main(sfm_pairs_path, images_path, references, 50) # Custom matcher that uses the GPS metadata to match only to the 50 closest pairs
        match_features.main(matcher_conf, sfm_pairs_path, features=features_path, matches=matches_path)
    
        sfm = PixSfM(conf={"dense_features": {"use_cache": True}})
    
        ref_dir = output_path / 'ref'
        refined, sfm_outputs = sfm.reconstruction(ref_dir, images_path, sfm_pairs_path, features_path, matches_path,
                                                  image_list=references)
    

    And in particular the keypoint adjustment phase seems to be taking a very long time. Some examples so far:

    1678 mapping images                                                                                                                                                                                                                                
    [2022/02/04 18:28:11 pixsfm.features.models.s2dnet INFO] Loading S2DNet checkpoint at /home/ubuntu/pixel-perfect-sfm/pixsfm/features/models/checkpoints/s2dnet_weights.pth.                                                                        
    [2022/02/04 18:28:25 pixsfm INFO] Loaded dense extractor with configuration:                                                                                                                                                                       
    {'cache_format': 'chunked',                                                                                                                                                                                                                        
     'device': 'auto',                                                                                                                                                                                                                                 
     'dtype': 'half',                                                                                                                                                                                                                                  
     'fast_image_load': False,                                                                                                                                                                                                                         
     'l2_normalize': True,                                                                                                                                                                                                                             
     'load_cache_on_init': False,                                                                                                                                                                                                                      
     'max_edge': 1600,                                                                                                                                                                                                                                 
     'model': {'name': 's2dnet', 'num_layers': 1, 'checkpointing': None, 'output_dim': 128, 'pretrained': 's2dnet', 'remove_pooling_layers': False, 'combine': False},                                                                                 
     'overwrite_cache': False,                                                                                                                                                                                                                         
     'patch_size': 16,                                                                                                                                                                                                                                 
     'pyr_scales': [1.0],                                                                                                                                                                                                                              
     'resize': 'LANCZOS',                                                                                                                                                                                                                              
     'sparse': True,                                                                                                                                                                                                                                   
     'use_cache': True}                                                                                                                                                                                                                                [2022/02/04 18:29:52 pixsfm INFO] Building matching graph...                                                                                                                                                                                       
    [2022/02/04 18:31:00 pixsfm INFO] Extracting dense features...                                                                                                                                                                                                                                                                                                                                                                                                                                      
    100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1678/1678 [1:05:39<00:00,  2.35s/it]|
    [2022/02/04 19:36:40 pixsfm INFO] Loading featuremaps from H5 File.                                                                                                                                                                                
    100%[████████████████████] 1678/1678 [00:51, 32.4514it/s]                                                                                                                                                                                          
    [2022/02/04 19:37:32 pixsfm INFO] Computing tracks...                                                                                                                                                                                              
    [2022/02/04 19:37:32 pixsfm INFO] # graph nodes: 6001799                                                                                                                                                                                           
    [2022/02/04 19:37:38 pixsfm INFO] # graph edges: 87565132                                                                                                                                                                                          
    [2022/02/04 19:39:26 pixsfm INFO] # tracks: 655998                                                                                                                                                                                                 
    [2022/02/04 19:39:31 pixsfm INFO] Start feature-metric keypoint adjustment.                                                                                                                                                                        
    [2022/02/04 19:39:35 pixsfm WARNING] 13887 / 115040 problems have more than 50 keypoints.                                                                                                                                                          
             Maximum keypoints in a problem: 202                                                                                                                                                                                                       
     74%[███████████████     ] 4484836/6001799 [171:56:55, 7.24511it/s]
    

    Another example seems to be getting slower over time:

    [2022/02/05 12:35:10 pixsfm INFO] Loading featuremaps from H5 File.
    1940 mapping images
    [2022/02/05 11:47:44 pixsfm.features.models.s2dnet INFO] Loading S2DNet checkpoint at /data/hturki/pixel-perfect-sfm/pixsfm/features/models/checkpoints/s2dnet_weights.pth.
    [2022/02/05 11:47:44 pixsfm.features.models.s2dnet INFO] Downloading S2DNet weights.
    [2022/02/05 11:47:51 pixsfm INFO] Loaded dense extractor with configuration:
    {'cache_format': 'chunked',
     'device': 'auto',
     'dtype': 'half',
     'fast_image_load': False,
     'l2_normalize': True,
     'load_cache_on_init': False,
     'max_edge': 1600,
     'model': {'name': 's2dnet', 'num_layers': 1, 'checkpointing': None, 'output_dim': 128, 'pretrained': 's2dnet', 'remove_pooling_layers': False, 'combine': False},
     'overwrite_cache': False,
     'patch_size': 16,
     'pyr_scales': [1.0],
     'resize': 'LANCZOS',
     'sparse': True,
     'use_cache': True}
    [2022/02/05 11:48:51 pixsfm INFO] Building matching graph...
    [2022/02/05 11:50:23 pixsfm INFO] Extracting dense features...
    100%[████████████████████] 1938/1938 [00:10, 183.748it/s]
    [2022/02/05 12:35:21 pixsfm INFO] Computing tracks...
    [2022/02/05 12:35:21 pixsfm INFO] # graph nodes: 6696955
    [2022/02/05 12:35:28 pixsfm INFO] # graph edges: 84325871
    [2022/02/05 12:38:06 pixsfm INFO] # tracks: 761986
    [2022/02/05 12:38:13 pixsfm INFO] Start feature-metric keypoint adjustment.
    [2022/02/05 12:38:19 pixsfm WARNING] 16060 / 125998 problems have more than 50 keypoints.
             Maximum keypoints in a problem: 265
      0%[                    ]   59491/6696955 [01:18:26, 12.6392it/s]
     10%[██                  ]  729223/6696955 [23:18:52, 8.68822it/s]
     10%[██                  ]  729290/6696955 [23:19:05, 8.68761it/s]
     25%[█████               ] 1718493/6696955 [70:43:00, 6.75028it/s]
     27%[██████              ] 1830843/6696955 [76:13:28, 6.67195it/s]
     41%[████████            ] 2765893/6696955 [121:42:58, 6.31225it/s]
     49%[██████████          ] 3347643/6696955 [150:00:06, 6.19926it/s]
    

    And same for a third example

    3019 mapping images
    [2022/02/06 12:12:32 pixsfm.features.models.s2dnet INFO] Loading S2DNet checkpoint at /home/cloudlet/hturki/pixel-perfect-sfm/pixsfm/features/models/checkpoints/s2dnet_weights.pth.
    [2022/02/06 12:12:36 pixsfm INFO] Loaded dense extractor with configuration:
    {'cache_format': 'chunked',
     'device': 'auto',
     'dtype': 'half',
     'fast_image_load': False,
     'l2_normalize': True,
     'load_cache_on_init': False,
     'max_edge': 1600,
     'model': {'name': 's2dnet', 'num_layers': 1, 'checkpointing': None, 'output_dim': 128, 'pretrained': 's2dnet', 'remove_pooling_layers': False, 'combine': False},
     'overwrite_cache': False,
     'patch_size': 16,
     'pyr_scales': [1.0],
     'resize': 'LANCZOS',
     'sparse': True,
     'use_cache': True}
    [2022/02/06 12:14:03 pixsfm INFO] Building matching graph...
    [2022/02/06 12:16:14 pixsfm INFO] Extracting dense features...
      5%|██████████▏                                                                                                                                                                                              | 153/  5%|██████████▎                                                                                                                                                                                              | 154/  5%|██████████▎                                              100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3019/3019 [1:08:49<00:00,  1.37s/it]
    [2022/02/06 13:25:03 pixsfm INFO] Loading featuremaps from H5 File.
    100%[████████████████████] 3019/3019 [00:17, 172.998it/s]
    [2022/02/06 13:25:21 pixsfm INFO] Computing tracks...
    [2022/02/06 13:25:21 pixsfm INFO] # graph nodes: 11090098
    [2022/02/06 13:25:27 pixsfm INFO] # graph edges: 122388899
    [2022/02/06 13:34:55 pixsfm INFO] # tracks: 834854
    [2022/02/06 13:35:05 pixsfm INFO] Start feature-metric keypoint adjustment.
    [2022/02/06 13:35:13 pixsfm WARNING] 41539 / 141697 problems have more than 50 keypoints.
             Maximum keypoints in a problem: 1022
      0%[                    ]    28755/11090098 [12:26, 38.5155it/s]
      0%[                    ]    42692/11090098 [29:23, 24.2052it/s]
      0%[                    ]    62858/11090098 [50:21, 20.8059it/s]
     16%[███                 ]  1884721/11090098 [23:21:01, 22.4207it/s]
     37%[████████            ]  4142028/11090098 [78:01:34, 14.7458it/s]
     45%[█████████           ]  5016151/11090098 [114:52:32, 12.1294it/s]
     46%[█████████           ]  5208388/11090098 [125:06:01, 11.5649it/s]
    

    The specs for the machines across each of these runs varies a bit, but they're pretty powerful machines (>100GB of ram, dozens of cores, SSD mounts)

    I've also tried running PixSfM on an even larger example (matching only against the 20 closest neighbors instead of 50), where keypoint adjustment throws an exception. I've trying reducing the output dim and patch size to no avail:

    5871 mapping images
    [2022/02/11 08:29:37 hloc INFO] Extracting local features with configuration:
    {'model': {'max_keypoints': 4096, 'name': 'superpoint', 'nms_radius': 3},
     'output': 'feats-superpoint-n4096-rmax1600',
     'preprocessing': {'grayscale': True, 'resize_force': True, 'resize_max': 1600}}
    Loaded SuperPoint model
    100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5871/5871 [16:57<00:00,  5.77it/s]
    [2022/02/11 08:46:38 hloc INFO] Finished exporting features.
    [2022/02/11 08:46:41 hloc INFO] Obtaining pairwise distances between 5871 images...
    [2022/02/11 08:46:43 hloc INFO] Found 117230 pairs.
    [2022/02/11 08:46:43 hloc INFO] Matching local features with configuration:
    {'model': {'name': 'superglue',
               'sinkhorn_iterations': 50,
               'weights': 'outdoor'},
     'output': 'matches-superglue'}
    Loaded SuperGlue model ("outdoor" weights)
    100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 117230/117230 [6:16:43<00:00,  5.19it/s]
    [2022/02/11 15:03:29 hloc INFO] Finished exporting matches.
    [2022/02/11 15:03:31 pixsfm.features.models.s2dnet INFO] Loading S2DNet checkpoint at /compute/autobot-1-1/hturki/pixel-perfect-sfm/pixsfm/features/models/checkpoints/s2dnet_weights.pth.
    [2022/02/11 15:03:31 pixsfm INFO] Loaded dense extractor with configuration:
    {'cache_format': 'chunked',
     'device': 'auto',
     'dtype': 'half',
     'fast_image_load': False,
     'l2_normalize': True,
     'load_cache_on_init': False,
     'max_edge': 1600,
     'model': {'name': 's2dnet', 'num_layers': 1, 'checkpointing': None, 'output_dim': 64, 'pretrained': 's2dnet', 'remove_pooling_layers': False, 'combine': False, 'patch_size': 8},
     'overwrite_cache': False,
     'patch_size': 8,
     'pyr_scales': [1.0],
     'resize': 'LANCZOS',
     'sparse': True,
     'use_cache': True} # Have also tried keeping everything in memory
    [2022/02/11 15:04:33 pixsfm INFO] Building matching graph...
    [2022/02/11 15:07:55 pixsfm INFO] Extracting dense features...
    100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5871/5871 [45:08<00:00,  2.17it/s]
    [2022/02/11 15:53:04 pixsfm INFO] Computing tracks...
    [2022/02/11 15:53:04 pixsfm INFO] # graph nodes: 21615817
    [2022/02/11 15:53:12 pixsfm INFO] # graph edges: 106782076
    [2022/02/11 15:55:08 pixsfm INFO] # tracks: 2955327
    [2022/02/11 15:55:28 pixsfm INFO] Start feature-metric keypoint adjustment.
    [2022/02/11 15:55:52 pixsfm WARNING] 206052 / 906513 problems have more than 20 keypoints.
             Maximum keypoints in a problem: 487
      0%[                    ]        0/21615817 [00:00, -nanit/s][2022/02/11 15:56:13 pixsfm ERROR] Child process threw exception in problem 0.
    

    Any thoughts on what I might be doing wrong, or is a week+ runtime to be expected no matter what? I've gotten suboptimal results on these (drone imagery-related) datasets using even commercial photogrammetry software, so excited to see if I can get better results with your featuremetric approach!

    opened by hturki 7
  • Faster loading of SuperGlue weights

    Faster loading of SuperGlue weights

    Each time I run a script that calls the matcher, it takes about 20s to load SuperGlue model ("outdoor" weights). Is there a way to better reuse cache between consecutive runs? Or is it that big in memory?

    For instance loading S2DNet checkpoint at /dependencies/pixel-perfect-sfm/pixsfm/features/models/checkpoints/s2dnet_weights.pth. is instantaneous

    Many thanks

    opened by ThomasParistech 5
  • Segfault during triangulation

    Segfault during triangulation

    I'm trying to refine a Pointcloud extracted using ArCore on my phone, and I get a Segmentation fault error at the end of the triangulation part of PixSfM.

    As an input, I provide:

    • A folder of images
    • A binary colmap model (cameras.bin, images.bin, points3D.bin): The pointcloud is noisy and used only for the pairs_from_covisibility method (In images.bin, point3D_ids make sense but I simply put dummy zeros xys for the 2d features since features should be recomputed by hloc) but the intrinsics/extrinsics estimate from arcore are quite good and should be used as priors

    and I want to refine the poses and the pointcloud.

    My pipeline is the following:

    1. hloc.extract_features
    2. hloc.pairs_from_covisibility
    3. hloc.match_features
    4. PixSfM.triangulation

    I use the low memory configuration file, because it crashes otherwise.

    Here's my code:

    from pathlib import Path
    from hloc import extract_features, match_features, pairs_from_covisibility
    from pixsfm.refine_hloc import PixSfM
    
    images = Path('data/images')
    input_model = Path('data/input_model')
    outputs = Path('data/results')
    
    sfm_pairs = outputs / 'pairs-sfm.txt'
    features = outputs / 'features.h5'
    matches = outputs / 'matches.h5'
    sfm_dir = outputs / "sfm"
    
    feature_conf = extract_features.confs['superpoint_aachen']
    matcher_conf = match_features.confs['superglue']
    
    references = [str(p.relative_to(images))for p in images.iterdir()]
    
    extract_features.main(feature_conf, images,
                          image_list=references,
                          feature_path=features)
    pairs_from_covisibility.main(input_model,
                                 sfm_pairs,
                                 num_matched=5)
    match_features.main(matcher_conf,
                        sfm_pairs,
                        features=features,
                        matches=matches)
    
    refiner = PixSfM(conf="/dependencies/pixel-perfect-sfm/pixsfm/configs/low_memory.yaml")
    model, _ = refiner.triangulation(output_dir=sfm_dir,
                                     reference_model_path=input_model,
                                     image_dir=images,
                                     pairs_path=sfm_pairs,
                                     features_path=features,
                                     matches_path=matches
                                     )
    

    and here's the output I got:

    [2022/01/27 09:56:05 hloc INFO] Extracting local features with configuration:
    {'model': {'max_keypoints': 4096, 'name': 'superpoint', 'nms_radius': 3},
     'output': 'feats-superpoint-n4096-r1024',
     'preprocessing': {'grayscale': True, 'resize_max': 1024}}
    [2022/01/27 09:56:05 hloc INFO] Skipping the extraction.
    [2022/01/27 09:56:05 hloc INFO] Reading the COLMAP model...
    [2022/01/27 09:56:05 hloc INFO] Extracting image pairs from covisibility info...
      0%|                                                                                                                                                                                   | 0/283 [00:00<?, ?it/s][2022/01/27 09:56:05 hloc INFO] Image 28 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 29 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 30 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 57 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 74 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 75 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 131 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 191 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 192 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 202 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 203 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 211 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 223 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 224 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 243 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 244 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 245 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 246 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 247 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 248 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 249 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 264 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 265 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 266 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 269 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 270 does not have any covisibility.
    [2022/01/27 09:56:05 hloc INFO] Image 271 does not have any covisibility.
    100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 283/283 [00:00<00:00, 4739.06it/s]
    [2022/01/27 09:56:05 hloc INFO] Found 911 pairs.
    [2022/01/27 09:56:05 hloc INFO] Matching local features with configuration:
    {'model': {'name': 'superglue',
               'sinkhorn_iterations': 50,
               'weights': 'outdoor'},
     'output': 'matches-superglue'}
    Loaded SuperGlue model ("outdoor" weights)
    100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 911/911 [00:31<00:00, 28.93it/s]
    [2022/01/27 09:56:39 hloc INFO] Finished exporting matches.
    [2022/01/27 09:56:40 pixsfm.features.models.s2dnet INFO] Loading S2DNet checkpoint at /dependencies/pixel-perfect-sfm/pixsfm/features/models/checkpoints/s2dnet_weights.pth.
    [2022/01/27 09:56:40 pixsfm INFO] Loaded dense extractor with configuration:
    {'cache_format': 'chunked',
     'device': 'auto',
     'dtype': 'half',
     'fast_image_load': False,
     'l2_normalize': True,
     'load_cache_on_init': False,
     'max_edge': 1600,
     'model': {'name': 's2dnet', 'num_layers': 1, 'checkpointing': None, 'output_dim': 128, 'pretrained': 's2dnet', 'remove_pooling_layers': False, 'combine': False},
     'overwrite_cache': True,
     'patch_size': 8,
     'pyr_scales': [1.0],
     'resize': 'LANCZOS',
     'sparse': True,
     'use_cache': True}
    [2022/01/27 09:56:41 pixsfm INFO] Building matching graph...
    [2022/01/27 09:56:41 pixsfm INFO] Extracting dense features...
    100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 256/256 [00:12<00:00, 20.47it/s]
    [2022/01/27 09:56:54 pixsfm INFO] Loading featuremaps from H5 File.
    100%[████████████████████] 256/256 [00:00, 3605.63it/s]
    [2022/01/27 09:56:54 pixsfm INFO] Computing tracks...
    [2022/01/27 09:56:54 pixsfm INFO] # graph nodes: 109498
    [2022/01/27 09:56:54 pixsfm INFO] # graph edges: 249077
    [2022/01/27 09:56:54 pixsfm INFO] # tracks: 34883
    [2022/01/27 09:56:54 pixsfm INFO] Start feature-metric keypoint adjustment.
    [2022/01/27 09:56:54 pixsfm INFO] Start topological-reference keypoint adjustment.
    100%[████████████████████] 109498/109498 [00:11, 9302.35it/s]
    [2022/01/27 09:57:06 pixsfm INFO] KA Time: 11.7715s, cost change: 0.0232999 --> 0.0206287
    [2022/01/27 09:57:06 hloc INFO] Importing features into the database...
    100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 283/283 [00:00<00:00, 4536.62it/s]
    [2022/01/27 09:57:06 hloc INFO] Importing matches into the database...
    100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 911/911 [00:00<00:00, 8098.12it/s]
    [2022/01/27 09:57:06 hloc INFO] Performing geometric verification of the matches...
    [2022/01/27 09:57:07 hloc INFO] Running 3D triangulation...
    [2022/01/27 09:57:10 hloc INFO] Finished the triangulation with statistics:
    Reconstruction:
            num_reg_images = 283
            num_cameras = 283
            num_points3D = 1662
            num_observations = 3408
            mean_track_length = 2.05054
            mean_observations_per_image = 12.0424
            mean_reprojection_error = 1.84696
    [2022/01/27 09:57:10 pixsfm INFO] Extracting references and costmaps.
    Segmentation fault (core dumped)
    

    Did I miss something or is there an actual bug? Might it be related to the low_memory conf? Is is still ok since I got the log "Finished the triangulation" ?

    Many thanks !

    opened by ThomasParistech 5
  • Build error from glog in PixSfM /src

    Build error from glog in PixSfM /src

    Installation went smoothly for me until the final pixSfM package install via pip. Compilation reached 40%, then returned this error from the glog source packaged with pixSfM:

    /pixel-perfect-sfm/pixsfm/util/src/glog.cc:86:48: error: invalid conversion from ‘void (*)(const char*, int)’ to ‘void (*)(const char*, size_t)’ {aka ‘void (*)(const char*, long unsigned int)’} [-fpermissive] 86 | []() { google::InstallFailureWriter(&PyBindLogStack); })

    The full error context is reprinted below:

    [ 40%] Building CXX object pixsfm/CMakeFiles/pixsfm.dir/bundle_adjustment/src/bundle_adjustment_options.cc.o
    /home/kevin/pixel-perfect-sfm/pixsfm/util/src/glog.cc: In lambda function:
    /home/kevin/pixel-perfect-sfm/pixsfm/util/src/glog.cc:86:48: error: invalid conversion from ‘void (*)(const char*, int)’ to ‘void (*)(const char*, size_t)’ {aka ‘void (*)(const char*, long unsigned int)’} [-fpermissive]
    86 |            []() { google::InstallFailureWriter(&PyBindLogStack); })
    |                                                ^~~~~~~~~~~~~~~
    |                                                |
    |                                                void (*)(const char*, int)
    In file included from /usr/local/include/colmap/util/logging.h:37,
    from /home/kevin/pixel-perfect-sfm/pixsfm/util/src/glog.cc:1:
    /usr/local/include/glog/logging.h:1972:12: note:   initializing argument 1of ‘void google::InstallFailureWriter(void (*)(const char*, size_t))’
    1972 |     void (*writer)(const char* data, size_t size));
    |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    make[2]: *** [pixsfm/CMakeFiles/pixsfm.dir/build.make:132: pixsfm/CMakeFiles/pixsfm.dir/util/src/glog.cc.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    make[1]: *** [CMakeFiles/Makefile2:368: pixsfm/CMakeFiles/pixsfm.dir/all] Error 2
    make: *** [Makefile:136: all] Error 2
    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/home/kevin/pixel-perfect-sfm/setup.py", line 112, in <module>
    setup(
    File "/home/kevin/anaconda3/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
    File "/home/kevin/anaconda3/lib/python3.9/distutils/core.py", line 148, in setup
    dist.run_commands()
    File "/home/kevin/anaconda3/lib/python3.9/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
    File "/home/kevin/anaconda3/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
    File "/home/kevin/anaconda3/lib/python3.9/site-packages/setuptools/command/develop.py", line 34, in run
    self.install_for_development()
    File "/home/kevin/anaconda3/lib/python3.9/site-packages/setuptools/command/develop.py", line 114, in install_for_development
    self.run_command('build_ext')
    File "/home/kevin/anaconda3/lib/python3.9/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
    File "/home/kevin/anaconda3/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
    File "/home/kevin/pixel-perfect-sfm/setup.py", line 55, in run
    self.build_extension(ext)
    File "/home/kevin/pixel-perfect-sfm/setup.py", line 98, in build_extension
    subprocess.check_call(['cmake', '--build', '.'] + build_args,
    File "/home/kevin/anaconda3/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j']' returned non-zero exit status 2.
    ----------------------------------------
    ERROR: Command errored out with exit status 1: /home/kevin/anaconda3/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/kevin/pixel-perfect-sfm/setup.py'"'"'; __file__='"'"'/home/kevin/pixel-perfect-sfm/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.
    
    opened by KevinCain 5
  • Installation issue: No module named 'pixsfm._pixsfm._base'

    Installation issue: No module named 'pixsfm._pixsfm._base'

    I'm facing an issue while importing pixsfm . Following is the error-

    >>> from pixsfm.util.visualize import init_image, plot_points2D Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/ubuntu/pixelperf/pixel-perfect-sfm/pixsfm/__init__.py", line 18, in <module> from . import ( # noqa F403 File "/home/ubuntu/pixelperf/pixel-perfect-sfm/pixsfm/base/__init__.py", line 1, in <module> from .._pixsfm._base import * # noqa F403 ModuleNotFoundError: No module named 'pixsfm._pixsfm._base'

    opened by manasi9610 4
  • Core dump during feature-metric keypoint adjustment

    Core dump during feature-metric keypoint adjustment

    I'm trying to refine keypoint from database,and I get core dump during Start feature-metric keypoint adjustment.

    The database is built on superpoint and superglue. When the descriptor does not exist in the database, the program will core dump. If the score is empty, this situation will be handle in the Graph::RegisterMatches, what is the cause of this problem?

    void Graph::RegisterMatches(std::string imname1, std::string imname2,
                                size_t* matches,       // Nx2
                                double* similarities,  // Nx1
                                size_t n_matches) {
      for (size_t match_idx = 0; match_idx < n_matches; ++match_idx) {
        colmap::point2D_t feature_idx1 = matches[2 * match_idx];
        colmap::point2D_t feature_idx2 = matches[2 * match_idx + 1];
        **double similarity = similarities ? similarities[match_idx] : 1.0;**
    
        FeatureNode* node1 = FindOrCreateNode(imname1, feature_idx1);
        FeatureNode* node2 = FindOrCreateNode(imname2, feature_idx2);
    
        AddEdge(node1, node2, similarity);
      }
    }
    

    When I import the descriptor of superpoint and read it accoording to float32, it still core dump in feature-metric keypoint adjustment. But I use the default uint8 to read the descriptor and the program works fine. I don`t think this is normal, the superpoint descriptor should not be of uint8. What is the cause of this problem?

    my code

    conf = {
            "dense_features": {"use_cache": True,
            "max_edge": 1024},
    }
    refiner = PixSfM(conf=conf)
    keypoints, _, _ = refiner.refine_keypoints_from_db(
            refined_database,
            database,
            image_dir,
            )
    

    Thanks in advance!

    my environment: Ubuntu 16.04 Python 3.8

    opened by Xiaobin-Jiang 4
  • Tanks and Temples eval?

    Tanks and Temples eval?

    Hi, Thanks for making this code available, and especially for the pycolmap improvements-- those have been needed for a very long time and the effort will have a big impact.

    Have you evaluated this method on Tanks and Temples (or considered doing so) ? The object-centric scenes are a perhaps bit different-- there is perhaps more range of depth and background keypoints have less support (fewer images). If not, do you see more relevance with ETH3D?

    opened by pwais 4
  • Some issues when loading match data from colmap database

    Some issues when loading match data from colmap database

    Hi, thanks for your fantastic work. But I got some problems when loading .db file generated by colmap. Here is the problem trace:

    Traceback (most recent call last): File "/home/tsk/anaconda3/envs/pixel/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/home/tsk/anaconda3/envs/pixel/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/tsk/workspace/pixel-perfect-sfm/pixsfm/refine_colmap.py", line 209, in args.database_path, args.image_dir, cache_path=args.cache_path) File "/home/tsk/workspace/pixel-perfect-sfm/pixsfm/refine_colmap.py", line 108, in refine_keypoints_from_db pairs, matches, scores = read_matches_from_db(database_path) File "/home/tsk/workspace/pixel-perfect-sfm/pixsfm/util/colmap.py", line 38, in read_matches_from_db desc[image_id] = blob_to_array(data, np.uint32, (-1, c)) File "/home/tsk/workspace/pixel-perfect-sfm/pixsfm/util/database.py", line 134, in blob_to_array return np.fromstring(blob, dtype=dtype).reshape(*shape) ValueError: cannot reshape array of size 277536 into shape (128)

    This seems to be the dimention of descriptor. However, I build the latest version of colmap and pycolmap from source. The .db file is generated from the colmap. Moreover, I noticed that the output dimention of descriptor is always 128.

    Thanks in advance for your reply! Shengkun

    opened by Tangshengku 4
  • build error

    build error

    pip install -e . Obtaining file:///home/goodix/qxg/groundtruth/pixsfm/pixel-perfect-sfm Preparing metadata (setup.py) ... done Installing collected packages: pixsfm Running setup.py develop for pixsfm error: subprocess-exited-with-error

    × python setup.py develop did not run successfully.
    │ exit code: 1
    ╰─> [124 lines of output]
        running develop
        running egg_info
        writing pixsfm.egg-info/PKG-INFO
        writing dependency_links to pixsfm.egg-info/dependency_links.txt
        writing top-level names to pixsfm.egg-info/top_level.txt
        reading manifest file 'pixsfm.egg-info/SOURCES.txt'
        adding license file 'LICENSE'
        writing manifest file 'pixsfm.egg-info/SOURCES.txt'
        running build_ext
        -- A library with BLAS API found.
        -- Found AMD headers in: /usr/include/suitesparse
        -- Found AMD library: /usr/lib/x86_64-linux-gnu/libamd.so
        -- Found CAMD headers in: /usr/include/suitesparse
        -- Found CAMD library: /usr/lib/x86_64-linux-gnu/libcamd.so
        -- Found CCOLAMD headers in: /usr/include/suitesparse
        -- Found CCOLAMD library: /usr/lib/x86_64-linux-gnu/libccolamd.so
        -- Found CHOLMOD headers in: /usr/include/suitesparse
        -- Found CHOLMOD library: /usr/lib/x86_64-linux-gnu/libcholmod.so
        -- Found COLAMD headers in: /usr/include/suitesparse
        -- Found COLAMD library: /usr/lib/x86_64-linux-gnu/libcolamd.so
        -- Found SPQR headers in: /usr/include/suitesparse
        -- Found SPQR library: /usr/lib/x86_64-linux-gnu/libspqr.so
        -- Found Config headers in: /usr/include/suitesparse
        -- Found Config library: /usr/lib/x86_64-linux-gnu/libsuitesparseconfig.so
        -- Did not find Intel TBB library, assuming SuiteSparseQR was not compiled with TBB.
        -- Adding librt to SuiteSparse_config libraries (required on Linux & Unix [not OSX] if SuiteSparse is compiled with timing).
        -- Found required Ceres dependency: Eigen version 3.3.7 in /usr/local/share/eigen3/cmake
        -- Found required Ceres dependency: glog
        -- Found required Ceres dependency: gflags
        -- Found Ceres version: 2.1.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, SchurSpecializations, Multithreading]
        -- Boost version: 1.65.1
        -- Found the following Boost libraries:
        --   program_options
        --   filesystem
        --   system
        --   unit_test_framework
        -- Found Eigen
        --   Includes : /usr/local/include/eigen3
        -- Found FreeImage
        --   Includes : /usr/include
        --   Libraries : /usr/lib/x86_64-linux-gnu/libfreeimage.so
        -- Found Glog
        --   Includes : /usr/include
        --   Libraries : /usr/lib/x86_64-linux-gnu/libglog.so
        -- Found Glew
        --   Includes : /usr/include
        --   Libraries : /usr/lib/x86_64-linux-gnu/libGLEW.so
        Compiling with AVX2 support.
        -- HDF5: Using hdf5 compiler wrapper to determine C configuration
        -- Boost version: 1.65.1
        -- Found the following Boost libraries:
        --   system
        --   serialization
        CMake Warning at third-party/HighFive/CMakeLists.txt:84 (message):
          Unit tests have been DISABLED.
        
        
        -- pybind11 v2.10.2
        -- Configuring done
        CMake Warning at third-party/pybind11/tools/pybind11Tools.cmake:177 (add_library):
          Cannot generate a safe runtime search path for target _pixsfm because files
          in some directories may conflict with libraries in implicit directories:
        
            runtime library [libz.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
              /home/goodix/anaconda3/envs/gt/lib
        
          Some of these libraries may not be found correctly.
        Call Stack (most recent call first):
          cmake/CMakeHelper.cmake:136 (pybind11_add_module)
          pixsfm/CMakeLists.txt:22 (PIXSFM_ADD_PYMODULE)
        
        
        -- Generating done
        -- Build files have been written to: /home/goodix/qxg/groundtruth/pixsfm/pixel-perfect-sfm/build/temp.linux-x86_64-cpython-38
        [ 56%] Built target pixsfm
        [ 91%] Built target pypixsfm
        [ 95%] Linking CXX shared module ../../../pixsfm/_pixsfm.cpython-38-x86_64-linux-gnu.so
        /usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libpba.a(pba_generated_ProgramCU.cu.o): relocation R_X86_64_PC32 against symbol `_ZN3pba20jte_point_vec_kernelILi2ELi2EEEviiPf' can not be used when making a shared object; recompile with -fPIC
        /usr/bin/ld: 最后的链结失败: 错误的值
        collect2: error: ld returned 1 exit status
        pixsfm/CMakeFiles/_pixsfm.dir/build.make:156: recipe for target '../../pixsfm/_pixsfm.cpython-38-x86_64-linux-gnu.so' failed
        make[2]: *** [../../pixsfm/_pixsfm.cpython-38-x86_64-linux-gnu.so] Error 1
        CMakeFiles/Makefile2:308: recipe for target 'pixsfm/CMakeFiles/_pixsfm.dir/all' failed
        make[1]: *** [pixsfm/CMakeFiles/_pixsfm.dir/all] Error 2
        Makefile:129: recipe for target 'all' failed
        make: *** [all] Error 2
        /home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
          warnings.warn(
        /home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
          warnings.warn(
        Traceback (most recent call last):
          File "<string>", line 2, in <module>
          File "<pip-setuptools-caller>", line 34, in <module>
          File "/home/goodix/qxg/groundtruth/pixsfm/pixel-perfect-sfm/setup.py", line 112, in <module>
            setup(
          File "/home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/__init__.py", line 87, in setup
            return distutils.core.setup(**attrs)
          File "/home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
            return run_commands(dist)
          File "/home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
            dist.run_commands()
          File "/home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
            self.run_command(cmd)
          File "/home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/dist.py", line 1217, in run_command
            super().run_command(command)
          File "/home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
            cmd_obj.run()
          File "/home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/command/develop.py", line 34, in run
            self.install_for_development()
          File "/home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/command/develop.py", line 114, in install_for_development
            self.run_command('build_ext')
          File "/home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
            self.distribution.run_command(command)
          File "/home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/dist.py", line 1217, in run_command
            super().run_command(command)
          File "/home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
            cmd_obj.run()
          File "/home/goodix/qxg/groundtruth/pixsfm/pixel-perfect-sfm/setup.py", line 55, in run
            self.build_extension(ext)
          File "/home/goodix/qxg/groundtruth/pixsfm/pixel-perfect-sfm/setup.py", line 98, in build_extension
            subprocess.check_call(['cmake', '--build', '.'] + build_args,
          File "/home/goodix/anaconda3/envs/gt/lib/python3.8/subprocess.py", line 364, in check_call
            raise CalledProcessError(retcode, cmd)
        subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j']' returned non-zero exit status 2.
        [end of output]
    
    note: This error originates from a subprocess, and is likely not a problem with pip.
    

    error: subprocess-exited-with-error

    × python setup.py develop did not run successfully. │ exit code: 1 ╰─> [124 lines of output] running develop running egg_info writing pixsfm.egg-info/PKG-INFO writing dependency_links to pixsfm.egg-info/dependency_links.txt writing top-level names to pixsfm.egg-info/top_level.txt reading manifest file 'pixsfm.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'pixsfm.egg-info/SOURCES.txt' running build_ext -- A library with BLAS API found. -- Found AMD headers in: /usr/include/suitesparse -- Found AMD library: /usr/lib/x86_64-linux-gnu/libamd.so -- Found CAMD headers in: /usr/include/suitesparse -- Found CAMD library: /usr/lib/x86_64-linux-gnu/libcamd.so -- Found CCOLAMD headers in: /usr/include/suitesparse -- Found CCOLAMD library: /usr/lib/x86_64-linux-gnu/libccolamd.so -- Found CHOLMOD headers in: /usr/include/suitesparse -- Found CHOLMOD library: /usr/lib/x86_64-linux-gnu/libcholmod.so -- Found COLAMD headers in: /usr/include/suitesparse -- Found COLAMD library: /usr/lib/x86_64-linux-gnu/libcolamd.so -- Found SPQR headers in: /usr/include/suitesparse -- Found SPQR library: /usr/lib/x86_64-linux-gnu/libspqr.so -- Found Config headers in: /usr/include/suitesparse -- Found Config library: /usr/lib/x86_64-linux-gnu/libsuitesparseconfig.so -- Did not find Intel TBB library, assuming SuiteSparseQR was not compiled with TBB. -- Adding librt to SuiteSparse_config libraries (required on Linux & Unix [not OSX] if SuiteSparse is compiled with timing). -- Found required Ceres dependency: Eigen version 3.3.7 in /usr/local/share/eigen3/cmake -- Found required Ceres dependency: glog -- Found required Ceres dependency: gflags -- Found Ceres version: 2.1.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, SchurSpecializations, Multithreading] -- Boost version: 1.65.1 -- Found the following Boost libraries: -- program_options -- filesystem -- system -- unit_test_framework -- Found Eigen -- Includes : /usr/local/include/eigen3 -- Found FreeImage -- Includes : /usr/include -- Libraries : /usr/lib/x86_64-linux-gnu/libfreeimage.so -- Found Glog -- Includes : /usr/include -- Libraries : /usr/lib/x86_64-linux-gnu/libglog.so -- Found Glew -- Includes : /usr/include -- Libraries : /usr/lib/x86_64-linux-gnu/libGLEW.so Compiling with AVX2 support. -- HDF5: Using hdf5 compiler wrapper to determine C configuration -- Boost version: 1.65.1 -- Found the following Boost libraries: -- system -- serialization CMake Warning at third-party/HighFive/CMakeLists.txt:84 (message): Unit tests have been DISABLED.

    -- pybind11 v2.10.2
    -- Configuring done
    CMake Warning at third-party/pybind11/tools/pybind11Tools.cmake:177 (add_library):
      Cannot generate a safe runtime search path for target _pixsfm because files
      in some directories may conflict with libraries in implicit directories:
    
        runtime library [libz.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
          /home/goodix/anaconda3/envs/gt/lib
    
      Some of these libraries may not be found correctly.
    Call Stack (most recent call first):
      cmake/CMakeHelper.cmake:136 (pybind11_add_module)
      pixsfm/CMakeLists.txt:22 (PIXSFM_ADD_PYMODULE)
    
    
    -- Generating done
    -- Build files have been written to: /home/goodix/qxg/groundtruth/pixsfm/pixel-perfect-sfm/build/temp.linux-x86_64-cpython-38
    [ 56%] Built target pixsfm
    [ 91%] Built target pypixsfm
    [ 95%] Linking CXX shared module ../../../pixsfm/_pixsfm.cpython-38-x86_64-linux-gnu.so
    /usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libpba.a(pba_generated_ProgramCU.cu.o): relocation R_X86_64_PC32 against symbol `_ZN3pba20jte_point_vec_kernelILi2ELi2EEEviiPf' can not be used when making a shared object; recompile with -fPIC
    /usr/bin/ld: 最后的链结失败: 错误的值
    collect2: error: ld returned 1 exit status
    pixsfm/CMakeFiles/_pixsfm.dir/build.make:156: recipe for target '../../pixsfm/_pixsfm.cpython-38-x86_64-linux-gnu.so' failed
    make[2]: *** [../../pixsfm/_pixsfm.cpython-38-x86_64-linux-gnu.so] Error 1
    CMakeFiles/Makefile2:308: recipe for target 'pixsfm/CMakeFiles/_pixsfm.dir/all' failed
    make[1]: *** [pixsfm/CMakeFiles/_pixsfm.dir/all] Error 2
    Makefile:129: recipe for target 'all' failed
    make: *** [all] Error 2
    /home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    /home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    Traceback (most recent call last):
      File "<string>", line 2, in <module>
      File "<pip-setuptools-caller>", line 34, in <module>
      File "/home/goodix/qxg/groundtruth/pixsfm/pixel-perfect-sfm/setup.py", line 112, in <module>
        setup(
      File "/home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/__init__.py", line 87, in setup
        return distutils.core.setup(**attrs)
      File "/home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
        return run_commands(dist)
      File "/home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
        dist.run_commands()
      File "/home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
        self.run_command(cmd)
      File "/home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/dist.py", line 1217, in run_command
        super().run_command(command)
      File "/home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
        cmd_obj.run()
      File "/home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/command/develop.py", line 34, in run
        self.install_for_development()
      File "/home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/command/develop.py", line 114, in install_for_development
        self.run_command('build_ext')
      File "/home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
        self.distribution.run_command(command)
      File "/home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/dist.py", line 1217, in run_command
        super().run_command(command)
      File "/home/goodix/anaconda3/envs/gt/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
        cmd_obj.run()
      File "/home/goodix/qxg/groundtruth/pixsfm/pixel-perfect-sfm/setup.py", line 55, in run
        self.build_extension(ext)
      File "/home/goodix/qxg/groundtruth/pixsfm/pixel-perfect-sfm/setup.py", line 98, in build_extension
        subprocess.check_call(['cmake', '--build', '.'] + build_args,
      File "/home/goodix/anaconda3/envs/gt/lib/python3.8/subprocess.py", line 364, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j']' returned non-zero exit status 2.
    [end of output]
    

    note: This error originates from a subprocess, and is likely not a problem with pip.

    when I run pip install -e . it happens with this error, can you tell me how to fix it? Thanks

    opened by jackchinor 0
  • KA cost -NAN in thousands of images.

    KA cost -NAN in thousands of images.

    Since low_memory.yaml cannot improve the accuracy of the camera poses a lot for my dataset(1764 images in a café), I am trying to use featuremetric strategy for large scale images. However, even if I provide enough cpu for it, the KA cost is -NAN for this strategy. Have you ever test featuremetric strategy for large scale? Is this strategy suitable for such situation? Here is my log:

    1764 mapping images
    [2022/12/15 11:18:55 hloc INFO] Extracting local features with configuration:
    {'model': {'name': 'dog'},
     'output': 'feats-sift',
     'preprocessing': {'grayscale': True, 'resize_max': 1600}}
    [2022/12/15 11:18:58 hloc INFO] Skipping the extraction.
    [2022/12/15 11:18:59 hloc INFO] Found 1554966 pairs.
    [2022/12/15 11:18:59 hloc INFO] Matching local features with configuration:
    {'model': {'do_mutual_check': True,
               'name': 'nearest_neighbor',
               'ratio_threshold': 0.8},
     'output': 'matches-NN-mutual-ratio.8'}
    [2022/12/15 11:21:18 hloc INFO] Skipping the matching.
    [2022/12/15 11:21:22 pixsfm.features.models.s2dnet INFO] Loading S2DNet checkpoint at /data2/x00586938/pixel-perfect-sfm/pixsfm/features/models/checkpoints/s2dnet_weights.pth.
    [2022/12/15 11:21:22 pixsfm INFO] Loaded dense extractor with configuration:
    {'cache_format': 'chunked',
     'device': 'auto',
     'dtype': 'half',
     'fast_image_load': False,
     'l2_normalize': True,
     'load_cache_on_init': False,
     'max_edge': 1600,
     'model': {'name': 's2dnet'},
     'overwrite_cache': False,
     'patch_size': 16,
     'pyr_scales': [1.0],
     'resize': 'LANCZOS',
     'sparse': True,
     'use_cache': False}
    [2022/12/15 11:48:05 pixsfm INFO] Building matching graph...
    [2022/12/15 11:49:07 pixsfm INFO] Extracting dense features...
    100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1744/1744 [15:26<00:00,  1.88it/s]
    [2022/12/15 12:04:37 pixsfm INFO] Computing tracks...
    [2022/12/15 12:04:37 pixsfm INFO] # graph nodes: 4093610
    [2022/12/15 12:04:39 pixsfm INFO] # graph edges: 26582231
    [2022/12/15 12:10:52 pixsfm INFO] # tracks: 195419
    [2022/12/15 12:10:57 pixsfm INFO] Start feature-metric keypoint adjustment.
    [2022/12/15 12:11:02 pixsfm WARNING] 15746 / 33210 problems have more than 50 keypoints.
             Maximum keypoints in a problem: 684
    100%[████████████████████] 4093610/4093610 [19:13, 3549.15it/s]
        Residuals : -1963876342
       Parameters : 7742986
       Iterations : 100
             Time : 98505.3 [s]
     Initial cost : -nan
       Final cost : -nan
      Termination : Convergence
    
    [2022/12/15 12:30:20 pixsfm INFO] KA Time: 1153.4s, cost change: -nan --> -nan
    [2022/12/15 12:30:29 hloc INFO] Importing features into the database...
    100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1764/1764 [00:01<00:00, 948.60it/s]
    [2022/12/15 12:30:31 hloc INFO] Importing matches into the database...
    100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1554966/1554966 [41:34<00:00, 623.45it/s]
    [2022/12/15 13:12:09 hloc INFO] Performing geometric verification of the matches...
    100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1763/1763 [4:58:01<00:00, 10.14s/it]
    [2022/12/15 18:10:12 hloc INFO] mean/med/min/max valid matches 3.93/0.00/0.00/100.00%.
    [2022/12/15 18:10:14 hloc INFO] Running 3D triangulation...
    [2022/12/15 18:18:01 hloc INFO] Finished the triangulation with statistics:
    Reconstruction:
            num_reg_images = 1764
            num_cameras = 1
            num_points3D = 281459
            num_observations = 2148514
            mean_track_length = 7.63349
            mean_observations_per_image = 1217.98
            mean_reprojection_error = 1.02626
    [2022/12/15 18:18:03 pixsfm INFO] Extracting references.
    100%[████████████████████] 281459/281459 [00:10, 27933.6it/s]
    [2022/12/15 18:18:14 pixsfm INFO] Reference Extraction Time: 10.0746s
    [2022/12/15 18:18:14 pixsfm INFO] Start feature-reference bundle adjustment.
      0%[                    ]   0/101 [00:00, -nanit/s]Aborted (core dumped)
    

    Here is my config:

    dense_features:
        sparse : true
        dtype : "half"
        use_cache: true
        overwrite_cache: true
        load_cache_on_init: false
        patch_size: 8
        cache_format: "chunked"
    interpolation:
        nodes: [[0.0,0.0]]
        mode: "BICUBIC"
    mapping:
      interpolation: ${interpolation}
      KA:
        strategy: featuremetric
        apply: true
        interpolation: ${..interpolation}
        level_indices: null
        max_kps_per_problem: 50
        optimizer:
          loss:
            name: cauchy
            params:
            - 0.25
          solver:
            function_tolerance: 0.0
            gradient_tolerance: 0.0
            parameter_tolerance: 1.0e-05
            minimizer_progress_to_stdout: false
            max_num_iterations: 100
            max_linear_solver_iterations: 200
            max_num_consecutive_invalid_steps: 10
            max_consecutive_nonmonotonic_steps: 10
            use_inner_iterations: false
            use_nonmonotonic_steps: true
            update_state_every_iteration: false
            num_threads: 1
          print_summary: true
          bound: 4.0
          num_threads: -1
        split_in_subproblems: true
      BA:
        apply: true
        interpolation: ${..interpolation}
        level_indices: null
        max_tracks_per_problem: 10
        num_threads: -1
        optimizer:
          loss:
            name: cauchy
            params:
            - 0.25
          solver:
            function_tolerance: 0.0
            gradient_tolerance: 0.0
            parameter_tolerance: 0.0
            minimizer_progress_to_stdout: false
            max_num_iterations: 100
            max_linear_solver_iterations: 200
            max_num_consecutive_invalid_steps: 10
            max_consecutive_nonmonotonic_steps: 10
            use_inner_iterations: true
            use_nonmonotonic_steps: true
            update_state_every_iteration: false
            num_threads: -1
          print_summary: true
          refine_focal_length: true
          refine_principal_point: true
          refine_extra_params: true
          refine_extrinsics: true
        references:
          loss:
            name: cauchy
            params:
            - 0.25
          iters: 100
          keep_observations: false
          compute_offsets3D: false
          num_threads: -1
        repeats: 1
        strategy: feature_reference
    localization:
      interpolation: ${interpolation}
      target_reference: nearest
      unique_inliers: min_error
      references:
        loss:
          name: cauchy
          params:
          - 0.25
        iters: 100
        keep_observations: true
        compute_offsets3D: false
        num_threads: -1
      max_tracks_per_problem: 50
      QKA:
        apply: true
        feature_inlier_thresh: -1
        interpolation: ${..interpolation}
        level_indices: null
        overwrite_features_sparse: null
        stacked_correspondences: False
        optimizer:
          loss:
            name: trivial
            params: []
          solver:
            function_tolerance: 0.0
            gradient_tolerance: 0.0
            parameter_tolerance: 1.0e-05
            minimizer_progress_to_stdout: false
            max_num_iterations: 100
            max_linear_solver_iterations: 200
            max_num_consecutive_invalid_steps: 10
            max_consecutive_nonmonotonic_steps: 10
            use_inner_iterations: false
            use_nonmonotonic_steps: true
            update_state_every_iteration: false
            num_threads: -1
          print_summary: false
          bound: 4.0
      PnP:
        estimation:
          ransac:
            max_error: 12
        refinement: {}
      QBA:
        apply: true
        interpolation: ${..interpolation}
        level_indices: null
        optimizer:
          loss:
            name: cauchy
            params:
            - 0.25
          solver:
            function_tolerance: 0.0
            gradient_tolerance: 0.0
            parameter_tolerance: 0.0
            minimizer_progress_to_stdout: false
            max_num_iterations: 100
            max_linear_solver_iterations: 200
            max_num_consecutive_invalid_steps: 10
            max_consecutive_nonmonotonic_steps: 10
            use_inner_iterations: false
            use_nonmonotonic_steps: false
            update_state_every_iteration: false
            num_threads: -1
          print_summary: false
          refine_focal_length: false
          refine_principal_point: false
          refine_extra_params: false
    
    opened by Xiaxia1997 2
  • pip install -e . fails

    pip install -e . fails

    Thanks for your awesome work!

    Hi, I get the following error when building:

        -- Generating done
        -- Build files have been written to: /home/larsh/development/pixel-perfect-sfm/build/temp.linux-x86_64-cpython-39
        [ 56%] Built target pixsfm
        [ 60%] Building CXX object pixsfm/CMakeFiles/pypixsfm.dir/bundle_adjustment/bindings.cc.o
        In file included from /home/larsh/development/pixel-perfect-sfm/pixsfm/bundle_adjustment/src/costmap_extractor.h:18,
                         from /home/larsh/development/pixel-perfect-sfm/pixsfm/bundle_adjustment/bindings.cc:14:
        /home/larsh/development/pixel-perfect-sfm/pixsfm/bundle_adjustment/src/reference_extractor.h:331:32: error: redefinition of default argument for ‘int N_NODES’
          331 | template <int N_NODES = Eigen::Dynamic>
              |                                ^~~~~~~
        /home/larsh/development/pixel-perfect-sfm/pixsfm/bundle_adjustment/src/reference_extractor.h:52:32: note: original definition appeared here
           52 | template <int N_NODES = Eigen::Dynamic>
              |                                ^~~~~~~
        make[2]: *** [pixsfm/CMakeFiles/pypixsfm.dir/build.make:132: pixsfm/CMakeFiles/pypixsfm.dir/bundle_adjustment/bindings.cc.o] Error 1
        make[1]: *** [CMakeFiles/Makefile2:376: pixsfm/CMakeFiles/pypixsfm.dir/all] Error 2
        make: *** [Makefile:136: all] Error 2
        Traceback (most recent call last):
          File "<string>", line 2, in <module>
          File "<pip-setuptools-caller>", line 34, in <module>
          File "/home/larsh/development/pixel-perfect-sfm/setup.py", line 112, in <module>
            setup(
          File "/home/larsh/micromamba/envs/pp_sfm/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup
            return distutils.core.setup(**attrs)
          File "/home/larsh/micromamba/envs/pp_sfm/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
            return run_commands(dist)
          File "/home/larsh/micromamba/envs/pp_sfm/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
            dist.run_commands()
          File "/home/larsh/micromamba/envs/pp_sfm/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
            self.run_command(cmd)
          File "/home/larsh/micromamba/envs/pp_sfm/lib/python3.9/site-packages/setuptools/dist.py", line 1217, in run_command
            super().run_command(command)
          File "/home/larsh/micromamba/envs/pp_sfm/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
            cmd_obj.run()
          File "/home/larsh/micromamba/envs/pp_sfm/lib/python3.9/site-packages/setuptools/command/develop.py", line 34, in run
            self.install_for_development()
          File "/home/larsh/micromamba/envs/pp_sfm/lib/python3.9/site-packages/setuptools/command/develop.py", line 114, in install_for_development
            self.run_command('build_ext')
          File "/home/larsh/micromamba/envs/pp_sfm/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
            self.distribution.run_command(command)
          File "/home/larsh/micromamba/envs/pp_sfm/lib/python3.9/site-packages/setuptools/dist.py", line 1217, in run_command
            super().run_command(command)
          File "/home/larsh/micromamba/envs/pp_sfm/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
            cmd_obj.run()
          File "/home/larsh/development/pixel-perfect-sfm/setup.py", line 55, in run
            self.build_extension(ext)
          File "/home/larsh/development/pixel-perfect-sfm/setup.py", line 98, in build_extension
            subprocess.check_call(['cmake', '--build', '.'] + build_args,
          File "/home/larsh/micromamba/envs/pp_sfm/lib/python3.9/subprocess.py", line 373, in check_call
            raise CalledProcessError(retcode, cmd)
        subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j']' returned non-zero exit status 2.
        [end of output]
    

    gcc -v gcc version 11.3.0

    opened by spacycoder 1
  • i have problem in demo

    i have problem in demo

    I've tried demo with my own datasets. there are 239 images in datasets. everything works fine until "reconstruction ". My kernel always die in this process. what happened? how to solve this?

    opened by mrKornWij 1
  • IndexError: _Map_base::at when running demo.ipynb

    IndexError: _Map_base::at when running demo.ipynb

    Hi.

    I get the following error when testing the demo.ipynb on another small dataset:

    IndexError                                Traceback (most recent call last)
    /tmp/ipykernel_5075/3412010250.py in <cell line: 1>()
    ----> 1 raw.align_points(refined, max_error=0.005, min_inlier_ratio=0.9, min_overlap=3)
    
    IndexError: _Map_base::at
    

    Here's the summary of the reconstruction:

    Raw Reconstruction:
    	num_reg_images = 25
    	num_cameras = 1
    	num_points3D = 1262
    	num_observations = 4097
    	mean_track_length = 3.24643
    	mean_observations_per_image = 163.88
    	mean_reprojection_error = 1.35567
    Refined Reconstruction:
    	num_reg_images = 24
    	num_cameras = 1
    	num_points3D = 1259
    	num_observations = 4241
    	mean_track_length = 3.36855
    	mean_observations_per_image = 176.708
    	mean_reprojection_error = 1.292
    

    It worked OK on the demo dataset but not on my dataset. What could be the problem here?

    opened by SeyedAlirezaFatemi 1
Owner
Computer Vision and Geometry Lab
Computer Vision and Geometry Lab
Convert ASF/AMC motion capture files to BVH motion capture files.

About amc2bvh is a utility that converts a pair of files, one in the Acclaim Skeleton Format (ASF) and the other in the Acclaim Motion Capture (AMC) f

Tom Copeland 9 Nov 10, 2022
The 2nd solution (68.1 mIoU) for ICCV workshop challenge SensarUrban

SensatUrban 2nd Solution This repository is for the runner up solution for the ICCV 2021 workshop challenge SensatUrban. Getting Started Requirements

Benny 22 Dec 1, 2022
open Multiple View Geometry library. Basis for 3D computer vision and Structure from Motion.

OpenMVG (open Multiple View Geometry) License Documentation Continuous Integration (Linux/MacOs/Windows) Build Code Quality Chat Wiki local/docker bui

openMVG 4.6k Jan 8, 2023
RXMesh - A GPU Mesh Data Structure - SIGGRAPH 2021

RXMesh About RXMesh is a surface triangle mesh data structure and programming model for processing static meshes on the GPU. RXMesh aims at provides a

null 137 Dec 18, 2022
Chunky pixel watch face for SQFMI's Watchy

pxl999 Pxl999 is a chunky pixel watch face for SQFMI's Watchy. This watch face features live weather updates every 30 minutes and NTP syncing twice a

null 28 Apr 17, 2022
ADOP: Approximate Differentiable One-Pixel Point Rendering

ADOP: Approximate Differentiable One-Pixel Point Rendering

Darius Rückert 1.9k Dec 28, 2022
A method to estimate 3D hand gestures from 3D body motion input in body languages.

Body2Hands: Learning to Infer 3D Hands from Conversational Gesture Body Dynamics (CVPR 2021) Project page This repository contains a pytorch implement

Facebook Research 84 Oct 23, 2022
Extracts high-precision mouse/pointer motion data on Windows. Good for drawing software!

window_mouse_queue This is a wrapper for GetMouseMovePointsEx function that allows to extract high-precision mouse/pointer motion data on Windows. Goo

YellowAfterlife's GameMaker Things 6 Feb 21, 2022
Stochastic Scene-Aware Motion Prediction

Stochastic Scene-Aware Motion Prediction [Project Page] [Paper] Description This repository contains the runtime Unity code for SAMP. For the training

Mohamed Hassan 98 Dec 9, 2022
ROS wrapper for real-time incremental event-based vision motion estimation by dispersion minimisation

event_emin_ros ROS wrapper for real-time incremental event-based vision motion estimation by dispersion minimisation (EventEMin). This code was used t

Imperial College London 2 Jan 10, 2022
The Robotics Library (RL) is a self-contained C++ library for rigid body kinematics and dynamics, motion planning, and control.

Robotics Library The Robotics Library (RL) is a self-contained C++ library for rigid body kinematics and dynamics, motion planning, and control. It co

Robotics Library 656 Jan 1, 2023
A tiny C++11 library for reading BVH motion capture data

bvh11 A tiny C++11 library for reading (and writing) BVH motion capture data. Dependencies C++11 standard library Eigen 3 http://eigen.tuxfamily.org/

Yuki Koyama 33 Dec 19, 2022
2021/3/30 ~ 2021/7/12 に行われる企画「競プロ典型 90 問」の問題・解説・ソースコードなどの資料をアップロードしています。

競プロ典型 90 問 日曜を除く毎朝 7:40 に競プロやアルゴリズムの教育的な問題を Twitter(@e869120)に投稿する企画です。 本企画は、2021 年 3 月 30 日から 7 月 12 日まで行われる予定です。 企画の目的 「競プロ典型 90 問」は、競プロ初級者から中上級者(レー

Masataka Yoneda 709 Dec 29, 2022
Super Mario Remake using C++, SFML, and Image Processing which was a project for Structure Programming Course, 1st Year

Super Mario Remake We use : C++ in OOP concepts SFML for game animations and sound effects. Image processing (Tensorflow and openCV) to add additional

Omar Elshopky 5 Dec 11, 2022
Collection of Fluid Structure Interaction codes, used for one of my PhD courses

Continuum mechanics and fluid-structure interaction problems mathematical modeling and numerical approximation Fluid-structure interaction (FSI) refer

Luca Heltai 3 Aug 12, 2022
A coupling library for partitioned multi-physics simulations, including, but not restricted to fluid-structure interaction and conjugate heat transfer simulations.

A coupling library for partitioned multi-physics simulations, including, but not restricted to fluid-structure interaction and conjugate heat transfer simulations.

preCICE 498 Jan 6, 2023
The repository contains our dataset and C++ implementation of the CVPR 2022 paper, Geometric Structure Preserving Warp for Natural Image Stitching.

Geometric Structure Preserving Warp for Natural Image Stitching This repository contains our dataset and C++ implementation of the CVPR 2022 paper, Ge

null 21 Dec 22, 2022
Root shell PoC for CVE-2021-3156

CVE-2021-3156 Root shell PoC for CVE-2021-3156 (no bruteforce) For educational purposes etc. Tested on Ubuntu 20.04 against sudo 1.8.31 All research c

CptGibbon 119 Jan 3, 2023
CVE-2021-3156非交互式执行命令

CVE-2021-3156 This is a warehouse modification based on @CptGibbon and supports arbitrary command execution. 相关阅读:CVE-2021-3156 - Exploit修改 Root shell

倾旋 188 Nov 15, 2022