SBCV / SatelliteSurfaceReconstruction

3D Surface Reconstruction From Multi-Date Satellite Images, ISPRS, 2021
BSD 3-Clause "New" or "Revised" License
92 stars 12 forks source link

How to execute from command line not pycharm #3

Closed ujjawalcse closed 1 year ago

ujjawalcse commented 3 years ago

Hi @SBCV , I tried to execute python ssr/run_pipeline.py from SatelliteSurfaceReconstruction folder. Also i tried python run_pipeline.py from ssr folder. Got this module not found error in both case,

Traceback (most recent call last): File "run_pipeline.py", line 3, in <module> from ssr.utility.logging_extension import logger ModuleNotFoundError: No module named 'ssr' In the Getting_started doc, I could not understand this , `

Add VisSatSatelliteStereo to the SatelliteSurfaceReconstruction project

For example in Pycharm
    Open SatelliteSurfaceReconstruction
    Open VisSatSatelliteStereo and attach it to SatelliteSurfaceReconstruction
    Go to File / Settings / Project: SatelliteSurfaceReconstruction / Project Dependencies
        Select SatelliteSurfaceReconstruction
        Make sure that VisSatSatelliteStereo is selected

` Can you guide me about how to setup the whole folder structure for the full pipeline execution? I'm attaching my folder structure below,

ssr

SBCV commented 3 years ago

Hi, thank you for opening this issue - my explanation at this point should have been more precise.

As you can see in the source code, the library uses absolute and not relative imports (e.g. from ssr.utility.logging_extension import logger). Since we did not install the library, your Python interpreter does not know where ssr is located.

One way to tell your python interpreter the location of the module, is to use the PYTHONPATH environment variable. 1.) Add ssr (in SatelliteSurfaceReconstruction) to the python interpreter export PYTHONPATH="${PYTHONPATH}:/path/to/SatelliteSurfaceReconstruction"

2.) Add lib (in VisSatSatelliteStereo) to the python interpreter export PYTHONPATH="${PYTHONPATH}:/path/to/VisSatSatelliteStereo"

If you use an IDE like pycharm, you can usually avoid messing around with the $PYTHONPATH environment variable, and define the dependencies within the IDE.

Hope this helps, I'll update the install instructions

SBCV commented 3 years ago

Maybe to summarize:

export PYTHONPATH="${PYTHONPATH}:/path/to/SatelliteSurfaceReconstruction"
export PYTHONPATH="${PYTHONPATH}:/path/to/VisSatSatelliteStereo"
cd /path/to/SatelliteSurfaceReconstruction/ssr
python run_pipeline.py
SBCV commented 3 years ago

I've updated the installation instructions - see this link

ujjawalcse commented 3 years ago

Thank you so much @SBCV for your quick response. I'm just trying and let you know if I find any other issue.

ujjawalcse commented 3 years ago

Hi @SBCV , As you suggested, I tried that. When I run "python run_pipeline.py" first time, it's generating a new 'pipeline.cfg' and ending with some path error. So, I edited the pipeline.cfg as you have already mentioned here https://github.com/SBCV/SatelliteSurfaceReconstruction/blob/master/Getting_Started.md

But when i again i run it it's throwing the same error. colmap_vissat_exe_fp: /path/to/ColmapForVisSat/build/src/exe/colmap Traceback (most recent call last): File "run_pipeline.py", line 94, in <module> vissat_pipeline = VisSatPipeline(pm) File "/home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/ssr/sfm_mvs_rec/vissat_pipeline.py", line 19, in __init__ assert os.path.isfile(colmap_vissat_exe_fp) AssertionError So,it's not getting the instances from the new pipeline.cfg as you can see the first line of my traceback where i have printed the path. So i hard coded the 'colmap_vissat_exe_fp' and the error went. But I would have to do it for all the instances that is edited in the pipeline.cfg. Can you suggest where to pass the new config while running the 'run_pipeline.py'?

