Git Product home page Git Product logo

bytedance / particle-sfm Goto Github PK

View Code? Open in Web Editor NEW
247.0 15.0 21.0 2.67 MB

ParticleSfM: Exploiting Dense Point Trajectories for Localizing Moving Cameras in the Wild. ECCV 2022.

Home Page: http://b1ueber2y.me/projects/ParticleSfM/

License: GNU General Public License v3.0

CMake 11.22% C++ 64.59% Shell 0.16% Python 24.04%
motion-segmentation structure-from-motion dynamic-scenes video-correspondence

particle-sfm's Introduction

ParticleSfM

Code release for our ECCV 2022 paper "ParticleSfM: Exploiting Dense Point Trajectories for Localizing Moving Cameras in the Wild." by Wang Zhao, Shaohui Liu, Hengkai Guo, Wenping Wang and Yong-Jin Liu.

[Introduction] ParticleSfM is an offline structure-from-motion system for videos (image sequences). Inspired by Particle video, our method connects pairwise optical flows and optimizes dense point trajectories as long-range video correpondences, which are used in a customized global structure-from-motion framework with similarity averaging and global bundle adjustment. In particular, for dynamic scenes, the acquired dense point trajectories can be fed into a specially designed trajectory-based motion segmentation module to select static point tracks, enabling the system to produce reliable camera trajectories on in-the-wild sequences with complex foreground motion.

Teaser

Contact Wang Zhao ([email protected]), Shaohui Liu ([email protected]) and Hengkai Guo ([email protected]) for questions, comments and reporting bugs.

If you are interested in potential collaboration or internship at ByteDance, please feel free to contact Hengkai Guo ([email protected]).

Installation

  1. Install dependencies:
  • Ceres 2.0.0 [Guide]
  • COLMAP [Guide]
  • Theia SfM (customized version) [Guide]
  1. Set up Python environment with Conda:
conda env create -f particlesfm_env.yaml
conda activate particlesfm 
  1. Build our point trajectory optimizer and global structure-from-motion module.
  • The path to your customized python executable should be set here.
  • (Optional) Add another gcc search path (e.g. gcc 9) here to compile gmapper correctly.
git submodule update --init --recursive
sudo apt-get install libhdf5-dev
bash scripts/build_all.sh
  1. Download pretrained models for MiDaS, RAFT and our motion segmentation module (download script).
bash scripts/download_all_models.sh

Quickstart Demo

  1. Download two example in-the-wild sequences [Google Drive] from DAVIS: snowboard and train:
bash ./scripts/download_examples.sh
  1. Example command to run the reconstruction (e.g. on snowboard):
python run_particlesfm.py --image_dir ./example/snowboard/images --output_dir ./outputs/snowboard/

You can also alternatively use the command for the workspace with the images folder inside below. This option will write all the output in the same workspace.

python run_particlesfm.py --workspace_dir ./example/snowboard/
  1. Visualize the outputs with either the COLMAP GUI or your customized visualizer. We also provide a visualization script:
python -m pip install open3d pycolmap
python visualize.py --input_dir ./outputs/snowboard/sfm/model --visualize

The results below are expected (left: snowboard; right: train): Example

Usage

  1. Given an image sequence, put all the images in the same folder. The sorted ordering of the names should be consistent with its ordering in the sequence.

  2. Use the following command to run our whole pipeline:

    python run_particlesfm.py --image_dir /path/to/the/image/folder/ \
                              --output_dir /path/to/output/workspace/
    

    This will sequentially run optical flow -> point trajectory -> motion seg -> sfm. The final results will be saved inside the image data folder with COLMAP output format.

    If you have the prior information that the scene to be reconstructed is fully static, you can skip the motion segmentation module with --assume_static. Conversely, if you only want to run the motion segmentation, attach --skip_sfm to the command.

    To speed up

    • Use "--skip_path_consistency" to skip the path consistency optimization of point trajectories
    • Try higher down-sampling ratio for optimizing point trajectories: e.g. "--sample_ratio 4"
  3. Visualize the outputs using COLMAP GUI (Download the COLMAP Binary and import the data sequence directory) or just your customized visualizer.

Evaluation

MPI Sintel dataset

  1. Download the Sintel dataset. You also need to download the groundtruth camera motion data and the generated motion mask to evaluate the pose and motion segmentation.
  2. Prepare the sequences:
python scripts/prepare_sintel.py --src_dir /path/to/your/sintel/training/final/ \
                                 --tgt_dir /path/to/the/data/root/dir/want/to/save/
  1. Run ParticleSfM reconstructions:
python run_particlesfm.py --root_dir /path/to/the/data/root/dir/
  1. To evaluate the camera poses:
python ./evaluation_evo/eval_sintel.py --input_dir /path/to/the/data/root/dir/ \
                                       --gt_dir /path/to/the/sintel/training/data/camdata_left/ \
                                       --dataset sintel

This will output a txt file with detailed error metrics. Also, the camera trajectories are plotted and saved inside each data sequence folder.

  1. To evaluate the motion segmentation:
python ./motion_seg/eval_traj_iou.py --root_dir /path/to/the/data/root/dir/ \
                                     --gt_dir /path/to/the/sintel/rigidity/

ScanNet dataset

  1. Download the test split of ScanNet dataset, extract the data from .sens data using the official script.

  2. Prepare the sequences:

python scripts/prepare_scannet.py --src_dir /path/to/your/scannet/test/scans_test/ \ 
                                  --tgt_dir /path/to/the/data/root/dir/want/to/save/

We use the first 20 sequences of test split and perform downsampling with stride 3, resize the image to 640x480.

  1. Run ParticleSfM reconstructions:
python run_particlesfm.py --root_dir /path/to/the/data/root/dir/ \
                          --flow_check_thres 3.0 --assume_static
  1. To evaluate the camera poses:
python ./evaluation_evo/eval_scannet.py --input_dir /path/to/the/data/root/dir/ \
                                        --gt_dir /path/to/the/scannet/test/scans_test/ \
                                        --dataset scannet

This will output a txt file with detailed error metrics. Also, the camera trajectories are plotted and saved inside each data sequence folder.

Training

  1. Download the Flyingthings3D dataset from the official website. We need the RGB images (finalpass) and optical flow data.

  2. Download the generated binary motion labels from here or GoogleDrive, and unpack this archive into the root directory of the FlyingThings3D dataset. We thank the authors of MPNet for kindly sharing it.

  3. Prepare the training data:

