perf: 优化战斗中技能识别,改用深度学习模型 (#3918)

* feat: 战斗中技能使用ort识别

* fix: 修正技能识别的错误

* feat: 当技能识别置信度过低时,保存debug图片

* fix: build error for onnx runtime

* fix: build error on linux

* perf: onnx path

* fix: build error

* fix: onnx build error
This commit is contained in:
MistEO
2023-03-08 21:55:57 +08:00
committed by GitHub
parent 7a017b5f04
commit 286a7cedf3
11 changed files with 248 additions and 168 deletions

View File

@@ -9,11 +9,12 @@
#include "Miscellaneous/CopilotConfig.h"
#include "Miscellaneous/InfrastConfig.h"
#include "Miscellaneous/ItemConfig.h"
#include "Miscellaneous/OcrConfig.h"
#include "Miscellaneous/OcrPack.h"
#include "Miscellaneous/RecruitConfig.h"
#include "Miscellaneous/StageDropsConfig.h"
#include "Miscellaneous/TilePack.h"
#include "Miscellaneous/OcrConfig.h"
#include "OnnxSession.h"
#include "Roguelike/RoguelikeCopilotConfig.h"
#include "Roguelike/RoguelikeRecruitConfig.h"
#include "Roguelike/RoguelikeShoppingConfig.h"
@@ -66,6 +67,7 @@ bool asst::ResourceLoader::load(const std::filesystem::path& path)
LoadResourceAndCheckRet(RoguelikeShoppingConfig, "roguelike"_p / "shopping.json"_p);
LoadResourceAndCheckRet(BattleDataConfig, "battle_data.json"_p);
LoadResourceAndCheckRet(OcrConfig, "ocr_config.json"_p);
LoadResourceAndCheckRet(OnnxSession, "onnx"_p / "skill_ready_rec.onnx"_p);
/* load resource with json and template files*/
LoadResourceWithTemplAndCheckRet(TaskData, "tasks.json"_p, "template"_p);