train_images.py 473 B

12345678910111213141516
  1. import os
  2. import subprocess
  3. # 图片集所在的绝对路径
  4. images_path = r"D:\gitlab2024\gaussian-splatting\data\ggbond\input"
  5. # 上一级文件夹所在路径
  6. folder_path = os.path.dirname(images_path)
  7. # 脚本运行
  8. # COLMAP估算相机位姿
  9. command = f'python convert.py -s {folder_path}'
  10. subprocess.run(command, shell=True)
  11. # 模型训练脚本,模型会保存在output路径下
  12. command = f'python train.py -s {folder_path}'
  13. subprocess.run(command, shell=True)