--- pipeline_tag: image-classification base_model: - pixai-labs/pixai-tagger-v0.9 language: - en tags: - image - dghs-imgutils library_name: dghs-imgutils license: apache-2.0 --- # ONNX Version for pixai-labs/pixai-tagger-v0.9 This is the ONNX-exported version of PixAI's tagger [pixai-labs/pixai-tagger-v0.9](https://huggingface.co/pixai-labs/pixai-tagger-v0.9). ## Model Details - **Model Type:** Multilabel Image classification / feature backbone - **Model Stats:** - Params: 317.9M - FLOPs / MACs: 620.9G / 310.1G - Image size: 448 x 448 - Tags Count: 13461 - General (#0) Tags Count: 9741 - Character (#4) Tags Count: 3720 ## Thresholds | Category | Name | Count | Threshold | |-----------:|:----------|--------:|------------:| | 0 | general | 9741 | 0.3 | | 4 | character | 3720 | 0.85 | ## How to Use We provided a sample image for our code samples, you can find it [here](https://huggingface.co/deepghs/pixai-tagger-v0.9-onnx/blob/main/sample.webp). Install [dghs-imgutils](https://github.com/deepghs/imgutils) with the following command ```shell pip install 'dghs-imgutils>=0.19.0' torch huggingface_hub timm pillow pandas ``` You can use function `get_pixai_tags` to tag your image. For more details of this function, see [documentation of imgutils.tagging.pixai](https://dghs-imgutils.deepghs.org/main/api_doc/tagging/pixai.html). ```python from imgutils.tagging import get_pixai_tags general, character, ips, ips_mapping = get_pixai_tags( 'https://huggingface.co/deepghs/pixai-tagger-v0.9-onnx/resolve/main/sample.webp', model_name='v0.9', fmt=('general', 'character', 'ips', 'ips_mapping'), ) print(general) # {'symbol-shaped_pupils': 0.9940369129180908, # 'ghost': 0.9908503890037537, # 'flower-shaped_pupils': 0.9783934354782104, # 'black_nails': 0.9721313118934631, # 'porkpie_hat': 0.964271068572998, # 'ghost_pose': 0.9570443630218506, # 'ring': 0.9521543979644775, # '1girl': 0.9491472244262695, # 'hat': 0.9321512579917908, # 'hat_flower': 0.9310178756713867, # 'flower': 0.9181427955627441, # 'plum_blossoms': 0.8758766651153564, # 'red_shirt': 0.8587117195129395, # 'jewelry': 0.8488669395446777, # 'chinese_clothes': 0.8235750198364258, # 'claw_pose': 0.8184436559677124, # 'long_sleeves': 0.8045806884765625, # 'twintails': 0.7922596335411072, # 'hat_tassel': 0.7861523628234863, # 'long_hair': 0.7857427597045898, # 'looking_at_viewer': 0.7703293561935425, # 'multiple_rings': 0.7530679106712341, # 'signature': 0.7448598146438599, # 'smile': 0.7411079406738281, # 'open_mouth': 0.7243687510490417, # 'red_flower': 0.6929515600204468, # 'solo': 0.6898764371871948, # 'hat_ornament': 0.6630162000656128, # 'red_eyes': 0.6534468531608582, # 'black_hat': 0.6130237579345703, # 'nail_polish': 0.600890576839447, # 'brown_coat': 0.5587427616119385, # 'coat': 0.5543128848075867, # 'upper_body': 0.5307736396789551, # 'thumb_ring': 0.5169675350189209, # 'brown_hair': 0.5059547424316406, # 'star_(symbol)': 0.48425528407096863, # 'star-shaped_pupils': 0.46570321917533875, # 'shirt': 0.44571059942245483, # 'hair_between_eyes': 0.4336400330066681, # ':d': 0.40481746196746826, # 'orange_eyes': 0.3937417268753052, # ':3': 0.38414278626441956, # 'tangzhuang': 0.37281090021133423, # 'blush': 0.36003637313842773, # 'sidelocks': 0.3363075256347656, # 'v-shaped_eyebrows': 0.3265596628189087, # 'blurry': 0.30306869745254517} print(character) # {'hu_tao_(genshin_impact)': 0.9999701380729675, # 'boo_tao_(genshin_impact)': 0.9996192455291748} print(ips) # ['genshin_impact'] print(ips_mapping) # {'hu_tao_(genshin_impact)': ['genshin_impact'], # 'boo_tao_(genshin_impact)': ['genshin_impact']} ```