googlecreativelab/quickdraw-dataset

How is the stroke data represented (square examples)?

melvinroest opened this issue · 1 comments

I've been scouring this Github (reading its source code) and reading the following documentation https://quickdraw.readthedocs.io/en/latest/api.html#

But I don't understand the structure of some_image.strokes.

I've filtered all squares to have no_of_strokes == 4. Looking at the images, this is indeed the case as the strokes are subtly separated from each other.

But then when I inspect the data, I see things such as:

Square 1 (a perfectly fine square upon image inspection)

[[(42, 7), (31, 63), (16, 124), (0, 229)], 
[(40, 0), (255, 11)], 
[(7, 229), (116, 229), (211, 223)], 
[(251, 18), (233, 211), (227, 218), (213, 219)]]

Square 2 (another perfectly fine square upon image inspection)

[[(1, 18), (0, 48), (8, 117), (19, 196), (21, 203), (25, 203)], 
[(14, 5), (55, 4), (105, 8), (253, 3)], 
[(33, 207), (86, 192), (117, 187), (255, 188)], 
[(246, 0), (240, 5), (239, 18), (245, 108), (247, 198)]]

My question: I always thought that lines were drawn in the format of:
(x1, y1) to (x2, y2).

So why are there more than 2 coordinates per array? I'd expect the data to be:

[ [(x1, y1), (x2, y2)],
 [(x1, y1), (x2, y2)],
 [(x1, y1), (x2, y2)],
 [(x1, y1), (x2, y2)] ]

I hope that someone knows, and is kind enough to clear the confusion.

Oh, this is silly.

Lines are not straight. They can be crooked, hence more data is needed.

I'll close the issue for now and reopen it if my inspection of the data shows something otherwise.