python ./scripts/prepare_flyingthings3d.py --src_dir /path/to/your/flyingthings3d/data/root/
  1. To launch the training, configure your config file inside ./motion_seg/configs/ and then run:
cd ./motion_seg/
python train_seq.py ./configs/your-config-file
cd ..

Citation

@inproceedings{zhao2022particlesfm,
      author    = {Zhao, Wang and Liu, Shaohui and Guo, Hengkai and Wang, Wenping and Liu, Yong-Jin},
      title     = {ParticleSfM: Exploiting Dense Point Trajectories for Localizing Moving Cameras in the Wild},
      booktitle = {European conference on computer vision (ECCV)},
      year      = {2022}
  }

More related projects

  • DynaSLAM. Bescos et al. DynaSLAM: Tracking, Mapping and Inpainting in Dynamic Scenes. IROS 2018.
  • TrianFlow. Zhao et al. Towards Better Generalization: Joint Depth-Pose Learning without PoseNet. CVPR 2020.
  • VOLDOR. Min et al. VOLDOR-SLAM: For the times when feature-based or direct methods are not good enough. ICRA 2021.
  • DROID-SLAM. Teed et al. DROID-SLAM: Deep Visual SLAM for Monocular, Stereo, and RGB-D Cameras. NeurIPS 2021.

Acknowledgements

This project could not be possible without the great open-source works from COLMAP, Theia, hloc, RAFT, MiDaS and OANet. We sincerely thank them all.

particle-sfm's People

Contributors

b1ueber2y avatar guohengkai avatar jonathanlehner avatar mkocabas avatar thuzhaowang avatar yz-cnsdqz avatar

Stargazers

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

Watchers

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

particle-sfm's Issues

Issue building gmapper

All of the installs seem to go well except for the very last step. Maybe there's a problem finding the linked ceres from theia?


:~/projects/particle-sfm/sfm/gmapper/build$ cmake ..
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenMP: /usr/lib/gcc/x86_64-linux-gnu/8/include  
-- Found required Theia dependency: Eigen version 3.3.7 in /usr/include/eigen3
**-- Found required Theia dependency: Ceres in** 
-- Found required Theia dependency: Glog in /usr/include
-- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
-- Found installed version of gflags: /usr/lib/x86_64-linux-gnu/cmake/gflags
-- Detected gflags version: 2.2.2
-- Found required Theia dependency: Google Flags in /usr/include in namespace: google
-- Found Theia dependency: OpenImageIO in /usr/include
CMake Warning (dev) at /usr/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (ROCKSDB)
  does not match the name of the calling package (RocksDB).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/Theia/FindRocksDB.cmake:117 (find_package_handle_standard_args)
  /usr/local/share/Theia/TheiaConfig.cmake:172 (find_package)
  CMakeLists.txt:33 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found ROCKSDB: /usr/lib/librocksdb.so  
-- Found RocksDB
-- Found RocksDB: 
-- Found Threads: TRUE  
-- 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 COLAMD headers in: /usr/include/suitesparse
-- Found COLAMD library: /usr/lib/x86_64-linux-gnu/libcolamd.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 SUITESPARSEQR headers in: /usr/include/suitesparse
-- Found SUITESPARSEQR library: /usr/lib/x86_64-linux-gnu/libspqr.so
-- Did not find TBB library (optional SuiteSparse dependency)
-- Did not find Intel TBB library, assuming SuiteSparseQR was not compiled with TBB.
-- Found SUITESPARSE_CONFIG headers in: /usr/include/suitesparse
-- Found SUITESPARSE_CONFIG library: /usr/lib/x86_64-linux-gnu/libsuitesparseconfig.so
-- Found LIBRT library: /usr/lib/x86_64-linux-gnu/librt.so
-- Adding librt: /usr/lib/x86_64-linux-gnu/librt.so to SuiteSparse_config libraries (required on Linux & Unix [not OSX] if SuiteSparse is compiled with timing).
-- Found METIS library: /usr/lib/x86_64-linux-gnu/libmetis.so
-- Found SuiteSparse 5.7.1
-- Found Theia version: 0.7.0 installed in: /usr/local
-- Found required Ceres dependency: Eigen version 3.3.7 in /usr/include/eigen3
-- Found required Ceres dependency: glog
-- Found required Ceres dependency: gflags
-- Found Ceres version: 2.0.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, SchurSpecializations, Multithreading]
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components: program_options filesystem system unit_test_framework 
-- Found Eigen3: /usr/include/eigen3 (Required is at least version "2.91.0") 
-- Found Eigen
--   Includes : /usr/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
CMake Warning (dev) at /usr/share/cmake-3.24/Modules/FindOpenGL.cmake:315 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  /usr/local/share/colmap/COLMAPConfig.cmake:109 (find_package)
  CMakeLists.txt:34 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so   
