Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colab Notebook Throws Error: No such file or directory: 'datasets/lego_ds2/images #205

Open
eyildiz-ugoe opened this issue May 22, 2024 · 1 comment

Comments

@eyildiz-ugoe
Copy link

eyildiz-ugoe commented May 22, 2024

The given Colab notebook does not proceed after a point, complaining about the image path.

/content/neuralangelo
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
  configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'lego.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.16.100
  Duration: 00:00:08.00, start: 0.000000, bitrate: 2181 kb/s
  Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 800x800, 2178 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x555e38da5140] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'datasets/lego_ds2/images_raw/%06d.jpg':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.76.100
  Stream #0:0(und): Video: mjpeg, yuvj420p(pc, progressive), 800x800, q=2-31, 200 kb/s, 25 fps, 25 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc58.134.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
frame=  100 fps= 57 q=2.0 Lsize=N/A time=00:00:07.96 bitrate=N/A speed=4.58x    
video:7275kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
colmap: error while loading shared libraries: libcudart.so.11.0: cannot open shared object file: No such file or directory
colmap: error while loading shared libraries: libcudart.so.11.0: cannot open shared object file: No such file or directory
colmap: error while loading shared libraries: libcudart.so.11.0: cannot open shared object file: No such file or directory
cp: cannot stat 'datasets/lego_ds2/sparse/0/*.bin': No such file or directory
projects/neuralangelo/scripts/run_colmap.sh: line 34: [: too many arguments
colmap: error while loading shared libraries: libcudart.so.11.0: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "/content/neuralangelo/projects/neuralangelo/scripts/convert_data_to_json.py", line 226, in <module>
    data_to_json(args)
  File "/content/neuralangelo/projects/neuralangelo/scripts/convert_data_to_json.py", line 191, in data_to_json
    cameras, images, points3D = read_model(os.path.join(args.data_dir, "sparse"), ext=".bin")
  File "/content/neuralangelo/third_party/colmap/scripts/python/read_write_model.py", line 435, in read_model
    cameras = read_cameras_binary(os.path.join(path, "cameras" + ext))
  File "/content/neuralangelo/third_party/colmap/scripts/python/read_write_model.py", line 134, in read_cameras_binary
    with open(path_to_model_file, "rb") as fid:
FileNotFoundError: [Errno 2] No such file or directory: 'datasets/lego_ds2/sparse/cameras.bin'
Traceback (most recent call last):
  File "/content/neuralangelo/projects/neuralangelo/scripts/generate_config.py", line 83, in <module>
    generate_config(args)
  File "/content/neuralangelo/projects/neuralangelo/scripts/generate_config.py", line 30, in generate_config
    num_images = len(os.listdir(os.path.join(args.data_dir, "images")))
FileNotFoundError: [Errno 2] No such file or directory: 'datasets/lego_ds2/images'
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
[<ipython-input-10-c6918c4a57dd>](https://localhost:8080/#) in <cell line: 14>()
     12 # Check whether we have 100 images registered.
     13 import os
---> 14 num_images = len(os.listdir(f"{colmap_path}/images"))
     15 print("----------------------------------------")
     16 print(f"Number of registered images: {num_images}")

FileNotFoundError: [Errno 2] No such file or directory: 'datasets/lego_ds2/images'
@prd-hung-trinh
Copy link

Hi, I think this solution can help you:

Firstly, you must switch to CUDA 11.x (suggest 11.7 in my experiment). Please run this command before you install COLMAP:

!wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
!mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600
!wget https://developer.download.nvidia.com/compute/cuda/11.7.0/local_installers/cuda-repo-ubuntu2204-11-7-local_11.7.0-515.43.04-1_amd64.deb
!dpkg -i cuda-repo-ubuntu2204-11-7-local_11.7.0-515.43.04-1_amd64.deb
!cp /var/cuda-repo-ubuntu2204-11-7-local/cuda-*-keyring.gpg /usr/share/keyrings/
!apt-get update
!apt-get -y install cuda-11-7
!update-alternatives --set cuda /usr/local/cuda-11.7

Now, you can install COLMAP, good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants