Spaces:
Runtime error
Runtime error
Fix color bug
Browse files- utils/__init__.py +2 -2
utils/__init__.py
CHANGED
@@ -84,7 +84,7 @@ class Predictor:
|
|
84 |
cv2.putText(image, text, (x1, y1 - 5),
|
85 |
cv2.FONT_HERSHEY_DUPLEX, 0.3, (255, 255, 255), 1)
|
86 |
|
87 |
-
return
|
88 |
|
89 |
def annotate_masks(self, image, cls, confs, masks, results):
|
90 |
# image, cls, confs, _, masks, results = self.predict(image_path)
|
@@ -114,7 +114,7 @@ class Predictor:
|
|
114 |
cv2.putText(image, text, (cx - int(0.5 * w), cy),
|
115 |
cv2.FONT_HERSHEY_DUPLEX, 0.5, (255, 255, 255), 1)
|
116 |
|
117 |
-
return
|
118 |
|
119 |
def transform(self, image_path, annot_boxes=False, annot_masks=False):
|
120 |
image, cls, confs, boxes, masks, results = self.predict(image_path)
|
|
|
84 |
cv2.putText(image, text, (x1, y1 - 5),
|
85 |
cv2.FONT_HERSHEY_DUPLEX, 0.3, (255, 255, 255), 1)
|
86 |
|
87 |
+
return image
|
88 |
|
89 |
def annotate_masks(self, image, cls, confs, masks, results):
|
90 |
# image, cls, confs, _, masks, results = self.predict(image_path)
|
|
|
114 |
cv2.putText(image, text, (cx - int(0.5 * w), cy),
|
115 |
cv2.FONT_HERSHEY_DUPLEX, 0.5, (255, 255, 255), 1)
|
116 |
|
117 |
+
return image
|
118 |
|
119 |
def transform(self, image_path, annot_boxes=False, annot_masks=False):
|
120 |
image, cls, confs, boxes, masks, results = self.predict(image_path)
|