Also I need some clarification about the field to be edited in the pipeline.cfg. As you suggested in the 'Getting_Started.md', we need to Install at least one of the following MVS & surface reconstruction libraries in which colmapvissat is already included. So i didn't installed others for surface reconstruction. I installed MVS_texturing as suggested by you. For meshlab, I just downloaded the latest zip file and extracted it. Since I'm just using colmapvissat, so commented the 'mve_apps_dp',gdmr_bin_dp,openmvs_bin_dp.

And for meshlab, i just put the 'bin' folder of the extracted meshlab.tar downloaded from your provided link.

For meshing_backends, I have used "MeshingBackends.colmap_poisson". But confused what to select for texturing_backends as i have not installed "openmvs" and "mve". I have just installed MVS_texturing for texture .

So finally my edited pipeline.cfg looks something like this,


# VisSat 
colmap_vissat_exe_fp = '/home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/ColmapForVisSat/build/src/exe/colmap'

# MVS, Mesh and Surface Reconstruction Libraries  
#mve_apps_dp = /path/to/mve/mve/apps
texrecon_apps_dp = '/home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/mvs-texturing/build/apps'
#gdmr_bin_dp = /path/to/pointfusion/pointfusion-0.2.0-Linux/bin
#openmvs_bin_dp = /path/to/openMVS/build/bin
colmap_exe_dp = '/home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/ColmapForVisSat/build/src/exe/colmap'

# === Meshlab ===
# Make sure that Meshlab has access to the "meshlab_temp_dp" directory below
# For example, the snap installation of Meshlab may have NO access to /tmp
meshlab_server_fp = '/home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/MeshLab2021.05-linux/usr/bin'
meshlab_temp_dp = '/home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/meshlab_temp'

# Computation behavior
lazy = True

# SfM / MVS Options
reconstruct_sfm_mvs = 1

# Preparation Options 
extract_pan = 1
extract_msi = 1
pan_sharpening = 1
depth_map_recovery = 1
skew_correction = 1
# ===

reconstruct_mesh = 1
texture_mesh = 1

meshing_backends = [
    "MeshingBackends.colmap_poisson",
    # "MeshingBackends.colmap_delaunay",
    # "MeshingBackends.openmvs",
    # "MeshingBackends.mve_fssr",
    # "MeshingBackends.mve_gdmr"
    ]
# Comment symbols can also be used within lists. For example to enable /
# disable specific meshing backends, e.g.
# meshing_backends = [
#    "MeshingBackends.colmap_poisson",
#    # "MeshingBackends.colmap_delaunay",
#    "MeshingBackends.openmvs",
#    # "MeshingBackends.mve_fssr",
#    "MeshingBackends.mve_gdmr"
#    ]

texturing_backends = [
    # "TexturingBackends.openmvs",    # Currently not supported
    "TexturingBackends.mve",
    #"TexturingBackends.mvs"
    ]

#  IARPA MVS3DM dataset 
satellite_image_pan_dp ='/home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/satellite_imgs/WV3/PAN'
satellite_image_msi_dp ='/home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/satellite_imgs/WV3/MSI'

# Site 1 (Used in the VisSat Evaluation) 
workspace_vissat_dp ="/home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat"
workspace_ssr_dp ="/home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_ssr"
zone_number = 21
hemisphere = S
ul_easting = 354035.0
ul_northing = 6182717.0
width = 745.0
height = 682.0
alt_min = -20.0
alt_max = 100.0

Thanks again.

SBCV commented 3 years ago

Can you please add a code block around the config content in your previous message? Difficult to read it in the current state

SBCV commented 3 years ago

Have you maybe accidentally changed the value in pipeline_template.cfg and not pipeline.cfg?

Can you go to line 62 in ssr/run_pipeline.py and add print(ssr_config.config_fp). What path does it print?

ujjawalcse commented 3 years ago

