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 

    import lanms

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

    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 

    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)

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

你可能感兴趣的:(EAST,Python,报错)