kyamagu commited on
Commit
1cef023
1 Parent(s): 0ad545d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +183 -100
README.md CHANGED
@@ -614,95 +614,171 @@ Almost all design templates use English.
614
  Each instance has scalar attributes (canvas) and sequence attributes (elements). Categorical values are stored as integer values. Check `ClassLabel` features of the dataset for the list of categorical labels.
615
 
616
  ```
617
- {'id': '5bd1c85078e1194aa6186300',
618
- 'length': 11,
619
- 'group': 4,
620
- 'format': 10,
621
- 'canvas_width': 40,
622
- 'canvas_height': 41,
623
- 'category': 1,
624
- 'type': [3, 3, 3, 3, 3, 3, 4, 1, 4, 4, 3],
625
- 'left': [0.8712766170501709,
626
- 0.42127659916877747,
627
- 0.14468085765838623,
628
- 0.8585106134414673,
629
- 0.8819149136543274,
630
- 0.043617021292448044,
631
- 0.30696335434913635,
632
- 0.0010638297535479069,
633
- 0.7409376502037048,
634
- 0.4813956916332245,
635
- 0.30744680762290955],
636
- 'top': [0.0,
637
- 0.0,
638
- 0.874365508556366,
639
- 0.6967005133628845,
640
- 0.6967005133628845,
641
- 0.9060913920402527,
642
- 0.8984156250953674,
643
- 0.113832488656044,
644
- 0.434346079826355,
645
- 0.14983975887298584,
646
- 0.05710659921169281],
647
- 'width': [0.12989361584186554,
648
- 0.2329787164926529,
649
- 0.42127659916877747,
650
- 0.0010638297535479069,
651
- 0.0010638297535479069,
652
- 0.20425531268119812,
653
- 0.2213829755783081,
654
- 0.5641489624977112,
655
- 0.2148936241865158,
656
- 0.2951063811779022,
657
- 0.6446808576583862],
658
- 'height': [1.0,
659
- 0.5164974331855774,
660
- 0.06598984450101852,
661
- 0.24365481734275818,
662
- 0.24365481734275818,
663
- 0.0012690355069935322,
664
- 0.026649747043848038,
665
- 0.7272842526435852,
666
- 0.2753807008266449,
667
- 0.2842639684677124,
668
- 0.7271573543548584],
669
- 'opacity': [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
670
  'text': ['',
671
  '',
672
  '',
673
  '',
674
  '',
675
  '',
676
- 'Powerful Ways',
677
  '',
678
- '11',
679
- 'Powerful Ways\nTo Take Care\nOf Your Skin\nIn Summer',
680
- ''],
681
- 'font': [0, 0, 0, 0, 0, 0, 24, 0, 24, 189, 0],
 
 
 
 
682
  'font_size': [0.0,
683
  0.0,
684
  0.0,
685
  0.0,
686
  0.0,
687
  0.0,
688
- 21.504981994628906,
689
  0.0,
690
- 217.0,
691
- 43.18538284301758,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
692
  0.0],
693
- 'text_align': [0, 0, 0, 0, 0, 0, 2, 0, 2, 2, 0],
694
- 'angle': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
695
- 'color': [[236.0, 96.0, 104.0],
696
- [236.0, 96.0, 104.0],
697
- [29.0, 29.0, 27.0],
698
- [29.0, 29.0, 27.0],
699
- [29.0, 29.0, 27.0],
700
- [29.0, 29.0, 27.0],
701
- [0.0, 0.0, 1.0],
702
- [228.0, 148.0, 151.0],
703
- [0.0, 0.0, 1.0],
704
- [0.0, 0.0, 1.0],
705
- [29.0, 29.0, 27.0]],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
706
  'image': [<PIL.PngImagePlugin.PngImageFile image mode=RGBA size=256x256>,
707
  <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=256x256>,
708
  <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=256x256>,
@@ -713,42 +789,48 @@ Each instance has scalar attributes (canvas) and sequence attributes (elements).
713
  <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=256x256>,
714
  <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=256x256>,
715
  <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=256x256>,
 
 
 
716
  <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=256x256>]}
717
  ```
