diff --git a/README.md b/README.md index 0e148f1fa1c9f597ef36e34f2eeda30a69487a8f..5f6bca2de45ae6603c8d96ecea341cca8a5022df 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,12 @@ cd .. 以下代码实现了文本检测、识别串联推理,在执行预测时,需要通过参数image_dir指定单张图像或者图像集合的路径、参数det_model_dir指定检测inference模型的路径和参数rec_model_dir指定识别inference模型的路径。可视化识别结果默认保存到 ./inference_results 文件夹里面。 ```bash + +# 设置PYTHONPATH环境变量 +export PYTHONPATH=. +# windows下设置环境变量 +SET PYTHONPATH=. + # 预测image_dir指定的单张图像 python3 tools/infer/predict_system.py --image_dir="./doc/imgs/11.jpg" --det_model_dir="./inference/ch_det_mv3_db/" --rec_model_dir="./inference/ch_rec_mv3_crnn/" diff --git a/README_en.md b/README_en.md index cfc147c85f6eafb82403f7d0035db27b9fec2f3d..8005e09e7e3a9bf1ec29426a07e4af29229cab3d 100644 --- a/README_en.md +++ b/README_en.md @@ -68,6 +68,12 @@ cd .. The following code implements text detection and recognition inference tandemly. When performing prediction, you need to specify the path of a single image or image folder through the parameter `image_dir`, the parameter `det_model_dir` specifies the path to detection model, and the parameter `rec_model_dir` specifies the path to the recognition model. The visual prediction results are saved to the `./inference_results` folder by default. ```bash + +# Set PYTHONPATH environment variable +export PYTHONPATH=. +# Setting environment variable in Windows +SET PYTHONPATH=. + # Prediction on a single image by specifying image path to image_dir python3 tools/infer/predict_system.py --image_dir="./doc/imgs/11.jpg" --det_model_dir="./inference/ch_det_mv3_db/" --rec_model_dir="./inference/ch_rec_mv3_crnn/"