As you said I checked it, i think it's getting the proper path for pipeline.cfg, but then why assertion error, python run_pipeline.py your print statement from run_pipeline.py : /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/ssr/configs/pipeline.cfg colmap_vissat_exe_fp from vissat_pipeline.py: '/home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/ColmapForVisSat/build/src/exe/colmap' Traceback (most recent call last): File "run_pipeline.py", line 95, in <module> vissat_pipeline = VisSatPipeline(pm) File "/home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/ssr/sfm_mvs_rec/vissat_pipeline.py", line 19, in __init__ assert os.path.isfile(colmap_vissat_exe_fp) AssertionError

But I figured it out that all the paths should be without string quotes as in template pipeline, so I changed all the paths from "/path/to/build/src/exe/colmap" to just /path/to/build/src/exe/colmap And the above Assertion Error went away.

ujjawalcse commented 3 years ago

So, I could start running the 'run_pipeline.py' somehow but I'm getting the below error,

My logs for python run_pipeline.py

your print statement from run_pipeline.py : /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/ssr/configs/pipeline.cfg
colmap_vissat_exe_fp from vissat_pipeline.py: /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/ColmapForVisSat/build/src/exe/colmap
INFO:root:self.pm.vissat_config_fp: /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/VisSat.json
{'dataset_dir': '/home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/satellite_imgs/WV3/PAN', 'work_dir': '/home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat', 'bounding_box': {'zone_number': 21, 'hemisphere': 'S', 'ul_easting': 354035.0, 'ul_northing': 6182717.0, 'width': 745.0, 'height': 682.0}, 'steps_to_run': {'clean_data': True, 'crop_image': True, 'derive_approx': True, 'choose_subset': True, 'colmap_sfm_perspective': True, 'inspect_sfm_perspective': True, 'reparam_depth': True, 'colmap_mvs': True, 'aggregate_2p5d': True, 'aggregate_3d': True}, 'alt_min': -20.0, 'alt_max': 100.0}
INFO:root:dataset path: ['/home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/satellite_imgs/WV3/PAN']
INFO:root:will save files to folder: /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/cleaned_data
INFO:root:the standard format is: <7 char date><6 char time>-P1BS-<20 char product id>.NTF

INFO:root:cleaning 01SEP15WV031000015SEP01135603-P1BS-500497284040_01_P001_________AAE_0AAAAABPABP0.NTF
INFO:root:cleaning 02APR15WV031000015APR02134716-P1BS-500276959010_02_P001_________AAE_0AAAAABPABB0.NTF
INFO:root:cleaning 02APR15WV031000015APR02134718-P1BS-500497282050_01_P001_________AAE_0AAAAABPABJ0.NTF
INFO:root:cleaning 02APR15WV031000015APR02134802-P1BS-500276959010_02_P001_________AAE_0AAAAABPABC0.NTF
INFO:root:cleaning 02APR15WV031000015APR02134804-P1BS-500497284080_01_P001_________AAE_0AAAAABPABJ0.NTF
INFO:root:processed 5 items in total
INFO:root:Timer started at 2021-05-25 13:15:46, summarized at 2021-05-25 13:15:47, total elapsed 0.014337 minutes
    description: Data cleaning Module
    start: 2021-05-25 13:15:46
    Data cleaning done: 2021-05-25 13:15:47, since_last: 0.014337 minutes, since_start: 0.014337 minutes

