Python can't compile lanms on windows -EAST

Python can’t compile lanms on windows -EAST

在运行EAST模型时,报错

Traceback (most recent call last):

  File "D:/work/Chepai/License-Plate-Recognition-master1/EAST-master/eval.py", line 9, in <module>

    import lanms

  File "D:\work\Chepai\License-Plate-Recognition-master1\EAST-master\lanms\__init__.py", line 10, in <module>

    if subprocess.call(['make', '-C', BASE_DIR]) != 0:  # return value

  File "D:\anaconda3\lib\subprocess.py", line 323, in call

    with Popen(*popenargs, **kwargs) as p:

  File "D:\anaconda3\lib\subprocess.py", line 775, in __init__

    restore_signals, start_new_session)

  File "D:\anaconda3\lib\subprocess.py", line 1178, in _execute_child

    startupinfo)

FileNotFoundError: [WinError 2] 系统找不到指定的文件。

Process finished with exit code 1

查了很多资料,也没有针对我这个问题的,所以一行一行对照Bug,发现指向_init_.py中的两行,

if subprocess.call(['make', '-C', BASE_DIR]) != 0: # return value

raise RuntimeError('Cannot compile lanms: {}'.format(BASE_DIR))

本着试试的原则,把这两行注释掉,不再报这个错误。结果出现了新的错误。

Traceback (most recent call last):

  File "D:/work/Chepai/License-Plate-Recognition-master1/EAST-master/eval.py", line 197, in <module>

    tf.app.run()

  File "D:\anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run

    _sys.exit(main(argv))

  File "D:/work/Chepai/License-Plate-Recognition-master1/EAST-master/eval.py", line 163, in main

    boxes, timer = detect(score_map=score, geo_map=geometry, timer=timer)

  File "D:/work/Chepai/License-Plate-Recognition-master1/EAST-master/eval.py", line 101, in detect

    boxes = lanms.merge_quadrangle_n9(boxes.astype('float32'), nms_thres)

  File "D:\work\Chepai\License-Plate-Recognition-master1\EAST-master\lanms\__init__.py", line 15, in merge_quadrangle_n9

    from adaptor import merge_quadrangle_n9 as nms_impl

ModuleNotFoundError: No module named 'adaptor'

Process finished with exit code 1

继续看报错提示,结果发现报eval.py中的101行错误,所以把这一行注释掉,换成上一句。

boxes = nms_locality.nms_locality(boxes.astype(np.float64), nms_thres)

# boxes = lanms.merge_quadrangle_n9(boxes.astype('float32'), nms_thres)

结果不再报错了。。。。
虽然也可以用了,但是自己也不知道为啥,,,

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值