Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -803,26 +803,6 @@ elif page == "π Model Performance":
|
|
| 803 |
else:
|
| 804 |
st.dataframe(df_cls, width='content')
|
| 805 |
|
| 806 |
-
col1, col2 = st.columns(2)
|
| 807 |
-
with col1:
|
| 808 |
-
st.markdown("#### Accuracy")
|
| 809 |
-
st.bar_chart(
|
| 810 |
-
df_cls.set_index("Model")["Accuracy"],
|
| 811 |
-
width=520,
|
| 812 |
-
)
|
| 813 |
-
with col2:
|
| 814 |
-
st.markdown("#### F1 (weighted)")
|
| 815 |
-
st.bar_chart(
|
| 816 |
-
df_cls.set_index("Model")["F1 (weighted)"],
|
| 817 |
-
width=520,
|
| 818 |
-
)
|
| 819 |
-
|
| 820 |
-
st.markdown("#### Inference Speed (images/sec)")
|
| 821 |
-
st.bar_chart(
|
| 822 |
-
df_cls.set_index("Model")["Images/sec"],
|
| 823 |
-
width=520,
|
| 824 |
-
)
|
| 825 |
-
|
| 826 |
# --- YOLO metrics ---
|
| 827 |
st.markdown("### π¦ YOLOv8 Detection Model")
|
| 828 |
yolo_m = load_yolo_metrics()
|
|
@@ -835,13 +815,27 @@ elif page == "π Model Performance":
|
|
| 835 |
|
| 836 |
col1, col2, col3 = st.columns(3)
|
| 837 |
with col1:
|
| 838 |
-
st.metric("Precision", f"{overall.get(
|
| 839 |
st.metric("mAP@0.5", f"{overall.get('mAP50', 0):.3f}")
|
| 840 |
with col2:
|
| 841 |
-
st.metric("Recall", f"{overall.get(
|
| 842 |
st.metric("mAP@0.5:0.95", f"{overall.get('mAP50_95', 0):.3f}")
|
| 843 |
with col3:
|
| 844 |
st.metric("YOLO FPS", f"{speed.get('fps', 0):.2f}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 845 |
|
| 846 |
# --- Confusion matrix & comparison plots (if available) ---
|
| 847 |
st.markdown("### π Comparison Plots & Confusion Matrices")
|
|
|
|
| 803 |
else:
|
| 804 |
st.dataframe(df_cls, width='content')
|
| 805 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 806 |
# --- YOLO metrics ---
|
| 807 |
st.markdown("### π¦ YOLOv8 Detection Model")
|
| 808 |
yolo_m = load_yolo_metrics()
|
|
|
|
| 815 |
|
| 816 |
col1, col2, col3 = st.columns(3)
|
| 817 |
with col1:
|
| 818 |
+
st.metric("Precision", f"{overall.get("precision", 0):.3f}")
|
| 819 |
st.metric("mAP@0.5", f"{overall.get('mAP50', 0):.3f}")
|
| 820 |
with col2:
|
| 821 |
+
st.metric("Recall", f"{overall.get("recall", 0):.3f}")
|
| 822 |
st.metric("mAP@0.5:0.95", f"{overall.get('mAP50_95', 0):.3f}")
|
| 823 |
with col3:
|
| 824 |
st.metric("YOLO FPS", f"{speed.get('fps', 0):.2f}")
|
| 825 |
+
|
| 826 |
+
col1, col2 = st.columns(2)
|
| 827 |
+
with col1:
|
| 828 |
+
st.markdown("#### Accuracy")
|
| 829 |
+
st.bar_chart(
|
| 830 |
+
df_cls.set_index("Model")["Accuracy"],
|
| 831 |
+
width=520,
|
| 832 |
+
)
|
| 833 |
+
with col2:
|
| 834 |
+
st.markdown("#### F1 (weighted)")
|
| 835 |
+
st.bar_chart(
|
| 836 |
+
df_cls.set_index("Model")["F1 (weighted)"],
|
| 837 |
+
width=520,
|
| 838 |
+
)
|
| 839 |
|
| 840 |
# --- Confusion matrix & comparison plots (if available) ---
|
| 841 |
st.markdown("### π Comparison Plots & Confusion Matrices")
|