Python 套件
安装方式
pip install ponychart-classifier
使用方式
from ponychart_classifier import predict, preload, update
# 预先加载模型(首次呼叫时会自动从远端下载)
preload()
# 检查并更新模型至最新版本(比对 ETag,有新版才下载)
update()
# 预测图片中的角色
result = predict("path/to/image.png")
print(result.labels) # frozenset({'Rarity', 'Fluttershy'})
# 最多标记三个
print(result.rarity) # 0.95 => 模型的信心
print(result.twilight_sparkle) # 0.02 => 低于阈值的不会被标记
现在模型训练到大概九成以上正确
大概是这样,给大家玩玩