小编Nav*_*uri的帖子

pycharm中OpenCV EAST文本检测器中的net.forward()错误

我正在尝试在pycharm中使用EAST文本检测器,但是在行上有错误。 (scores, geometry) = net.forward(layerNames)

cv2.error: OpenCV(4.1.0) C:\projects\opencv-python\opencv\modules\dnn\src\layers\concat_layer.cpp:95: error: (-201:Incorrect size of input array) Inconsistent shape for ConcatLayer in function 'cv::dnn::ConcatLayerImpl::getMemoryShapes'
Run Code Online (Sandbox Code Playgroud)

码:

print("[INFO] loading EAST text detector...")
name = 'Pictures/non crop/maths soln analysis 4_89.jpg'
image = cv2.imread(name, 1)
(H, W) = image.shape[:2]
Run Code Online (Sandbox Code Playgroud)

设置新的宽度和高度,然后确定宽度和高度的变化率

(newW, newH) = (375, 500)
rW = W / float(newW)
rH = H / float(newH)
# resize the image and grab the new image dimensions
image = cv2.resize(image, (newW, newH))
orig = image.copy()
(H, W) = image.shape[:2] …
Run Code Online (Sandbox Code Playgroud)

python opencv deep-learning

3
推荐指数
1
解决办法
941
查看次数

标签 统计

deep-learning ×1

opencv ×1

python ×1