Commit
·
9b0c7a0
1
Parent(s):
8997343
updates
Browse files
app.py
CHANGED
@@ -114,6 +114,8 @@ col1, col2 = st.columns([5,1])
|
|
114 |
|
115 |
with col1:
|
116 |
|
|
|
|
|
117 |
current_image=ds[st.session_state["img"]]['image'].resize(size=(512,512))
|
118 |
draw = ImageDraw.Draw(current_image)
|
119 |
|
@@ -145,7 +147,7 @@ with col1:
|
|
145 |
with scol2:
|
146 |
st.button('Find similar parts', on_click=find)
|
147 |
|
148 |
-
st.write("Currently viewing frame "+str(random_i[st.session_state["img"]%20])+" in batch "+str(st.session_state["img"]//20))
|
149 |
|
150 |
#st.write(st.session_state["img"])
|
151 |
#st.write(st.session_state["point"])
|
@@ -156,14 +158,10 @@ with col2:
|
|
156 |
for i in range(4):
|
157 |
|
158 |
if i==0:
|
159 |
-
st.write("
|
160 |
-
|
161 |
-
st.write("
|
162 |
-
|
163 |
-
st.write("Second best match found in batch "+str(st.session_state["sideix"][i]))#//(gridsize**2)//20))
|
164 |
-
if i==3:
|
165 |
-
st.write("Third best match found in batch "+str(st.session_state["sideix"][i]))#//(gridsize**2)//20))
|
166 |
-
|
167 |
st.image(st.session_state["sideimg"][i].resize((128,128)))
|
168 |
|
169 |
#st.write(st.session_state["sideix"][i])
|
@@ -171,9 +169,9 @@ with col2:
|
|
171 |
"The batch indexing machine shakes parts while recording a video."
|
172 |
"The machine processed 20 batches of random parts, with each batch running for 30 seconds."
|
173 |
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
|
178 |
"The model is trained completely unsupervised using a CNN with a custom contrastive loss. Open source code to be released soon. "
|
179 |
|
|
|
114 |
|
115 |
with col1:
|
116 |
|
117 |
+
|
118 |
+
|
119 |
current_image=ds[st.session_state["img"]]['image'].resize(size=(512,512))
|
120 |
draw = ImageDraw.Draw(current_image)
|
121 |
|
|
|
147 |
with scol2:
|
148 |
st.button('Find similar parts', on_click=find)
|
149 |
|
150 |
+
#st.write("Currently viewing frame "+str(random_i[st.session_state["img"]%20])+" in batch "+str(st.session_state["img"]//20))
|
151 |
|
152 |
#st.write(st.session_state["img"])
|
153 |
#st.write(st.session_state["point"])
|
|
|
158 |
for i in range(4):
|
159 |
|
160 |
if i==0:
|
161 |
+
st.write("Target in batch "+str(st.session_state["sideix"][i]))#//(gridsize**2)//20))
|
162 |
+
else:
|
163 |
+
st.write("Match #"+str(i)+" in batch "+str(st.session_state["sideix"][i]))#//(gridsize**2)//20))
|
164 |
+
|
|
|
|
|
|
|
|
|
165 |
st.image(st.session_state["sideimg"][i].resize((128,128)))
|
166 |
|
167 |
#st.write(st.session_state["sideix"][i])
|
|
|
169 |
"The batch indexing machine shakes parts while recording a video."
|
170 |
"The machine processed 20 batches of random parts, with each batch running for 30 seconds."
|
171 |
|
172 |
+
"INSCTRUCTIONS:"
|
173 |
+
"Click in the image to set target part"
|
174 |
+
"Click “Find similar parts” to find the best matches in other batches"
|
175 |
|
176 |
"The model is trained completely unsupervised using a CNN with a custom contrastive loss. Open source code to be released soon. "
|
177 |
|