Spaces:
Sleeping
Sleeping
winfred2027
commited on
Commit
•
3cf4d1d
1
Parent(s):
e6dd343
Update app.py
Browse files
app.py
CHANGED
@@ -117,8 +117,8 @@ def retrieval_pc(load_data, k, sim_th, filter_fn):
|
|
117 |
pc = load_data(prog)
|
118 |
prog.progress(0.5, "Computing Embeddings")
|
119 |
col2 = utils.render_pc(pc)
|
120 |
-
ref_dev = next(
|
121 |
-
enc =
|
122 |
if model_name == "pb-sn-M":
|
123 |
enc = pc_adapter(enc)
|
124 |
sim = torch.matmul(torch.nn.functional.normalize(lvis.feats, dim=-1), torch.nn.functional.normalize(enc.cpu(), dim=-1).squeeze())
|
@@ -237,6 +237,7 @@ try:
|
|
237 |
if st.sidebar.button("submit"):
|
238 |
classification_custom(load_data, cats)
|
239 |
elif task == "Cross-modal retrieval":
|
|
|
240 |
input_mode = st.sidebar.selectbox(
|
241 |
'Choose an input modality',
|
242 |
("Point Cloud", "Image", "Text")
|
|
|
117 |
pc = load_data(prog)
|
118 |
prog.progress(0.5, "Computing Embeddings")
|
119 |
col2 = utils.render_pc(pc)
|
120 |
+
ref_dev = next(model_retrieval.parameters()).device
|
121 |
+
enc = model_retrieval(torch.tensor(pc[:, [0, 2, 1, 3, 4, 5]].T[None], device=ref_dev))
|
122 |
if model_name == "pb-sn-M":
|
123 |
enc = pc_adapter(enc)
|
124 |
sim = torch.matmul(torch.nn.functional.normalize(lvis.feats, dim=-1), torch.nn.functional.normalize(enc.cpu(), dim=-1).squeeze())
|
|
|
237 |
if st.sidebar.button("submit"):
|
238 |
classification_custom(load_data, cats)
|
239 |
elif task == "Cross-modal retrieval":
|
240 |
+
model_retrieval = load_tripletmix('tripletmix-pointbert-all-objaverse')
|
241 |
input_mode = st.sidebar.selectbox(
|
242 |
'Choose an input modality',
|
243 |
("Point Cloud", "Image", "Text")
|