--- license: cc-by-nc-4.0 language: - ja pretty_name: CLIPCJK_Gen size_categories: - 10K, # {'filepath': '剛/剛_5.png', 'title': '剛:⿰岡刂'}) ``` ## Dataset structure ### Data instances A data point comprises a path to an image with its label (that we call title). A sample looks like this: ``` {'__key__': 'sample_00089001', '__url__': 'train/train-000089.tar', 'json': {'filepath': '剛/剛_5.png', 'title': '剛:⿰岡刂'}, '__local_path__': 'train/train-000089.tar', 'png': } ``` ### Data fields - `__key__`: the unique identifier of the sample inside the shard. - `__url__`: the path to the shard (.tar file) containing the sample. - `json`: a dictionary containing metadata. The *title* field holds the character's label, including its IDS decomposition. - `__local_path__`: the path to the sample - `png`: the raw image data in bytes. Can be decoded into a PIL.Image object. ### Data Splits ||**Train**|**Test**| |:-----|:-----|:-----| |Classes|2414|2414| |Image Files|76392|15614| |Labels|305565|35629| > Note: The number of labels is higher than the number of images because each label is duplicated to match the character with the highest number of IDS patterns, as explained in the 'Label Biases' section ## Dataset Creation ClipCJK_Gen was built to provide enough date for an OpenCLIP VLM to predict and recognize Japanese Characters. ## Source Data ### Initial Data collection The dataset was built by generating images of shape 224*224 of characters from 17 Japanese fonts listed here : - Daichi. « ダーツフォント ». ProjectDARTS, 2024, https://www.p-darts.jp/font/dartsfont/. TTF. - Electronic Font Open Laboratory. « Sazanami Mincho ». Version 001, 2004, https://www.wazu.jp/gallery/Fonts_Japanese2.html. TTF. - Fontrix. « LINESeedJP_A ». 2022, https://seed.line.me/. TTF. - Furukawa, Yasuyuki. « Kochi Gothic Substitute ». 2003. TTF. - Inconnu. « 851マカポップ ». Version 1.01, 2022, https://pm85122.onamae.jp/851mkpop.html. TTF. - ———. « Aoyagi Kouzan Font 2 OTF ». Version 1.1, 2015, https://jref.com/resources/aoyagi-kouzan.90/. OTF. - ———. « Nagurigaki ». Version 1.60, 2007, https://www.wazu.jp/gallery/Fonts_Japanese2.html. TTF. - ———. « Osaka_unicode ». Version 1. TTF. - ———. « Sea font ». Version 1.60, https://www.wazu.jp/gallery/Fonts_Japanese2.html. TTF. - Kataoka, Yuji. « YujiBoku ». 28 novembre 2019. Kinutafontfactory, 2024. GitHub, https://github.com/Kinutafontfactory/Yuji. TTF. - Kurrasch, Jim. « Sword Kanji ». Avec Didier Mas, 2002, http://didier.mas.free.fr/public/. TTC. - Masayuki Sato et Hiroko Takiguchi. « Holiday-MDJP05 ». Version 05, 2014, https://mksd.jp/holiday05.html. OTF. - Momo. « さるじふぉんと ». Avec Chitose Kato, 2022, https://note.com/chitosekato/n/nc162552f8c1f. TTF. - Okita Kana. « ラコフォント ». 2016, https://okitan.booth.pm/items/203082. TTF. - Shibuya Myam. « 左利きの彼女 ». Police de caractères. 2022, https://note.com/shibumi/n/nb2ba54baf3c6. OTF. - YOKO. « YOKO文字 ». Avec Chitose Kato, 2022, https://note.com/chitosekato/n/nc162552f8c1f. TTF. - ZHONGYI Electronic Co. « Simsun ». Avec Microsoft, 2001, https://learn.microsoft.com/fr-be/typography/font-list/simsun. TTC. ### Data Annotation All the data is annotated with the character from its Unicode code point. To which we then labels constructed with IDS from the [CHISE project](https://www.chise.org/). Such as a label follows the rule `Char:Char` or `Char:Char` giving the following labels : - `剛:剛` - `剛:⿰岡刂` ### Annotation Process The code for annotation can be found [here](https://gitlab.huma-num.fr/pierre.magistry/silene/-/tree/main/ids_parsing). ## Considerations for using the Data ### Label biases Some of the characters do not possess the same number of IDS patterns possibles. Some possess 3 different patterns, some others none. In this case, to let any model view the same number of times a given image, we copy the first label as many times as necessary. ### Cropped images Some of the characters were not fully generated, and just a part of the character is visible. You can think of it as a forced data augmentation config for VLM models =D ## Licensing Information The licensing status of the dataset hinges on the legal status of the fonts' designers, which should be free for non-commercial use. So please, cite them.