Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: matmul: Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (n?,k),(k,m?)->(n?,m?) (size 0 is different from 3) #28

Open
Lifedecoder opened this issue Aug 3, 2024 · 1 comment

Comments

@Lifedecoder
Copy link

Hi! When I run run_particlesfm.py on 16 256x256 images, the error goes up:

Elapsed time: 0.376 [minutes]
{'num_reg_images': 16, 'num_sparse_points': 1141, 'num_observations': 10630, 'mean_track_length': 9.316389, 'num_observations_per_image': 664.375, 'mean_reproj_error': 0.401069}
WARNING:root:This SfM file structure was deprecated in hloc v1.1
88%|███████████████████████████████████████████████████████████████████████████████████████████████████████▎ | 14/16 [00:00<00:00, 62.94it/s]
Traceback (most recent call last):
File "run_particlesfm.py", line 159, in
particlesfm(args, args.image_dir, args.output_dir, skip_exists=args.skip_exists, keep_intermediate=args.keep_intermediate)
File "run_particlesfm.py", line 114, in particlesfm
sfm_reconstruction(args, image_dir, output_dir, traj_dir, skip_exists=skip_exists, keep_intermediate=keep_intermediate)
File "run_particlesfm.py", line 88, in sfm_reconstruction
write_depth_pose_from_colmap_format(sfm_dir, os.path.join(output_dir, "colmap_outputs_converted"))
File "/data2/yuxq/SFM/particle-sfm/sfm/convert.py", line 102, in write_depth_pose_from_colmap_format
save_depth_pose(output_dir, cameras, images, points3D)
File "/data2/yuxq/SFM/particle-sfm/sfm/convert.py", line 84, in save_depth_pose
cam_points = np.matmul(R, points_3d) + t
ValueError: matmul: Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (n?,k),(k,m?)->(n?,m?) (size 0 is different from 3)

But when I ran on 16 1024x1024 images, it doesn't have such problems. I wonder why this could happen and how to solve it.
Thanks!

@Lifedecoder
Copy link
Author

It seems that no 3d point in last few frames, could it be the camera motion too drastic so no points are matched?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant