Closed whulc closed 1 year ago
I keep changing the format so might have happened. Can you make a simple test case that I can fix?
I want to get the matching result for two 4D tensor(im1, im2) with size b, 3, h, w.
flow, confidence = dkm_model.match(im1, im2, device=device, batched=True)
Here is the error message.
/root/miniconda3/envs/mmseg/lib/python3.8/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or None
for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing weights=None
.
warnings.warn(msg)
0%| | 0/838 [00:00<?, ?it/s]/root/miniconda3/envs/mmseg/lib/python3.8/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3190.)
return _VF.meshgrid(tensors, kwargs) # type: ignore[attr-defined]
0%| | 0/838 [00:03<?, ?it/s]
Traceback (most recent call last):
File "/mnt/e/3D_tasks/SFM_related/DKM-main/demo_match_opensfm.py", line 238, in
Process finished with exit code 1
Thanks, I'll look into it.
I think the issue is that "upsample_preds" assumes that the data is not batched, since it wants the use the original images for higher resolution. If you set "dkm_model.upsample_preds" to false I think it should work.
You still cannot use upsample preds and batched jointly currently. Added assertion for this. With some changes to API I guess it would work. If people are interested enough I could add it.
It seems that dkm_model.match doesn't accept batch input now?