Skip to content

Commit

Permalink
fix: 修复_LIB宏开关导致的编译时找不到函数问题
Browse files Browse the repository at this point in the history
  • Loading branch information
GengGode committed Aug 30, 2024
1 parent 758eb12 commit 740185a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion resource/version.ver
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.123
0.3.126
2 changes: 1 addition & 1 deletion resource/version_hash.hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
650574d
93be619
2 changes: 1 addition & 1 deletion source/onnx/text_detector/text_detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
libocr::onnx::text_detector::text_detector()
{
set_options();
#ifdef _LIB
#if 0
//===== this set model resource IDR ONNX MODEL =====
auto model = onnx::from_resource_load_onnx(IDR_ONNX_DET);
#else
Expand Down
8 changes: 4 additions & 4 deletions source/onnx/text_recognizer/text_recognizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
libocr::onnx::text_recognizer::text_recognizer()
{
set_options();
#ifdef _LIB
#if 0
//===== this set model resource IDR ONNX MODEL =====
auto model = onnx::from_resource_load_onnx(IDR_ONNX_CHT_REC);
#else
Expand All @@ -17,13 +17,13 @@ libocr::onnx::text_recognizer::text_recognizer()
#endif
session = std::make_shared<Ort::Session>(env, model.data, model.data_length, session_options);

#ifdef _LIB
#if 0
//===== this set keys resource IDR Txt =====
auto dict = onnx::from_resource_load_det_txt(IDR_TXT_CHT_DICT);
#else
#else
//===== this set keys resource file Txt =====
auto dict = onnx::from_resource_load_file("model_rec_dict.txt");
#endif
#endif
{
auto dict_string = std::string((char*)dict.data, dict.data_length);
std::istringstream in(dict_string);
Expand Down

0 comments on commit 740185a

Please sign in to comment.