Spaces:
Running
Running
Silvia Terragni
commited on
Commit
·
1977c6a
1
Parent(s):
aacfe19
rephrasing
Browse files- localization.py +5 -4
localization.py
CHANGED
@@ -112,9 +112,10 @@ def app():
|
|
112 |
how the similarity to the image description changes. If you want to have a look at the implementation in details
|
113 |
you can find it in [this Colab](https://colab.research.google.com/drive/10neENr1DEAFq_GzsLqBDo0gZ50hOhkOr?usp=sharing).
|
114 |
|
115 |
-
On the two parameters:
|
116 |
-
|
117 |
-
|
|
|
118 |
Too many will shrink the heatmap too much.
|
119 |
|
120 |
|
@@ -162,7 +163,7 @@ def app():
|
|
162 |
st.error("Please choose one image and at least one label")
|
163 |
else:
|
164 |
with st.spinner("Computing... This might take up to a few minutes depending on the current load 😕 \n"
|
165 |
-
"[Colab
|
166 |
heatmap, image = get_heatmap(image_url, caption, pixel_size, iterations)
|
167 |
|
168 |
with col1:
|
|
|
112 |
how the similarity to the image description changes. If you want to have a look at the implementation in details
|
113 |
you can find it in [this Colab](https://colab.research.google.com/drive/10neENr1DEAFq_GzsLqBDo0gZ50hOhkOr?usp=sharing).
|
114 |
|
115 |
+
On the two parameters:
|
116 |
+
+ the *pixel size* defines the resolution of the localization map. A pixel size of 15 means
|
117 |
+
that 15 pixels in the original image will form 1 pixel in the heatmap.
|
118 |
+
+ The *refinement iterations* are just a cheap operation to reduce background noise. Too few iterations will leave a lot of noise.
|
119 |
Too many will shrink the heatmap too much.
|
120 |
|
121 |
|
|
|
163 |
st.error("Please choose one image and at least one label")
|
164 |
else:
|
165 |
with st.spinner("Computing... This might take up to a few minutes depending on the current load 😕 \n"
|
166 |
+
"Otherwise, you can use this [Colab notebook](https://colab.research.google.com/drive/10neENr1DEAFq_GzsLqBDo0gZ50hOhkOr?usp=sharing)"):
|
167 |
heatmap, image = get_heatmap(image_url, caption, pixel_size, iterations)
|
168 |
|
169 |
with col1:
|