darknet-ocr icon indicating copy to clipboard operation
darknet-ocr copied to clipboard

AttributeError: 'cv2.dnn_Net' object has no attribute 'getUnconnectedOutLayersNames'

Open yisampi opened this issue 5 years ago • 3 comments

AttributeError: 'cv2.dnn_Net' object has no attribute 'getUnconnectedOutLayersNames'

yisampi avatar Oct 22 '19 02:10 yisampi

我自己测试替换获取输出层的名字的代码net.getUnconnectedOutLayersNames(),用这个 def getOutputsNames(net): # Get the names of all the layers in the network layersNames = net.getLayerNames() # Get the names of the output layers, i.e. the layers with unconnected outputs return [layersNames[i[0] - 1] for i in net.getUnconnectedOutLayers()]换了就可以了,获取是那个版本太高造成的吧

345334701 avatar Oct 28 '19 05:10 345334701

按照requirements.txt去配置opencv

wenlihaoyu avatar Oct 28 '19 06:10 wenlihaoyu

AttributeError: 'cv2.dnn_Net' object has no attribute 'getUconnectedOutLayersNames'

Kryptonite12 avatar Oct 17 '20 09:10 Kryptonite12