Spaces:
Runtime error
Runtime error
TheProjectsGuy
commited on
Commit
•
baccfc0
1
Parent(s):
3afc677
Added examples for GeM tSNE
Browse files- .gitattributes +1 -0
- app.py +25 -1
- ex_city_road.jpeg +3 -0
- ex_dining_room.jpeg +3 -0
- ex_manhattan_aerial.jpeg +3 -0
.gitattributes
CHANGED
@@ -35,3 +35,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
*.png filter=lfs diff=lfs merge=lfs -text
|
37 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
|
|
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
*.png filter=lfs diff=lfs merge=lfs -text
|
37 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
38 |
+
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
app.py
CHANGED
@@ -45,7 +45,8 @@ applications are included
|
|
45 |
domain for loading VLAD cluster centers (vocabulary).
|
46 |
|
47 |
We do **not** save any images uploaded to the demo. Some errors may \
|
48 |
-
leave a log. We do not collect any information about the user.
|
|
|
49 |
|
50 |
🥳 Thanks to HuggingFace for providing a free GPU for this demo.
|
51 |
|
@@ -518,6 +519,16 @@ def tab_gem_tsne():
|
|
518 |
|
519 |
bttn1 = gr.Button("Click Me!")
|
520 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
521 |
# ---- Main pipeline ----
|
522 |
# Get the tSNE plot
|
523 |
bttn1.click(get_gem_descs_cache, dms, [out_msg1, gem_descs])\
|
@@ -562,6 +573,15 @@ with gr.Blocks() as demo:
|
|
562 |
Enter the number of images to upload and upload images. \
|
563 |
Then click the button to get the t-SNE plot.
|
564 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
565 |
""")
|
566 |
tab_gem_tsne()
|
567 |
|
@@ -579,6 +599,10 @@ with gr.Blocks() as demo:
|
|
579 |
the bottom) to load the data and then click the button \
|
580 |
to get the cluster assignment images.
|
581 |
|
|
|
|
|
|
|
|
|
582 |
""")
|
583 |
tab_cluster_viz()
|
584 |
|
|
|
45 |
domain for loading VLAD cluster centers (vocabulary).
|
46 |
|
47 |
We do **not** save any images uploaded to the demo. Some errors may \
|
48 |
+
leave a log. We do not collect any information about the user. The \
|
49 |
+
example images are attributed in the respective tabs.
|
50 |
|
51 |
🥳 Thanks to HuggingFace for providing a free GPU for this demo.
|
52 |
|
|
|
519 |
|
520 |
bttn1 = gr.Button("Click Me!")
|
521 |
|
522 |
+
# ---- Examples ----
|
523 |
+
gr.Examples(
|
524 |
+
[
|
525 |
+
["./ex_dining_room.jpeg", "./ex_city_road.jpeg"],
|
526 |
+
["./ex_manhattan_aerial.jpeg", "./ex_city_road.jpeg"],
|
527 |
+
["./ex_dining_room.jpeg", "./ex_manhattan_aerial.jpeg"],
|
528 |
+
],
|
529 |
+
[*imgs],
|
530 |
+
)
|
531 |
+
|
532 |
# ---- Main pipeline ----
|
533 |
# Get the tSNE plot
|
534 |
bttn1.click(get_gem_descs_cache, dms, [out_msg1, gem_descs])\
|
|
|
573 |
Enter the number of images to upload and upload images. \
|
574 |
Then click the button to get the t-SNE plot.
|
575 |
|
576 |
+
You can also directly click on one of the examples (at \
|
577 |
+
the bottom) to load the data and then click the button \
|
578 |
+
to get the t-SNE plot.
|
579 |
+
|
580 |
+
The examples have the following images
|
581 |
+
- [Manhattan aerial view](https://www.crushpixel.com/stock-photo/aerial-view-midtown-manhattan-849717.html)
|
582 |
+
- [Dining room](https://homesfeed.com/formal-dining-room-sets-for-8/)
|
583 |
+
- [City road](https://pxhere.com/en/photo/824211)
|
584 |
+
|
585 |
""")
|
586 |
tab_gem_tsne()
|
587 |
|
|
|
599 |
the bottom) to load the data and then click the button \
|
600 |
to get the cluster assignment images.
|
601 |
|
602 |
+
- The `aerial` example is from the Tartan Air dataset
|
603 |
+
- The `indoor` example is from the 17Places dataset
|
604 |
+
- The `urban` example is from the Oxford dataset
|
605 |
+
|
606 |
""")
|
607 |
tab_cluster_viz()
|
608 |
|
ex_city_road.jpeg
ADDED
Git LFS Details
|
ex_dining_room.jpeg
ADDED
Git LFS Details
|
ex_manhattan_aerial.jpeg
ADDED
Git LFS Details
|