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

How to chose the threshold for LocLoss? #6

Closed
dangweili opened this issue Sep 2, 2016 · 6 comments
Closed

How to chose the threshold for LocLoss? #6

dangweili opened this issue Sep 2, 2016 · 6 comments

Comments

@dangweili
Copy link

Usually the [theta_1_1 theta_1_2; theta_2_1 theta_2_2] is mall (less than 1). The parameters [theta_1_3 theta_1_3] will be much bigger (because this is the offset of cropped feature map or image part). So how to set the threshold of LocLoss for those two different types of parameters? Or I misunderstand the implement? Any suggestions? @daerduoCarey

@daerduoCarey
Copy link
Owner

I think you misunderstand the definition for theta_1_3 and theta_2_3. They should not be too large and should be of the same scale with other thetas. All thetas are defined to map a location from the source image to the target image in [-1, 1] scale, instead of the actual pixel space scale, e.g. [0, 224], [0, 256]. For example, any location in the source image or the target image is defined to be in [-1, 1], which is the relative location within the whole image.

Hope my reply answer your question. Thank you.

@dangweili
Copy link
Author

Got it. I misunderstand it. Thanks a lot. @daerduoCarey

@dangweili
Copy link
Author

dangweili commented Sep 4, 2016

Another question about the details. Consider the feature map is CHW. C is the channel. H, W are the height and width of the feature maps. Are the parameters [theta_1_1 theta_1_2 theta_1_3] correspond with the transform of features' width (denoted as x in original paper)? Or I misunderstand the order of x and y in the original paper? Thanks. @daerduoCarey

@daerduoCarey
Copy link
Owner

Yes. You're right.

@dangweili
Copy link
Author

OK. Thanks a lot. @daerduoCarey

@shaoming20798
Copy link

shaoming20798 commented Apr 2, 2020

Yes. You're right.

Hi, author。In your code, I find that x_t and y_t are reversed, here is your source code

for(int i=0; i<output_H_ * output_W_; ++i) {
    data[3 * i] = (i / output_W_) * 1.0 / output_H_ * 2 - 1;               // this is y_t, I think, cause it is scale by 'output_H'
    data[3 * i + 1] = (i % output_W_) * 1.0 / output_W_ * 2 - 1;     // x_t
    data[3 * i + 2] = 1;
}

And based on these codes, theta is also reversed, [theta_1_1 theta_1_2 theta_1_3] correspond with [y_t x_t translation]。
Emm.....it looks weird. Is there something I miss? I will appreciate it if you could give me a reply. Thanks!

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