hasibzunair
commited on
Commit
•
9629bd9
1
Parent(s):
952af7b
update
Browse files
app.py
CHANGED
@@ -25,8 +25,11 @@ if torch.cuda.is_available():
|
|
25 |
torch.backends.cudnn.deterministic = True
|
26 |
|
27 |
# Device
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
30 |
|
31 |
# Make directories
|
32 |
os.system("mkdir ./models")
|
@@ -78,7 +81,22 @@ inputs = gr.inputs.Image(type="filepath", label="Input Image")
|
|
78 |
|
79 |
# Define style
|
80 |
title = "Learning to Recognize Occluded and Small Objects with Partial Inputs"
|
81 |
-
description = "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/1512.03385' target='_blank'>Learning to Recognize Occluded and Small Objects with Partial Inputs</a> | <a href='https://github.com/hasibzunair/msl-recognition' target='_blank'>Github Repo</a></p>"
|
83 |
|
84 |
voc_classes = ("aeroplane", "bicycle", "bird", "boat", "bottle",
|
|
|
25 |
torch.backends.cudnn.deterministic = True
|
26 |
|
27 |
# Device
|
28 |
+
# Use GPU if available
|
29 |
+
if torch.cuda.is_available():
|
30 |
+
DEVICE = torch.device("cuda")
|
31 |
+
else:
|
32 |
+
DEVICE = torch.device("cpu")
|
33 |
|
34 |
# Make directories
|
35 |
os.system("mkdir ./models")
|
|
|
81 |
|
82 |
# Define style
|
83 |
title = "Learning to Recognize Occluded and Small Objects with Partial Inputs"
|
84 |
+
description = """
|
85 |
+
Try this demo for <a href="https://github.com/hasibzunair/msl-recognition">MSL</a>,
|
86 |
+
introduced in <a href="ADD_PAPER_LINK">Learning to Recognize Occluded and Small Objects with Partial Inputs</a>.
|
87 |
+
\n\n MSL aims to explicitly focus on context from neighbouring regions around
|
88 |
+
objects. Further, this also enables to learn a distribution of association across classes. Ideally to handle situations in-the-wild where only part of some object class is visible, but where us humans might readily use context to infer the classes presence.
|
89 |
+
|
90 |
+
You can use this demo to get the a list of objects present in your images.
|
91 |
+
|
92 |
+
To use it, simply upload an image of your choice and hit submit. You will get one or more names of objects present
|
93 |
+
in your images from this list: ("aeroplane", "bicycle", "bird", "boat", "bottle",
|
94 |
+
"bus", "car", "cat", "chair", "cow", "diningtable",
|
95 |
+
"dog", "horse", "motorbike", "person", "pottedplant",
|
96 |
+
"sheep", "sofa", "train", "tvmonitor")
|
97 |
+
|
98 |
+
\n\n<a href="https://hasibzunair.github.io/msl-recognition/">Project Page</a>
|
99 |
+
"""
|
100 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/1512.03385' target='_blank'>Learning to Recognize Occluded and Small Objects with Partial Inputs</a> | <a href='https://github.com/hasibzunair/msl-recognition' target='_blank'>Github Repo</a></p>"
|
101 |
|
102 |
voc_classes = ("aeroplane", "bicycle", "bird", "boat", "bottle",
|