718
 
719
  ### Data Fields
720
 
721
- In the following, categorical fields are shown as `string` type, but the actual storage is `int64`.
722
 
723
  **Context features (Canvas attributes)**
724
 
725
- | Field | Type | Shape | Description |
726
- | ------------- | ------ | ----- | -------------------------------------------------------------- |
727
- | id | string | () | Template ID from crello.com |
728
- | group | string | () | Broad design group, such as social media posts or blog headers |
729
- | format | string | () | Detailed design format, such as Instagram post or postcard |
730
- | category | string | () | Topic category of the design, such as holiday celebration |
731
- | canvas_width | string | () | Canvas pixel width |
732
- | canvas_height | string | () | Canvas pixel height |
733
- | length | int64 | () | Length of sequence features |
734
 
735
  **Sequence features (Element attributes)**
736
 
737
- | Field | Type | Shape | Description |
738
- | ----------- | ------- | ----- | -------------------------------------------------------------------- |
739
- | type | string | () | Element type, such as vector shape, image, or text |
740
- | left | float32 | () | Element left position normalized to [0, 1] range w.r.t. canvas_width |
741
- | top | float32 | () | Element top position normalized to [0, 1] range w.r.t. canvas_height |
742
- | width | float32 | () | Element width normalized to [0, 1] range w.r.t. canvas_width |
743
- | height | float32 | () | Element height normalized to [0, 1] range w.r.t. canvas_height |
744
- | color | int64 | (3,) | Extracted main RGB color of the element |
745
- | opacity | float32 | () | Opacity in [0, 1] range |
746
- | image_bytes | string | () | Pre-rendered 256x256 preview of the element encoded in PNG format |
747
- | text | string | () | Text content in UTF-8 encoding for text element |
748
- | font | string | () | Font family name for text element |
749
- | font_size | float32 | () | Font size (height) in pixels |
750
- | text_align | string | () | Horizontal text alignment, left, center, right for text element |
751
- | angle | float32 | () | Element rotation angle (radian) w.r.t. the center of the element |
 
 
 
752
 
753
  Note that the color and pre-rendered images do not necessarily accurately reproduce the original design templates. The original template is accessible at the following URL if still available.
754
 
@@ -841,10 +923,11 @@ We do not re-distribute the original files as we are not allowed by terms.
841
  - Improve text rendering quality.
842
  - Change split generation criteria: no compatibility with v2 splits.
843
  - Incorporate a motion picture thumbnail in templates.
 
844
 
845
  2.0: v2 release (May 26, 2022)
846
 
847
- - Adds `text`, `font`, `font_size`, `text_align`, and `angle` sequence attributes.
848
  - Include rendered text element in `image_bytes`.
849
 
850
  1.0: v1 release (Aug 24, 2021)
 
614
  Each instance has scalar attributes (canvas) and sequence attributes (elements). Categorical values are stored as integer values. Check `ClassLabel` features of the dataset for the list of categorical labels.
615
 
