OpenSfM icon indicating copy to clipboard operation
OpenSfM copied to clipboard

No Reconstruction.json found after running all

Open Fsamhouri opened this issue 4 years ago • 3 comments

I run into this issue where it appears that opensfm cannot create a json file for reconstruction from the images I used. Here is the output:

/home/fsamhouri/3DReconstruction_Playground/OpenSfM/bin/opensfm_run_all /home/fsamhouri/3DReconstruction_Playground/OpenSfM/data/hdmi
2022-11-23 20:23:36,908 INFO: Extracting EXIF for 20221123_202314.jpg
2022-11-23 20:23:36,931 INFO: Extracting EXIF for 20221123_202257.jpg
2022-11-23 20:23:36,947 INFO: Extracting EXIF for 20221123_202328.jpg
2022-11-23 20:23:36,959 INFO: Extracting EXIF for 20221123_202302.jpg
2022-11-23 20:23:37,543 INFO: Planning to use 50682.6 MB of RAM for both processing queue and parallel processing.
2022-11-23 20:23:37,543 INFO: Scale-space expected size of a single image : 95.625 MB
2022-11-23 20:23:37,543 INFO: Expecting to queue at most 200 images while parallel processing of 1 images.
2022-11-23 20:23:37,544 INFO: Reading data for image 20221123_202314.jpg (queue-size=0)
2022-11-23 20:23:37,669 INFO: Finished reading images
2022-11-23 20:23:37,669 INFO: Extracting ROOT_HAHOG features for image 20221123_202314.jpg
2022-11-23 20:23:38,405 DEBUG: Found 5020 points in 0.7272379398345947s
2022-11-23 20:23:38,405 DEBUG: No segmentation for 20221123_202314.jpg, no features masked.
2022-11-23 20:23:38,431 INFO: Reading data for image 20221123_202257.jpg (queue-size=0)
2022-11-23 20:23:38,541 INFO: Finished reading images
2022-11-23 20:23:38,541 INFO: Extracting ROOT_HAHOG features for image 20221123_202257.jpg
2022-11-23 20:23:39,290 DEBUG: Found 5335 points in 0.7430620193481445s
2022-11-23 20:23:39,291 DEBUG: No segmentation for 20221123_202257.jpg, no features masked.
2022-11-23 20:23:39,316 INFO: Reading data for image 20221123_202328.jpg (queue-size=0)
2022-11-23 20:23:39,433 INFO: Finished reading images
2022-11-23 20:23:39,433 INFO: Extracting ROOT_HAHOG features for image 20221123_202328.jpg
2022-11-23 20:23:40,156 DEBUG: Found 4772 points in 0.7167689800262451s
2022-11-23 20:23:40,156 DEBUG: No segmentation for 20221123_202328.jpg, no features masked.
2022-11-23 20:23:40,181 INFO: Reading data for image 20221123_202302.jpg (queue-size=0)
2022-11-23 20:23:40,297 INFO: Finished reading images
2022-11-23 20:23:40,297 INFO: Extracting ROOT_HAHOG features for image 20221123_202302.jpg
2022-11-23 20:23:41,031 DEBUG: Found 4953 points in 0.7280728816986084s
2022-11-23 20:23:41,032 DEBUG: No segmentation for 20221123_202302.jpg, no features masked.
2022-11-23 20:23:41,635 INFO: Matching 6 image pairs
2022-11-23 20:23:41,646 INFO: Computing pair matching with 1 processes
2022-11-23 20:23:41,662 DEBUG: No segmentation for 20221123_202257.jpg, no features masked.
2022-11-23 20:23:41,668 DEBUG: No segmentation for 20221123_202302.jpg, no features masked.
2022-11-23 20:23:41,901 DEBUG: Matching 20221123_202257.jpg and 20221123_202302.jpg.  Matcher: FLANN (symmetric) T-desc: 0.254 Matches: FAILED
2022-11-23 20:23:41,907 DEBUG: No segmentation for 20221123_202314.jpg, no features masked.
2022-11-23 20:23:42,059 DEBUG: Matching 20221123_202302.jpg and 20221123_202314.jpg.  Matcher: FLANN (symmetric) T-desc: 0.158 Matches: FAILED
2022-11-23 20:23:42,065 DEBUG: No segmentation for 20221123_202328.jpg, no features masked.
2022-11-23 20:23:42,208 DEBUG: Matching 20221123_202328.jpg and 20221123_202257.jpg.  Matcher: FLANN (symmetric) T-desc: 0.149 Matches: FAILED
2022-11-23 20:23:42,286 DEBUG: Matching 20221123_202257.jpg and 20221123_202314.jpg.  Matcher: FLANN (symmetric) T-desc: 0.078 Matches: FAILED
2022-11-23 20:23:42,357 DEBUG: Matching 20221123_202328.jpg and 20221123_202302.jpg.  Matcher: FLANN (symmetric) T-desc: 0.071 Matches: FAILED
2022-11-23 20:23:42,426 DEBUG: Matching 20221123_202328.jpg and 20221123_202314.jpg.  Matcher: FLANN (symmetric) T-desc: 0.069 Matches: FAILED
2022-11-23 20:23:42,426 INFO: Matched 6 pairs (perspective-perspective: 6) in 0.7915602400898933 seconds (0.13192673000351837 seconds/pair).
2022-11-23 20:23:42,996 INFO: reading features
2022-11-23 20:23:43,020 DEBUG: Merging features onto tracks
2022-11-23 20:23:43,021 DEBUG: Good tracks: 0
2022-11-23 20:23:43,575 INFO: Starting incremental reconstruction
2022-11-23 20:23:43,575 INFO: 0 partial reconstructions in total.
Traceback (most recent call last):
  File "/home/fsamhouri/3DReconstruction_Playground/OpenSfM/bin/opensfm_main.py", line 25, in <module>
    commands.command_runner(
  File "/home/fsamhouri/3DReconstruction_Playground/OpenSfM/opensfm/commands/command_runner.py", line 38, in command_runner
    command.run(data, args)
  File "/home/fsamhouri/3DReconstruction_Playground/OpenSfM/opensfm/commands/command.py", line 13, in run
    self.run_impl(data, args)
  File "/home/fsamhouri/3DReconstruction_Playground/OpenSfM/opensfm/commands/compute_depthmaps.py", line 13, in run_impl
    compute_depthmaps.run_dataset(dataset, args.subfolder, args.interactive)
  File "/home/fsamhouri/3DReconstruction_Playground/OpenSfM/opensfm/actions/compute_depthmaps.py", line 20, in run_dataset
    reconstructions = udataset.load_undistorted_reconstruction()
  File "/home/fsamhouri/3DReconstruction_Playground/OpenSfM/opensfm/dataset.py", line 973, in load_undistorted_reconstruction
    with self.io_handler.open_rt(filename) as fin:
  File "/home/fsamhouri/3DReconstruction_Playground/OpenSfM/opensfm/io.py", line 1393, in open_rt
    return cls.open(path, "r", encoding="utf-8")
  File "/home/fsamhouri/3DReconstruction_Playground/OpenSfM/opensfm/io.py", line 1385, in open
    return open(*args, **kwargs)
FileNotFoundError: [Errno 2] No such file or directory: '/home/fsamhouri/3DReconstruction_Playground/OpenSfM/
data/hdmi/undistorted/reconstruction.json'

This is when running opensfm on the following images 20221123_202257 20221123_202302 20221123_202314 20221123_202328

Does this have to do with the way I captured the images in terms of camera angles? Is there simply not enough data? With the example set of Berlin pictures, there were only 3 images, yet it got a fairly accurate point cloud.

Fsamhouri avatar Nov 24 '22 02:11 Fsamhouri

As you can see in your output:

2022-11-23 20:23:42,208 DEBUG: Matching 20221123_202328.jpg and 20221123_202257.jpg.  Matcher: FLANN (symmetric) T-desc: 0.149 Matches: FAILED

As matching for all the image-pairs failes i would think your camera poses are too far away from each other.

kielnino avatar Nov 29 '22 11:11 kielnino

Hi @Fsamhouri,

You could try with more image and maybe as a start, try a full room and not just a cable on top of your desk.

Best, Fabian

fabianschenk avatar Nov 29 '22 11:11 fabianschenk

Yeah I managed to solve it with more photos. Thank you!

Fsamhouri avatar Dec 01 '22 03:12 Fsamhouri