Skip to content

refine model error #146

@Bin-ze

Description

@Bin-ze

I tried fine-tuning from a known colmap model:

  echo "hloc extract_features"
  echo "+++++++++++++++++++++++++++++++++++++++++"
  python -m hloc.extract_features --image_dir $image_dir --feature_path $feature_path --export_dir $export_dir
  
  # echo "colmap model_converter"
  # echo "+++++++++++++++++++++++++++++++++++++++++"
  # colmap model_converter --input_path $colmap_ref_model --output_path $colmap_convert_model --output_type BIN
  
  echo "hloc pairs_from_poses"
  echo "+++++++++++++++++++++++++++++++++++++++++"
  python -m hloc.pairs_from_poses --output $hloc_pairs_path --model  $colmap_convert_model --num_matched 10
  
  echo "hloc match_features"
  echo "+++++++++++++++++++++++++++++++++++++++++"
  python -m hloc.match_features --pairs $hloc_pairs_path --export_dir $export_dir
  
  echo "pixsfm refine_hloc triangulator"
  echo "+++++++++++++++++++++++++++++++++++++++++"
  python -m pixsfm.refine_hloc triangulator --sfm_dir $triangulator_dir --image_dir $image_dir --pairs_path $hloc_pairs_path --features_path $export_dir/feats-superpoint-n4096-r1024.h5 --matches_path $export_dir/feats-superpoint-n4096-r1024_matches-superglue_pairs.h5 --reference_sfm_model $colmap_convert_model --config default
  
   # BA
  echo "pixsfm.refine_colmap bundle_adjuster"
  python -m pixsfm.refine_colmap ba --input_path $triangulator_model_dir --output_path $refine_model_dir --image_dir $image_dir --config default

But ba has a cost of -nan and exits quickly:

image

This phenomenon happens occasionally, how can I prevent such problems?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions