本文共 1277 字,大约阅读时间需要 4 分钟。
ipython/python均可以,或者你可以将model.py 第5行注释掉,看能不能启动
#! /usr/bin/env python
# -*- coding: utf-8 -*-
from detector.detectors import TextDetector
from detector.other import get_boxes
#import darknet_detect
import opencv_dnn_detect ##opencv dnn model for darknet
import numpy as np
from PIL import Image
import numpy as np
import time
import cv2
from glob import glob
from crnn.crnn import crnnOcr as crnnOcr
注释掉第5行还是一样的错误:
ImportError Traceback (most recent call last)
~/chineseocr/app.py in ()
16 web.config.debug = True
17 from apphelper.image import convert_image,read_url_img,string_to_array,array_to_string,base64_to_array
---> 18 import model
19 render = web.template.render('templates', base='base')
20
~/chineseocr/model.py in ()
1 #! /usr/bin/env python
2 # -- coding: utf-8 --
----> 3 from detector.detectors import TextDetector
4 from detector.other import get_boxes
5 #import darknet_detect
~/chineseocr/detector/detectors.py in ()
3 import numpy as np
4 import numpy as np
----> 5 from detector.utils.cython_nms import nms as cython_nms
6 try:
7 from detector.utils.gpu_nms import gpu_nms
~/chineseocr/detector/utils/init.py in ()
----> 1 from . import cython_nms
2 try:
3 from . import gpu_nms
4 except:
5 gpu_nms = cython_nms
ImportError: cannot import name 'cython_nms'
转载地址:https://blog.csdn.net/weixin_32473663/article/details/113549677 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!