ONNX Model Zoo

CowCowC/Adu_mod_id_img

By CowCowC · ↓ 4 · ♥ 0 · Updated 2024-05-14

What's in this repo

This page lists the files in CowCowC/Adu_mod_id_img, including model.onnx.

  • 1 ONNX models (.onnx files)
  • 6 files, including 2 .json, 1 .md, 1 .onnx, 1 .safetensors
  • Last updated 2024-05-14

ONNX files

File Size Download
model.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

adult-content-identify-image

(text version here 文字版本請參考 這裡)

Determine whether online sales products are adult content. Input: image content, Output results: 0 Unknown, 1 Adult Content, 2 General Merchandise.

判斷網路銷售商品是否屬於成人內容。輸入圖片內容,輸出結果: 0 未知, 1 成人內容, 2 一般商品。

use transformers pipeline

from transformers import pipeline, AutoConfig
pipe = pipeline("image-classification", model="jiechau/adult-content-identify-image")
config = AutoConfig.from_pretrained("jiechau/adult-content-identify-image")
label2id = config.label2id
id2label = config.id2label

q = 'https://xxx.xxx.xxx/images/xxx/xxx.webp'
q = 'https://xxx.xxx.xxx/images/xxx/xxx.jpg'
result = pipe(q)
print(result)
print(label2id[result[0]['label']])
# [{'label': 'adult_成人商品', 'score': 0.7516837120056152}, {'label': 'regular_一般商品', 'score': 0.2475457787513733}, {'label': 'unknown', 'score': 0.0007705678581260145}]
# 1

Model info

image-classification transformers
transformers onnx safetensors vit image-classification endpoints_compatible region:us
↓ 4 ♥ 0

Created: 2024-05-14

Updated: 2024-05-14

View on Hugging Face

Files (6)

.gitattributes
README.md
config.json
model.onnx ONNX
model.safetensors
preprocessor_config.json

Related models