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

Need help to do inference for gray scale image #32

Open
mkothule opened this issue Aug 10, 2023 · 4 comments
Open

Need help to do inference for gray scale image #32

mkothule opened this issue Aug 10, 2023 · 4 comments

Comments

@mkothule
Copy link

Want to run the network for gray scale images (single channel)

I get this error while running network on gray images
Traceback (most recent call last):
File "demo_imgs.py", line 100, in
demo(args)
File "demo_imgs.py", line 50, in demo
image1 = load_image(imfile1)
File "demo_imgs.py", line 29, in load_image
img = torch.from_numpy(img).permute(2, 0, 1).float()
RuntimeError: number of dims don't match in permute

I tried copying same gray values for all 3 channel but results are not very good.

I see eth3d is gray scale image dataset so I also tried with eth3d network shared.
But I still get above error.

Can you please share what change is needed to adapt network to gray images?

@gangweiX
Copy link
Owner

can you give me your gray images?

@mkothule
Copy link
Author

Currently I am using KITTIT images (RGB2Gray converted) for experimentation.
000000_10_image_3 png_gray
000000_10_image_2_gray

@gangweiX
Copy link
Owner

You can use KITTI pretrained model, that will perform well.

@mkothule
Copy link
Author

thanks gangweiX. I see sensible output with kitti2015 pre-trained network for above images.

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

2 participants