Totoro97 / f2-nerf

Fast neural radiance field training with free camera trajectories
https://totoro97.github.io/projects/f2-nerf/
Apache License 2.0
933 stars 69 forks source link

failed to create sparse model when use custom data #46

Open 0iui0 opened 1 year ago

0iui0 commented 1 year ago
$ bash scripts/local_colmap_and_resize.sh ./data/mydata/loop

Loading database
==============================================================================

Loading cameras... 1 in 0.000s
Loading matches... 355 in 0.016s
Loading images... 76 in 0.042s (connected 74)
Building correspondence graph... in 0.012s (ignored 0)

Elapsed time: 0.001 [minutes]

==============================================================================
Finding good initial image pair
==============================================================================

  => No good initial image pair found.
  => Relaxing the initialization constraints.

==============================================================================
Finding good initial image pair
==============================================================================

  => No good initial image pair found.
  => Relaxing the initialization constraints.

==============================================================================
Finding good initial image pair
==============================================================================

  => No good initial image pair found.
  => Relaxing the initialization constraints.

==============================================================================
Finding good initial image pair
==============================================================================

==============================================================================
Initializing with image pair #3 and #12
==============================================================================

...
...
==============================================================================
Retriangulation
==============================================================================

  => Completed observations: 0
  => Merged observations: 0
  => Retriangulated observations: 0

==============================================================================
Global bundle adjustment
==============================================================================

iter      cost      cost_change  |gradient|   |step|    tr_ratio  tr_radius  ls_iter  iter_time  total_time
   0  7.545661e+01    0.00e+00    6.63e-02   0.00e+00   0.00e+00  1.00e+04        0    2.36e-04    4.16e-04

Bundle adjustment report
------------------------
    Residuals : 338
   Parameters : 221
   Iterations : 1
         Time : 0.000432679 [s]
 Initial cost : 0.472487 [px]
   Final cost : 0.472487 [px]
  Termination : Convergence

  => Completed observations: 0
  => Merged observations: 0
  => Filtered observations: 0
  => Changed observations: 0.000000
  => Filtered images: 0

==============================================================================
Registering image #44 (4)
==============================================================================

  => Image sees 52 / 292 points
  => Could not register, trying another image.

==============================================================================
Registering image #46 (4)
==============================================================================

  => Image sees 39 / 164 points
  => Could not register, trying another image.

==============================================================================
Registering image #50 (4)
==============================================================================

  => Image sees 34 / 313 points
  => Could not register, trying another image.

==============================================================================
Finding good initial image pair
==============================================================================

==============================================================================
Initializing with image pair #23 and #22
==============================================================================

==============================================================================
Global bundle adjustment

...

Bundle adjustment report
------------------------
    Residuals : 108
   Parameters : 92
   Iterations : 101
         Time : 0.0117295 [s]
 Initial cost : 2.95252 [px]
   Final cost : 0.329608 [px]
  Termination : No convergence

  => Filtered observations: 0
  => Filtered images: 0

==============================================================================
Finding good initial image pair
==============================================================================

==============================================================================
Initializing with image pair #71 and #73
==============================================================================

==============================================================================
Global bundle adjustment
==============================================================================

...

Bundle adjustment report
------------------------
    Residuals : 108
   Parameters : 92
   Iterations : 101
         Time : 0.0101432 [s]
 Initial cost : 38.3953 [px]
   Final cost : 2.33497 [px]
  Termination : No convergence

  => Filtered observations: 16
  => Filtered images: 0

==============================================================================
Finding good initial image pair
==============================================================================

  => No good initial image pair found.

Elapsed time: 0.148 [minutes]
ERROR: failed to create sparse model

==============================================================================
Reading reconstruction
==============================================================================

F0517 02:01:50.685370 86435 reconstruction.cc:743] cameras, images, points3D files do not exist at ./data/b1f13/loop/sparse/0
*** Check failure stack trace: ***
    @     0x7f8d506571c3  google::LogMessage::Fail()
    @     0x7f8d5065c25b  google::LogMessage::SendToLog()
    @     0x7f8d50656ebf  google::LogMessage::Flush()
    @     0x7f8d506576ef  google::LogMessageFatal::~LogMessageFatal()
    @     0x5563a4812727  colmap::Reconstruction::Read()
    @     0x5563a474824e  colmap::RunImageUndistorter()
    @     0x5563a4728102  main
    @     0x7f8d4ee14083  __libc_start_main
    @     0x5563a472c43e  _start
scripts/local_colmap_and_resize.sh: line 63: 86435 Aborted                 (core dumped) colmap image_undistorter --image_path "$DATASET_PATH"/images --input_path "$DATASET_PATH"/sparse/0 --output_path "$DATASET_PATH"/dense --output_type COLMAP
~/f2-nerf/data/mydata/loop/images_2 ~/f2-nerf
xargs: mogrify: No such file or directory
~/f2-nerf
~/f2-nerf/data/mydata/loop/images_4 ~/f2-nerf
xargs: mogrify: No such file or directory
~/f2-nerf
~/f2-nerf/data/mydata/loop/images_8 ~/f2-nerf
xargs: mogrify: No such file or directory
~/f2-nerf
lyzhenshuai commented 1 year ago

I also meet the same question,have you solved the question?

lyzhenshuai commented 1 year ago

When i change the param"USE_GPU" in local_colmap_and_resize.sh,i can get the result.

enginksz commented 1 year ago

Can you specify the change you made , @lyzhenshuai ?

Did you change the value to USE_GPU?

lyzhenshuai commented 1 year ago

Can you specify the change you made , @lyzhenshuai ?

Did you change the value to USE_GPU?

i changed the value to 0, did not use the GPU.

mohit-choithwani commented 9 months ago

Hi, maybe the problem lies with the images themselves; they lack informative details, causing COLMAP to struggle in finding suitable image pairs. Try it with different set of images and check if it works or not.