File size: 972 Bytes
494c823 deb6583 494c823 4463f29 deb6583 494c823 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import numpy as np
import gradio as gr
def flip_image(x):
return (1000, np.zeros((100, 100)))
with gr.Blocks() as demo:
gr.Markdown("""
# Crowd Counting based on SASNet
We implemented a image crowd counting model with VGG16 following the paper of Song et. al (2021).
## References
Song, Q., Wang, C., Wang, Y., Tai, Y., Wang, C., Li, J., … Ma, J. (2021). To Choose or to Fuse? Scale Selection for Crowd Counting. The Thirty-Fifth AAAI Conference on Artificial Intelligence (AAAI-21).
""")
image_button = gr.Button("Count the Crowd!")
with gr.Row():
with gr.Column():
image_input = gr.Image(type="pil")
gr.Examples(["IMG_1.jpg", "IMG_2.jpg", "IMG_3.jpg"], image_input)
with gr.Column():
image_output = gr.Image()
text_output = gr.Label()
image_button.click(flip_image, inputs=image_input, outputs=[text_output, image_output])
demo.launch()
|