update
Browse files
README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
emoji: π
|
| 4 |
colorFrom: green
|
| 5 |
colorTo: gray
|
|
@@ -10,4 +10,4 @@ pinned: false
|
|
| 10 |
license: mit
|
| 11 |
---
|
| 12 |
|
| 13 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces#reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Visual CorrespondenceHuman Study - CUB
|
| 3 |
emoji: π
|
| 4 |
colorFrom: green
|
| 5 |
colorTo: gray
|
|
|
|
| 10 |
license: mit
|
| 11 |
---
|
| 12 |
|
| 13 |
+
Check out the configuration reference at <https://huggingface.co/docs/hub/spaces#reference>
|
app.py
CHANGED
|
@@ -33,13 +33,14 @@ classifier_predictions = {}
|
|
| 33 |
selected_dataset = "CUB-iNAt-Unified"
|
| 34 |
|
| 35 |
root_visualization_dir = "./visualizations/"
|
| 36 |
-
viz_url = "https://
|
| 37 |
viz_archivefile = "CUB-Final.zip"
|
| 38 |
|
| 39 |
-
|
|
|
|
| 40 |
demonst_zipfile = "demonstrations.zip"
|
| 41 |
|
| 42 |
-
picklefile_url = "https://
|
| 43 |
prediction_root = "./predictions/"
|
| 44 |
prediction_pickle = f"{prediction_root}predictions.pickle"
|
| 45 |
|
|
@@ -365,21 +366,17 @@ def main():
|
|
| 365 |
global CLASSIFIER_TAG
|
| 366 |
|
| 367 |
# Set the session state
|
| 368 |
-
# State Management and General Setup
|
| 369 |
st.set_page_config(layout="wide")
|
| 370 |
-
st.title("
|
| 371 |
-
|
| 372 |
-
# st.write(classifier_predictions.keys())
|
| 373 |
-
# st.write(classifier_predictions["ILSVRC2012_val_00024646.JPEG"])
|
| 374 |
|
| 375 |
options = [
|
| 376 |
"Unselected",
|
| 377 |
"NOXAI",
|
| 378 |
"KNN",
|
| 379 |
-
"EMD Nearest Neighbors",
|
| 380 |
-
"EMD Correspondence",
|
| 381 |
-
"CHM Nearest Neighbors",
|
| 382 |
-
"CHM Correspondence",
|
| 383 |
]
|
| 384 |
|
| 385 |
st.markdown(
|
|
@@ -400,7 +397,6 @@ def main():
|
|
| 400 |
key="which_xai",
|
| 401 |
index=default,
|
| 402 |
)
|
| 403 |
-
# print(session_state.XAI_tool)
|
| 404 |
|
| 405 |
if session_state.XAI_tool != "Unselected":
|
| 406 |
st.markdown(f"## SELECTED METHOD ``{session_state.XAI_tool}``")
|
|
@@ -411,16 +407,16 @@ def main():
|
|
| 411 |
elif session_state.XAI_tool == "KNN":
|
| 412 |
selected_xai_tool = load_knn_nns
|
| 413 |
CLASSIFIER_TAG = "KNN"
|
| 414 |
-
elif session_state.XAI_tool == "CHM Nearest Neighbors":
|
| 415 |
selected_xai_tool = load_chm_nns
|
| 416 |
CLASSIFIER_TAG = "CHM"
|
| 417 |
-
elif session_state.XAI_tool == "CHM Correspondence":
|
| 418 |
selected_xai_tool = load_chm_corrs
|
| 419 |
CLASSIFIER_TAG = "CHM"
|
| 420 |
-
elif session_state.XAI_tool == "EMD Nearest Neighbors":
|
| 421 |
selected_xai_tool = load_emd_nns
|
| 422 |
CLASSIFIER_TAG = "EMD"
|
| 423 |
-
elif session_state.XAI_tool == "EMD Correspondence":
|
| 424 |
selected_xai_tool = load_emd_corrs
|
| 425 |
CLASSIFIER_TAG = "EMD"
|
| 426 |
|
|
|
|
| 33 |
selected_dataset = "CUB-iNAt-Unified"
|
| 34 |
|
| 35 |
root_visualization_dir = "./visualizations/"
|
| 36 |
+
viz_url = "https://drive.google.com/uc?id=1ifNYT2Jfnj61U1t144ZRE3c1PI_K89YA"
|
| 37 |
viz_archivefile = "CUB-Final.zip"
|
| 38 |
|
| 39 |
+
|
| 40 |
+
demonstration_url = "https://drive.google.com/uc?id=1YbAT-M_ZdjLlPuPPAaXbAOqYOqhAIJWs"
|
| 41 |
demonst_zipfile = "demonstrations.zip"
|
| 42 |
|
| 43 |
+
picklefile_url = "https://drive.google.com/uc?id=175CO7kfqedrmqO-3wXCN9gFFjnVhXFn8"
|
| 44 |
prediction_root = "./predictions/"
|
| 45 |
prediction_pickle = f"{prediction_root}predictions.pickle"
|
| 46 |
|
|
|
|
| 366 |
global CLASSIFIER_TAG
|
| 367 |
|
| 368 |
# Set the session state
|
|
|
|
| 369 |
st.set_page_config(layout="wide")
|
| 370 |
+
st.title("Visual CorrespondenceHuman Study - CUB")
|
|
|
|
|
|
|
|
|
|
| 371 |
|
| 372 |
options = [
|
| 373 |
"Unselected",
|
| 374 |
"NOXAI",
|
| 375 |
"KNN",
|
| 376 |
+
"EMD-Corr Nearest Neighbors",
|
| 377 |
+
"EMD-Corr Correspondence",
|
| 378 |
+
"CHM-Corr Nearest Neighbors",
|
| 379 |
+
"CHM-Corr Correspondence",
|
| 380 |
]
|
| 381 |
|
| 382 |
st.markdown(
|
|
|
|
| 397 |
key="which_xai",
|
| 398 |
index=default,
|
| 399 |
)
|
|
|
|
| 400 |
|
| 401 |
if session_state.XAI_tool != "Unselected":
|
| 402 |
st.markdown(f"## SELECTED METHOD ``{session_state.XAI_tool}``")
|
|
|
|
| 407 |
elif session_state.XAI_tool == "KNN":
|
| 408 |
selected_xai_tool = load_knn_nns
|
| 409 |
CLASSIFIER_TAG = "KNN"
|
| 410 |
+
elif session_state.XAI_tool == "CHM-Corr Nearest Neighbors":
|
| 411 |
selected_xai_tool = load_chm_nns
|
| 412 |
CLASSIFIER_TAG = "CHM"
|
| 413 |
+
elif session_state.XAI_tool == "CHM-Corr Correspondence":
|
| 414 |
selected_xai_tool = load_chm_corrs
|
| 415 |
CLASSIFIER_TAG = "CHM"
|
| 416 |
+
elif session_state.XAI_tool == "EMD-Corr Nearest Neighbors":
|
| 417 |
selected_xai_tool = load_emd_nns
|
| 418 |
CLASSIFIER_TAG = "EMD"
|
| 419 |
+
elif session_state.XAI_tool == "EMD-Corr Correspondence":
|
| 420 |
selected_xai_tool = load_emd_corrs
|
| 421 |
CLASSIFIER_TAG = "EMD"
|
| 422 |
|