Spaces:
Sleeping
Sleeping
update embeddings from resnet model
Browse files- all_fossils_filtered_100.csv +0 -0
- app.py +1 -1
- closest_sample.py +4 -4
- embedding_fossils_142_finer.npy +3 -0
all_fossils_filtered_100.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
app.py
CHANGED
@@ -329,7 +329,7 @@ with gr.Blocks(theme='sudeepshouche/minimalist') as demo:
|
|
329 |
|
330 |
with gr.Column():
|
331 |
model_name = gr.Dropdown(
|
332 |
-
["Mummified 170", "Rock 170","Fossils
|
333 |
multiselect=False,
|
334 |
value="Fossils 142", # default option
|
335 |
label="Model",
|
|
|
329 |
|
330 |
with gr.Column():
|
331 |
model_name = gr.Dropdown(
|
332 |
+
["Fossils 142"],#"Mummified 170", "Rock 170","Fossils BEiT" removed
|
333 |
multiselect=False,
|
334 |
value="Fossils 142", # default option
|
335 |
label="Model",
|
closest_sample.py
CHANGED
@@ -18,9 +18,9 @@ if not os.path.exists('dataset'):
|
|
18 |
snapshot_download(repo_id=REPO_ID, token=token,repo_type='dataset',local_dir='dataset')
|
19 |
|
20 |
|
21 |
-
fossils_pd= pd.read_csv('
|
22 |
|
23 |
-
def pca_distance(pca,sample,embedding,top_k):
|
24 |
"""
|
25 |
Args:
|
26 |
pca:fitted PCA model
|
@@ -62,7 +62,7 @@ def get_images(embedding,model_name):
|
|
62 |
elif model_name in ['Fossils 142']:
|
63 |
pca_fossils = pk.load(open('pca_fossils_142_resnet.pkl','rb'))
|
64 |
pca_leaves = pk.load(open('pca_leaves_142_resnet.pkl','rb'))
|
65 |
-
embedding_fossils = np.load('dataset/
|
66 |
#embedding_leaves = np.load('embedding_leaves.npy')
|
67 |
else:
|
68 |
print(f'{model_name} not recognized')
|
@@ -110,7 +110,7 @@ def get_diagram(embedding,top_k,model_name):
|
|
110 |
elif model_name in ['Fossils 142']:
|
111 |
pca_fossils = pk.load(open('pca_fossils_142_resnet.pkl','rb'))
|
112 |
pca_leaves = pk.load(open('pca_leaves_142_resnet.pkl','rb'))
|
113 |
-
embedding_fossils = np.load('dataset/
|
114 |
#embedding_leaves = np.load('embedding_leaves.npy')
|
115 |
else:
|
116 |
print(f'{model_name} not recognized')
|
|
|
18 |
snapshot_download(repo_id=REPO_ID, token=token,repo_type='dataset',local_dir='dataset')
|
19 |
|
20 |
|
21 |
+
fossils_pd= pd.read_csv('all_fossils_filtered_100.csv')
|
22 |
|
23 |
+
def pca_distance(pca,sample,embedding,top_k):
|
24 |
"""
|
25 |
Args:
|
26 |
pca:fitted PCA model
|
|
|
62 |
elif model_name in ['Fossils 142']:
|
63 |
pca_fossils = pk.load(open('pca_fossils_142_resnet.pkl','rb'))
|
64 |
pca_leaves = pk.load(open('pca_leaves_142_resnet.pkl','rb'))
|
65 |
+
embedding_fossils = np.load('dataset/embedding_fossils_142_finer.npy')
|
66 |
#embedding_leaves = np.load('embedding_leaves.npy')
|
67 |
else:
|
68 |
print(f'{model_name} not recognized')
|
|
|
110 |
elif model_name in ['Fossils 142']:
|
111 |
pca_fossils = pk.load(open('pca_fossils_142_resnet.pkl','rb'))
|
112 |
pca_leaves = pk.load(open('pca_leaves_142_resnet.pkl','rb'))
|
113 |
+
embedding_fossils = np.load('dataset/embedding_fossils_142_finer.npy')
|
114 |
#embedding_leaves = np.load('embedding_leaves.npy')
|
115 |
else:
|
116 |
print(f'{model_name} not recognized')
|
embedding_fossils_142_finer.npy
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:284a9154c60e41c9d912c0f2e335ea01c6741e88bc779cb4c9e09e8ec05baf29
|
3 |
+
size 28172416
|