gaopengcuhk / Stable-Pix2Seq

A full-fledged version of Pix2Seq
Apache License 2.0
235 stars 20 forks source link

Why do we want to create two samples in `get_item` #15

Closed allanj closed 1 year ago

allanj commented 1 year ago

I'm trying to understand the following code:

https://github.com/gaopengcuhk/Stable-Pix2Seq/blob/12587302a2b697e2be8c131452e466a3f45c8c3e/datasets/coco.py#L23-L31

This part is also different from the code in DETR. I'm wondering what's the design principle of transforming two samples.

As I can see that the collate function actually just concatenates them together

https://github.com/gaopengcuhk/Stable-Pix2Seq/blob/12587302a2b697e2be8c131452e466a3f45c8c3e/util/misc.py#L268-L271

allanj commented 1 year ago

I found this is mentioned in the Appendix of the paper. Thanks