2019-10-24 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)

结果不再报错了。。。。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,424评论 0 10
  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 9,813评论 0 23
  • 1.创建文件夹 !/bin/sh mkdir -m 777 "%%1" 2.创建文件 !/bin/sh touch...
    BigJeffWang阅读 10,161评论 3 53
  • Just.game区块链游戏开发 Just.game由曾经一度引爆币圈的Fomo3D游戏的开发团队Team JUS...
    爱笑的叙时阅读 215评论 0 0
  • 几月前,于微博中见一题为——“摄影师眼里雨后的世界”的博文,摄影师将镜头倒转,在雨后的一汪小水潭中捕捉到一个美丽的...
    長安曹公子阅读 240评论 0 1