Yiming-M commited on
Commit
3b32643
Β·
1 Parent(s): 9cb167a

2025-07-31 22:39 πŸš€

Browse files
Files changed (1) hide show
  1. app.py +20 -12
app.py CHANGED
@@ -716,21 +716,23 @@ with gr.Blocks(css=css, theme=gr.themes.Soft(), title="ZIP Crowd Counting") as d
716
  with gr.Group():
717
  gr.Markdown("### πŸ“Š Main Results")
718
  output_den_map = gr.Image(label="🎯 Predicted Density Map", type="pil")
719
- output_lambda_map = gr.Image(label="πŸ“ˆ Lambda Map", type="pil")
720
  output_text = gr.Textbox(
721
  label="πŸ‘₯ Predicted Count",
722
  info="Total number of people detected"
723
  )
724
-
725
  with gr.Column(scale=1):
726
  with gr.Group():
727
- gr.Markdown("### πŸ” Zero Analysis")
 
 
 
 
 
 
 
728
  output_structural_zero_map = gr.Image(label="πŸ—οΈ Structural Zero Map", type="pil")
729
  output_sampling_zero_map = gr.Image(label="πŸ“Š Sampling Zero Map", type="pil")
730
-
731
- with gr.Column(scale=1):
732
- with gr.Group():
733
- gr.Markdown("### πŸ“ˆ Combined Analysis")
734
  output_complete_zero_map = gr.Image(label="🎯 Complete Zero Map", type="pil")
735
 
736
  # ε½“ζ¨‘εž‹ε˜εŒ–ζ—ΆοΌŒθ‡ͺεŠ¨ζ›΄ζ–°ζ¨‘εž‹
@@ -769,7 +771,7 @@ with gr.Blocks(css=css, theme=gr.themes.Soft(), title="ZIP Crowd Counting") as d
769
  gr.Markdown("**Click on any example below to test the model:**")
770
  gr.Examples(
771
  examples=[
772
- ["example1.jpg"], ["example2.jpg"], # ["example3.jpg"], ["example4.jpg"],
773
  ["example5.jpg"], ["example6.jpg"], ["example7.jpg"], ["example8.jpg"],
774
  ["example9.jpg"], ["example10.jpg"], ["example11.jpg"], ["example12.jpg"]
775
  ],
@@ -790,11 +792,17 @@ with gr.Blocks(css=css, theme=gr.themes.Soft(), title="ZIP Crowd Counting") as d
790
 
791
  ### Understanding the Outputs:
792
 
 
793
  - **🎯 Density Map**: Shows where people are located with color intensity
794
- - **πŸ“ˆ Lambda Map**: Represents the expected count per pixel
795
- - **πŸ—οΈ Structural Zero Map**: Areas where people cannot exist (buildings, sky)
796
- - **πŸ“Š Sampling Zero Map**: Areas where people could be but aren't
797
- - **🎯 Complete Zero Map**: Combined zero probability map
 
 
 
 
 
798
  """)
799
 
800
  # ζ·»εŠ ζŠ€ζœ―δΏ‘ζ―
 
716
  with gr.Group():
717
  gr.Markdown("### πŸ“Š Main Results")
718
  output_den_map = gr.Image(label="🎯 Predicted Density Map", type="pil")
 
719
  output_text = gr.Textbox(
720
  label="πŸ‘₯ Predicted Count",
721
  info="Total number of people detected"
722
  )
723
+
724
  with gr.Column(scale=1):
725
  with gr.Group():
726
+ gr.Markdown("### πŸ”₯ Hotspots")
727
+ output_lambda_map = gr.Image(label="πŸ“ˆ Lambda Map", type="pil")
728
+
729
+ # Zero Analysis section - ζ¨ͺε‘ζŽ’εˆ—ηš„δΈ‰δΈͺ图像
730
+ with gr.Row():
731
+ with gr.Group():
732
+ gr.Markdown("### πŸ” Zero Analysis")
733
+ with gr.Row():
734
  output_structural_zero_map = gr.Image(label="πŸ—οΈ Structural Zero Map", type="pil")
735
  output_sampling_zero_map = gr.Image(label="πŸ“Š Sampling Zero Map", type="pil")
 
 
 
 
736
  output_complete_zero_map = gr.Image(label="🎯 Complete Zero Map", type="pil")
737
 
738
  # ε½“ζ¨‘εž‹ε˜εŒ–ζ—ΆοΌŒθ‡ͺεŠ¨ζ›΄ζ–°ζ¨‘εž‹
 
771
  gr.Markdown("**Click on any example below to test the model:**")
772
  gr.Examples(
773
  examples=[
774
+ ["example1.jpg"], ["example2.jpg"], ["example3.jpg"], ["example4.jpg"],
775
  ["example5.jpg"], ["example6.jpg"], ["example7.jpg"], ["example8.jpg"],
776
  ["example9.jpg"], ["example10.jpg"], ["example11.jpg"], ["example12.jpg"]
777
  ],
 
792
 
793
  ### Understanding the Outputs:
794
 
795
+ **πŸ“Š Main Results:**
796
  - **🎯 Density Map**: Shows where people are located with color intensity
797
+ - **οΏ½ Predicted Count**: Total number of people detected in the image
798
+
799
+ **πŸ” Zero Analysis:**
800
+ - **πŸ—οΈ Structural Zero Map**: Areas where people cannot exist (buildings, sky, walls)
801
+ - **πŸ“Š Sampling Zero Map**: Areas where people could be but aren't currently present
802
+ - **🎯 Complete Zero Map**: Combined zero probability map showing all non-crowd areas
803
+
804
+ **🎯 Hotspots:**
805
+ - **πŸ“ˆ Lambda Map**: Highlights crowd density hotspots and expected count per pixel
806
  """)
807
 
808
  # ζ·»εŠ ζŠ€ζœ―δΏ‘ζ―