TheProjectsGuy commited on
Commit
baccfc0
1 Parent(s): 3afc677

Added examples for GeM tSNE

Browse files
.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

  • SHA256: eb76bd6b8c049008365f5f667af5cefb822fcf32d96390462c6e78dbfaeaebf0
  • Pointer size: 132 Bytes
  • Size of remote file: 4.07 MB
ex_dining_room.jpeg ADDED

Git LFS Details

  • SHA256: ad23bc398553746add7f7d7c1cf77239d4ba4888e734e155db39f343f76ca375
  • Pointer size: 131 Bytes
  • Size of remote file: 292 kB
ex_manhattan_aerial.jpeg ADDED

Git LFS Details

  • SHA256: e7cf44c33fd89e862030f262e26b3b418db97e417c3d83e79d60d7c70760c550
  • Pointer size: 131 Bytes
  • Size of remote file: 330 kB