Update pages/3_Life Cycle Of ML Project.py
Browse files
pages/3_Life Cycle Of ML Project.py
CHANGED
|
@@ -187,6 +187,9 @@ elif st.session_state.page == "unstructured_data":
|
|
| 187 |
if st.button(":blue[Introduction to Image]"):
|
| 188 |
st.session_state.page = "Introduction_to_image"
|
| 189 |
|
|
|
|
|
|
|
|
|
|
| 190 |
# ----------------- Introduction to Image -----------------
|
| 191 |
|
| 192 |
# Ensure proper indentation for this section of the Streamlit app
|
|
@@ -194,7 +197,6 @@ elif st.session_state.page == "unstructured_data":
|
|
| 194 |
if st.session_state.page == "Introduction_to_image":
|
| 195 |
st.header(":red[🖼️ What is an Image?]")
|
| 196 |
st.markdown("""
|
| 197 |
-
### What is an Image?
|
| 198 |
An image is a two-dimensional visual representation of objects, people, scenes, or concepts. It can be captured using devices like cameras or scanners, or created digitally. Images are composed of individual units called pixels, which contain information about brightness and color.
|
| 199 |
|
| 200 |
#### Types of Images:
|
|
@@ -250,7 +252,7 @@ if st.session_state.page == "Introduction_to_image":
|
|
| 250 |
plt.show()
|
| 251 |
""", language='python')
|
| 252 |
|
| 253 |
-
st.header(":
|
| 254 |
st.markdown("""
|
| 255 |
A color space is a mathematical model for representing colors. In machine learning, different color spaces can be used for preprocessing and analyzing image data, depending on the task.
|
| 256 |
|
|
@@ -303,7 +305,7 @@ elif st.session_state.page == "operations_using_opencv":
|
|
| 303 |
""")
|
| 304 |
|
| 305 |
# Header and description for cv2.imshow
|
| 306 |
-
st.header(":
|
| 307 |
st.markdown("""
|
| 308 |
**`cv2.imshow()` - Display an Image**
|
| 309 |
**Purpose:** Show an image in a window.
|
|
@@ -327,7 +329,7 @@ elif st.session_state.page == "operations_using_opencv":
|
|
| 327 |
""")
|
| 328 |
|
| 329 |
# Header and description for cv2.imwrite
|
| 330 |
-
st.header(":
|
| 331 |
st.markdown("""
|
| 332 |
**`cv2.imwrite()` - Write/Save an Image**
|
| 333 |
**Purpose:** Save an image to a file.
|
|
@@ -392,7 +394,7 @@ elif st.session_state.page == "Conversion_of_Images":
|
|
| 392 |
""")
|
| 393 |
|
| 394 |
# Header for Splitting Channels
|
| 395 |
-
st.header(":
|
| 396 |
|
| 397 |
st.markdown("""
|
| 398 |
**Splitting an image into its individual color channels (B, G, R) allows you to analyze or modify each channel independently.**
|
|
@@ -419,7 +421,7 @@ elif st.session_state.page == "Conversion_of_Images":
|
|
| 419 |
""")
|
| 420 |
|
| 421 |
# Header for Merging Channels
|
| 422 |
-
st.header(":
|
| 423 |
|
| 424 |
st.markdown("""
|
| 425 |
**You can merge the individual channels back into a color image using `cv2.merge()`.**
|
|
@@ -447,7 +449,7 @@ elif st.session_state.page == "Conversion_of_Images":
|
|
| 447 |
""")
|
| 448 |
|
| 449 |
# Header for Combining with Modifications
|
| 450 |
-
st.header(":
|
| 451 |
|
| 452 |
st.markdown("""
|
| 453 |
**You can modify each channel (e.g., increase brightness in the red channel) before merging them back together.**
|
|
@@ -534,7 +536,7 @@ elif st.session_state.page == "Video_capture_and_explanation":
|
|
| 534 |
|
| 535 |
##----------##
|
| 536 |
|
| 537 |
-
st.header(":
|
| 538 |
st.markdown("""
|
| 539 |
Purpose:
|
| 540 |
cv2.waitKey() is a key function used to handle keyboard events in OpenCV. It is commonly used to display images or video frames and wait for a user input.
|
|
@@ -642,7 +644,7 @@ elif st.session_state.page == "Affine_Transformation_Matrix":
|
|
| 642 |
""")
|
| 643 |
|
| 644 |
# Key Points Section
|
| 645 |
-
st.header(":
|
| 646 |
|
| 647 |
st.markdown("""
|
| 648 |
### 1. **Preserves Collinearity**
|
|
@@ -679,8 +681,11 @@ elif st.session_state.page == "Affine_Transformation_Matrix":
|
|
| 679 |
|
| 680 |
|
| 681 |
|
|
|
|
|
|
|
|
|
|
| 682 |
if st.button(":red[Back to Data Collection]"):
|
| 683 |
-
st.session_state.page = "data_collection
|
| 684 |
|
| 685 |
# ----------------- Semi-Structured Data Page -----------------
|
| 686 |
elif st.session_state.page == "semi_structured_data":
|
|
|
|
| 187 |
if st.button(":blue[Introduction to Image]"):
|
| 188 |
st.session_state.page = "Introduction_to_image"
|
| 189 |
|
| 190 |
+
if st.button("Back to Data Collection"):
|
| 191 |
+
st.session_state.page = "data_collection"
|
| 192 |
+
|
| 193 |
# ----------------- Introduction to Image -----------------
|
| 194 |
|
| 195 |
# Ensure proper indentation for this section of the Streamlit app
|
|
|
|
| 197 |
if st.session_state.page == "Introduction_to_image":
|
| 198 |
st.header(":red[🖼️ What is an Image?]")
|
| 199 |
st.markdown("""
|
|
|
|
| 200 |
An image is a two-dimensional visual representation of objects, people, scenes, or concepts. It can be captured using devices like cameras or scanners, or created digitally. Images are composed of individual units called pixels, which contain information about brightness and color.
|
| 201 |
|
| 202 |
#### Types of Images:
|
|
|
|
| 252 |
plt.show()
|
| 253 |
""", language='python')
|
| 254 |
|
| 255 |
+
st.header(":red[Color Spaces in Machine Learning]")
|
| 256 |
st.markdown("""
|
| 257 |
A color space is a mathematical model for representing colors. In machine learning, different color spaces can be used for preprocessing and analyzing image data, depending on the task.
|
| 258 |
|
|
|
|
| 305 |
""")
|
| 306 |
|
| 307 |
# Header and description for cv2.imshow
|
| 308 |
+
st.header(":red[🖼️ Displaying an Image with cv2.imshow()]")
|
| 309 |
st.markdown("""
|
| 310 |
**`cv2.imshow()` - Display an Image**
|
| 311 |
**Purpose:** Show an image in a window.
|
|
|
|
| 329 |
""")
|
| 330 |
|
| 331 |
# Header and description for cv2.imwrite
|
| 332 |
+
st.header(":red[💾 Saving an Image with cv2.imwrite()]")
|
| 333 |
st.markdown("""
|
| 334 |
**`cv2.imwrite()` - Write/Save an Image**
|
| 335 |
**Purpose:** Save an image to a file.
|
|
|
|
| 394 |
""")
|
| 395 |
|
| 396 |
# Header for Splitting Channels
|
| 397 |
+
st.header(":red[🔹 Splitting Color Channels in an Image]")
|
| 398 |
|
| 399 |
st.markdown("""
|
| 400 |
**Splitting an image into its individual color channels (B, G, R) allows you to analyze or modify each channel independently.**
|
|
|
|
| 421 |
""")
|
| 422 |
|
| 423 |
# Header for Merging Channels
|
| 424 |
+
st.header(":red[🔹 Merging Color Channels in an Image]")
|
| 425 |
|
| 426 |
st.markdown("""
|
| 427 |
**You can merge the individual channels back into a color image using `cv2.merge()`.**
|
|
|
|
| 449 |
""")
|
| 450 |
|
| 451 |
# Header for Combining with Modifications
|
| 452 |
+
st.header(":red[🎨 Modifying Channels Before Merging]")
|
| 453 |
|
| 454 |
st.markdown("""
|
| 455 |
**You can modify each channel (e.g., increase brightness in the red channel) before merging them back together.**
|
|
|
|
| 536 |
|
| 537 |
##----------##
|
| 538 |
|
| 539 |
+
st.header(":red[⏱️ cv2.waitKey() for Key Event Handling]")
|
| 540 |
st.markdown("""
|
| 541 |
Purpose:
|
| 542 |
cv2.waitKey() is a key function used to handle keyboard events in OpenCV. It is commonly used to display images or video frames and wait for a user input.
|
|
|
|
| 644 |
""")
|
| 645 |
|
| 646 |
# Key Points Section
|
| 647 |
+
st.header(":red[Key Points of Affine Transformations]")
|
| 648 |
|
| 649 |
st.markdown("""
|
| 650 |
### 1. **Preserves Collinearity**
|
|
|
|
| 681 |
|
| 682 |
|
| 683 |
|
| 684 |
+
if st.button(":blue[Back to Unstructured Collection]"):
|
| 685 |
+
st.session_state.page = "Unstructured_data"
|
| 686 |
+
|
| 687 |
if st.button(":red[Back to Data Collection]"):
|
| 688 |
+
st.session_state.page = "data_collection
|
| 689 |
|
| 690 |
# ----------------- Semi-Structured Data Page -----------------
|
| 691 |
elif st.session_state.page == "semi_structured_data":
|