Martin Tomov commited on
Commit
065911d
·
verified ·
1 Parent(s): c6a21bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -66,7 +66,7 @@ def annotate_with_transparency(image: Union[Image.Image, np.ndarray], detection_
66
  cv2.drawContours(overlay, contours, -1, color, -1) # Draw filled contours on the overlay
67
 
68
  # Blend the overlay with the original image
69
- alpha = 0.5 # Adjust the alpha value to control transparency
70
  image_cv2 = cv2.addWeighted(overlay, alpha, image_cv2, 1 - alpha, 0)
71
 
72
  cv2.putText(image_cv2, f'{label}: {score:.2f}', (box.xmin, box.ymin - 10),
 
66
  cv2.drawContours(overlay, contours, -1, color, -1) # Draw filled contours on the overlay
67
 
68
  # Blend the overlay with the original image
69
+ alpha = 0.1 # Adjust the alpha value to control transparency
70
  image_cv2 = cv2.addWeighted(overlay, alpha, image_cv2, 1 - alpha, 0)
71
 
72
  cv2.putText(image_cv2, f'{label}: {score:.2f}', (box.xmin, box.ymin - 10),