Closed Vonjor closed 1 month ago
Hi @Vonjor : the main error seems to be
subprocess.CalledProcessError: Command '['ns-process-data', 'images', '--data', '/tmp/tmppywzee7v', '--output-dir', '/tmp/tmpniwln2cj/colmap-sai-cli-imgs/spectacular-rec_2024-05-29_15-27-29']' returned non-zero exit status 1.
that is, COLMAP failed for some reason. A bit earlier, there's
Processing /tmp/tmpniwln2cj/sai-cli/spectacular-rec_2024-05-29_15-27-29 4 images (would be) copied in a temporary directory
Which means that only 4 images passed the pipeline, which seems low. You can try these things
Run the pipeline without COLMAP
SKIP_COLMAP=ON ./scripts/process_and_train_sai_custom.sh ./3dgs-deblur/data/myvideo/spectacular-rec_TIMESTAMP.zip
Try again with another recording. The main thing to keep eye on is that it's currently not recommended to shoot extremely close to objects (keep a distance of 1m or more). However, there's also other reasons for it to relatively randomly fail so just trying the same thing again may help too
Modify the script to support a smaller scale: In particular you can add something like --key_frame_distance=0.02
here https://github.com/SpectacularAI/3dgs-deblur/blob/b5bbc895e81c91c494faeb2c13be7f6ba5c3a41e/scripts/process_and_train_sai_custom.sh#L36C8-L36C26 (the default is 0.1, which mean 10cm, that is, the different camera poses selected for 3DGS training must be 10cm apart).
Thanks to your reply, I try these two and it worked
- Run the pipeline without COLMAP
SKIP_COLMAP=ON ./scripts/process_and_train_sai_custom.sh ./3dgs-deblur/data/myvideo/spectacular-rec_TIMESTAMP.zip
- Try again with another recording. The main thing to keep eye on is that it's currently not recommended to shoot extremely close to objects (keep a distance of 1m or more). However, there's also other reasons for it to relatively randomly fail so just trying the same thing again may help too
Now it can be trained and save a checkpoint model,but i can't use this to metric my model:
python parse_outputs.py
I check my folder and there is no file named metrics.json, so how to metric the model like PSNR、SSIM
I check my folder and there is no file named metrics.json, so how to metric the model like PSNR、SSIM
You can remove the --no_eval
and --train_all
flags here. https://github.com/SpectacularAI/3dgs-deblur/blob/b5bbc895e81c91c494faeb2c13be7f6ba5c3a41e/scripts/process_and_train_sai_custom.sh#L37
However, if your goal is to get the best possible reconstruction from your data, then it's best to leave those in an not waste input data on the test set. With most scenes, evaluation metrics using automatically/evenly selected evaluation sets are dominated by random cruft at the edges of the images. The numbers are useful for comparing different methods on the same dataset, but not for evaluating the quality of a particular scene/model.
Thank you very much for your answer, this is a great work!
Hi. This is a great job. I wanted to train it with my own data. I shot a video using the Spectacular Rec app on my Android phone, And use the script./scrpts/process_and_train_sai_custom.sh /PATH/TO/spectacular-rec-MY_RECORDING, but it reports errors as follows: (nerfstudio) x@x:~/Desktop/prog/3dgs-deblur$ ./scripts/process_and_train_sai_custom.sh ./3dgs-deblur/data/myvideo/spectacular-rec_2024-05-29_15-27-29.zip ++ basename./3dgs-deblur/data/myvideo/spectacular-rec_2024-05-29_15-27-29.zip
inflating: /tmp/tmp5t_3mu0w/recording/data.jsonl
inflating: /tmp/tmp5t_3mu0w/recording/calibration.json
inflating: /tmp/tmp5t_3mu0w/recording/vio_config.yaml
COMMAND: ['sai-cli', 'process', '/tmp/tmp5t_3mu0w/recording', '/tmp/tmpniwln2cj/sai-cli/spectacular-rec_2024-05-29_15-27-29', '--image_format=png', '--no_undistort', '--key_frame_distance=0.1', '--internal=maxKeypoints:2000', '--internal=optimizerMaxIterations:50', '--preview', '--preview3d'] Selected device type: android {'maxMapSize': 0, 'useSlam': True, 'passthroughColorImages': True, 'keyframeDecisionDistanceThreshold': 0.1, 'icpVoxelSize': 0.1, 'useStereo': False, 'maxKeypoints': '2000', 'optimizerMaxIterations': '50', 'parameterSets': ['wrapper-base', 'offline-base', 'android']} blur filter range [-2, 2) filtering out points further than 14.935060803845893m Done!
output written to /tmp/tmpniwln2cj/sai-cli/spectacular-rec_2024-05-29_15-27-29 COMMAND: ['python', 'run_colmap.py', '/tmp/tmpniwln2cj/sai-cli/spectacular-rec_2024-05-29_15-27-29', '/tmp/tmpniwln2cj/colmap-sai-cli-imgs/spectacular-rec_2024-05-29_15-27-29'] Processing /tmp/tmpniwln2cj/sai-cli/spectacular-rec_2024-05-29_15-27-29 4 images (would be) copied in a temporary directory ['ns-process-data', 'images', '--data', '/tmp/tmppywzee7v', '--output-dir', '/tmp/tmpniwln2cj/colmap-sai-cli-imgs/spectacular-rec_2024-05-29_15-27-29'] Traceback (most recent call last): File "run_colmap.py", line 101, in
process(case, args)
File "run_colmap.py", line 42, in process
ret = subprocess.run(cmd, check=True, capture_output=True)
File "/home/x/anaconda3/envs/nerfstudio/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ns-process-data', 'images', '--data', '/tmp/tmppywzee7v', '--output-dir', '/tmp/tmpniwln2cj/colmap-sai-cli-imgs/spectacular-rec_2024-05-29_15-27-29']' returned non-zero exit status 1.
Traceback (most recent call last):
File "process_sai_custom.py", line 140, in
process(args)
File "process_sai_custom.py", line 112, in process
maybe_run_cmd(colmap_cmd)
File "process_sai_custom.py", line 36, in maybe_run_cmd
if not args.dry_run: subprocess.check_call(cmd)
File "/home/x/anaconda3/envs/nerfstudio/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['python', 'run_colmap.py', '/tmp/tmpniwln2cj/sai-cli/spectacular-rec_2024-05-29_15-27-29', '/tmp/tmpniwln2cj/colmap-sai-cli-imgs/spectacular-rec_2024-05-29_15-27-29']' returned non-zero exit status 1.