canvas-vae icon indicating copy to clipboard operation
canvas-vae copied to clipboard

Some reminder about the Crello dataset

Open skyerhxx opened this issue 2 years ago • 6 comments

Firstly, thanks for the authors' good dataset.

Just a reminder, in both v1 and v2, there are some rendered elements parsed from the .tfrecord files whose height or width are not greater than 0. In my parsing process using the python code provided by the author, I met the error like this image After removing some error cases, the number of remaining imgs is image

Besides, there are some elements whose top or left coordinate is smaller than 0. I think it is because the rendered element is larger than its space in the image like Fig.2. My approach is to set left/top coordinate = 0 if they are < 0 like Fig.3 (the resulted appearance may be a little bit different from the original img, but it does not influence the classification of the element) image

skyerhxx avatar May 30 '22 16:05 skyerhxx

I also encountered width, height > 1 in some samples So I'm capping that at 1.0

sukritiverma1996 avatar Jun 14 '22 17:06 sukritiverma1996

There are also some incomplete cases in textElement, like image

skyerhxx avatar Jun 15 '22 06:06 skyerhxx

Thanks for that Do you happen to know what "maskElement" means? Some elements are tagged as "maskElement"

sukritiverma1996 avatar Jun 16 '22 15:06 sukritiverma1996

no idea, very confused.........

skyerhxx avatar Jun 27 '22 16:06 skyerhxx

Thanks for reporting this. Here are some clarifications.

We have tried our best to reverse-engineer undocumented data structure from the source website, but there are still erroneous elements and fields that we did not handle. For example, the width or height might be zero. We leave them as is. maskElement seems to be equivalent to a cropped image element.

Any element can have an out-of-canvas position as an element can be bigger than the canvas (then cropped). There is no preprocessing yet to crop such elements.

As documented in the README, text rendering is far from perfect. For example, a newline character is not supported.

kyamagu avatar Jan 05 '23 06:01 kyamagu