babalae/better-genshin-impact · error · Exception
无法识别第{index}位角色,置信度{topClass.Confidence:F1},结果:{topClass.Nam
Error message
无法识别第{index}位角色,置信度{topClass.Confidence:F1},结果:{topClass.Name.Name}。请重新阅读 BetterGI 文档中的《快速上手》! What it means
Error "无法识别第{index}位角色,置信度{topClass.Confidence:F1},结果:{topClass.Name.Name}。请重新阅读 BetterGI 文档中的《快速上手》!" thrown in babalae/better-genshin-impact.
Source
Thrown at BetterGenshinImpact/GameTask/AutoFight/Model/CombatScenes.cs:306
return (avatar.Name, costumeName);
}
public string ClassifyAvatarName(Image<Rgb24> img, int index)
{
SpeedTimer speedTimer = new();
speedTimer.Record("角色侧面头像图像转换");
var result = _predictor.Predictor.Classify(img);
speedTimer.Record("角色侧面头像分类识别");
Debug.WriteLine($"角色侧面头像识别结果:{result}");
speedTimer.DebugPrint();
var topClass = result.GetTopClass();
if (topClass.Name.Name.StartsWith("Qin") || topClass.Name.Name.Contains("Costume"))
{
// 降低琴和衣装角色的识别率要求
if (topClass.Confidence < 0.51)
{
img.SaveAsPng(Global.Absolute($@"log\avatar_side_classify_error.png"));
throw new Exception(
$"无法识别第{index}位角色,置信度{topClass.Confidence:F1},结果:{topClass.Name.Name}。请重新阅读 BetterGI 文档中的《快速上手》!");
}
}
else
{
if (topClass.Confidence < 0.7)
{
img.SaveAsPng(Global.Absolute($@"log\avatar_side_classify_error.png"));
throw new Exception(
$"无法识别第{index}位角色,置信度{topClass.Confidence:F1},结果:{topClass.Name.Name}。请重新阅读 BetterGI 文档中的《快速上手》!");
}
}
return topClass.Name.Name;
}
private void InitializeTeamFromConfig(string teamNames, AutoFightConfig autoFightConfig)
{View on GitHub (pinned to a7cb36712d)
Solutions
- 重新阅读文档《快速上手》确认配置步骤
- 调整游戏画质使角色头像更清晰
- 将游戏内时间调整为夜晚后重试
- 必要时使用强制指定队伍角色功能
Example fix
按文档《快速上手》调整环境(暗背景、无遮挡、16:9分辨率)重试;查看 log\avatar_side_classify_error.png 确认识别画面。
When it happens
Trigger: ClassifyAvatarName 用模型分类角色侧面头像,普通角色置信度<0.7(琴和衣装类<0.51)时保存错误截图并抛出。
Common situations: 画面过亮/过暗、头像被遮挡、使用新衣装或新角色导致分类置信度不足。
AI-assisted analysis of babalae/better-genshin-impact@a7cb36712d (2026-08-13).
Data as JSON: /api/errors/2f84a53e35c59112.
Report an issue: GitHub.