Spaces:
Runtime error
Runtime error
lkeab
commited on
Commit
·
e4e47d6
1
Parent(s):
749f060
updae app
Browse files
app.py
CHANGED
|
@@ -28,7 +28,7 @@ r = requests.get(url2, allow_redirects=True)
|
|
| 28 |
open("city2.jpg", 'wb').write(r.content)
|
| 29 |
'''
|
| 30 |
|
| 31 |
-
model_name='./configs/COCO-InstanceSegmentation/
|
| 32 |
|
| 33 |
# model = model_zoo.get(model_name, trained=True)
|
| 34 |
|
|
@@ -56,10 +56,9 @@ def inference(image):
|
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
-
title = "
|
| 60 |
-
description = "demo for
|
| 61 |
-
|
| 62 |
-
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2012.07177'>Simple Copy-Paste is a Strong Data Augmentation Method for Instance Segmentation</a> | <a href='https://github.com/facebookresearch/detectron2/blob/main/MODEL_ZOO.md'>Detectron model ZOO</a></p>"
|
| 63 |
|
| 64 |
gr.Interface(
|
| 65 |
inference,
|
|
@@ -69,6 +68,8 @@ gr.Interface(
|
|
| 69 |
description=description,
|
| 70 |
article=article,
|
| 71 |
examples=[
|
|
|
|
|
|
|
| 72 |
["demo/sample_imgs/000000224200.jpg"],
|
| 73 |
["demo/sample_imgs/000000344909.jpg"]
|
| 74 |
]).launch()
|
|
|
|
| 28 |
open("city2.jpg", 'wb').write(r.content)
|
| 29 |
'''
|
| 30 |
|
| 31 |
+
model_name='./configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x_4gpu_transfiner.yaml'
|
| 32 |
|
| 33 |
# model = model_zoo.get(model_name, trained=True)
|
| 34 |
|
|
|
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
+
title = "Mask Transfiner R50 model"
|
| 60 |
+
description = "demo for Mask Transfiner based on R50-FPN. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
|
| 61 |
+
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2012.07177'>Mask Transfiner for High-Quality Instance Segmentation, CVPR 2022</a> | <a href='https://github.com/SysCV/transfiner'>Mask Transfiner Github</a></p>"
|
|
|
|
| 62 |
|
| 63 |
gr.Interface(
|
| 64 |
inference,
|
|
|
|
| 68 |
description=description,
|
| 69 |
article=article,
|
| 70 |
examples=[
|
| 71 |
+
["demo/sample_imgs/000000132408.jpg"],
|
| 72 |
+
["demo/sample_imgs/000000018737.jpg"],
|
| 73 |
["demo/sample_imgs/000000224200.jpg"],
|
| 74 |
["demo/sample_imgs/000000344909.jpg"]
|
| 75 |
]).launch()
|