Update app.py
Browse files
app.py
CHANGED
|
@@ -84,7 +84,7 @@ if uploaded_image:
|
|
| 84 |
mask = (label_map == i).astype(np.uint8)
|
| 85 |
x, y, w, h = cv2.boundingRect(contours[i-1])
|
| 86 |
org = (x, y)
|
| 87 |
-
color = (
|
| 88 |
thickness = 2
|
| 89 |
cv2.putText(blended_img, str(i), org, font, 1, color, thickness, cv2.LINE_AA)
|
| 90 |
|
|
@@ -93,7 +93,7 @@ if uploaded_image:
|
|
| 93 |
st.image(blended_img, caption='Blended Image with Labels', use_column_width=True)
|
| 94 |
|
| 95 |
# Save the final result
|
| 96 |
-
cv2.imwrite('example/result15.png', blended_img, [int(cv2.IMWRITE_JPEG_QUALITY),
|
| 97 |
st.success('Saliency detection complete. Result saved as "example/result15.png".')
|
| 98 |
|
| 99 |
st.write('Finished, check the result at: example/result15.png')
|
|
|
|
| 84 |
mask = (label_map == i).astype(np.uint8)
|
| 85 |
x, y, w, h = cv2.boundingRect(contours[i-1])
|
| 86 |
org = (x, y)
|
| 87 |
+
color = (0, 0, 255) # Blue color
|
| 88 |
thickness = 2
|
| 89 |
cv2.putText(blended_img, str(i), org, font, 1, color, thickness, cv2.LINE_AA)
|
| 90 |
|
|
|
|
| 93 |
st.image(blended_img, caption='Blended Image with Labels', use_column_width=True)
|
| 94 |
|
| 95 |
# Save the final result
|
| 96 |
+
cv2.imwrite('example/result15.png', blended_img, [int(cv2.IMWRITE_JPEG_QUALITY), 100])
|
| 97 |
st.success('Saliency detection complete. Result saved as "example/result15.png".')
|
| 98 |
|
| 99 |
st.write('Finished, check the result at: example/result15.png')
|