616
  ```
617
+ {'id': '59528b4e95a7a863ddcdf902',
618
+ 'length': 14,
619
+ 'group': 5,
620
+ 'format': 49,
621
+ 'canvas_width': 11,
622
+ 'canvas_height': 34,
623
+ 'category': 14,
624
+ 'type': [1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4],
625
+ 'left': [0.0002478847454767674,
626
+ 0.0,
627
+ 0.0,
628
+ 0.03125,
629
+ 0.05624999850988388,
630
+ 0.30000001192092896,
631
+ 0.16875000298023224,
632
+ 0.18125000596046448,
633
+ 0.5625,
634
+ 0.3375000059604645,
635
+ 0.25623849034309387,
636
+ 0.41874998807907104,
637
+ 0.19995903968811035,
638
+ 0.36250001192092896],
639
+ 'top': [0.00042101924191229045,
640
+ 0.0,
641
+ -0.0016666667070239782,
642
+ 0.008333333767950535,
643
+ 0.014999999664723873,
644
+ 0.5633333325386047,
645
+ 0.4816666543483734,
646
+ 0.4116666615009308,
647
+ 0.3883333206176758,
648
+ 0.3883333206176758,
649
+ 0.512499988079071,
650
+ 0.4833333194255829,
651
+ 0.4350000023841858,
652
+ 0.3933333456516266],
653
+ 'width': [0.9999237656593323,
654
+ 0.9937499761581421,
655
+ 1.0,
656
+ 0.9375,
657
+ 0.8812500238418579,
658
+ 0.4000000059604645,
659
+ 0.65625,
660
+ 0.637499988079071,
661
+ 0.09375,
662
+ 0.10000000149011612,
663
+ 0.6084214448928833,
664
+ 0.29374998807907104,
665
+ 0.7160975337028503,
666
+ 0.28125],
667
+ 'height': [1.0023325681686401,
668
+ 0.9983333349227905,
669
+ 1.0,
670
+ 0.9833333492279053,
671
+ 0.9683333039283752,
672
+ 0.0416666679084301,
673
+ 0.04333333298563957,
674
+ 0.029999999329447746,
675
+ 0.029999999329447746,
676
+ 0.029999999329447746,
677
+ 0.05166666582226753,
678
+ 0.021666666492819786,
679
+ 0.05166666582226753,
680
+ 0.018333332613110542],
681
+ 'opacity': [1.0,
682
+ 1.0,
683
+ 1.0,
684
+ 1.0,
685
+ 1.0,
686
+ 1.0,
687
+ 1.0,
688
+ 1.0,
689
+ 1.0,
690
+ 1.0,
691
+ 1.0,
692
+ 1.0,
693
+ 1.0,
694
+ 1.0],
695
  'text': ['',
696
  '',
697
  '',
698
  '',
699
  '',
700
  '',
 
701
  '',
702
+ '',
703
+ '',
704
+ '',
705
+ 'Nature',
706
+ 'with',
707
+ 'friends',
708
+ 'Make'],
709
+ 'font': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 182, 31, 31],
710
  'font_size': [0.0,
711
  0.0,
712
  0.0,
713
  0.0,
714
  0.0,
715
  0.0,
 
716
  0.0,
717
+ 0.0,
718
+ 0.0,
719
+ 0.0,
720
+ 31.71994972229004,
721
+ 13.0,
722
+ 31.644691467285156,
723
+ 11.0],
724
+ 'text_align': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 1],
725
+ 'angle': [0.0,
726
+ 0.0,
727
+ 0.0,
728
+ 0.0,
729
+ 0.0,
730
+ 0.0,
731
+ 0.0,
732
+ 0.0,
733
+ 0.0,
734
+ 0.0,
735
+ 0.0,
736
+ 0.0,
737
+ 0.0,
738
  0.0],
739
+ 'capitalize': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
740
+ 'line_height': [1.0,
741
+ 1.0,
742
+ 1.0,
743
+ 1.0,
744
+ 1.0,
745
+ 1.0,
746
+ 1.0,
747
+ 1.0,
748
+ 1.0,
749
+ 1.0,
750
+ 1.0,
751
+ 1.0,
752
+ 1.0,
753
+ 1.0],
754
+ 'letter_spacing': [0.0,
755
+ 0.0,
756
+ 0.0,
757
+ 0.0,
758
+ 0.0,
759
+ 0.0,
760
+ 0.0,
761
+ 0.0,
762
+ 0.0,
763
+ 0.0,
764
+ 2.0,
765
+ 0.0,
766
+ 2.0,
767
+ 1.0],
768
+ 'color': [[35.0, 80.0, 60.0],
769
+ [255.0, 255.0, 255.0],
770
+ [35.0, 31.0, 32.0],
771
+ [255.0, 255.0, 255.0],
772
+ [255.0, 255.0, 255.0],
773
+ [255.0, 255.0, 255.0],
774
+ [255.0, 255.0, 255.0],
775
+ [255.0, 255.0, 255.0],
776
+ [255.0, 255.0, 255.0],
777
+ [255.0, 255.0, 255.0],
778
+ [255.0, 255.0, 255.0],
779
+ [255.0, 255.0, 255.0],
780
+ [255.0, 255.0, 255.0],
781
+ [255.0, 255.0, 255.0]],
782
  'image': [<PIL.PngImagePlugin.PngImageFile image mode=RGBA size=256x256>,
783
  <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=256x256>,
784
  <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=256x256>,
 
789
  <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=256x256>,
790
  <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=256x256>,
791
  <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=256x256>,
792
+ <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=256x256>,
793
+ <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=256x256>,
794
+ <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=256x256>,
795
  <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=256x256>]}
796
  ```
