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'