信用卡的数字识别项目运行报错:error: the following arguments are required: -i/--image

看了唐宇迪机器学习实战代码的信用卡数字识别的项目下载运行时遇到两个问题:
第一个问题就是运行的库没有的问题,由于本人是在anaconda+TensorFlow+OpenCV的环境下进行的对于没有的或者报错的环境在对应运行的沙盒环境中进行配置就行了

conda activate 沙盒环境
pip install 对应报错的库

第二个问题就是在项目能跑通的时候出现了问题:
在这里插入图片描述
对于这个问题我在网上找到了解决的方法,原文博客地址:https://blog.csdn.net/qq_33950926/article/details/108707470?ops_request_misc=&request_id=&biz_id=102&utm_term=the%2520following%2520arguments%2520are%2520re&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduweb~default-5-108707470.nonecase
解决方案是:
先找到Edit Configurations…
信用卡的数字识别项目运行报错:error: the following arguments are required: -i/--image_第1张图片
在对应地方加入参数
信用卡的数字识别项目运行报错:error: the following arguments are required: -i/--image_第2张图片
我的参数如下

--image
./images/credit_card_02.png
--template
./ocr_a_reference.png

对应图片的位置也放上来:
信用卡的数字识别项目运行报错:error: the following arguments are required: -i/--image_第3张图片
之后成功运行:
信用卡的数字识别项目运行报错:error: the following arguments are required: -i/--image_第4张图片

你可能感兴趣的:(Python,python,opencv)