Skip to content

Commit 8069382

Browse files
committed
fix visual v1.2.2
1 parent 83e5311 commit 8069382

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

patched_yolo_infer/functions_extra.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,20 +361,19 @@ def visualize_results(
361361
color_mask = np.zeros_like(img)
362362
color_mask[mask_resized > 0] = color
363363
labeled_image = cv2.addWeighted(labeled_image, 1, color_mask, alpha, 0)
364-
365364
cv2.drawContours(labeled_image, mask_contours, -1, color, thickness)
366365

367366
elif segment and len(polygons) > 0:
368367
if len(polygons[i]) > 0:
369368
points = np.array(polygons[i].reshape((-1, 1, 2)), dtype=np.int32)
370-
cv2.drawContours(labeled_image, [points], -1, color, thickness)
371369
if fill_mask:
372370
if alpha == 1:
373371
cv2.fillPoly(labeled_image, pts=[points], color=color)
374372
else:
375373
mask_from_poly = np.zeros_like(img)
376374
color_mask_from_poly = cv2.fillPoly(mask_from_poly, pts=[points], color=color)
377375
labeled_image = cv2.addWeighted(labeled_image, 1, color_mask_from_poly, alpha, 0)
376+
cv2.drawContours(labeled_image, [points], -1, color, thickness)
378377

379378
# Write class label
380379
if show_boxes:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
long_description = "\n" + fh.read()
99

1010

11-
VERSION = '1.2.1'
11+
VERSION = '1.2.2'
1212
DESCRIPTION = '''YOLO-Patch-Based-Inference for detection/segmentation of small objects in images.'''
1313

1414
setup(

0 commit comments

Comments
 (0)