797
 
798
  ### Data Fields
799
 
800
+ In the following, categorical fields are shown as `categorical` type, but the actual storage is `int64`.
801
 
802
  **Context features (Canvas attributes)**
803
 
804
+ | Field | Type | Shape | Description |
805
+ | ------------- | ----------- | ----- | -------------------------------------------------------------- |
806
+ | id | string | () | Template ID from crello.com |
807
+ | group | categorical | () | Broad design group, such as social media posts or blog headers |
808
+ | format | categorical | () | Detailed design format, such as Instagram post or postcard |
809
+ | category | categorical | () | Topic category of the design, such as holiday celebration |
810
+ | canvas_width | categorical | () | Canvas pixel width |
811
+ | canvas_height | categorical | () | Canvas pixel height |
812
+ | length | int64 | () | Length of sequence features |
813
 
814
  **Sequence features (Element attributes)**
815
 
816
+ | Field | Type | Shape | Description |
817
+ | -------------- | ----------- | ----- | -------------------------------------------------------------------- |
818
+ | type | categorical | () | Element type, such as vector shape, image, or text |
819
+ | left | float32 | () | Element left position normalized to [0, 1] range w.r.t. canvas_width |
820
+ | top | float32 | () | Element top position normalized to [0, 1] range w.r.t. canvas_height |
821
+ | width | float32 | () | Element width normalized to [0, 1] range w.r.t. canvas_width |
822
+ | height | float32 | () | Element height normalized to [0, 1] range w.r.t. canvas_height |
823
+ | color | int64 | (3,) | Extracted main RGB color of the element |
824
+ | opacity | float32 | () | Opacity in [0, 1] range |
825
+ | image_bytes | image | () | Pre-rendered 256x256 preview of the element encoded in PNG format |
826
+ | text | string | () | Text content in UTF-8 encoding for text element |
827
+ | font | categorical | () | Font family name for text element |
828
+ | font_size | float32 | () | Font size (height) in pixels |
829
+ | text_align | categorical | () | Horizontal text alignment, left, center, right for text element |
830
+ | angle | float32 | () | Element rotation angle (radian) w.r.t. the center of the element |
831
+ | capitalize | categorical | () | Binary flag to capitalize letters |
832
+ | line_height | float32 | () | Scaling parameter to line height, default is 1.0 |
833
+ | letter_spacing | float32 | () | Adjustment parameter for letter spacing, default is 0.0 |
834
 
835
  Note that the color and pre-rendered images do not necessarily accurately reproduce the original design templates. The original template is accessible at the following URL if still available.
836
 
 
923
  - Improve text rendering quality.
924
  - Change split generation criteria: no compatibility with v2 splits.
925
  - Incorporate a motion picture thumbnail in templates.
926
+ - Add `capitalize`, `line_height`, and `letter_spacing` sequence attributes.
927
 
928
  2.0: v2 release (May 26, 2022)
929
 
930
+ - Add `text`, `font`, `font_size`, `text_align`, and `angle` sequence attributes.
931
  - Include rendered text element in `image_bytes`.
932
 
933
  1.0: v1 release (Aug 24, 2021)