You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support datasets with images with varied widths and heights #7
Are you able to add support for datasets with images with varied widths and heights?
Error executing job with overrides: ['train.gs_epochs=30000', 'train.no_densify=True', 'gs.dataset.source_path=data/frame000001', 'gs.dataset.model_path=data/output/frame000001', 'init_wC.matches_per_ref=20000', 'init_wC.nns_per_ref=3', 'init_wC.num_refs=180', 'wandb.mode=disabled']
Traceback (most recent call last):
File "/mnt/c/Users/ice/wslworkspace/EDGS/train.py", line 54, in main
trainer.init_with_corr(cfg.init_wC)
File "/mnt/c/Users/ice/wslworkspace/EDGS/source/trainer.py", line 234, in init_with_corr
camera_set, selected_indices, visualization_dict = init_fn(
File "/mnt/c/Users/ice/wslworkspace/EDGS/source/corr_init.py", line 630, in init_gaussians_with_corr
kptsA_np, kptsB_np, kptsB_proj_matrices_idcs, kptsA_color, kptsB_color = extract_keypoints_and_colors(
File "/mnt/c/Users/ice/wslworkspace/EDGS/source/corr_init.py", line 362, in extract_keypoints_and_colors
imB_compound_np = np.stack(imB_compound, axis=0)
File "/home/ice/miniconda3/envs/edgs/lib/python3.10/site-packages/numpy/core/shape_base.py", line 449, in stack
raise ValueError('all input arrays must have the same shape')
ValueError: all input arrays must have the same shape
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
Thank you guys for your interest in our work. We haven't actually considered this problem when designing the method but we maybe will fix that after the SIGGRAPH ddl. For now on I can suggest you to manually resize all the arrays in imB_compound to the size of imA in function extract_keypoints_and_colors in source/corr_init.py. Probably add this to the line 313. This will slightly decrease the speed and generally not the nicest solution but may work as a quick hack. Let me know if you have problems, I'll try to help you out.
Hi, I have been facing the same problem.
In my case, the following code just worked.
Resizing to (W_A, H_A) ended in an error (array index out of range), so I used (W, H) instead.
H_A, W_A, _=imA.shapeH, W=certainties_max.shape# very dirty, but it just worked for metmp= []
importcv2forimBinimB_compound:
tmp.append(
cv2.resize(imB, (W, H))
)
imB_compound=tmp# Convert matches to pixel coordinateskptsA, kptsB=roma_model.to_pixel_coordinates(
matches, W_A, H_A, H, W# W, H
)
Activity
wstwxl commentedon May 14, 2025
Hello, I have the same problem. Have you solved it yet
henrypearce4D commentedon May 14, 2025
No I did not revisit to test anything else :(
dimakot55 commentedon May 20, 2025
Thank you guys for your interest in our work. We haven't actually considered this problem when designing the method but we maybe will fix that after the SIGGRAPH ddl. For now on I can suggest you to manually resize all the arrays in
imB_compoundto the size ofimAin functionextract_keypoints_and_colorsinsource/corr_init.py. Probably add this to the line 313. This will slightly decrease the speed and generally not the nicest solution but may work as a quick hack. Let me know if you have problems, I'll try to help you out.vrano714 commentedon Nov 6, 2025
Hi, I have been facing the same problem.
In my case, the following code just worked.
Resizing to
(W_A, H_A)ended in an error (array index out of range), so I used(W, H)instead.I'll be happy if there's any better workaround.