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

About LargeScaleJitter #3

Open
ShuaiBai623 opened this issue Nov 8, 2021 · 3 comments
Open

About LargeScaleJitter #3

ShuaiBai623 opened this issue Nov 8, 2021 · 3 comments

Comments

@ShuaiBai623
Copy link

ShuaiBai623 commented Nov 8, 2021

hi, great work! We also try to reimplement the Pix2Seq, we find the absolute coordinate is useful, which is similar to your LargeScaleJitter (pad or crop the image to the fix desired size),
the absolute coordinate means that normalized the position by dividing the fix size.
boxes = boxes / 1333. instead of boxes = boxes / torch.tensor([w, h, w, h], dtype=torch.float32),Then, padding or croppinf the image to the fix desired size is not necessary.

@hanqiu-hq
Copy link
Collaborator

Thanks.
We also use absolute coordinate as described in Pix2Seq.

scaled_box = box * scale_factor
scaled_box = box_cxcywh_to_xyxy(scaled_box)
box_tokens = (scaled_box / 1333 * self.num_bins).floor().long().clamp(min=0, max=self.num_bins)

The conversion of relative coordinate in transforms.py is because we use the same dataloader as DETR.
And for the large Scale jittering, we basically follow the same pipeline proposed in CopyPaste which is cited in Pix2seq.

@baiyongrui
Copy link

Hello, does using absolute coordinate gets a better AP?

@seanzhuh
Copy link

The only difference between relative and absolute coordinate is the normalization factor ? Absolute will normalize by the longest image size instead of the actual image size, which relative coordinate does, am I right ?

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

4 participants