Update app.py
Browse files
app.py
CHANGED
@@ -84,8 +84,8 @@ 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 =
|
89 |
cv2.putText(blended_img, str(i), org, font, 1, color, thickness, cv2.LINE_AA)
|
90 |
|
91 |
# Display the final result
|
@@ -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 = (255, 0, 0) # Blue color
|
88 |
+
thickness = 3
|
89 |
cv2.putText(blended_img, str(i), org, font, 1, color, thickness, cv2.LINE_AA)
|
90 |
|
91 |
# Display the final result
|
|
|
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), 50])
|
97 |
st.success('Saliency detection complete. Result saved as "example/result15.png".')
|
98 |
|
99 |
st.write('Finished, check the result at: example/result15.png')
|