sree4411 commited on
Commit
377a7ed
·
verified ·
1 Parent(s): 338fde6

Update pages/4_Image Augmentation.py

Browse files
Files changed (1) hide show
  1. pages/4_Image Augmentation.py +0 -5
pages/4_Image Augmentation.py CHANGED
@@ -93,11 +93,6 @@ if uploaded_file is not None:
93
  img_array = cv2.convertScaleAbs(img_array, alpha=contrast, beta=brightness * 127)
94
  st.markdown(get_image_download_link(img_array, "color_jittered.jpg", "Download Color Jittered Image"), unsafe_allow_html=True)
95
 
96
- if convert_gray:
97
- img_array_gray = cv2.cvtColor(img_array, cv2.COLOR_RGB2GRAY)
98
- img_array_gray = cv2.cvtColor(img_array_gray, cv2.COLOR_GRAY2RGB) # Convert back to RGB for consistency
99
- st.image(img_array_gray, caption='Grayscale Image.', use_container_width=True)
100
- st.markdown(get_image_download_link(img_array_gray, "grayscale.jpg", "Download Grayscale Image"), unsafe_allow_html=True)
101
 
102
  # Convert numpy array back to image
103
  augmented_image = Image.fromarray(img_array)
 
93
  img_array = cv2.convertScaleAbs(img_array, alpha=contrast, beta=brightness * 127)
94
  st.markdown(get_image_download_link(img_array, "color_jittered.jpg", "Download Color Jittered Image"), unsafe_allow_html=True)
95
 
 
 
 
 
 
96
 
97
  # Convert numpy array back to image
98
  augmented_image = Image.fromarray(img_array)