We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7da76ab commit 2a5292cCopy full SHA for 2a5292c
tools/accuracy_checker/openvino/tools/accuracy_checker/adapters/text_detection.py
@@ -154,8 +154,10 @@ def min_area_rect(contour):
154
for bbox_idx in range(1, max_bbox_idx + 1):
155
bbox_mask = (mask == bbox_idx).astype(np.uint8)
156
cnts = cv2.findContours(bbox_mask, cv2.RETR_CCOMP, cv2.CHAIN_APPROX_SIMPLE)[-2]
157
- if np.size(cnts) == 0:
+
158
+ if not cnts:
159
continue
160
161
cnt = cnts[0]
162
rect, rect_area = min_area_rect(cnt)
163
0 commit comments