Spaces:
Sleeping
Sleeping
Update pages/7_Unstructured_data.py
Browse files- pages/7_Unstructured_data.py +7 -79
pages/7_Unstructured_data.py
CHANGED
|
@@ -95,83 +95,11 @@ file_type = st.sidebar.radio(
|
|
| 95 |
|
| 96 |
if file_type == "IMAGE":
|
| 97 |
st.title("Image 🖼️")
|
| 98 |
-
st.markdown('''
|
| 99 |
-
- Image is a 2D representation of a visible light spectrum which is collection of wavelength values
|
| 100 |
-
- Image in unstructured data refers to a visual file that lacks a predefined format or schema for its content
|
| 101 |
-
- Its information, such as shapes, colors, or objects, is not inherently organized for traditional databases typically requires specialized tools or algorithms (like image processing or machine learning) to extract meaningful insights.
|
| 102 |
-
''')
|
| 103 |
-
st.header('**How an image is formed**')
|
| 104 |
-
st.subheader('''**Source of light**''')
|
| 105 |
-
st.markdown('''
|
| 106 |
-
- 2D grid like structure which is divided by horizontal and vertical lines
|
| 107 |
-
- Every grid is pixel
|
| 108 |
-
- Every pixel is a feature and the information can be shapes, patterns, color
|
| 109 |
-
- Height * width = pixels
|
| 110 |
-
''')
|
| 111 |
-
st.markdown('''
|
| 112 |
-
- As no.of rows , columns or height and width increases --> pixel increases
|
| 113 |
-
- As pixel increases there is more information --> gives higher clarity
|
| 114 |
-
- As resolution increases --> clarity of pixels increases
|
| 115 |
-
- Every single image is considered as a data point and each grid or pixel is a feature
|
| 116 |
-
- Tabular structure and grid like structure has similar structure but different in interpretation
|
| 117 |
-
''')
|
| 118 |
-
st.header('**Color Spaces**')
|
| 119 |
-
st.markdown('''
|
| 120 |
-
- It is a technique by using which we can represent the colors of an image
|
| 121 |
-
- Edges are created because of the difference in colors (changing intensities of color)
|
| 122 |
-
- Image is converted to numerical form for this color space is used
|
| 123 |
-
''')
|
| 124 |
-
st.subheader('**Types of Color Spaces**')
|
| 125 |
st.markdown("""
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
"""
|
| 133 |
-
st.header('**Black & White Color Space**')
|
| 134 |
-
st.markdown('''
|
| 135 |
-
- It preserves only two colors which are **black(0) and white(1)**
|
| 136 |
-
- For converting image into numerical as the image is 2D format numpy is used
|
| 137 |
-
- Here there is no color preservation
|
| 138 |
-
- As image is represented in 0's and 1's which will be only in black and white in grid format
|
| 139 |
-
- To neglect the color preservation of black and white color space next gray scale is used
|
| 140 |
-
''')
|
| 141 |
-
st.header('**Gray Scale Color Space**')
|
| 142 |
-
st.markdown('''
|
| 143 |
-
- It preserves total 256 colors which is [0 - 255]
|
| 144 |
-
- Where 0 represent black and 255 represent white , [1 - 255] --> shades of grey color
|
| 145 |
-
- If the image is colored then the both gray scale and colorspace are not used
|
| 146 |
-
- Gray scale converts to different shades of gray
|
| 147 |
-
- Black and white converts to either black or white
|
| 148 |
-
''')
|
| 149 |
-
st.header('**RGB Color Space**')
|
| 150 |
-
st.markdown('''
|
| 151 |
-
- While converting image to numerical it can't convert as it has 3 colors --> as it converts to 3D array
|
| 152 |
-
- There are 3 channels in RGB Color Space
|
| 153 |
-
- **Red Channel**
|
| 154 |
-
- **Green Channel**
|
| 155 |
-
- **Blue Channel**
|
| 156 |
-
''')
|
| 157 |
-
st.subheader('**Red Channel**')
|
| 158 |
-
st.markdown('''
|
| 159 |
-
- It is 2D array which has [0 - 255]
|
| 160 |
-
- 0 means black and 255 is red , [0 - 255] between is shades of red
|
| 161 |
-
- Red channel is taken and kept at depth of 1 --> depth always represents color
|
| 162 |
-
- As it is always constant
|
| 163 |
-
''')
|
| 164 |
-
st.subheader('**Green Channel**')
|
| 165 |
-
st.markdown('''
|
| 166 |
-
- It is 2D array which has [0 - 255]
|
| 167 |
-
- 0 means black and 255 is green , [0 - 255] between is shades of green
|
| 168 |
-
- Red channel is taken and kept at depth of 2 --> depth always represents color
|
| 169 |
-
- As it is always constant
|
| 170 |
-
''')
|
| 171 |
-
st.subheader('**Blue Channel**')
|
| 172 |
-
st.markdown('''
|
| 173 |
-
- It is 2D array which has [0 - 255]
|
| 174 |
-
- 0 means black and 255 is blue , [0 - 255] between is shades of blue
|
| 175 |
-
- Red channel is taken and kept at depth of 3 --> depth always represents color
|
| 176 |
-
- The combination of 3 chnnels give 3D array where depth represents color and it is always constant
|
| 177 |
-
''')
|
|
|
|
| 95 |
|
| 96 |
if file_type == "IMAGE":
|
| 97 |
st.title("Image 🖼️")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
st.markdown("""
|
| 99 |
+
Images - A form of Unstructured data since they have no well defined Pattern or Structures.
|
| 100 |
+
Images can do contain certain patterns, objects that can be used to recognize, classify, and predict few emotions and information.
|
| 101 |
+
""",unsafe_allow_html=True)
|
| 102 |
+
|
| 103 |
+
st.sidebar.header("Explore Image Data ✨")
|
| 104 |
+
data_type1 = st.sidebar.radio("Select Information", ["Image Information","Basic Operations", "Color Space"
|
| 105 |
+
,"Video Capture","Image Augumentation"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|