step clean_data:    finished in 0.014340516666666666 minutes
INFO:root:process 12958, cropping 1/5, ntf: /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/cleaned_data/15SEP01135603-P1BS-500497284040_01_P001.NTF
INFO:root:process 12957, cropping 0/5, ntf: /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/cleaned_data/15APR02134804-P1BS-500497284080_01_P001.NTF
INFO:root:process 12959, cropping 2/5, ntf: /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/cleaned_data/15APR02134718-P1BS-500497282050_01_P001.NTF
INFO:root:process 12960, cropping 3/5, ntf: /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/cleaned_data/15APR02134802-P1BS-500276959010_02_P001.NTF
INFO:root:process 12961, cropping 4/5, ntf: /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/cleaned_data/15APR02134716-P1BS-500276959010_02_P001.NTF
INFO:root:ntf image to cut: /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/cleaned_data/15SEP01135603-P1BS-500497284040_01_P001.NTF, width, height: 43008, 43008
INFO:root:cut image bounding box, ul_col, ul_row, width, height: 14690, 15355, 2057, 2091
INFO:root:png image to save: /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/tmp/12958:0001:15SEP01135603-P1BS-500497284040_01_P001.png
INFO:root:Running subprocess: gdal_translate -of png -ot UInt16 -srcwin 14690 15355 2057 2091 /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/cleaned_data/15SEP01135603-P1BS-500497284040_01_P001.NTF /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/tmp/12958:0001:15SEP01135603-P1BS-500497284040_01_P001.png
INFO:root:ntf image to cut: /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/cleaned_data/15APR02134802-P1BS-500276959010_02_P001.NTF, width, height: 43008, 29696
INFO:root:cut image bounding box, ul_col, ul_row, width, height: 24371, 3125, 1985, 2195
INFO:root:png image to save: /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/tmp/12960:0003:15APR02134802-P1BS-500276959010_02_P001.png
INFO:root:Running subprocess: gdal_translate -of png -ot UInt16 -srcwin 24371 3125 1985 2195 /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/cleaned_data/15APR02134802-P1BS-500276959010_02_P001.NTF /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/tmp/12960:0003:15APR02134802-P1BS-500276959010_02_P001.png
INFO:root:ntf image to cut: /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/cleaned_data/15APR02134716-P1BS-500276959010_02_P001.NTF, width, height: 43008, 28672
INFO:root:cut image bounding box, ul_col, ul_row, width, height: 24184, 2056, 1928, 2056
INFO:root:png image to save: /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/tmp/12961:0004:15APR02134716-P1BS-500276959010_02_P001.png
INFO:root:Running subprocess: gdal_translate -of png -ot UInt16 -srcwin 24184 2056 1928 2056 /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/cleaned_data/15APR02134716-P1BS-500276959010_02_P001.NTF /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/tmp/12961:0004:15APR02134716-P1BS-500276959010_02_P001.png
INFO:root:ntf image to cut: /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/cleaned_data/15APR02134804-P1BS-500497284080_01_P001.NTF, width, height: 43008, 36864
INFO:root:ntf image to cut: /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/cleaned_data/15APR02134718-P1BS-500497282050_01_P001.NTF, width, height: 43008, 36864
INFO:root:cut image bounding box, ul_col, ul_row, width, height: 24371, 8209, 1985, 2194
INFO:root:cut image bounding box, ul_col, ul_row, width, height: 24184, 9640, 1928, 2056
INFO:root:png image to save: /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/tmp/12957:0000:15APR02134804-P1BS-500497284080_01_P001.png
INFO:root:png image to save: /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/tmp/12959:0002:15APR02134718-P1BS-500497282050_01_P001.png
INFO:root:Running subprocess: gdal_translate -of png -ot UInt16 -srcwin 24371 8209 1985 2194 /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/cleaned_data/15APR02134804-P1BS-500497284080_01_P001.NTF /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/tmp/12957:0000:15APR02134804-P1BS-500497284080_01_P001.png
INFO:root:Running subprocess: gdal_translate -of png -ot UInt16 -srcwin 24184 9640 1928 2056 /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/cleaned_data/15APR02134718-P1BS-500497282050_01_P001.NTF /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/tmp/12959:0002:15APR02134718-P1BS-500497282050_01_P001.png
INFO:root:Input file size is 43008, 28672

INFO:root:Input file size is 43008, 29696

INFO:root:0...10...20...30...40...50...60...70...80...90...100 - done.

INFO:root:Subprocess finished
INFO:root:0...10...20...30...40...50...60...70...80...90...100 - done.

INFO:root:Subprocess finished
INFO:root:Input file size is 43008, 36864

INFO:root:0...10...20...30...40...50...60...70...80...90...100 - done.

INFO:root:Subprocess finished
INFO:root:Input file size is 43008, 36864

INFO:root:0...10...20...30...40...50...60...70...80...90...100 - done.

INFO:root:Subprocess finished
INFO:root:Input file size is 43008, 43008

