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

Euclidean loss heatmap layer error?? #13

Open
zhaishengfu opened this issue Jul 22, 2016 · 7 comments
Open

Euclidean loss heatmap layer error?? #13

zhaishengfu opened this issue Jul 22, 2016 · 7 comments

Comments

@zhaishengfu
Copy link

zhaishengfu commented Jul 22, 2016

Hello. Thank you for sharing your code. But i find a big error. In you file of euclidean_loss_heatmap_layer.cpp, you have the following codes in line 81:
for (int idx_ch = 0; idx_ch < num_channels; idx_ch++)
{
for (int i = 0; i < label_height; i++)
{
for (int j = 0; j < label_width; j++)
{
int image_idx = idx_img * label_img_size + idx_ch * label_channel_size + i * label_height + j;
float diff = (float)bottom_pred[image_idx] - (float)gt_pred[image_idx];

but i think image_idx should be idx_img * label_img_size + idx_ch * label_channel_size + i * label_width+ j;
thatis , the label_height should be changed to label_width. Am i wrong??
Looking forward to your reply!

@uestcapp
Copy link

this is no an error , your mistake.

@zhaishengfu
Copy link
Author

zhaishengfu commented Jul 28, 2016

Sorry for mistaking it, but can you tell me more ?? Indeed i have changed your codes as i said and i can make it work correctly. In my opinion, variable i and j loop over label_height and label_width(for example, label_width=176 and label_height =216), then i * label_height will be 216*216!! Am I wrong about the meaning of variable i, j, label_width or label_height??

@Fang-Haoshu
Copy link

Hi @zhaishengfu I think you are right. However, it's weird that the original code works and no one raise this issue. Does your result of regression look good?

@zhaishengfu
Copy link
Author

@liuxhy237 I think this is because they don't use the code to visualize??whatever, this only effects the visualization , so the code can work well. I think so...

@Fang-Haoshu
Copy link

Fang-Haoshu commented Sep 1, 2016

@zhaishengfu I see. And label_height is set to be equal to label_width in most cases, I guess. BUT it's indeed a bug. Maybe you can make a PR.
And THANK YOU for raising this issue!

@rimphyd
Copy link

rimphyd commented Dec 17, 2016

@zhaishengfu
Sorry to use your thread, but I have a related question.

In euclidean_loss_heatmap_layer.cpp there is code like this:

...
for (int i = 0; i < label_height; i++)
{
for (int j = 0; j < label_width; j++)
{
int image_idx = idx_img * label_img_size + idx_ch * label_channel_size + i * label_height + j;
float diff = (float)bottom_pred[image_idx] - (float)gt_pred[image_idx];
loss += diff * diff;
...

Is it possible to get (x,y) coordinates of prediction instead of an "area" ?

Thank you.

@dedoogong
Copy link

Oh it's nice to find @zhaishengfu's already raised this issue. I think, principally, he is right.
@rimphyd what you mean for the "area"? and isn't it right that x, y == j, i ? what you mean for the "x, y"?

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

5 participants