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

Question about Layout Location Coordinate Normalization. #7

Open
KimRass opened this issue Dec 26, 2024 · 4 comments
Open

Question about Layout Location Coordinate Normalization. #7

KimRass opened this issue Dec 26, 2024 · 4 comments

Comments

@KimRass
Copy link

KimRass commented Dec 26, 2024

I don't understand the meaning of layout location coordinate normalization.

The input image resolution during pre-training is 1920 x 1600, but the coordinates are quantized into the range $[0, 1000]$.

Does this mean that any ground truth coordinates greater than 1000 are simply clipped to 1000?

@Veason-silverbullet
Copy link
Owner

@KimRass Coordinate bin normalization means all coordinates are quantized into a relative range of $[0, 1000]$.

Suppose a pixel of the image in the location $(x_1, y_1, x_2, y_2)$, the pre-training size H x W is 1920 x 1600, the normalized location is $\big(\frac{x_1}{W} \times 1000, \frac{y_1}{H} \times 1000, \frac{x_2}{W} \times 1000, \frac{y_2}{H} \times 1000\big)$.

For example, a pixel of the image in the location $(320, 192, 640, 960)$ with the pre-training resolution (H x W) = (1920 x 1600), its normalized location is $(200, 100, 400, 500)$.

Also, note that the pre-training and fine-tuning resolutions are different.

@KimRass
Copy link
Author

KimRass commented Dec 26, 2024

I fully understood. Thank you very much!

@KimRass
Copy link
Author

KimRass commented Dec 26, 2024

So in files such as 'ocr_0.json' coordinates are already quantized. Is this right?

@Veason-silverbullet
Copy link
Owner

So in files such as 'ocr_0.json' coordinates are already quantized. Is this right?

Yes.

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