About ““sfm_data.bin" cannot be read”
Author: LabubuJCreated Feb 23, 2025Updated Apr 20, 2025
Hello everyone, this is my first time using OpenMVG. I encountered some issues when running my own dataset captured by Insta360.
python SfM_GlobalPipeline.py /home/disk1/jh/dataset/omnilocalrf/real/red_building/images /home/disk1/jh/dataset/omnilocalrf/real/red_building_MVG``
INFO: [main_SfMInit_ImageListing.cpp:194] You called : /home/disk1/jh/dataset/openMVG_Build/Linux-x86_64-RELEASE/openMVG_main_SfMInit_ImageListing
--imageDirectory /home/disk1/jh/dataset/omnilocalrf/real/red_building/images
--sensorWidthDatabase /home/disk1/jh/dataset/openMVG/src/software/SfM/../../openMVG/exif/sensor_width_database/sensor_width_camera_database.txt
--outputDirectory /home/disk1/jh/dataset/omnilocalrf/real/red_building_MVG/matches
--focal -1
--intrinsics
--camera_model 3
--group_camera_model 1
--use_pose_prior 0
--prior_weights 1.0;1.0;1.0
--gps_to_xyz_method 0
INFO: [loggerprogress.hpp:79] [- Listing images -] 10%
INFO: [loggerprogress.hpp:79] [- Listing images -] 20%
INFO: [loggerprogress.hpp:79] [- Listing images -] 30%
INFO: [loggerprogress.hpp:79] [- Listing images -] 40%
INFO: [loggerprogress.hpp:79] [- Listing images -] 50%
INFO: [loggerprogress.hpp:79] [- Listing images -] 60%
INFO: [loggerprogress.hpp:79] [- Listing images -] 70%
INFO: [loggerprogress.hpp:79] [- Listing images -] 80%
INFO: [loggerprogress.hpp:79] [- Listing images -] 90%
INFO: [loggerprogress.hpp:79] [- Listing images -] 100%
INFO: [main_SfMInit_ImageListing.cpp:475] SfMInit_ImageListing report:
listed #File(s): 250
usable #File(s) listed in sfm_data: 250
usable #Intrinsic(s) listed in sfm_data: 0
INFO: [main_ComputeFeatures.cpp:120] You called :
/home/disk1/jh/dataset/openMVG_Build/Linux-x86_64-RELEASE/openMVG_main_ComputeFeatures
--input_file /home/disk1/jh/dataset/omnilocalrf/real/red_building_MVG/matches/sfm_data.json
--outdir /home/disk1/jh/dataset/omnilocalrf/real/red_building_MVG/matches
--describerMethod SIFT
--upright 0
--describerPreset NORMAL
--force 0
--numThreads 0
INFO: [loggerprogress.hpp:79] [- EXTRACT FEATURES -] 10%
...
INFO: [loggerprogress.hpp:79] [- EXTRACT FEATURES -] 100%
INFO: [main_ComputeFeatures.cpp:343] Task done in (s): 0
You called:
/home/disk1/jh/dataset/openMVG_Build/Linux-x86_64-RELEASE/openMVG_main_PairGenerator
--input_file : /home/disk1/jh/dataset/omnilocalrf/real/red_building_MVG/matches/sfm_data.json
--output_file : /home/disk1/jh/dataset/omnilocalrf/real/red_building_MVG/matches/pairs.bin
Optional parameters
--pair_mode : EXHAUSTIVE
--contiguous_count :
> -1
Loading scene.Computing pairs.
Saving pairs.
INFO: [main_ComputeMatches.cpp:112] You called :
/home/disk1/jh/dataset/openMVG_Build/Linux-x86_64-RELEASE/openMVG_main_ComputeMatches
--input_file /home/disk1/jh/dataset/omnilocalrf/real/red_building_MVG/matches/sfm_data.json
--output_file /home/disk1/jh/dataset/omnilocalrf/real/red_building_MVG/matches/matches.putative.bin
--pair_list /home/disk1/jh/dataset/omnilocalrf/real/red_building_MVG/matches/pairs.bin
Optional parameters:
--force 0
--ratio 0.8
--nearest_matching_method AUTO
--cache_size unlimited
--preemptive_feature_used/count 0 / 200
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 10%
...
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 100%
INFO: [main_ComputeMatches.cpp:215] - PUTATIVE MATCHES -
INFO: [main_ComputeMatches.cpp:224] PREVIOUS RESULTS LOADED; #pair: 31125
INFO: [main_ComputeMatches.cpp:358] #Putative pairs: 31125
INFO: [graph_stats.hpp:53] Graph statistics:
#nodes: 250
#cc: 1
#singleton: 0
Node degree statistics: min: 249, max: 249, mean: 249, median: 249
sh: 1: neato: not found
INFO: [main_GeometricFilter.cpp:131] You called :
/home/disk1/jh/dataset/openMVG_Build/Linux-x86_64-RELEASE/openMVG_main_GeometricFilter
--input_file: /home/disk1/jh/dataset/omnilocalrf/real/red_building_MVG/matches/sfm_data.json
--matches: /home/disk1/jh/dataset/omnilocalrf/real/red_building_MVG/matches/matches.putative.bin
--output_file: /home/disk1/jh/dataset/omnilocalrf/real/red_building_MVG/matches/matches.e.bin
Optional parameters:
--input_pairs
--output_pairs
--force false
--geometric_model e
--guided_matching 0
--cache_size unlimited
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 10%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 20%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 30%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 40%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 50%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 60%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 70%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 80%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 90%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 100%
WARNING: [E_ACRobust.hpp:89] Skip this pair. No intrinsic information: (0,1)
INFO: [loggerprogress.hpp:79] [- Geometric filtering -] 0%
WARNING: [E_ACRobust.hpp:89] Skip this pair. No intrinsic information: (0,8)
WARNING: [E_ACRobust.hpp:89] Skip this pair. No intrinsic information: (0,9)
...
WARNING: [E_ACRobust.hpp:89] Skip this pair. No intrinsic information: (247,249)
WARNING: [E_ACRobust.hpp:89] Skip this pair. No intrinsic information: (248,249)
INFO: [graph_stats.hpp:53] Graph statistics:
#nodes: 250
#cc: 250
#singleton: 250
Node degree statistics: min: 631423488, max: 631423088, mean: 69, median: 631421768
INFO: [main_GeometricFilter.cpp:383] Task done in (s): 0
INFO: [main_GeometricFilter.cpp:386]
Export Adjacency Matrix of the pairwise's geometric matches
sh: 1: neato: not found
INFO: [main_SfM.cpp:157]
-----------------------------------------------------------
Structure from Motion:
-----------------------------------------------------------
INFO: [loggerprogress.hpp:79] [- Features Loading -] 10%
INFO: [loggerprogress.hpp:79] [- Features Loading -] 20%
INFO: [loggerprogress.hpp:79] [- Features Loading -] 30%
INFO: [loggerprogress.hpp:79] [- Features Loading -] 40%
INFO: [loggerprogress.hpp:79] [- Features Loading -] 50%
INFO: [loggerprogress.hpp:79] [- Features Loading -] 60%
INFO: [loggerprogress.hpp:79] [- Features Loading -] 70%
INFO: [loggerprogress.hpp:79] [- Features Loading -] 80%
INFO: [loggerprogress.hpp:79] [- Features Loading -] 90%
INFO: [loggerprogress.hpp:79] [- Features Loading -] 100%
INFO: [connectedComponent.hpp:99] CleanGraph_KeepLargestBiEdge_Nodes():: => connected Component: 0
WARNING: [sfm_global_engine_relative_motions.cpp:122] Invalid input image graph for global SfM
ERROR: [main_ComputeSfM_DataColor.cpp:69] The input SfM_Data file "/home/disk1/jh/dataset/omnilocalrf/real/red_building_MVG/reconstruction_global/sfm_data.bin" cannot be read.
Using input dir : /home/disk1/jh/dataset/omnilocalrf/real/red_building/images
output_dir : /home/disk1/jh/dataset/omnilocalrf/real/red_building_MVG
1. Intrinsics analysis
2. Compute features
3. Compute matching pairs
4. Compute matches
5. Filter matches
6. Do Global reconstruction
7. Colorize StructureI then tried to run the tutorial_demo.py, but still faced the following problems. I would appreciate any advice on how to resolve these issues. Thank you!
Using input dir : /home/disk1/jh/dataset/openMVG_Build/software/SfM/ImageDataset_SceauxCastle/images
output_dir : /home/disk1/jh/dataset/openMVG_Build/software/SfM/tutorial_out
1. Intrinsics analysis
INFO: [main_SfMInit_ImageListing.cpp:194] You called : /home/disk1/jh/dataset/openMVG_Build/Linux-x86_64-RELEASE/openMVG_main_SfMInit_ImageListing
--imageDirectory /home/disk1/jh/dataset/openMVG_Build/software/SfM/ImageDataset_SceauxCastle/images
--sensorWidthDatabase /home/disk1/jh/dataset/openMVG/src/software/SfM/../../openMVG/exif/sensor_width_database/sensor_width_camera_database.txt
--outputDirectory /home/disk1/jh/dataset/openMVG_Build/software/SfM/tutorial_out/matches
--focal -1
--intrinsics
--camera_model 3
--group_camera_model 1
--use_pose_prior 0
--prior_weights 1.0;1.0;1.0
--gps_to_xyz_method 0
INFO: [loggerprogress.hpp:79] [- Listing images -] 100%
WARNING: [main_SfMInit_ImageListing.cpp:455] Warning & Error messages:
K.txt: Unkown image file format.
Readme.txt: Unkown image file format.
INFO: [main_SfMInit_ImageListing.cpp:475] SfMInit_ImageListing report:
listed #File(s): 13
usable #File(s) listed in sfm_data: 11
usable #Intrinsic(s) listed in sfm_data: 1
2. Compute features
INFO: [main_ComputeFeatures.cpp:120] You called :
/home/disk1/jh/dataset/openMVG_Build/Linux-x86_64-RELEASE/openMVG_main_ComputeFeatures
--input_file /home/disk1/jh/dataset/openMVG_Build/software/SfM/tutorial_out/matches/sfm_data.json
--outdir /home/disk1/jh/dataset/openMVG_Build/software/SfM/tutorial_out/matches
--describerMethod SIFT
--upright 0
--describerPreset NORMAL
--force 1
--numThreads 0
INFO: [loggerprogress.hpp:79] [- EXTRACT FEATURES -] 100%
INFO: [main_ComputeFeatures.cpp:343] Task done in (s): 1
2. Compute matches
INFO: [main_ComputeMatches.cpp:112] You called :
/home/disk1/jh/dataset/openMVG_Build/Linux-x86_64-RELEASE/openMVG_main_ComputeMatches
--input_file /home/disk1/jh/dataset/openMVG_Build/software/SfM/tutorial_out/matches/sfm_data.json
--output_file /home/disk1/jh/dataset/openMVG_Build/software/SfM/tutorial_out/matches/matches.putative.bin
--pair_list
Optional parameters:
--force 1
--ratio 0.8
--nearest_matching_method ANNL2
--cache_size unlimited
--preemptive_feature_used/count 0 / 200
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 100%
INFO: [main_ComputeMatches.cpp:215] - PUTATIVE MATCHES -
ERROR: [main_ComputeMatches.cpp:289] Invalid Nearest Neighbor method: ANNL2
2. Filter matches
INFO: [main_GeometricFilter.cpp:131] You called :
/home/disk1/jh/dataset/openMVG_Build/Linux-x86_64-RELEASE/openMVG_main_GeometricFilter
--input_file: /home/disk1/jh/dataset/openMVG_Build/software/SfM/tutorial_out/matches/sfm_data.json
--matches: /home/disk1/jh/dataset/openMVG_Build/software/SfM/tutorial_out/matches/matches.putative.bin
--output_file: /home/disk1/jh/dataset/openMVG_Build/software/SfM/tutorial_out/matches/matches.f.bin
Optional parameters:
--input_pairs
--output_pairs
--force false
--geometric_model f
--guided_matching 0
--cache_size unlimited
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 100%
ERROR: [indMatch_utils.cpp:79] Cannot open the matche file: /home/disk1/jh/dataset/openMVG_Build/software/SfM/tutorial_out/matches/matches.putative.bin.
ERROR: [main_GeometricFilter.cpp:256] Failed to load the initial matches file.
3. Do Incremental/Sequential reconstruction
INFO: [main_SfM.cpp:157]
-----------------------------------------------------------
Structure from Motion:
-----------------------------------------------------------
INFO: [loggerprogress.hpp:79] [- Features Loading -] 100%
ERROR: [main_SfM.cpp:466] Cannot load the match file.
5. Colorize Structure
ERROR: [main_ComputeSfM_DataColor.cpp:69] The input SfM_Data file "/home/disk1/jh/dataset/openMVG_Build/software/SfM/tutorial_out/reconstruction_sequential/sfm_data.bin" cannot be read.
4. Structure from Known Poses (robust triangulation)
INFO: [main_ComputeStructureFromKnownPoses.cpp:56] Compute Structure from the provided poses
ERROR: [main_ComputeStructureFromKnownPoses.cpp:131] The input SfM_Data file "/home/disk1/jh/dataset/openMVG_Build/software/SfM/tutorial_out/reconstruction_sequential/sfm_data.bin" cannot be read.
2. Filter matches (for the global SfM Pipeline)
INFO: [main_GeometricFilter.cpp:131] You called :
/home/disk1/jh/dataset/openMVG_Build/Linux-x86_64-RELEASE/openMVG_main_GeometricFilter
--input_file: /home/disk1/jh/dataset/openMVG_Build/software/SfM/tutorial_out/matches/sfm_data.json
--matches: /home/disk1/jh/dataset/openMVG_Build/software/SfM/tutorial_out/matches/matches.putative.bin
--output_file: /home/disk1/jh/dataset/openMVG_Build/software/SfM/tutorial_out/matches/matches.e.bin
Optional parameters:
--input_pairs
--output_pairs
--force false
--geometric_model e
--guided_matching 0
--cache_size unlimited
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 100%
ERROR: [indMatch_utils.cpp:79] Cannot open the matche file: /home/disk1/jh/dataset/openMVG_Build/software/SfM/tutorial_out/matches/matches.putative.bin.
ERROR: [main_GeometricFilter.cpp:256] Failed to load the initial matches file.
3. Do Global reconstruction
INFO: [main_SfM.cpp:157]
-----------------------------------------------------------
Structure from Motion:
-----------------------------------------------------------
ERROR: [sfm_features_provider.hpp:62] Invalid feature files for the view: /home/disk1/jh/dataset/openMVG_Build/software/SfM/ImageDataset_SceauxCastle/images/100_7102.JPG
ERROR: [sfm_features_provider.hpp:62] Invalid feature files for the view: /home/disk1/jh/dataset/openMVG_Build/software/SfM/ImageDataset_SceauxCastle/images/100_7100.JPG
ERROR: [sfm_features_provider.hpp:62] Invalid feature files for the view: /home/disk1/jh/dataset/openMVG_Build/software/SfM/ImageDataset_SceauxCastle/images/100_7101.JPG
ERROR: [sfm_features_provider.hpp:62] Invalid feature files for the view: /home/disk1/jh/dataset/openMVG_Build/software/SfM/ImageDataset_SceauxCastle/images/100_7104.JPG
ERROR: [sfm_features_provider.hpp:62] Invalid feature files for the view: /home/disk1/jh/dataset/openMVG_Build/software/SfM/ImageDataset_SceauxCastle/images/100_7107.JPG
ERROR: [sfm_features_provider.hpp:62] Invalid feature files for the view: /home/disk1/jh/dataset/openMVG_Build/software/SfM/ImageDataset_SceauxCastle/images/100_7109.JPG
ERROR: [sfm_features_provider.hpp:62] Invalid feature files for the view: /home/disk1/jh/dataset/openMVG_Build/software/SfM/ImageDataset_SceauxCastle/images/100_7105.JPG
ERROR: [sfm_features_provider.hpp:62] Invalid feature files for the view: /home/disk1/jh/dataset/openMVG_Build/software/SfM/ImageDataset_SceauxCastle/images/100_7103.JPG
ERROR: [sfm_features_provider.hpp:62] Invalid feature files for the view: /home/disk1/jh/dataset/openMVG_Build/software/SfM/ImageDataset_SceauxCastle/images/100_7106.JPG
ERROR: [sfm_features_provider.hpp:62] Invalid feature files for the view: /home/disk1/jh/dataset/openMVG_Build/software/SfM/ImageDataset_SceauxCastle/images/100_7108.JPG
ERROR: [sfm_features_provider.hpp:62] Invalid feature files for the view: /home/disk1/jh/dataset/openMVG_Build/software/SfM/ImageDataset_SceauxCastle/images/100_7110.JPG
INFO: [loggerprogress.hpp:79] [- Features Loading -] 100%
ERROR: [main_SfM.cpp:452] Cannot load view corresponding features in directory: .
5. Colorize Structure
ERROR: [main_ComputeSfM_DataColor.cpp:69] The input SfM_Data file "/home/disk1/jh/dataset/openMVG_Build/software/SfM/tutorial_out/reconstruction_global/sfm_data.bin" cannot be read.
4. Structure from Known Poses (robust triangulation)
INFO: [main_ComputeStructureFromKnownPoses.cpp:56] Compute Structure from the provided poses
ERROR: [main_ComputeStructureFromKnownPoses.cpp:131] The input SfM_Data file "/home/disk1/jh/dataset/openMVG_Build/software/SfM/tutorial_out/reconstruction_global/sfm_data.bin" cannot be read.``Source: openMVG/openMVG