You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: datasets/quickdraw/README.md
+90-5Lines changed: 90 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,6 +166,7 @@ The `sketch_rnn_full` configuration stores the data in the format suitable for i
166
166
<summary>
167
167
Click here to see the full class labels mapping:
168
168
</summary>
169
+
169
170
|id|class|
170
171
|---|---|
171
172
|0|aircraft carrier|
@@ -513,28 +514,99 @@ The `sketch_rnn_full` configuration stores the data in the format suitable for i
513
514
|342|yoga|
514
515
|343|zebra|
515
516
|344|zigzag|
517
+
516
518
</details>
517
519
518
520
#### `sketch_rnn` and `sketch_rnn_full`
519
521
520
522
-`word`: Category the player was prompted to draw.
521
523
-`drawing`: An array of strokes. Strokes are represented as 3-tuples consisting of x-offset, y-offset, and a binary variable which is 1 if the pen is lifted between this position and the next, and 0 otherwise.
522
524
525
+
<details>
526
+
<summary>
527
+
Click here to see the code for visualizing drawings in Jupyter Notebook or Google Colab:
528
+
</summary>
529
+
530
+
```python
531
+
import numpy as np
532
+
import svgwrite # pip install svgwrite
533
+
from IPython.display importSVG, display
534
+
535
+
defdraw_strokes(drawing, factor=0.045):
536
+
"""Displays vector drawing as SVG.
537
+
538
+
Args:
539
+
drawing: a list of strokes represented as 3-tuples
540
+
factor: scaling factor. The smaller the scaling factor, the bigger the SVG picture and vice versa.
> **Note**: Sketch-RNN takes for input strokes represented as 5-tuples with drawings padded to a common maximum length and prefixed by the special start token `[0, 0, 1, 0, 0]`. The 5-tuple representation consists of x-offset, y-offset, and p_1, p_2, p_3, a binary one-hot vector of 3 possible pen states: pen down, pen up, end of sketch. More precisely, the first two elements are the offset distance in the x and y directions of the pen from the previous point. The last 3 elements represents a binary one-hot vector of 3 possible states. The first pen state, p1, indicates that the pen is currently touching the paper, and that a line will be drawn connecting the next point with the current point. The second pen state, p2, indicates that the pen will be lifted from the paper after the current point, and that no line will be drawn next. The final pen state, p3, indicates that the drawing has ended, and subsequent points, including the current point, will not be rendered.
524
595
><details>
525
596
> <summary>
526
597
> Click here to see the code for converting drawings to Sketch-RNN input format:
527
598
> </summary>
599
+
>
528
600
> ```python
529
601
>defto_sketch_rnn_format(drawing, max_len):
530
602
>"""Converts a drawing to Sketch-RNN input format.
531
603
>
532
604
> Args:
533
-
> drawing: a list of strokes represented as 3-tuples
534
-
> max_len: maximum common length of all drawings
605
+
> drawing: a list of strokes represented as 3-tuples
606
+
> max_len: maximum common length of all drawings
535
607
>
536
608
> Returns:
537
-
> NumPy array
609
+
> NumPy array
538
610
> """
539
611
> drawing = np.array(drawing)
540
612
> result = np.zeros((max_len, 5), dtype=float)
@@ -548,10 +620,15 @@ The `sketch_rnn_full` configuration stores the data in the format suitable for i
548
620
> result = np.vstack([[0, 0, 1, 0, 0], result])
549
621
>return result
550
622
>```
623
+
>
551
624
></details>
552
625
553
626
### Data Splits
554
627
628
+
In the configurations `raw`, `preprocessed_simplified_drawings`and`preprocessed_bitamps` (default configuration), all the data is contained in the training set, which has 50426266 examples.
629
+
630
+
`sketch_rnn`and`sketch_rnn_full` have the data split into training, validation and test split. In the `sketch_rnn` configuration, 75K samples (70K Training, 2.5K Validation, 2.5K Test) have been randomly selected from each category. Therefore, the training set contains 24150000 examples, the validation set862500 examples and the test set862500 examples. The `sketch_rnn_full` configuration has the full (training) data for each category, which leads to the training set having 43988874 examples, the validation set862500and the test set862500 examples.
631
+
555
632
## Dataset Creation
556
633
557
634
### Curation Rationale
@@ -566,17 +643,25 @@ From the GitHub repository:
566
643
567
644
#### Initial Data Collection and Normalization
568
645
646
+
This dataset contains vector drawings obtained from [Quick, Draw!](https://quickdraw.withgoogle.com/), an online game where the players are asked to draw objects belonging to a particular objectclassin less than 20 seconds.
647
+
569
648
#### Who are the source language producers?
570
649
650
+
The participants in the [Quick, Draw!](https://quickdraw.withgoogle.com/) game.
651
+
571
652
### Annotations
572
653
573
654
#### Annotation process
574
655
656
+
The annotations are machine-generated and match the category the player was prompted to draw.
657
+
575
658
#### Who are the annotators?
576
659
660
+
The annotations are machine-generated.
661
+
577
662
### Personal and Sensitive Information
578
663
579
-
[More Information Needed]
664
+
Some sketches are known to be problematic (see https://github.com/googlecreativelab/quickdraw-dataset/issues/74and https://github.com/googlecreativelab/quickdraw-dataset/issues/18).
580
665
581
666
## Considerations for Using the Data
582
667
@@ -594,7 +679,7 @@ From the GitHub repository:
594
679
595
680
### Dataset Curators
596
681
597
-
Jonas Jongejan.
682
+
Jonas Jongejan, Henry Rowley, Takashi Kawashima, Jongmin Kim and Nick Fox-Gieg.
0 commit comments