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

Optimization problem: missing m_hat parameters #5

Closed
GustavoMourao opened this issue Dec 13, 2021 · 15 comments
Closed

Optimization problem: missing m_hat parameters #5

GustavoMourao opened this issue Dec 13, 2021 · 15 comments

Comments

@GustavoMourao
Copy link

GustavoMourao commented Dec 13, 2021

Hi, how is it going?
@VSainteuf @loicland

In equation (6), which is apply to extract the centerness map, I would like to ask what is the estimated parameters $\hat{I}{p}$ and $\hat{J}{p}$.

I'm asking since I have implemented this optimization problem and I didn't got those parameters:

def loss(params):
    i_measured, j_measured, sigma_h, sigma_w = params
    term_i = np.power((i_measured), 2) / np.power((2*sigma_h), 2)
    term_j = np.power((j_measured), 2) / np.power((2*sigma_w), 2)

    return np.exp(-(term_i + term_j))

Thank you so much!

@VSainteuf
Copy link
Owner

VSainteuf commented Dec 20, 2021

Hi @GustavoMourao !
So Eq. 6 shows how to obtain the centerness ground truth, and in this formula $\hat{i}{p}$ and $\hat{j}{p}$ denote the ground truth position of a given parcel $p$. Hence, a parcel in a given patch will result in a Gaussian kernel centred on $ (\hat{i}{p} , \hat{j}{p}) $ in the centerness ground truth.
Does that answer your question ?

@GustavoMourao
Copy link
Author

I've got it!

However, have you used the original CenterMask implementation in order to get the heatmap, and the centerness ground truth, as well?

Besides of that, I haven't fully understood how you obtained the Zones? Was that extracted from centerness ground truth?

Thank you very much!

@VSainteuf
Copy link
Owner

Great!
We didn't use the CenterMask implementation we computed the centerness ground truth as described in Eq.6.
I think that in CenterMask the kernels are homoscedastic whereas we use heteroscedastic kernels that depend on the parcel's two dimensions.

For the Zones see this issue : #6

@GustavoMourao
Copy link
Author

I see.

However, how have you calculated the ground truth heatmap, used as target that feed the loss function? In this case, the target heatmap used into Class PaPsLoss?

@VSainteuf
Copy link
Owner

that's what I mean (centerness ground truth = ground truth heatmap), so Eq. 6

@GustavoMourao
Copy link
Author

heat-comp

Haven't you implemented Equation 6 in Class PaPs? If so, those results above represents the target heatmap and the calculated value from forwar method (class PaPs).

If not, have you implemented Eq.6?

Cheers

@VSainteuf
Copy link
Owner

The left figure is the result of our implementation of Eq. 6.
But the implementation is not contained in PaPs, the ground truth heatmap was computed once and for all and stored in the annotations of the dataset.

@GustavoMourao
Copy link
Author

Great, I see.

So, could you share the methodology used to obtain the ground truth heatmap? It seems that isn't just the argmax of each parcel..

Thanks a lot!

@VSainteuf
Copy link
Owner

Well the ground truth heatmap is obtained with Eq. 6 ! ^^

@VSainteuf
Copy link
Owner

Maybe you are thinking of the mapping pixel->parcel (the "zones" tensor) ?

@GustavoMourao
Copy link
Author

I see.

But look, do you use the Eq. 6 as parameter of your loss function, right (PaPsLoss)? And, considering this, do you use the same estimation (Eq.6) during the inference?

@VSainteuf
Copy link
Owner

This is the target signal for PaPsLoss, and specifically for the centerness regression head.
It is used as target signal during training.
You don't need this at inference time.

@GustavoMourao
Copy link
Author

I've got.

I think that I misunderstanding the optimization loss func. ;)

Thank you for the support

@alexanderDuenas
Copy link

Hi Dears!

Is it possible to upload or share the code implementation for the eq 6 for generating the ground-truth heatmaps?

@VSainteuf
Copy link
Owner

Hi @alexanderDuenas ,
I pushed the implementation for the generation of the ground truth heatmaps, where you will also see how the zones tensor is obtained.
I pushed it in the dataset repository.

This issue was closed.
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

3 participants