Skip to content

Commit

Permalink
merge dygraph
Browse files Browse the repository at this point in the history
  • Loading branch information
WenmuZhou committed Aug 9, 2021
2 parents cbc6de9 + 829a393 commit 915d063
Show file tree
Hide file tree
Showing 16 changed files with 588 additions and 470 deletions.
10 changes: 5 additions & 5 deletions configs/rec/rec_icdar15_train.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Global:
cal_metric_during_train: True
pretrained_model:
checkpoints:
save_inference_dir:
save_inference_dir: ./
use_visualdl: False
infer_img: doc/imgs_words_en/word_10.png
# for data or label process
Expand Down Expand Up @@ -60,8 +60,8 @@ Metric:
Train:
dataset:
name: SimpleDataSet
data_dir: ./train_data/
label_file_list: ["./train_data/train_list.txt"]
data_dir: ./train_data/ic15_data/
label_file_list: ["./train_data/ic15_data/rec_gt_train.txt"]
transforms:
- DecodeImage: # load image
img_mode: BGR
Expand All @@ -81,8 +81,8 @@ Train:
Eval:
dataset:
name: SimpleDataSet
data_dir: ./train_data/
label_file_list: ["./train_data/val_list.txt"]
data_dir: ./train_data/ic15_data
label_file_list: ["./train_data/ic15_data/rec_gt_test.txt"]
transforms:
- DecodeImage: # load image
img_mode: BGR
Expand Down
2 changes: 0 additions & 2 deletions deploy/cpp_infer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@ endif()


if (WIN32)
include_directories("${PADDLE_LIB}/paddle/fluid/inference")
include_directories("${PADDLE_LIB}/paddle/include")
link_directories("${PADDLE_LIB}/paddle/lib")
link_directories("${PADDLE_LIB}/paddle/fluid/inference")
find_package(OpenCV REQUIRED PATHS ${OPENCV_DIR}/build/ NO_DEFAULT_PATH)

else ()
Expand Down
10 changes: 8 additions & 2 deletions deploy/cpp_infer/src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,18 @@ std::vector<std::string> OCRConfig::split(const std::string &str,
std::vector<std::string> res;
if ("" == str)
return res;
char strs[str.length() + 1];

int strlen = str.length() + 1;
chars *strs = new char[strlen];
std::strcpy(strs, str.c_str());

char d[delim.length() + 1];
int delimlen = delim.length() + 1;
char *d = new char[delimlen];
std::strcpy(d, delim.c_str());

delete[] strs;
delete[] d;

char *p = std::strtok(strs, d);
while (p) {
std::string s = p;
Expand Down
Binary file modified doc/joinus.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ tqdm
numpy
visualdl
python-Levenshtein
opencv-contrib-python==4.2.0.32
opencv-contrib-python==4.4.0.46
cython
35 changes: 0 additions & 35 deletions test/ocr_det_params.txt

This file was deleted.

35 changes: 0 additions & 35 deletions test/ocr_rec_params.txt

This file was deleted.

146 changes: 0 additions & 146 deletions test/prepare.sh

This file was deleted.

Loading

0 comments on commit 915d063

Please sign in to comment.