colmap / pycolmap

Python bindings for COLMAP
BSD 3-Clause "New" or "Revised" License
858 stars 125 forks source link

AttributeError: module 'pycolmap' has no attribute 'patch_match_stereo' #262

Closed smoothumut closed 4 months ago

smoothumut commented 4 months ago

Hi Everyone, First of all, thank you soo much for all creators and contributers here is my problem I have installed pycolmap with pip. I try to do 3d reconstruction, but I am having error on the code

  output_path: pathlib.Path
  image_dir: pathlib.Path

  output_path = Path("output_data")
  image_dir = Path("input_data")

  if output_path.exists() == False:
      output_path.mkdir()
  mvs_path = output_path / "mvs"
  database_path = output_path / "database.db"

  pycolmap.extract_features(database_path, image_dir)
  pycolmap.match_exhaustive(database_path)
  maps = pycolmap.incremental_mapping(database_path, image_dir, output_path)
  maps[0].write(output_path)

  pycolmap.undistort_images(mvs_path, output_path, image_dir)
  pycolmap.patch_match_stereo(mvs_path)  # requires compilation with CUDA
  pycolmap.stereo_fusion(mvs_path / "dense.ply", mvs_path)

But I am having the error below

AttributeError: module 'pycolmap' has no attribute 'patch_match_stereo'

Many Thanks in advance

sarlinpe commented 4 months ago

Hello, As mentioned in the README:

pycolmap.patch_match_stereo(mvs_path) # requires compilation with CUDA

The wheels [...] are currently not built with CUDA support, which requires building from source.

We will improve the warning message.

smoothumut commented 4 months ago

thank you for clarification