sree4411 commited on
Commit
300c89f
ยท
verified ยท
1 Parent(s): 9166b7b

Update pages/3_Life Cycle Of ML Project.py

Browse files
Files changed (1) hide show
  1. pages/3_Life Cycle Of ML Project.py +18 -23
pages/3_Life Cycle Of ML Project.py CHANGED
@@ -192,7 +192,7 @@ elif st.session_state.page == "unstructured_data":
192
  # Ensure proper indentation for this section of the Streamlit app
193
 
194
  if st.session_state.page == "Introduction_to_image":
195
- st.header("๐Ÿ–ผ๏ธ 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.
@@ -250,7 +250,7 @@ if st.session_state.page == "Introduction_to_image":
250
  plt.show()
251
  """, language='python')
252
 
253
- st.header("Color Spaces in Machine Learning")
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
 
@@ -280,7 +280,7 @@ if st.session_state.page == "Introduction_to_image":
280
 
281
  elif st.session_state.page == "operations_using_opencv":
282
  # Header and description for cv2.imread
283
- st.header("๐Ÿ—‚๏ธ Reading an Image with cv2.imread()")
284
  st.markdown("""
285
  **`cv2.imread()` - Read an Image**
286
  **Purpose:** Load an image from a file and convert it to a NumPy array.
@@ -303,7 +303,7 @@ elif st.session_state.page == "operations_using_opencv":
303
  """)
304
 
305
  # Header and description for cv2.imshow
306
- st.header("๐Ÿ–ผ๏ธ Displaying an Image with cv2.imshow()")
307
  st.markdown("""
308
  **`cv2.imshow()` - Display an Image**
309
  **Purpose:** Show an image in a window.
@@ -327,7 +327,7 @@ elif st.session_state.page == "operations_using_opencv":
327
  """)
328
 
329
  # Header and description for cv2.imwrite
330
- st.header("๐Ÿ’พ Saving an Image with cv2.imwrite()")
331
  st.markdown("""
332
  **`cv2.imwrite()` - Write/Save an Image**
333
  **Purpose:** Save an image to a file.
@@ -364,7 +364,7 @@ elif st.session_state.page == "operations_using_opencv":
364
 
365
  elif st.session_state.page == "Conversion_of_Images":
366
  # Header for Image Conversion
367
- st.header("๐Ÿ”„ Converting Images Between Different Color Spaces")
368
 
369
  st.markdown("""
370
  **OpenCV supports many color spaces for image processing.**
@@ -392,7 +392,7 @@ elif st.session_state.page == "Conversion_of_Images":
392
  """)
393
 
394
  # Header for Splitting Channels
395
- st.header("๐Ÿ”น Splitting Color Channels in an Image")
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 +419,7 @@ elif st.session_state.page == "Conversion_of_Images":
419
  """)
420
 
421
  # Header for Merging Channels
422
- st.header("๐Ÿ”น Merging Color Channels in an Image")
423
 
424
  st.markdown("""
425
  **You can merge the individual channels back into a color image using `cv2.merge()`.**
@@ -447,7 +447,7 @@ elif st.session_state.page == "Conversion_of_Images":
447
  """)
448
 
449
  # Header for Combining with Modifications
450
- st.header("๐ŸŽจ Modifying Channels Before Merging")
451
 
452
  st.markdown("""
453
  **You can modify each channel (e.g., increase brightness in the red channel) before merging them back together.**
@@ -488,7 +488,7 @@ elif st.session_state.page == "Conversion_of_Images":
488
 
489
  elif st.session_state.page == "Video_capture_and_explanation":
490
 
491
- st.header("๐ŸŽฅ Video Capture with `cv2.VideoCapture()`")
492
 
493
  st.markdown("""
494
  **Purpose**: Captures live video from a webcam or reads a video file using OpenCV.
@@ -534,7 +534,7 @@ elif st.session_state.page == "Video_capture_and_explanation":
534
 
535
  ##----------##
536
 
537
- st.header("โฑ๏ธ cv2.waitKey() for Key Event Handling")
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.
@@ -603,18 +603,15 @@ This explanation provides both the purpose and practical use cases of `cv2.Video
603
  if st.button(":blue[Affine Transformation Matrix]"):
604
  st.session_state.page = "Affine_Transformation_Matrix"
605
 
 
 
 
606
  # Navigation Button
607
- if st.button("Back to Data Collection"):
608
  st.session_state.page = "data_collection"
609
 
610
 
611
- st.markdown(
612
- '<a href="https://github.com/Vamshi-183/Animation_project_using_opencv" target="_blank">'
613
- '<button style="background-color:#4CAF50; color:white; padding:10px 20px; border:none; border-radius:5px; font-size:16px;">Go to GitHub Project</button>'
614
- '</a>',
615
- unsafe_allow_html=True
616
- )
617
-
618
 
619
  # ----- AFFINE TRANSFORMATION MATRIX -----
620
 
@@ -622,7 +619,7 @@ This explanation provides both the purpose and practical use cases of `cv2.Video
622
 
623
  elif st.session_state.page == "Affine_Transformation_Matrix":
624
  # Header for Affine Transformation Matrix
625
- st.header("Affine Transformation Matrix")
626
 
627
  # Description of Affine Transformation
628
  st.markdown("""
@@ -645,7 +642,7 @@ elif st.session_state.page == "Affine_Transformation_Matrix":
645
  """)
646
 
647
  # Key Points Section
648
- st.header("Key Points of Affine Transformations")
649
 
650
  st.markdown("""
651
  ### 1. **Preserves Collinearity**
@@ -681,8 +678,6 @@ elif st.session_state.page == "Affine_Transformation_Matrix":
681
  """)
682
 
683
 
684
- st.link_button(":blue[HITHUB Link]","https://github.com/Jayasree417/Animation-Using-Open-CV")
685
-
686
 
687
  if st.button(":red[Back to Data Collection]"):
688
  st.session_state.page = "data_collection"
 
192
  # Ensure proper indentation for this section of the Streamlit app
193
 
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.
 
250
  plt.show()
251
  """, language='python')
252
 
253
+ st.header(":blue[Color Spaces in Machine Learning]")
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
 
 
280
 
281
  elif st.session_state.page == "operations_using_opencv":
282
  # Header and description for cv2.imread
283
+ st.header(":red[๐Ÿ—‚๏ธ Reading an Image with cv2.imread()]")
284
  st.markdown("""
285
  **`cv2.imread()` - Read an Image**
286
  **Purpose:** Load an image from a file and convert it to a NumPy array.
 
303
  """)
304
 
305
  # Header and description for cv2.imshow
306
+ st.header(":blue[๐Ÿ–ผ๏ธ Displaying an Image with cv2.imshow()]")
307
  st.markdown("""
308
  **`cv2.imshow()` - Display an Image**
309
  **Purpose:** Show an image in a window.
 
327
  """)
328
 
329
  # Header and description for cv2.imwrite
330
+ st.header(":blue[๐Ÿ’พ Saving an Image with cv2.imwrite()]")
331
  st.markdown("""
332
  **`cv2.imwrite()` - Write/Save an Image**
333
  **Purpose:** Save an image to a file.
 
364
 
365
  elif st.session_state.page == "Conversion_of_Images":
366
  # Header for Image Conversion
367
+ st.header(":red[๐Ÿ”„ Converting Images Between Different Color Spaces]")
368
 
369
  st.markdown("""
370
  **OpenCV supports many color spaces for image processing.**
 
392
  """)
393
 
394
  # Header for Splitting Channels
395
+ st.header(":blue[๐Ÿ”น Splitting Color Channels in an Image]")
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
  """)
420
 
421
  # Header for Merging Channels
422
+ st.header(":blue[๐Ÿ”น Merging Color Channels in an Image]")
423
 
424
  st.markdown("""
425
  **You can merge the individual channels back into a color image using `cv2.merge()`.**
 
447
  """)
448
 
449
  # Header for Combining with Modifications
450
+ st.header(":blue[๐ŸŽจ Modifying Channels Before Merging]")
451
 
452
  st.markdown("""
453
  **You can modify each channel (e.g., increase brightness in the red channel) before merging them back together.**
 
488
 
489
  elif st.session_state.page == "Video_capture_and_explanation":
490
 
491
+ st.header(":red[๐ŸŽฅ Video Capture with `cv2.VideoCapture()`]")
492
 
493
  st.markdown("""
494
  **Purpose**: Captures live video from a webcam or reads a video file using OpenCV.
 
534
 
535
  ##----------##
536
 
537
+ st.header(":blue[โฑ๏ธ cv2.waitKey() for Key Event Handling]")
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.
 
603
  if st.button(":blue[Affine Transformation Matrix]"):
604
  st.session_state.page = "Affine_Transformation_Matrix"
605
 
606
+ st.link_button(":blue[HitHub project Link]","https://github.com/Jayasree417/Animation-Using-Open-CV")
607
+
608
+
609
  # Navigation Button
610
+ if st.button(":red[Back to Data Collection]"):
611
  st.session_state.page = "data_collection"
612
 
613
 
614
+
 
 
 
 
 
 
615
 
616
  # ----- AFFINE TRANSFORMATION MATRIX -----
617
 
 
619
 
620
  elif st.session_state.page == "Affine_Transformation_Matrix":
621
  # Header for Affine Transformation Matrix
622
+ st.header(":red[Affine Transformation Matrix]")
623
 
624
  # Description of Affine Transformation
625
  st.markdown("""
 
642
  """)
643
 
644
  # Key Points Section
645
+ st.header(":blue[Key Points of Affine Transformations]")
646
 
647
  st.markdown("""
648
  ### 1. **Preserves Collinearity**
 
678
  """)
679
 
680
 
 
 
681
 
682
  if st.button(":red[Back to Data Collection]"):
683
  st.session_state.page = "data_collection"