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

Mask is an array full of 0, leads to Nan for logits #22

Open
gabrielvannier opened this issue Mar 1, 2021 · 2 comments
Open

Mask is an array full of 0, leads to Nan for logits #22

gabrielvannier opened this issue Mar 1, 2021 · 2 comments

Comments

@gabrielvannier
Copy link

Thanks for this project !
This project is awesome. However I have an issue that occur really often and I can not figure out how to solve it :/

I am testing the repository in multi_frame using your script test.py. When starting the test, everything works fine and the predict fonction yields features correctly except for one thing : For almost half of the features the mask is an array full of 0 for the first two dimensions.

This imply that the new depth map (calculated on line 151 of test.py will be an array full of 0 :
depth_map = depth_map[..., 0]*masks[..., 0]

and the depth_mean will be an Nan value (because of division by 0) :
depth_mean = np.sum(depth_map) / np.sum(masks[..., 0])

And logits as well...
cla_ratio = flags.paras.cla_ratio depth_ratio = 1 - cla_ratio logits[0] = depth_ratio * depth_mean + cla_ratio * logits[0] logits[1] = 1.0 - depth_mean

So I need to figure out why the mask is an array full of 0, and how to fix the it to get the output I want !
If anybody could help me I would be very thankful !

PS : If you need any additional information let me know, I am 100% available

@gabrielvannier
Copy link
Author

Also, what does the masks is supposed to represent ? what is its meaning ?

@nguyennhatkhoa99
Copy link

nguyennhatkhoa99 commented Oct 19, 2021

How do you calculate the depth map for input to the network. My image prediction always return to 0.

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