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
Hi I'm trying to inference on some of my images and it runs successfully with images with 4:3 ratio, but when I tried on images with size 720*480 there shows some error
(planerecnet) kb249@kb249:/media/kb249/K/liuxiaohan/PlaneRecNet$ python simple_inference.py --config=PlaneRecNet_101_config --trained_model=weights/PlaneRecNet_101_9_125000.pth --image=test_images/00000206_10002.jpg
Inference image: test_images/00000206_10002.jpg
/home/kb249/anaconda3/envs/planerecnet/lib/python3.6/site-packages/torch/functional.py:445: 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:2157.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
Traceback (most recent call last):
File "simple_inference.py", line 357, in
inference_image(net, args.image, depth_mode=args.depth_mode)
File "simple_inference.py", line 152, in inference_image
results = net(batch)
File "/home/kb249/anaconda3/envs/planerecnet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/media/kb249/K/liuxiaohan/PlaneRecNet/planerecnet.py", line 93, in forward
mask_pred = self.mask_head(mask_features)
File "/home/kb249/anaconda3/envs/planerecnet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/media/kb249/K/liuxiaohan/PlaneRecNet/planerecnet.py", line 492, in forward
feature_add_all_level += self.convs_all_levelsi
RuntimeError: The size of tensor a (107) must match the size of tensor b (108) at non-singleton dimension 2
And this is my test image
The text was updated successfully, but these errors were encountered:
Hi, that's because the image width and height should be divisible by 32. You can write a small function to pad zeros to the resized image so that H and W are divisible by 32. I will also do the same in the next update.
Hi, that's because the image width and height should be divisible by 32. You can write a small function to pad zeros to the resized image so that H and W are divisible by 32. I will also do the same in the next update.
Hi I'm trying to inference on some of my images and it runs successfully with images with 4:3 ratio, but when I tried on images with size
720*480
there shows some errorInference image: test_images/00000206_10002.jpg
/home/kb249/anaconda3/envs/planerecnet/lib/python3.6/site-packages/torch/functional.py:445: 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:2157.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
Traceback (most recent call last):
File "simple_inference.py", line 357, in
inference_image(net, args.image, depth_mode=args.depth_mode)
File "simple_inference.py", line 152, in inference_image
results = net(batch)
File "/home/kb249/anaconda3/envs/planerecnet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/media/kb249/K/liuxiaohan/PlaneRecNet/planerecnet.py", line 93, in forward
mask_pred = self.mask_head(mask_features)
File "/home/kb249/anaconda3/envs/planerecnet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/media/kb249/K/liuxiaohan/PlaneRecNet/planerecnet.py", line 492, in forward
feature_add_all_level += self.convs_all_levelsi
RuntimeError: The size of tensor a (107) must match the size of tensor b (108) at non-singleton dimension 2
And this is my test image
The text was updated successfully, but these errors were encountered: