Spaces:
Sleeping
Sleeping
Update pages/Data Collection.py
Browse files- pages/Data Collection.py +66 -1
pages/Data Collection.py
CHANGED
|
@@ -1263,9 +1263,74 @@ elif st.session_state.current_page == "video_processing":
|
|
| 1263 |
elif st.session_state.current_page == "image_transformations":
|
| 1264 |
# Content for Image Transformations Page
|
| 1265 |
st.markdown("""
|
| 1266 |
-
<h2 style="color: #
|
| 1267 |
""", unsafe_allow_html=True)
|
| 1268 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1269 |
|
| 1270 |
|
| 1271 |
elif st.session_state.current_page == "explore_audio":
|
|
|
|
| 1263 |
elif st.session_state.current_page == "image_transformations":
|
| 1264 |
# Content for Image Transformations Page
|
| 1265 |
st.markdown("""
|
| 1266 |
+
<h2 style="color: #BB3385;">Image Augmentation Techniques</h2>
|
| 1267 |
""", unsafe_allow_html=True)
|
| 1268 |
|
| 1269 |
+
# Page: What is Image Augmentation?
|
| 1270 |
+
|
| 1271 |
+
# Heading
|
| 1272 |
+
st.markdown("""
|
| 1273 |
+
<h2 style="color: #9400d3;">What is Image Augmentation?</h2>
|
| 1274 |
+
""", unsafe_allow_html=True)
|
| 1275 |
+
|
| 1276 |
+
# Definition
|
| 1277 |
+
st.write("""
|
| 1278 |
+
Image augmentation is a method used to enhance the size and variety of an image dataset by applying transformations to existing images.
|
| 1279 |
+
These transformations introduce variations while preserving the core features of the image, making it useful for training machine learning models to handle diverse inputs.
|
| 1280 |
+
|
| 1281 |
+
### How It Works
|
| 1282 |
+
Image augmentation applies transformations like resizing, rotation, flipping, and more to the original image. These changes simulate real-world variations, ensuring that machine learning models can identify patterns even with differences in perspective, scale, or lighting conditions.
|
| 1283 |
+
|
| 1284 |
+
The key idea is to preserve the original features of the image while introducing diversity. For example, if we take an image and apply five different transformations, we generate five new variations of that image. This provides the model with more data to learn from, improving its performance and ability to generalize.
|
| 1285 |
+
""")
|
| 1286 |
+
|
| 1287 |
+
# Types of Image Augmentation
|
| 1288 |
+
|
| 1289 |
+
st.markdown("""
|
| 1290 |
+
<h3 style="color: #9400d3;">Types of Image Augmentation</h3>
|
| 1291 |
+
""", unsafe_allow_html=True)
|
| 1292 |
+
|
| 1293 |
+
st.write("""
|
| 1294 |
+
Image augmentation is broadly categorized into two types:
|
| 1295 |
+
|
| 1296 |
+
1. **Affine Transformations**
|
| 1297 |
+
2. **Non-Affine Transformations**
|
| 1298 |
+
""")
|
| 1299 |
+
|
| 1300 |
+
# Affine Transformations
|
| 1301 |
+
|
| 1302 |
+
st.markdown("""
|
| 1303 |
+
<h3 style="color: #9400d3;">Affine Transformations</h3>
|
| 1304 |
+
""", unsafe_allow_html=True)
|
| 1305 |
+
|
| 1306 |
+
st.write("""
|
| 1307 |
+
**Affine Transformations** are transformations where:
|
| 1308 |
+
|
| 1309 |
+
1. The transformed image and the original image maintain **parallelism between lines**.
|
| 1310 |
+
2. In some cases, the **angle between lines** and the **length of the lines** may also be preserved.
|
| 1311 |
+
|
| 1312 |
+
These transformations ensure that the geometric relationships within the image remain intact, even as the image is resized, rotated, or shifted.
|
| 1313 |
+
|
| 1314 |
+
Affine transformations are performed using a mathematical operation known as an **Affine Matrix**, which maps the original image coordinates to new coordinates.
|
| 1315 |
+
""")
|
| 1316 |
+
|
| 1317 |
+
st.markdown("""
|
| 1318 |
+
<h3 style="color: #e25822;">Common Affine Transformations:</h3>
|
| 1319 |
+
""", unsafe_allow_html=True)
|
| 1320 |
+
|
| 1321 |
+
st.write("""
|
| 1322 |
+
1. **Scaling**: Changing the size of the image while maintaining its proportions.
|
| 1323 |
+
2. **Translation**: Shifting the image horizontally, vertically, or both.
|
| 1324 |
+
3. **Rotation**: Rotating the image around a specified center point.
|
| 1325 |
+
4. **Shearing**: Slanting the image along the x or y axis, creating a skewed effect.
|
| 1326 |
+
5. **Cropping**: Extracting a specific portion of the image, usually to focus on a region of interest.
|
| 1327 |
+
|
| 1328 |
+
These transformations are linear, meaning the relationships between points in the image remain consistent.
|
| 1329 |
+
""")
|
| 1330 |
+
|
| 1331 |
+
|
| 1332 |
+
|
| 1333 |
+
|
| 1334 |
|
| 1335 |
|
| 1336 |
elif st.session_state.current_page == "explore_audio":
|