INFO:root:0...10...20...30...40...50...60...70...80...90...100 - done.

INFO:root:Subprocess finished
INFO:root:Timer started at 2021-05-25 13:15:47, summarized at 2021-05-25 13:16:47, total elapsed 1.00136 minutes
    description: Image cropping module
    start: 2021-05-25 13:15:47
    image cropping done: 2021-05-25 13:16:47, since_last: 1.00136 minutes, since_start: 1.00136 minutes

step crop_image:    finished in 1.0013645500000001 minutes
INFO:root:deriving an affine camera approximation...
INFO:root:scene coordinate frame is in lat, lon, alt
INFO:root:residual error (pixels): 0.0897340284458035
INFO:root:residual error (pixels): 0.08646687084550146
INFO:root:residual error (pixels): 0.077138199325807
INFO:root:residual error (pixels): 0.07556797422352711
INFO:root:residual error (pixels): 0.08467842272992213
INFO:root:deriving a perspective camera approximation...
INFO:root:scene coordinate frame is in ENU
INFO:root:singular values:  0.018201683090824313 216.11372687251816 7356.49728738482 25689.95856535532 47122.19620156296 51920.66564592974 84131.86475960165 94850.92875029102 343400.3112218126 43629163.618809216 149413190.3496925 162789536.6106509
INFO:root:singular values:  0.018682439676534823 216.114242162375 7357.848092753466 25690.614903828377 47134.17623404645 51929.71397724839 84126.80198616433 94851.04256576655 343310.7201105738 43617074.00565755 149381099.48553303 162756492.377518
INFO:root:singular values:  0.011817055831826207 214.78960082006304 6861.006144527523 25432.101539450556 41565.65890723015 53014.38485674486 84735.28477259395 93748.79237338423 358611.0466262869 47479155.22177774 153972185.8213711 168356704.34668428
INFO:root:singular values:  0.011645058705925417 214.78702953827414 6861.065503790191 25432.23589322226 41564.666785326895 53014.8152800425 84734.64207757187 93747.26441224132 358598.7010464184 47475804.616387114 153961409.18636802 168343462.12129146
INFO:root:singular values:  0.01922331325117253 215.72072208630192 7360.334125429207 25702.49338093768 46263.672654665126 53643.58877406965 83800.69896814745 94477.66559785818 359077.4311186535 46160741.56484158 156300570.17355317 169943201.42871875
INFO:root:Timer started at 2021-05-25 13:16:47, summarized at 2021-05-25 13:16:49, total elapsed 0.0306161 minutes
    description: Derive Approximation Module
    start: 2021-05-25 13:16:47
    Derive approximation done: 2021-05-25 13:16:49, since_last: 0.0306161 minutes, since_start: 0.0306161 minutes

step derive_approx: finished in 0.0306676 minutes
step choose_subset: finished in 9.9e-06 minutes
INFO:root:Running subprocess: colmap feature_extractor --database_path /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/colmap/sfm_perspective/database.db                                     --image_path /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/colmap/sfm_perspective/images                                     --ImageReader.camera_model PERSPECTIVE                                     --SiftExtraction.max_image_size 10000                                      --SiftExtraction.estimate_affine_shape 0                                     --SiftExtraction.domain_size_pooling 1                                     --SiftExtraction.max_num_features 25000                                     --SiftExtraction.num_threads 32                                     --SiftExtraction.use_gpu 1                                     --SiftExtraction.gpu_index -1
INFO:root:ERROR: flag 'logtostderr' was defined more than once (in files 'src/logging.cc' and '/home/ujjawal/intrinsic3d/glog/src/logging.cc').

INFO:root:Subprocess finished
INFO:root:Running subprocess: colmap exhaustive_matcher --database_path /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/colmap/sfm_perspective/database.db                                             --SiftMatching.guided_matching 1                                             --SiftMatching.num_threads 6                                             --SiftMatching.max_error 3                                             --SiftMatching.max_num_matches 30000                                             --SiftMatching.gpu_index -1
INFO:root:ERROR: flag 'logtostderr' was defined more than once (in files 'src/logging.cc' and '/home/ujjawal/intrinsic3d/glog/src/logging.cc').

