yogesh-venkat commited on
Commit
daa39be
Β·
verified Β·
1 Parent(s): 756aa78

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -22
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('precision', 0):.3f}")
839
  st.metric("mAP@0.5", f"{overall.get('mAP50', 0):.3f}")
840
  with col2:
841
- st.metric("Recall", f"{overall.get('recall', 0):.3f}")
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")