Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,15 +7,14 @@ import subprocess
|
|
| 7 |
import shlex
|
| 8 |
import torch
|
| 9 |
|
| 10 |
-
os.system("
|
| 11 |
-
os.system("git clone https://github.com/Visual-AI/Mr.DETR.git MrDETR && cd MrDETR && rm -f requirements.txt && cd ..")
|
| 12 |
subprocess.run(
|
| 13 |
shlex.split(
|
| 14 |
"pip install detrex-0.3.0-cp310-cp310-linux_x86_64.whl"
|
| 15 |
)
|
| 16 |
)
|
| 17 |
|
| 18 |
-
sys.path.append("
|
| 19 |
|
| 20 |
|
| 21 |
|
|
@@ -28,7 +27,7 @@ from PIL import Image
|
|
| 28 |
|
| 29 |
if __name__ == "__main__":
|
| 30 |
gr.close_all()
|
| 31 |
-
cfg = LazyConfig.load("
|
| 32 |
cfg["model"].device = "cuda"
|
| 33 |
cfg["train"].device = "cuda"
|
| 34 |
|
|
@@ -36,7 +35,7 @@ if __name__ == "__main__":
|
|
| 36 |
# def
|
| 37 |
model = instantiate(cfg.model)
|
| 38 |
checkpointer = DetectionCheckpointer(model)
|
| 39 |
-
checkpointer.load("https://
|
| 40 |
|
| 41 |
model.eval()
|
| 42 |
model.cuda()
|
|
@@ -64,16 +63,9 @@ if __name__ == "__main__":
|
|
| 64 |
],
|
| 65 |
outputs="image",
|
| 66 |
examples=[
|
| 67 |
-
|
| 68 |
-
["MrDETR/assets/000000028449.jpg", 0.3],
|
| 69 |
-
["MrDETR/assets/000000070048.jpg", 0.5],
|
| 70 |
-
["MrDETR/assets/000000218997.jpg", 0.5],
|
| 71 |
-
["MrDETR/assets/000000279774.jpg", 0.5],
|
| 72 |
-
["MrDETR/assets/000000434459.jpg", 0.5],
|
| 73 |
-
["MrDETR/assets/000000448448.jpg", 0.5],
|
| 74 |
-
["MrDETR/assets/000000560474.jpg", 0.5],
|
| 75 |
],
|
| 76 |
-
title="[CVPR 2025 highlight]
|
| 77 |
description='''
|
| 78 |
[](https://arxiv.org/abs/2412.10028)
|
| 79 |
[](https://paperswithcode.com/sota/object-detection-on-coco-2017-val?p=mr-detr-instructive-multi-route-training-for)
|
|
|
|
| 7 |
import shlex
|
| 8 |
import torch
|
| 9 |
|
| 10 |
+
os.system("git clone https://github.com/Visual-AI/vCLR.git && cd vCLR && rm -f requirements.txt && cd ..")
|
|
|
|
| 11 |
subprocess.run(
|
| 12 |
shlex.split(
|
| 13 |
"pip install detrex-0.3.0-cp310-cp310-linux_x86_64.whl"
|
| 14 |
)
|
| 15 |
)
|
| 16 |
|
| 17 |
+
sys.path.append("vCLR/")
|
| 18 |
|
| 19 |
|
| 20 |
|
|
|
|
| 27 |
|
| 28 |
if __name__ == "__main__":
|
| 29 |
gr.close_all()
|
| 30 |
+
cfg = LazyConfig.load("vCLR/projects/vCLR_deformable_mask/configs/dino-resnet/deformable_train_voc_eval_nonvoc.py")
|
| 31 |
cfg["model"].device = "cuda"
|
| 32 |
cfg["train"].device = "cuda"
|
| 33 |
|
|
|
|
| 35 |
# def
|
| 36 |
model = instantiate(cfg.model)
|
| 37 |
checkpointer = DetectionCheckpointer(model)
|
| 38 |
+
checkpointer.load("https://huggingface.co/allencbzhang/vCLR/resolve/main/vCLR_deformable_train_on_voc.pth")
|
| 39 |
|
| 40 |
model.eval()
|
| 41 |
model.cuda()
|
|
|
|
| 63 |
],
|
| 64 |
outputs="image",
|
| 65 |
examples=[
|
| 66 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
],
|
| 68 |
+
title="[CVPR 2025 highlight] v-CLR: View-Consistent Learning for Open-World Instance Segmentation",
|
| 69 |
description='''
|
| 70 |
[](https://arxiv.org/abs/2412.10028)
|
| 71 |
[](https://paperswithcode.com/sota/object-detection-on-coco-2017-val?p=mr-detr-instructive-multi-route-training-for)
|