INFO:root:Subprocess finished
Traceback (most recent call last):
  File "run_pipeline.py", line 96, in <module>
    vissat_pipeline.run(reconstruct_sfm_mvs)
  File "/home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/ssr/sfm_mvs_rec/vissat_pipeline.py", line 85, in run
    pipeline.run()
  File "/home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/VisSatSatelliteStereo/stereo_pipeline.py", line 115, in run
    self.run_colmap_sfm_perspective()
  File "/home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/VisSatSatelliteStereo/stereo_pipeline.py", line 346, in run_colmap_sfm_perspective
    colmap_sfm_perspective.run_sfm(work_dir, sfm_dir, init_camera_file, weight)
  File "/home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/VisSatSatelliteStereo/colmap_sfm_perspective.py", line 72, in run_sfm
    reproj_err_threshold, reproj_err_threshold, reproj_err_threshold)
  File "/home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/VisSatSatelliteStereo/colmap_sfm_commands.py", line 75, in run_point_triangulation
    create_init_files(db_file, template_file, out_dir)
  File "/home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/VisSatSatelliteStereo/colmap_sfm_utils.py", line 110, in create_init_files
    table_images = db.execute("SELECT * FROM images")
sqlite3.OperationalError: no such table: images`

I have only downloaded some PAN and MSI images (not completely) as you can seen below, ssr_msi

ssr_pan

And I'm using the same pipeline as mentioned above. (I just removed " " from the all the paths)

SBCV commented 3 years ago

Please use code blocks to format your log properly

ujjawalcse commented 3 years ago

Sorry @SBCV , Comments edited. Please have a look.

SBCV commented 3 years ago

As you can see, the error appears in the VisSat library, so potentially you should open the issue there. Looking at the log one sees that two error messages are thrown:

INFO:root:Running subprocess: colmap feature_extractor --database_path /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/colmap/sfm_perspective/database.db                                     --image_path /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/colmap/sfm_perspective/images                                     --ImageReader.camera_model PERSPECTIVE                                     --SiftExtraction.max_image_size 10000                                      --SiftExtraction.estimate_affine_shape 0                                     --SiftExtraction.domain_size_pooling 1                                     --SiftExtraction.max_num_features 25000                                     --SiftExtraction.num_threads 32                                     --SiftExtraction.use_gpu 1                                     --SiftExtraction.gpu_index -1
INFO:root:ERROR: flag 'logtostderr' was defined more than once (in files 'src/logging.cc' and '/home/ujjawal/intrinsic3d/glog/src/logging.cc').

INFO:root:Subprocess finished
INFO:root:Running subprocess: colmap exhaustive_matcher --database_path /home/ujjawal/my_work/object_recon/SatelliteSurfaceReconstruction/workspace_vissat/colmap/sfm_perspective/database.db                                             --SiftMatching.guided_matching 1                                             --SiftMatching.num_threads 6                                             --SiftMatching.max_error 3                                             --SiftMatching.max_num_matches 30000                                             --SiftMatching.gpu_index -1
INFO:root:ERROR: flag 'logtostderr' was defined more than once (in files 'src/logging.cc' and '/home/ujjawal/intrinsic3d/glog/src/logging.cc').

Maybe that could be an issue.

On the otherhand, during my experiments I observed that the --SiftExtraction.num_threads 32 caused problems on my system - see this issue.

Maybe it would be a good idea to directly execute the VisSat pipeline first (and then use SSR). This way it should be easier to detect the error, since VisSat allows you to run single reconstructions steps by modifying the corresponding config file

"clean_data": true,
"crop_image": true,
"derive_approx": true,
"choose_subset": true,
"colmap_sfm_perspective": true,
"inspect_sfm_perspective": false,
"reparam_depth": true,
"colmap_mvs": true,
"aggregate_2p5d": true,
aggregate_3d: false