Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ from prediction import (
|
|
29 |
def overview_page():
|
30 |
col1, col2, col3 = st.columns([1, 6, 1])
|
31 |
|
32 |
-
st.title("π Beyond
|
33 |
st.markdown("---")
|
34 |
|
35 |
try:
|
@@ -89,12 +89,7 @@ def overview_page():
|
|
89 |
|
90 |
st.subheader("β¨ **Bringing Anomalies to Light**: Real-World Examples")
|
91 |
st.write("""
|
92 |
-
Below are **three real examples** of AI-powered anomaly detection.
|
93 |
-
|
94 |
-
πΉ **First Column**: Original object with an anomaly
|
95 |
-
πΉ **Second Column**: AI-generated **heatmap** highlighting the defect
|
96 |
-
πΉ **Third Column**: Segmentation mask identifying **defect locations**
|
97 |
-
πΉ **Fourth Column**: **Ground truth** (expert-labeled defect areas for verification)
|
98 |
""")
|
99 |
|
100 |
# Display anomaly detection images directly without additional data processing
|
@@ -103,42 +98,21 @@ def overview_page():
|
|
103 |
st.image("images/anomaly_visual_example_3.png", use_container_width=True, caption="Leather - Cut Defect")
|
104 |
|
105 |
st.write("""
|
106 |
-
|
|
|
|
|
|
|
107 |
- AI scans the object and **highlights unusual areas** in **red/yellow**, indicating anomaly.
|
108 |
|
109 |
-
|
110 |
- Shows the **exact shape** of the detected anomaly, crucial for precise localization.
|
111 |
|
112 |
-
|
113 |
- The manually labeled anomaly **used for AI validation**.
|
114 |
|
115 |
This technology helps manufacturers **automate anomaly detection, reduce waste, and ensure top-tier product quality** at an industrial scale. π
|
116 |
""")
|
117 |
|
118 |
-
st.success("π With AI-powered anomaly detection, we bring **precision and automation** to manufacturing quality control! πβ¨")
|
119 |
-
|
120 |
-
st.markdown("---")
|
121 |
-
col1, col2 = st.columns(2)
|
122 |
-
|
123 |
-
with col1:
|
124 |
-
st.subheader("π― Process Pipeline")
|
125 |
-
st.markdown("""
|
126 |
-
1. **Data Collection & Preprocessing**
|
127 |
-
2. **Feature Extraction**
|
128 |
-
3. **Model Training**
|
129 |
-
4. **Anomaly Detection**
|
130 |
-
5. **Results Visualization**
|
131 |
-
""")
|
132 |
-
|
133 |
-
with col2:
|
134 |
-
st.subheader("π οΈ Key Technologies")
|
135 |
-
st.markdown("""
|
136 |
-
- **Deep Learning**: PyTorch
|
137 |
-
- **Computer Vision**: OpenCV, PIL
|
138 |
-
- **Data Analysis**: NumPy, Pandas
|
139 |
-
- **Visualization**: Plotly, Matplotlib
|
140 |
-
""")
|
141 |
-
|
142 |
|
143 |
# Dataset Page
|
144 |
def dataset_page():
|
@@ -406,6 +380,8 @@ def resnet50_page():
|
|
406 |
Essentially, these **1536 features** act like a summary of the imageβs most important elements. π
|
407 |
|
408 |
""")
|
|
|
|
|
409 |
def models_page():
|
410 |
st.title("π€ Anomaly Detection Models")
|
411 |
|
|
|
29 |
def overview_page():
|
30 |
col1, col2, col3 = st.columns([1, 6, 1])
|
31 |
|
32 |
+
st.title("π Beyond Normal: Unveiling Image Anomalies with AI")
|
33 |
st.markdown("---")
|
34 |
|
35 |
try:
|
|
|
89 |
|
90 |
st.subheader("β¨ **Bringing Anomalies to Light**: Real-World Examples")
|
91 |
st.write("""
|
92 |
+
Below are **three real examples** of AI-powered anomaly detection.
|
|
|
|
|
|
|
|
|
|
|
93 |
""")
|
94 |
|
95 |
# Display anomaly detection images directly without additional data processing
|
|
|
98 |
st.image("images/anomaly_visual_example_3.png", use_container_width=True, caption="Leather - Cut Defect")
|
99 |
|
100 |
st.write("""
|
101 |
+
**First Column**:
|
102 |
+
- Original object with an anomaly
|
103 |
+
|
104 |
+
**The Heatmap (Second Column)**:
|
105 |
- AI scans the object and **highlights unusual areas** in **red/yellow**, indicating anomaly.
|
106 |
|
107 |
+
**Segmentation Map (Third Column)**:
|
108 |
- Shows the **exact shape** of the detected anomaly, crucial for precise localization.
|
109 |
|
110 |
+
**Ground Truth (Fourth Column)**:
|
111 |
- The manually labeled anomaly **used for AI validation**.
|
112 |
|
113 |
This technology helps manufacturers **automate anomaly detection, reduce waste, and ensure top-tier product quality** at an industrial scale. π
|
114 |
""")
|
115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
|
117 |
# Dataset Page
|
118 |
def dataset_page():
|
|
|
380 |
Essentially, these **1536 features** act like a summary of the imageβs most important elements. π
|
381 |
|
382 |
""")
|
383 |
+
st.image("images/internal_features.png", caption="ResNet50 Block 1 & 2, random internal features", use_container_width=True)
|
384 |
+
|
385 |
def models_page():
|
386 |
st.title("π€ Anomaly Detection Models")
|
387 |
|