sree4411 commited on
Commit
55995a6
Β·
verified Β·
1 Parent(s): 4040690

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 -17
pages/3_Life Cycle Of ML Project.py CHANGED
@@ -209,7 +209,7 @@ elif st.session_state.page == "Introduction_to_image":
209
  - **Graphic Design & Art**: Creating creative visual content for marketing and design.
210
  """)
211
 
212
- st.code("""
213
  from PIL import Image
214
  import numpy as np
215
  import matplotlib.pyplot as plt
@@ -235,8 +235,8 @@ elif st.session_state.page == "Introduction_to_image":
235
  plt.show()
236
  """, language='python')
237
 
238
- st.header("Color Spaces in Machine Learning")
239
- st.markdown("""
240
  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.
241
  Common Color Spaces:
242
  - **RGB (Red, Green, Blue)**: The most common color space for digital images. Each pixel is represented by a combination of three values corresponding to the red, green, and blue channels.
@@ -262,8 +262,8 @@ elif st.session_state.page == "Introduction_to_image":
262
 
263
  elif st.session_state.page == "operations_using_opencv":
264
  # Header and description for cv2.imread
265
- st.header("πŸ—‚οΈ Reading an Image with cv2.imread()")
266
- st.markdown("""
267
  **`cv2.imread()` - Read an Image**
268
  **Purpose:** Load an image from a file and convert it to a NumPy array.
269
  **Syntax:**
@@ -285,8 +285,8 @@ elif st.session_state.page == "operations_using_opencv":
285
  """)
286
 
287
  # Header and description for cv2.imshow
288
- st.header("πŸ–ΌοΈ Displaying an Image with cv2.imshow()")
289
- st.markdown("""
290
  **`cv2.imshow()` - Display an Image**
291
  **Purpose:** Show an image in a window.
292
  **Syntax:**
@@ -309,8 +309,8 @@ elif st.session_state.page == "operations_using_opencv":
309
  """)
310
 
311
  # Header and description for cv2.imwrite
312
- st.header("πŸ’Ύ Saving an Image with cv2.imwrite()")
313
- st.markdown("""
314
  **`cv2.imwrite()` - Write/Save an Image**
315
  **Purpose:** Save an image to a file.
316
  **Syntax:**
@@ -346,9 +346,9 @@ elif st.session_state.page == "operations_using_opencv":
346
 
347
  elif st.session_state.page == "operations_using_opencv":
348
  # Header for Image Conversion
349
- st.header("πŸ”„ Converting Images Between Different Color Spaces")
350
 
351
- st.markdown("""
352
  **OpenCV supports many color spaces for image processing.**
353
  **Common Conversions:**
354
 
@@ -374,9 +374,9 @@ elif st.session_state.page == "operations_using_opencv":
374
  """)
375
 
376
  # Header for Splitting Channels
377
- st.header("πŸ”Ή Splitting Color Channels in an Image")
378
 
379
- st.markdown("""
380
  **Splitting an image into its individual color channels (B, G, R) allows you to analyze or modify each channel independently.**
381
  **Syntax:**
382
  ```python
@@ -401,9 +401,9 @@ elif st.session_state.page == "operations_using_opencv":
401
  """)
402
 
403
  # Header for Merging Channels
404
- st.header("πŸ”Ή Merging Color Channels in an Image")
405
 
406
- st.markdown("""
407
  **You can merge the individual channels back into a color image using `cv2.merge()`.**
408
  **Syntax:**
409
  ```python
@@ -429,9 +429,9 @@ elif st.session_state.page == "operations_using_opencv":
429
  """)
430
 
431
  # Header for Combining with Modifications
432
- st.header("🎨 Modifying Channels Before Merging")
433
 
434
- st.markdown("""
435
  **You can modify each channel (e.g., increase brightness in the red channel) before merging them back together.**
436
  **Example:**
437
  ```python
@@ -469,6 +469,7 @@ elif st.session_state.page == "operations_using_opencv":
469
  #---------VIDEO CAPTURE AND EXPLANATION OF CV2.WAITKEY-----------
470
 
471
  elif st.session_state.page == "Video_capture_and_explanation_page":
 
472
  st.header("πŸŽ₯ Video Capture with `cv2.VideoCapture()`")
473
 
474
  st.markdown("""
 
209
  - **Graphic Design & Art**: Creating creative visual content for marketing and design.
210
  """)
211
 
212
+ st.code("""
213
  from PIL import Image
214
  import numpy as np
215
  import matplotlib.pyplot as plt
 
235
  plt.show()
236
  """, language='python')
237
 
238
+ st.header("Color Spaces in Machine Learning")
239
+ st.markdown("""
240
  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.
241
  Common Color Spaces:
242
  - **RGB (Red, Green, Blue)**: The most common color space for digital images. Each pixel is represented by a combination of three values corresponding to the red, green, and blue channels.
 
262
 
263
  elif st.session_state.page == "operations_using_opencv":
264
  # Header and description for cv2.imread
265
+ st.header("πŸ—‚οΈ Reading an Image with cv2.imread()")
266
+ st.markdown("""
267
  **`cv2.imread()` - Read an Image**
268
  **Purpose:** Load an image from a file and convert it to a NumPy array.
269
  **Syntax:**
 
285
  """)
286
 
287
  # Header and description for cv2.imshow
288
+ st.header("πŸ–ΌοΈ Displaying an Image with cv2.imshow()")
289
+ st.markdown("""
290
  **`cv2.imshow()` - Display an Image**
291
  **Purpose:** Show an image in a window.
292
  **Syntax:**
 
309
  """)
310
 
311
  # Header and description for cv2.imwrite
312
+ st.header("πŸ’Ύ Saving an Image with cv2.imwrite()")
313
+ st.markdown("""
314
  **`cv2.imwrite()` - Write/Save an Image**
315
  **Purpose:** Save an image to a file.
316
  **Syntax:**
 
346
 
347
  elif st.session_state.page == "operations_using_opencv":
348
  # Header for Image Conversion
349
+ st.header("πŸ”„ Converting Images Between Different Color Spaces")
350
 
351
+ st.markdown("""
352
  **OpenCV supports many color spaces for image processing.**
353
  **Common Conversions:**
354
 
 
374
  """)
375
 
376
  # Header for Splitting Channels
377
+ st.header("πŸ”Ή Splitting Color Channels in an Image")
378
 
379
+ st.markdown("""
380
  **Splitting an image into its individual color channels (B, G, R) allows you to analyze or modify each channel independently.**
381
  **Syntax:**
382
  ```python
 
401
  """)
402
 
403
  # Header for Merging Channels
404
+ st.header("πŸ”Ή Merging Color Channels in an Image")
405
 
406
+ st.markdown("""
407
  **You can merge the individual channels back into a color image using `cv2.merge()`.**
408
  **Syntax:**
409
  ```python
 
429
  """)
430
 
431
  # Header for Combining with Modifications
432
+ st.header("🎨 Modifying Channels Before Merging")
433
 
434
+ st.markdown("""
435
  **You can modify each channel (e.g., increase brightness in the red channel) before merging them back together.**
436
  **Example:**
437
  ```python
 
469
  #---------VIDEO CAPTURE AND EXPLANATION OF CV2.WAITKEY-----------
470
 
471
  elif st.session_state.page == "Video_capture_and_explanation_page":
472
+
473
  st.header("πŸŽ₯ Video Capture with `cv2.VideoCapture()`")
474
 
475
  st.markdown("""