Spaces:
Build error
Build error
Miroslav Purkrabek commited on
Commit ·
6359049
1
Parent(s): 46671d4
edit texts and layout
Browse files- app.py +31 -27
- examples/004684.jpg +3 -0
- examples/004806.jpg +3 -0
- examples/004849.jpg +3 -0
- examples/004981.jpg +3 -0
- examples/005002.jpg +3 -0
- examples/005056.jpg +3 -0
app.py
CHANGED
|
@@ -186,46 +186,46 @@ def process_image_with_BMP(
|
|
| 186 |
|
| 187 |
|
| 188 |
with gr.Blocks() as app:
|
| 189 |
-
gr.Markdown("#
|
| 190 |
gr.Markdown(
|
| 191 |
-
"
|
| 192 |
-
|
|
|
|
|
|
|
|
|
|
| 193 |
)
|
| 194 |
|
| 195 |
with gr.Row():
|
| 196 |
with gr.Column():
|
| 197 |
original_image_input = gr.Image(type="numpy", label="Original Image")
|
| 198 |
-
# bbox_thr_slider = gr.Slider(
|
| 199 |
-
# minimum=0.0,
|
| 200 |
-
# maximum=1.0,
|
| 201 |
-
# step=0.01,
|
| 202 |
-
# value=0.5,
|
| 203 |
-
# label="BBox Confidence Threshold",
|
| 204 |
-
# )
|
| 205 |
-
# bbox_nms_slider = gr.Slider(
|
| 206 |
-
# minimum=0.0,
|
| 207 |
-
# maximum=1.0,
|
| 208 |
-
# step=0.01,
|
| 209 |
-
# value=0.5,
|
| 210 |
-
# label="BBox NMS Threshold",
|
| 211 |
-
# )
|
| 212 |
-
# kpt_conf_slider = gr.Slider(
|
| 213 |
-
# minimum=0.0,
|
| 214 |
-
# maximum=1.0,
|
| 215 |
-
# step=0.01,
|
| 216 |
-
# value=0.5,
|
| 217 |
-
# label="Keypoint Confidence Threshold",
|
| 218 |
-
# )
|
| 219 |
submit_button = gr.Button("Run Inference")
|
| 220 |
|
| 221 |
with gr.Column():
|
| 222 |
-
output_standard = gr.Image(type="numpy", label="RTMDet-L
|
| 223 |
|
| 224 |
with gr.Column():
|
| 225 |
-
output_sahi_sliced = gr.Image(type="numpy", label="
|
| 226 |
|
| 227 |
|
| 228 |
gr.Examples(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 229 |
examples=[
|
| 230 |
["examples/prochazka_MMA.jpg"],
|
| 231 |
["examples/riner_judo.jpg"],
|
|
@@ -233,9 +233,9 @@ with gr.Blocks() as app:
|
|
| 233 |
["examples/tackle1.jpg"],
|
| 234 |
["examples/tackle2.jpg"],
|
| 235 |
["examples/tackle5.jpg"],
|
|
|
|
| 236 |
["examples/santa_o_crop.jpg"],
|
| 237 |
["examples/floorball_SKV_2.jpg"],
|
| 238 |
-
["examples/floorball_SKV_3.jpg"],
|
| 239 |
],
|
| 240 |
inputs=[
|
| 241 |
original_image_input,
|
|
@@ -244,6 +244,10 @@ with gr.Blocks() as app:
|
|
| 244 |
fn=process_image_with_BMP,
|
| 245 |
cache_examples=True,
|
| 246 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 247 |
|
| 248 |
submit_button.click(
|
| 249 |
fn=process_image_with_BMP,
|
|
|
|
| 186 |
|
| 187 |
|
| 188 |
with gr.Blocks() as app:
|
| 189 |
+
gr.Markdown("# BBoxMaskPose Image Demo")
|
| 190 |
gr.Markdown(
|
| 191 |
+
"Official demo for paper **Detection, Pose Estimation and Segmentation for Multiple Bodies: Closing the Virtuous Circle.** (ICCV 2025)"
|
| 192 |
+
)
|
| 193 |
+
gr.Markdown(
|
| 194 |
+
"For details, see the [project website](https://mirapurkrabek.github.io/BBox-Mask-Pose/) or [arXiv paper](https://arxiv.org/abs/2412.01562)."
|
| 195 |
+
"The demo showcases the capabilities of the BBoxMaskPose framework. If you want to play around with parameters, use the [GitHub demo](https://github.com/MiraPurkrabek/BBoxMaskPose)."
|
| 196 |
)
|
| 197 |
|
| 198 |
with gr.Row():
|
| 199 |
with gr.Column():
|
| 200 |
original_image_input = gr.Image(type="numpy", label="Original Image")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 201 |
submit_button = gr.Button("Run Inference")
|
| 202 |
|
| 203 |
with gr.Column():
|
| 204 |
+
output_standard = gr.Image(type="numpy", label="RTMDet-L + MaskPose-B")
|
| 205 |
|
| 206 |
with gr.Column():
|
| 207 |
+
output_sahi_sliced = gr.Image(type="numpy", label="BBoxMaskPose")
|
| 208 |
|
| 209 |
|
| 210 |
gr.Examples(
|
| 211 |
+
label="OCHuman examples",
|
| 212 |
+
examples=[
|
| 213 |
+
["examples/004806.jpg"],
|
| 214 |
+
["examples/004684.jpg"],
|
| 215 |
+
["examples/004849.jpg"],
|
| 216 |
+
["examples/004981.jpg"],
|
| 217 |
+
["examples/005002.jpg"],
|
| 218 |
+
["examples/005056.jpg"],
|
| 219 |
+
],
|
| 220 |
+
inputs=[
|
| 221 |
+
original_image_input,
|
| 222 |
+
],
|
| 223 |
+
outputs=[output_standard, output_sahi_sliced],
|
| 224 |
+
fn=process_image_with_BMP,
|
| 225 |
+
cache_examples=True,
|
| 226 |
+
)
|
| 227 |
+
gr.Examples(
|
| 228 |
+
label="In-the-wild examples",
|
| 229 |
examples=[
|
| 230 |
["examples/prochazka_MMA.jpg"],
|
| 231 |
["examples/riner_judo.jpg"],
|
|
|
|
| 233 |
["examples/tackle1.jpg"],
|
| 234 |
["examples/tackle2.jpg"],
|
| 235 |
["examples/tackle5.jpg"],
|
| 236 |
+
["examples/floorball_SKV_3.jpg"],
|
| 237 |
["examples/santa_o_crop.jpg"],
|
| 238 |
["examples/floorball_SKV_2.jpg"],
|
|
|
|
| 239 |
],
|
| 240 |
inputs=[
|
| 241 |
original_image_input,
|
|
|
|
| 244 |
fn=process_image_with_BMP,
|
| 245 |
cache_examples=True,
|
| 246 |
)
|
| 247 |
+
gr.Markdown(
|
| 248 |
+
"Please note that due to HuggingFace restrictions, the demo runs much slower than the original implementation."
|
| 249 |
+
"For faster inference, use the [GitHub demo](https://github.com/MiraPurkrabek/BBoxMaskPose)."
|
| 250 |
+
)
|
| 251 |
|
| 252 |
submit_button.click(
|
| 253 |
fn=process_image_with_BMP,
|
examples/004684.jpg
ADDED
|
Git LFS Details
|
examples/004806.jpg
ADDED
|
Git LFS Details
|
examples/004849.jpg
ADDED
|
Git LFS Details
|
examples/004981.jpg
ADDED
|
Git LFS Details
|
examples/005002.jpg
ADDED
|
Git LFS Details
|
examples/005056.jpg
ADDED
|
Git LFS Details
|