Bläddra i källkod

Merge pull request #946 from will-jl944/develop_jf

修复检测结果可视化中用户自定义颜色导致报错的问题
FlyingQianMM 4 år sedan
förälder
incheckning
152ae4068d
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      dygraph/paddlex/cv/models/utils/visualize.py

+ 1 - 1
dygraph/paddlex/cv/models/utils/visualize.py

@@ -204,7 +204,7 @@ def draw_bbox_mask(image, results, threshold=0.5, color_map=None):
         xmax = xmin + w
         ymax = ymin + h
 
-        color = tuple(color_map[labels.index(cname)])
+        color = tuple(map(int, color_map[labels.index(cname)]))
         # draw bbox
         image = cv2.rectangle(image, (xmin, ymin), (xmax, ymax), color,
                               linewidth)