-- Found Glew
--   Includes : /usr/include
--   Libraries : /usr/lib/x86_64-linux-gnu/libGLEW.so
-- Using header-only CGAL
-- Targetting Unix Makefiles
-- Using /usr/bin/c++ compiler.
-- Found GMP: /usr/lib/x86_64-linux-gnu/libgmp.so  
-- Found MPFR: /usr/lib/x86_64-linux-gnu/libmpfr.so  
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.48")  
-- Boost include dirs: /usr/include
-- Boost libraries:    
-- Using gcc version 4 or later. Adding -frounding-math
-- Build type not specified, using Release
-- Enabling SIMD support
-- Enabling OpenMP support
-- Disabling interprocedural optimization
-- Disabling profiling support
-- OpenMP: 
-- Configuring done
-- Generating done
-- Build files have been written to: particle-sfm/sfm/gmapper/build
:~/projects/particle-sfm/sfm/gmapper/build$ make -j
[  4%] Building CXX object src/CMakeFiles/gcolmap.dir/base/correspondence_graph.cc.o
[ 14%] Building CXX object src/CMakeFiles/gcolmap.dir/base/database_cache.cc.o
[ 14%] Building CXX object src/CMakeFiles/gcolmap.dir/base/reconstruction.cc.o
[ 23%] Building CXX object src/CMakeFiles/gcolmap.dir/base/reconstruction_manager.cc.o
[ 23%] Building CXX object src/CMakeFiles/gcolmap.dir/estimators/two_view_geometry.cc.o
[ 28%] Building CXX object src/CMakeFiles/gcolmap.dir/global/linear_position_estimator.cc.o
[ 38%] Building CXX object src/CMakeFiles/gcolmap.dir/controllers/global_mapper.cc.o
[ 38%] Building CXX object src/CMakeFiles/gcolmap.dir/global/nonlinear_position_estimator.cc.o
[ 47%] Building CXX object src/CMakeFiles/gcolmap.dir/global/orientation_util.cc.o
[ 47%] Building CXX object src/CMakeFiles/gcolmap.dir/global/filter_util.cc.o
[ 52%] Building CXX object src/CMakeFiles/gcolmap.dir/global/robust_rotation_estimator.cc.o
[ 57%] Building CXX object src/CMakeFiles/gcolmap.dir/global/known_rotation_util.cc.o
[ 61%] Building CXX object src/CMakeFiles/gcolmap.dir/global/triplet_util.cc.o
[ 66%] Building CXX object src/CMakeFiles/gcolmap.dir/global/least_unsquared_deviation_position_estimator.cc.o
[ 71%] Building CXX object src/CMakeFiles/gcolmap.dir/optim/bundle_adjustment.cc.o
[ 76%] Building CXX object src/CMakeFiles/gcolmap.dir/sfm/incremental_triangulator.cc.o
[ 80%] Building CXX object src/CMakeFiles/gcolmap.dir/sfm/global_mapper.cc.o
[ 85%] Building CXX object src/CMakeFiles/gcolmap.dir/util/option_manager.cc.o
[ 90%] Linking CXX static library libgcolmap.a
[ 90%] Built target gcolmap
[ 95%] Building CXX object src/exe/CMakeFiles/gcolmap_exe.dir/gcolmap.cc.o
[100%] Linking CXX executable gcolmap
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o): in function `colmap::RefineRelativePose(ceres::Solver::Options const&, std::vector<Eigen::Matrix<double, 2, 1, 0, 2, 1>, std::allocator<Eigen::Matrix<double, 2, 1, 0, 2, 1> > > const&, std::vector<Eigen::Matrix<double, 2, 1, 0, 2, 1>, std::allocator<Eigen::Matrix<double, 2, 1, 0, 2, 1> > > const&, Eigen::Matrix<double, 4, 1, 0, 4, 1>*, Eigen::Matrix<double, 3, 1, 0, 3, 1>*)':
pose.cc:(.text+0x13c): undefined reference to `ceres::CostFunction::CostFunction()'
/usr/bin/ld: pose.cc:(.text+0x1fe): undefined reference to `vtable for ceres::QuaternionManifold'
/usr/bin/ld: pose.cc:(.text+0x211): undefined reference to `ceres::Problem::SetManifold(double*, ceres::Manifold*)'
/usr/bin/ld: pose.cc:(.text+0x240): undefined reference to `ceres::Problem::SetManifold(double*, ceres::Manifold*)'
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o): in function `colmap::RefineAbsolutePose(colmap::AbsolutePoseRefinementOptions const&, std::vector<char, std::allocator<char> > const&, std::vector<Eigen::Matrix<double, 2, 1, 0, 2, 1>, std::allocator<Eigen::Matrix<double, 2, 1, 0, 2, 1> > > const&, std::vector<Eigen::Matrix<double, 3, 1, 0, 3, 1>, std::allocator<Eigen::Matrix<double, 3, 1, 0, 3, 1> > > const&, Eigen::Matrix<double, 4, 1, 0, 4, 1>*, Eigen::Matrix<double, 3, 1, 0, 3, 1>*, colmap::Camera*, Eigen::Matrix<double, 6, 6, 0, 6, 6>*)':
pose.cc:(.text+0x1508): undefined reference to `vtable for ceres::QuaternionManifold'
/usr/bin/ld: pose.cc:(.text+0x151c): undefined reference to `ceres::Problem::SetManifold(double*, ceres::Manifold*)'
/usr/bin/ld: pose.cc:(.text+0x15d9): undefined reference to `ceres::SubsetManifold::SubsetManifold(int, std::vector<int, std::allocator<int> > const&)'
/usr/bin/ld: pose.cc:(.text+0x15e7): undefined reference to `ceres::Problem::SetManifold(double*, ceres::Manifold*)'
/usr/bin/ld: pose.cc:(.text+0x170b): undefined reference to `ceres::CostFunction::CostFunction()'
/usr/bin/ld: pose.cc:(.text+0x17cb): undefined reference to `ceres::CostFunction::CostFunction()'
/usr/bin/ld: pose.cc:(.text+0x188b): undefined reference to `ceres::CostFunction::CostFunction()'
/usr/bin/ld: pose.cc:(.text+0x1a6b): undefined reference to `ceres::CostFunction::CostFunction()'
/usr/bin/ld: pose.cc:(.text+0x1b2b): undefined reference to `ceres::CostFunction::CostFunction()'
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o): in function `colmap::RefineGeneralizedAbsolutePose(colmap::AbsolutePoseRefinementOptions const&, std::vector<char, std::allocator<char> > const&, std::vector<Eigen::Matrix<double, 2, 1, 0, 2, 1>, std::allocator<Eigen::Matrix<double, 2, 1, 0, 2, 1> > > const&, std::vector<Eigen::Matrix<double, 3, 1, 0, 3, 1>, std::allocator<Eigen::Matrix<double, 3, 1, 0, 3, 1> > > const&, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<Eigen::Matrix<double, 4, 1, 0, 4, 1>, std::allocator<Eigen::Matrix<double, 4, 1, 0, 4, 1> > > const&, std::vector<Eigen::Matrix<double, 3, 1, 0, 3, 1>, std::allocator<Eigen::Matrix<double, 3, 1, 0, 3, 1> > > const&, Eigen::Matrix<double, 4, 1, 0, 4, 1>*, Eigen::Matrix<double, 3, 1, 0, 3, 1>*, std::vector<colmap::Camera, std::allocator<colmap::Camera> >*, Eigen::Matrix<double, 6, 6, 0, 6, 6>*)':
pose.cc:(.text+0x2c2f): undefined reference to `vtable for ceres::QuaternionManifold'
/usr/bin/ld: pose.cc:(.text+0x2c43): undefined reference to `ceres::Problem::SetManifold(double*, ceres::Manifold*)'
/usr/bin/ld: pose.cc:(.text+0x2c7a): undefined reference to `ceres::SubsetManifold::SubsetManifold(int, std::vector<int, std::allocator<int> > const&)'
/usr/bin/ld: pose.cc:(.text+0x2c88): undefined reference to `ceres::Problem::SetManifold(double*, ceres::Manifold*)'
/usr/bin/ld: pose.cc:(.text+0x2fdd): undefined reference to `ceres::CostFunction::CostFunction()'
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o): in function `ceres::AutoDiffCostFunction<colmap::RigBundleAdjustmentCostFunction<colmap::ThinPrismFisheyeCameraModel>, 2, 4, 3, 4, 3, 3, 12>::~AutoDiffCostFunction()':
pose.cc:(.text._ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_27ThinPrismFisheyeCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi12EEED2Ev[_ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_27ThinPrismFisheyeCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi12EEED5Ev]+0x44): undefined reference to `ceres::CostFunction::~CostFunction()'
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o): in function `ceres::AutoDiffCostFunction<colmap::RigBundleAdjustmentCostFunction<colmap::FOVCameraModel>, 2, 4, 3, 4, 3, 3, 5>::~AutoDiffCostFunction()':
pose.cc:(.text._ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_14FOVCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi5EEED2Ev[_ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_14FOVCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi5EEED5Ev]+0x44): undefined reference to `ceres::CostFunction::~CostFunction()'
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o): in function `ceres::AutoDiffCostFunction<colmap::RigBundleAdjustmentCostFunction<colmap::FullOpenCVCameraModel>, 2, 4, 3, 4, 3, 3, 12>::~AutoDiffCostFunction()':
pose.cc:(.text._ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_21FullOpenCVCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi12EEED2Ev[_ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_21FullOpenCVCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi12EEED5Ev]+0x44): undefined reference to `ceres::CostFunction::~CostFunction()'
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o): in function `ceres::AutoDiffCostFunction<colmap::RigBundleAdjustmentCostFunction<colmap::OpenCVFisheyeCameraModel>, 2, 4, 3, 4, 3, 3, 8>::~AutoDiffCostFunction()':
pose.cc:(.text._ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_24OpenCVFisheyeCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi8EEED2Ev[_ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_24OpenCVFisheyeCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi8EEED5Ev]+0x44): undefined reference to `ceres::CostFunction::~CostFunction()'
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o): in function `ceres::AutoDiffCostFunction<colmap::RigBundleAdjustmentCostFunction<colmap::OpenCVCameraModel>, 2, 4, 3, 4, 3, 3, 8>::~AutoDiffCostFunction()':
pose.cc:(.text._ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_17OpenCVCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi8EEED2Ev[_ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_17OpenCVCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi8EEED5Ev]+0x44): undefined reference to `ceres::CostFunction::~CostFunction()'
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o):pose.cc:(.text._ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_24RadialFisheyeCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi5EEED2Ev[_ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_24RadialFisheyeCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi5EEED5Ev]+0x44): more undefined references to `ceres::CostFunction::~CostFunction()' follow
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o): in function `ceres::SphereManifold<3>::~SphereManifold()':
pose.cc:(.text._ZN5ceres14SphereManifoldILi3EED2Ev[_ZN5ceres14SphereManifoldILi3EED5Ev]+0x13): undefined reference to `ceres::Manifold::~Manifold()'
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o): in function `ceres::SphereManifold<3>::~SphereManifold()':
pose.cc:(.text._ZN5ceres14SphereManifoldILi3EED0Ev[_ZN5ceres14SphereManifoldILi3EED5Ev]+0x17): undefined reference to `ceres::Manifold::~Manifold()'
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o): in function `ceres::AutoDiffCostFunction<colmap::RigBundleAdjustmentCostFunction<colmap::RadialFisheyeCameraModel>, 2, 4, 3, 4, 3, 3, 5>::~AutoDiffCostFunction()':
pose.cc:(.text._ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_24RadialFisheyeCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi5EEED0Ev[_ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_24RadialFisheyeCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi5EEED5Ev]+0x43): undefined reference to `ceres::CostFunction::~CostFunction()'
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o): in function `ceres::AutoDiffCostFunction<colmap::RigBundleAdjustmentCostFunction<colmap::RadialCameraModel>, 2, 4, 3, 4, 3, 3, 5>::~AutoDiffCostFunction()':
pose.cc:(.text._ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_17RadialCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi5EEED0Ev[_ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_17RadialCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi5EEED5Ev]+0x43): undefined reference to `ceres::CostFunction::~CostFunction()'
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o): in function `ceres::AutoDiffCostFunction<colmap::RigBundleAdjustmentCostFunction<colmap::SimpleRadialFisheyeCameraModel>, 2, 4, 3, 4, 3, 3, 4>::~AutoDiffCostFunction()':
pose.cc:(.text._ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_30SimpleRadialFisheyeCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi4EEED0Ev[_ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_30SimpleRadialFisheyeCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi4EEED5Ev]+0x43): undefined reference to `ceres::CostFunction::~CostFunction()'
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o): in function `ceres::AutoDiffCostFunction<colmap::RigBundleAdjustmentCostFunction<colmap::SimpleRadialCameraModel>, 2, 4, 3, 4, 3, 3, 4>::~AutoDiffCostFunction()':
pose.cc:(.text._ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_23SimpleRadialCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi4EEED0Ev[_ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_23SimpleRadialCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi4EEED5Ev]+0x43): undefined reference to `ceres::CostFunction::~CostFunction()'
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o): in function `ceres::AutoDiffCostFunction<colmap::RigBundleAdjustmentCostFunction<colmap::PinholeCameraModel>, 2, 4, 3, 4, 3, 3, 4>::~AutoDiffCostFunction()':
pose.cc:(.text._ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_18PinholeCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi4EEED0Ev[_ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_18PinholeCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi4EEED5Ev]+0x43): undefined reference to `ceres::CostFunction::~CostFunction()'
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o):pose.cc:(.text._ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_24SimplePinholeCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi3EEED0Ev[_ZN5ceres20AutoDiffCostFunctionIN6colmap31RigBundleAdjustmentCostFunctionINS1_24SimplePinholeCameraModelEEELi2EJLi4ELi3ELi4ELi3ELi3ELi3EEED5Ev]+0x43): more undefined references to `ceres::CostFunction::~CostFunction()' follow
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o): in function `ceres::SizedCostFunction<2, 4, 3, 4, 3, 3, 4>::SizedCostFunction()':
pose.cc:(.text._ZN5ceres17SizedCostFunctionILi2EJLi4ELi3ELi4ELi3ELi3ELi4EEEC2Ev[_ZN5ceres17SizedCostFunctionILi2EJLi4ELi3ELi4ELi3ELi3ELi4EEEC5Ev]+0x1f): undefined reference to `ceres::CostFunction::CostFunction()'
/usr/bin/ld: pose.cc:(.text._ZN5ceres17SizedCostFunctionILi2EJLi4ELi3ELi4ELi3ELi3ELi4EEEC2Ev[_ZN5ceres17SizedCostFunctionILi2EJLi4ELi3ELi4ELi3ELi3ELi4EEEC5Ev]+0xd8): undefined reference to `ceres::CostFunction::~CostFunction()'
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o): in function `ceres::SizedCostFunction<2, 4, 3, 4, 3, 3, 5>::SizedCostFunction()':
pose.cc:(.text._ZN5ceres17SizedCostFunctionILi2EJLi4ELi3ELi4ELi3ELi3ELi5EEEC2Ev[_ZN5ceres17SizedCostFunctionILi2EJLi4ELi3ELi4ELi3ELi3ELi5EEEC5Ev]+0x1f): undefined reference to `ceres::CostFunction::CostFunction()'
/usr/bin/ld: pose.cc:(.text._ZN5ceres17SizedCostFunctionILi2EJLi4ELi3ELi4ELi3ELi3ELi5EEEC2Ev[_ZN5ceres17SizedCostFunctionILi2EJLi4ELi3ELi4ELi3ELi3ELi5EEEC5Ev]+0xd8): undefined reference to `ceres::CostFunction::~CostFunction()'
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o): in function `ceres::SizedCostFunction<2, 4, 3, 4, 3, 3, 8>::SizedCostFunction()':
pose.cc:(.text._ZN5ceres17SizedCostFunctionILi2EJLi4ELi3ELi4ELi3ELi3ELi8EEEC2Ev[_ZN5ceres17SizedCostFunctionILi2EJLi4ELi3ELi4ELi3ELi3ELi8EEEC5Ev]+0x1f): undefined reference to `ceres::CostFunction::CostFunction()'
/usr/bin/ld: pose.cc:(.text._ZN5ceres17SizedCostFunctionILi2EJLi4ELi3ELi4ELi3ELi3ELi8EEEC2Ev[_ZN5ceres17SizedCostFunctionILi2EJLi4ELi3ELi4ELi3ELi3ELi8EEEC5Ev]+0xd8): undefined reference to `ceres::CostFunction::~CostFunction()'
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o): in function `ceres::SizedCostFunction<2, 4, 3, 4, 3, 3, 12>::SizedCostFunction()':
pose.cc:(.text._ZN5ceres17SizedCostFunctionILi2EJLi4ELi3ELi4ELi3ELi3ELi12EEEC2Ev[_ZN5ceres17SizedCostFunctionILi2EJLi4ELi3ELi4ELi3ELi3ELi12EEEC5Ev]+0x1f): undefined reference to `ceres::CostFunction::CostFunction()'
/usr/bin/ld: pose.cc:(.text._ZN5ceres17SizedCostFunctionILi2EJLi4ELi3ELi4ELi3ELi3ELi12EEEC2Ev[_ZN5ceres17SizedCostFunctionILi2EJLi4ELi3ELi4ELi3ELi3ELi12EEEC5Ev]+0xd8): undefined reference to `ceres::CostFunction::~CostFunction()'
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o):(.data.rel.ro._ZTIN5ceres14SphereManifoldILi3EEE[_ZTIN5ceres14SphereManifoldILi3EEE]+0x10): undefined reference to `typeinfo for ceres::Manifold'
/usr/bin/ld: /usr/local/share/colmap/../../lib/colmap/libcolmap.a(pose.cc.o):(.data.rel.ro._ZTVN5ceres14SphereManifoldILi3EEE[_ZTVN5ceres14SphereManifoldILi3EEE]+0x40): undefined reference to `ceres::Manifold::RightMultiplyByPlusJacobian(double const*, int, double const*, double*) const'
collect2: error: ld returned 1 exit status
make[2]: *** [src/exe/CMakeFiles/gcolmap_exe.dir/build.make:148: src/exe/gcolmap] Error 1
make[1]: *** [CMakeFiles/Makefile2:321: src/exe/CMakeFiles/gcolmap_exe.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
:~/projects/particle-sfm/sfm/gmapper/build$ 

missing header in TheiaSfm

i got a problem when building Theiasfm under custom branch.
which shows
/home/xxx/TheiaSfM/src/theia/io/write_calibration_test.cc:45:14: error: expected constructor, destructor, or type conversion before ‘(’ token 45 | DEFINE_string(json_file, "io/write_calibration_test.json", | ^ /home/xxx/TheiaSfM/src/theia/io/read_calibration_test.cc:43:14: error: expected constructor, destructor, or type conversion before ‘(’ token 43 | DEFINE_string(json_file, "io/calibration_test.json"); | ^ /home/xxx/TheiaSfM/src/theia/io/write_calibration_test.cc:51:65: error: ‘FLAGS_json_file’ was not declared in this scope 51 | std::string json_filepath = THEIA_DATA_DIR + std::string("/") + FLAGS_json_file; | ^~~~~~~~~~~~~~~ /home/xxx/TheiaSfM/src/theia/io/read_calibration_test.cc:48:65: error: ‘FLAGS_json_file’ was not declared in this scope 48 | std::string json_filepath = THEIA_DATA_DIR + std::string("/") + FLAGS_json_file; |

I fix this problem by simply adding #include <gflags/gflags.h> to read_calibration_test and write_calibration_test

I Hope this can help.

How to judge the motion state of a trajectory.

def find_traj_label(traj, mask, gts):

I am confused with the method to judge the motion state of a trajectory. Because the label of dynamic objects is 255 in the motion_label provided in your README. According to your method, as long as one frame of the trajectory is dynamic, then the label of the trajectory is dynamic. I'm not sure, maybe you originally meant that at least half of the points in the trajectory are dynamic before you can determine that the label of this trajectory is dynamic. Then the code should be:

if gts[j, round(y), round(x)]:
    label_num += 1

Impossibility to build the conda environment on Windows

Hello,
When launching the conda env create command using the .yaml configuration file, I get the following errors :

conda env create -f particlesfm_env.yaml
Channels:
 - pytorch
 - conda-forge
 - defaults
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: failed
Channels:
 - pytorch
 - conda-forge
 - defaults
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: failed

LibMambaUnsatisfiableError: Encountered problems while solving:
  - nothing provides requested py-opencv ==3.4.2 py37hb342d67_1
  - nothing provides requested readline 8.1.2**
  - nothing provides requested ncurses 6.3**
  - nothing provides requested libxcb 1.14**
  - nothing provides requested libvpx 1.7.0**
  - nothing provides requested libuuid 1.0.3**
  - nothing provides requested libstdcxx-ng 9.1.0**
  - nothing provides requested libglu 9.0.0**
  - nothing provides requested libgfortran-ng 7.3.0**
  - nothing provides requested libgcc-ng 9.1.0**
  - nothing provides requested ld_impl_linux-64 2.35.1**
  - nothing provides requested harfbuzz 1.8.8**
  - nothing provides requested freetype 2.11.0**
  - nothing provides vc 10 needed by pixman-0.34.0-vc10_0
  - nothing provides py-opencv 3.4.2 py36_0 needed by opencv-3.4.2-py36h6fd60c2_0

Could not solve for environment specs
The following packages are incompatible
├─ cairo 1.16.0**  is installable with the potential options
│  ├─ cairo 1.16.0 would require
│  │  ├─ libglib [>=2.70.0,<3.0a0 |>=2.70.2,<3.0a0 ] with the potential options
│  │  │  ├─ libglib [2.70.0|2.70.1|2.70.2] would require
│  │  │  │  ├─ libffi >=3.4.2,<3.5.0a0 , which can be installed;
│  │  │  │  └─ libzlib >=1.2.11,<1.3.0a0  with the potential options
│  │  │  │     ├─ libzlib 1.2.11 would require
│  │  │  │     │  └─ zlib 1.2.11 *_1012, which can be installed;
│  │  │  │     ├─ libzlib 1.2.11 would require
│  │  │  │     │  └─ zlib 1.2.11 *_1013, which can be installed;
│  │  │  │     ├─ libzlib 1.2.11 would require
│  │  │  │     │  └─ zlib 1.2.11 *_1014, which can be installed;
│  │  │  │     ├─ libzlib 1.2.12 would require
│  │  │  │     │  └─ zlib 1.2.12 *_0, which can be installed;
│  │  │  │     ├─ libzlib 1.2.12 would require
│  │  │  │     │  └─ zlib 1.2.12 *_1, which can be installed;
│  │  │  │     ├─ libzlib 1.2.12 would require
│  │  │  │     │  └─ zlib 1.2.12 *_2, which can be installed;
│  │  │  │     ├─ libzlib 1.2.12 would require
│  │  │  │     │  └─ zlib 1.2.12 *_3, which can be installed;
│  │  │  │     ├─ libzlib 1.2.12 would require
│  │  │  │     │  └─ zlib 1.2.12 *_4, which can be installed;
│  │  │  │     ├─ libzlib 1.2.13 would require
│  │  │  │     │  └─ zlib 1.2.13 *_4, which can be installed;
│  │  │  │     └─ libzlib 1.2.13 would require
│  │  │  │        └─ zlib 1.2.13 *_5, which can be installed;
│  │  │  ├─ libglib [2.72.1|2.74.0] would require
│  │  │  │  └─ libzlib >=1.2.12,<1.3.0a0 , which can be installed (as previously explained);
│  │  │  ├─ libglib [2.74.1|2.76.1|...|2.80.0] would require
│  │  │  │  └─ libzlib >=1.2.13,<1.3.0a0 , which can be installed (as previously explained);
│  │  │  └─ libglib 2.78.4 would require
│  │  │     └─ zlib >=1.2.13,<1.3.0a0 , which can be installed;
│  │  └─ libzlib >=1.2.11,<1.3.0a0 , which can be installed (as previously explained);
│  ├─ cairo 1.16.0 would require
│  │  └─ libzlib >=1.2.12,<1.3.0a0 , which can be installed (as previously explained);
│  ├─ cairo 1.16.0 would require
│  │  └─ pixman >=0.38.0,<0.39.0a0 , which can be installed;
│  ├─ cairo 1.16.0 would require
│  │  └─ libglib >=2.68.0,<3.0a0  with the potential options
│  │     ├─ libglib 2.68.0 would require
│  │     │  └─ glib 2.68.0 *_1, which can be installed;
│  │     ├─ libglib 2.68.0 would require
│  │     │  └─ glib 2.68.0 *_2, which can be installed;
│  │     ├─ libglib 2.68.1 would require
│  │     │  └─ glib 2.68.1 *_0, which can be installed;
│  │     ├─ libglib 2.68.2 would require
│  │     │  └─ glib 2.68.2 *_0, which can be installed;
│  │     ├─ libglib 2.68.2 would require
│  │     │  └─ glib 2.68.2 *_1, which can be installed;
│  │     ├─ libglib 2.68.2 would require
│  │     │  └─ glib 2.68.2 *_2, which can be installed;
│  │     ├─ libglib 2.68.3 would require
│  │     │  └─ glib 2.68.3 *_0, which can be installed;
│  │     ├─ libglib 2.68.4 would require
│  │     │  └─ glib 2.68.4 *_0, which can be installed;
│  │     ├─ libglib 2.68.4 would require
│  │     │  └─ libffi >=3.4.2,<3.5.0a0 , which can be installed;
│  │     ├─ libglib [2.70.0|2.70.1|2.70.2], which can be installed (as previously explained);
│  │     ├─ libglib [2.72.1|2.74.0], which can be installed (as previously explained);
│  │     ├─ libglib [2.74.1|2.76.1|...|2.80.0], which can be installed (as previously explained);
│  │     └─ libglib 2.78.4, which can be installed (as previously explained);
│  ├─ cairo 1.16.0 would require
│  │  └─ libglib >=2.66.4,<3.0a0  with the potential options
│  │     ├─ libglib 2.66.4 would require
│  │     │  └─ glib 2.66.4 *_0, which can be installed;
│  │     ├─ libglib 2.66.4 would require
│  │     │  └─ glib 2.66.4 *_1, which can be installed;
│  │     ├─ libglib 2.66.4 would require
│  │     │  └─ glib 2.66.4 *_2, which can be installed;
│  │     ├─ libglib 2.66.5 would require
│  │     │  └─ glib 2.66.5 *_2, which can be installed;
│  │     ├─ libglib 2.66.6 would require
│  │     │  └─ glib 2.66.6 *_2, which can be installed;
│  │     ├─ libglib 2.66.6 would require
│  │     │  └─ glib 2.66.6 *_3, which can be installed;
│  │     ├─ libglib 2.66.7 would require
│  │     │  └─ glib 2.66.7 *_1, which can be installed;
│  │     ├─ libglib 2.66.7 would require
│  │     │  └─ glib 2.66.7 *_0, which can be installed;
│  │     ├─ libglib 2.68.0, which can be installed (as previously explained);
│  │     ├─ libglib 2.68.0, which can be installed (as previously explained);
│  │     ├─ libglib 2.68.1, which can be installed (as previously explained);
│  │     ├─ libglib 2.68.2, which can be installed (as previously explained);
│  │     ├─ libglib 2.68.2, which can be installed (as previously explained);
│  │     ├─ libglib 2.68.2, which can be installed (as previously explained);
│  │     ├─ libglib 2.68.3, which can be installed (as previously explained);
│  │     ├─ libglib 2.68.4, which can be installed (as previously explained);
│  │     ├─ libglib 2.68.4, which can be installed (as previously explained);
│  │     ├─ libglib [2.70.0|2.70.1|2.70.2], which can be installed (as previously explained);
│  │     ├─ libglib [2.72.1|2.74.0], which can be installed (as previously explained);
│  │     ├─ libglib [2.74.1|2.76.1|...|2.80.0], which can be installed (as previously explained);
│  │     └─ libglib 2.78.4, which can be installed (as previously explained);
│  ├─ cairo 1.16.0 would require
│  │  └─ pixman >=0.34.0,<0.35.0a0  with the potential options
│  │     ├─ pixman 0.34.0, which can be installed;
│  │     └─ pixman 0.34.0 would require
│  │        └─ vc 10 , which does not exist (perhaps a missing channel);
│  ├─ cairo 1.16.0 would require
│  │  └─ libglib >=2.64.6,<3.0a0  with the potential options
│  │     ├─ libglib [2.64.6|2.66.1|2.66.2|2.66.3] would require
│  │     │  └─ libffi >=3.2.1,<3.3.0a0 , which can be installed;
│  │     ├─ libglib 2.66.3 would require
│  │     │  └─ glib 2.66.3 *_1, which can be installed;
│  │     ├─ libglib 2.66.4, which can be installed (as previously explained);
│  │     ├─ libglib 2.66.4, which can be installed (as previously explained);
│  │     ├─ libglib 2.66.4, which can be installed (as previously explained);
│  │     ├─ libglib 2.66.5, which can be installed (as previously explained);
│  │     ├─ libglib 2.66.6, which can be installed (as previously explained);
│  │     ├─ libglib 2.66.6, which can be installed (as previously explained);
│  │     ├─ libglib 2.66.7, which can be installed (as previously explained);
│  │     ├─ libglib 2.66.7, which can be installed (as previously explained);
│  │     ├─ libglib 2.68.0, which can be installed (as previously explained);
│  │     ├─ libglib 2.68.0, which can be installed (as previously explained);
│  │     ├─ libglib 2.68.1, which can be installed (as previously explained);
│  │     ├─ libglib 2.68.2, which can be installed (as previously explained);
│  │     ├─ libglib 2.68.2, which can be installed (as previously explained);
│  │     ├─ libglib 2.68.2, which can be installed (as previously explained);
│  │     ├─ libglib 2.68.3, which can be installed (as previously explained);
│  │     ├─ libglib 2.68.4, which can be installed (as previously explained);
│  │     ├─ libglib 2.68.4, which can be installed (as previously explained);
│  │     ├─ libglib [2.70.0|2.70.1|2.70.2], which can be installed (as previously explained);
│  │     ├─ libglib [2.72.1|2.74.0], which can be installed (as previously explained);
│  │     ├─ libglib [2.74.1|2.76.1|...|2.80.0], which can be installed (as previously explained);
│  │     └─ libglib 2.78.4, which can be installed (as previously explained);
│  ├─ cairo 1.16.0 would require
│  │  └─ zlib >=1.2.12,<1.3.0a0 , which can be installed;
│  ├─ cairo 1.16.0 would require
│  │  └─ libzlib >=1.2.13,<1.3.0a0 , which can be installed (as previously explained);
│  └─ cairo 1.16.0 would require
│     └─ zlib >=1.2.13,<1.3.0a0 , which can be installed;
├─ freetype 2.11.0**  does not exist (perhaps a typo or a missing channel);
├─ glib 2.69.1**  is installable with the potential options
│  ├─ glib 2.69.1 conflicts with any installable versions previously reported;
│  ├─ glib 2.69.1 would require
│  │  └─ libffi >=3.2.1,<3.3a0 , which can be installed;
│  └─ glib 2.69.1 would require
│     └─ zlib >=1.2.13,<1.3.0a0 , which can be installed;
├─ harfbuzz 1.8.8**  does not exist (perhaps a typo or a missing channel);
├─ hdf5 1.10.2**  is requested and can be installed;
├─ ld_impl_linux-64 2.35.1**  does not exist (perhaps a typo or a missing channel);
├─ libffi 3.3**  is not installable because it conflicts with any installable versions previously reported;
├─ libgcc-ng 9.1.0**  does not exist (perhaps a typo or a missing channel);
├─ libgfortran-ng 7.3.0**  does not exist (perhaps a typo or a missing channel);
├─ libglu 9.0.0**  does not exist (perhaps a typo or a missing channel);
├─ libstdcxx-ng 9.1.0**  does not exist (perhaps a typo or a missing channel);
├─ libuuid 1.0.3**  does not exist (perhaps a typo or a missing channel);
├─ libvpx 1.7.0**  does not exist (perhaps a typo or a missing channel);
├─ libxcb 1.14**  does not exist (perhaps a typo or a missing channel);
├─ ncurses 6.3**  does not exist (perhaps a typo or a missing channel);
├─ opencv 3.4.2**  is installable with the potential options
│  ├─ opencv 3.4.2 would require
│  │  └─ hdf5 >=1.8.20,<1.9.0a0 , which conflicts with any installable versions previously reported;
│  ├─ opencv 3.4.2 would require
│  │  └─ python >=3.5,<3.6.0a0 , which can be installed;
│  ├─ opencv 3.4.2 would require
│  │  └─ python >=3.6,<3.7.0a0 , which can be installed;
│  ├─ opencv 3.4.2 would require
│  │  └─ py-opencv 3.4.2 py36_0, which does not exist (perhaps a missing channel);
│  └─ opencv 3.4.2 would require
│     └─ py-opencv 3.4.2 py37_0, which does not exist (perhaps a missing channel);
├─ pixman 0.40.0**  is not installable because it conflicts with any installable versions previously reported;
├─ py-opencv ==3.4.2 py37hb342d67_1 does not exist (perhaps a typo or a missing channel);
├─ python 3.7.11**  is not installable because it conflicts with any installable versions previously reported;
├─ readline 8.1.2**  does not exist (perhaps a typo or a missing channel);
└─ zlib 1.2.11**  is not installable because it conflicts with any installable versions previously reported.

If I let the hashes in the .yaml file, then absolutely none of them is found.

ImportError while running run_particlesfm.py

Hi ,

I am facing this import error issue while running particlesfm

ImportError: /home/xyz/Downloads/particle-sfm/point_trajectory/optimize/build/particlesfm.cpython-37m-x86_64-linux-gnu.so: undefined symbol: cholmod_solve

Is there any dependency missing in CMakeLists or I have made some mistake while building particle-sfm ?

Thanks

Error when trying to download checkpoint.pth

Hi!
I tried running
bash scripts/download_all_models.sh

But I am getting:
--2022-12-21 13:01:20-- ftp://b1ueber2y.me/ParticleSfM/checkpoint.pth (try: 3) => './motion_seg/log/pretrain/checkpoint.pth' Connecting to b1ueber2y.me (b1ueber2y.me)|93.179.103.61|:21... connected. Error in server response. Closing. Retrying.

ImportError

Hello,

I am facing this error while running particlesfm

ImportError: /home/jdyang/workspace/particle-sfm-main/point_trajectory/optimize/build/particlesfm.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ULx86_64_init_local

Thanks

Building on Windows, errors and fixes.

Hi, and thank you for this code! I am seeing errors when running the example, can you help me to debug them please?

python run_particlesfm.py --image_dir ./example/snowboard/images --output_dir ./outputs/snowboard/
[ParticleSFM] Running pairwise optical flow inference......
Loading weights:  D:\Testing\OFFLINE\PSFM\particle-sfm\third_party\RAFT\models/raft-things.pth
  0%|                                                                                           | 0/65 [00:00<?, ?it/s]C:\Users\B\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\TensorShape.cpp:3484.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
  0%|                                                                                           | 0/65 [00:02<?, ?it/s]
Traceback (most recent call last):
  File "D:\Testing\OFFLINE\PSFM\particle-sfm\run_particlesfm.py", line 158, in <module>
    particlesfm(args, args.image_dir, args.output_dir, skip_exists=args.skip_exists, keep_intermediate=args.keep_intermediate)
  File "D:\Testing\OFFLINE\PSFM\particle-sfm\run_particlesfm.py", line 105, in particlesfm
    traj_dir = connect_point_trajectory(args, image_dir, output_dir, skip_exists=skip_exists, keep_intermediate=keep_intermediate)
  File "D:\Testing\OFFLINE\PSFM\particle-sfm\run_particlesfm.py", line 33, in connect_point_trajectory
    compute_raft_custom_folder(image_dir, flow_dir, skip_exists=skip_exists)
  File "D:\Testing\OFFLINE\PSFM\particle-sfm\third_party\RAFT\compute_raft_custom_folder.py", line 85, in compute_raft_custom_folder
    infer_optical_flows(model, image_dir, output_dir, skip_exists=skip_exists)
  File "D:\Testing\OFFLINE\PSFM\particle-sfm\third_party\RAFT\compute_raft_custom_folder.py", line 57, in infer_optical_flows
    flow_write(flow_save_name, flow_forward)
  File "D:\Testing\OFFLINE\PSFM\particle-sfm\third_party\RAFT\custom_utils.py", line 42, in flow_write
    f = open(filename,'wb')
FileNotFoundError: [Errno 2] No such file or directory: './outputs/snowboard/optical_flows\\flow_f\\images\\00000.flo'

I have downloaded all models and placed them in the folders, what might be happening here?

Issue with point_trajectory

Hello,

I have ran the build_all.sh script successfully. However, when I run "python run_particlesfm.py --image_dir ./example/snowboard/images --output_dir ./outputs/snowboard/", I get the following error:

ImportError: particle-sfm/point_trajectory/optimize/build/particlesfm.cpython-37m-x86_64-linux-gnu.so: undefined symbol: cudaMemcpyAsync

I tried checking online and changing the CUDA version from 12.1 to 11.6, but I did not get any luck. Any idea what could be the issue here?

Error while install gmapper

I have have installed colmap, with no issues, but gmapper requires aligment.h from colmap which is not present in include folder of colmap, is there any specific version of colmap needs to used ?

bash scripts/build_all.sh

In file included from /home/avinash/Desktop/code/sfm/particle-sfm/sfm/gmapper/src/sfm/incremental_triangulator.cc:32:
/home/avinash/Desktop/code/sfm/particle-sfm/sfm/gmapper/src/sfm/incremental_triangulator.h:35:10: fatal error: colmap/util/alignment.h: No such file or directory
35 | #include <colmap/util/alignment.h>

Segmentation Fault (Core Dumped)

Hi

Thank you so much for the great work. I am always facing this error while running particlesfm.

A total of 20 sequences found in /home/zhuo/particle-sfm/rr/.
[ParticleSFM] Running pairwise optical flow inference......
/home/zhuo/anaconda3/envs/particlesfm/lib/python3.7/site-packages/torch/cuda/init.py:52: UserWarning: CUDA initialization: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx (Triggered internally at /opt/conda/conda-bld/pytorch_1603729006826/work/c10/cuda/CUDAFunctions.cpp:100.)
return torch._C._cuda_getDeviceCount() > 0
Loading weights: /home/zhuo/particle-sfm/third_party/RAFT/models/raft-things.pth
100%|█████████████████████████████████████████████| 2/2 [03:19<00:00, 99.80s/it]
[ParticleSfM] Running pairwise optical flow inference (stride 2)......
Loading weights: /home/zhuo/particle-sfm/third_party/RAFT/models/raft-things.pth
100%|█████████████████████████████████████████████| 1/1 [01:19<00:00, 79.64s/it]
[ParticleSfM] Connecting (optimization enabled) point trajectories from optical flows.......
/home/zhuo/particle-sfm/rr/scene0707_00/optical_flows/flow_f2
5%|██▏ | 1/20 [00:06<02:03, 6.50s/it]Segmentation fault (core dumped)

How long does it take to finish the whole process?

I tried to run the example dataset with the command:
python run_particlesfm.py --image_dir ./example/snowboard/images --output_dir ./outputs/snowboard/".
However, it's already over 30 mins and it's not finished yet. It keeps doing global bundle adjustment. I'm running on a server with 4x 1080 GPUs. Is it normal or there might be something wrong with my setting? Thank you.

Exporting results to PLY

Is it possible to add the camera poses to the colmap reconstruction in order to export both the scene and the camera poses at once using rec.export_PLY("name.ply") ? Trying to convert them to Open3d PointClouds and combining them to the original pcd result just leads to white pointclouds where the color isn't exported. Only exporting the scene works well but the cameras are the interesting result.

Thanks for your help

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.