justinkay commited on
Commit
7569088
·
1 Parent(s): 46632d2

Cleaned up a few more images and plot labels

Browse files
app.py CHANGED
@@ -56,8 +56,8 @@ MODEL_INFO = [
56
  {"org": "Facebook", "name": "PE-Core", "logo": "logos/meta.png"},
57
  {"org": "Google", "name": "SigLIP2", "logo": "logos/google.png"},
58
  {"org": "OpenAI", "name": "CLIPViT-L", "logo": "logos/openai.png"},
59
- {"org": "Imageomics", "name": "BioCLIP", "logo": "logos/imageomics.png"},
60
- {"org": "LAION", "name": "CLIP-L", "logo": "logos/laion.png"}
61
  ]
62
 
63
  DEMO_LEARNING_RATE = 0.05 # don't use default; use something more fun
@@ -203,7 +203,7 @@ def add_logo_to_x_axis(ax, x_pos, logo_path, model_name, height_px=35):
203
  img = mpimg.imread(logo_path)
204
  # Calculate zoom to achieve desired height in pixels
205
  # Rough conversion: height_px / image_height / dpi * 72
206
- zoom = height_px / img.shape[0] / ax.figure.dpi * 72
207
  imagebox = OffsetImage(img, zoom=zoom)
208
 
209
  # Position logo to the left of the x-tick
@@ -335,7 +335,7 @@ def create_probability_chart():
335
  else:
336
  probs_tensor = coda_selector.get_pbest()
337
  probabilities = probs_tensor.detach().cpu().numpy().flatten()
338
- model_labels = [" "*(3 + len(info['name'])//4) + info['name'] for info in MODEL_INFO[:len(probabilities)]]
339
 
340
  # Find the index of the highest probability
341
  best_idx = np.argmax(probabilities)
 
56
  {"org": "Facebook", "name": "PE-Core", "logo": "logos/meta.png"},
57
  {"org": "Google", "name": "SigLIP2", "logo": "logos/google.png"},
58
  {"org": "OpenAI", "name": "CLIPViT-L", "logo": "logos/openai.png"},
59
+ {"org": "Imageomics", "name": "BioCLIP2", "logo": "logos/imageomics.png"},
60
+ {"org": "LAION", "name": "LAION CLIP", "logo": "logos/laion.png"}
61
  ]
62
 
63
  DEMO_LEARNING_RATE = 0.05 # don't use default; use something more fun
 
203
  img = mpimg.imread(logo_path)
204
  # Calculate zoom to achieve desired height in pixels
205
  # Rough conversion: height_px / image_height / dpi * 72
206
+ zoom = height_px / min(img.shape[0],img.shape[1]) / ax.figure.dpi * 72
207
  imagebox = OffsetImage(img, zoom=zoom)
208
 
209
  # Position logo to the left of the x-tick
 
335
  else:
336
  probs_tensor = coda_selector.get_pbest()
337
  probabilities = probs_tensor.detach().cpu().numpy().flatten()
338
+ model_labels = [" "*(9 if info['name']=='LAION CLIP' else 4 if info['name']=='SigLIP2' else 6) + info['name'] for info in MODEL_INFO[:len(probabilities)]]
339
 
340
  # Find the index of the highest probability
341
  best_idx = np.argmax(probabilities)
images.txt CHANGED
@@ -184,11 +184,6 @@
184
  943a1a20-21bc-11ea-a13a-137349068a90.jpg
185
  8ba23eec-21bc-11ea-a13a-137349068a90.jpg
186
  98536d82-21bc-11ea-a13a-137349068a90.jpg
187
- 8f4dd7f4-21bc-11ea-a13a-137349068a90.jpg
188
- 8f88c6e8-21bc-11ea-a13a-137349068a90.jpg
189
- 8aaabb04-21bc-11ea-a13a-137349068a90.jpg
190
- 8f337b16-21bc-11ea-a13a-137349068a90.jpg
191
- 8f20690e-21bc-11ea-a13a-137349068a90.jpg
192
  8bf1327c-21bc-11ea-a13a-137349068a90.jpg
193
  8c7ef620-21bc-11ea-a13a-137349068a90.jpg
194
  92b99fb8-21bc-11ea-a13a-137349068a90.jpg
@@ -1029,7 +1024,6 @@
1029
  949d098c-21bc-11ea-a13a-137349068a90.jpg
1030
  8fd985d8-21bc-11ea-a13a-137349068a90.jpg
1031
  91785bee-21bc-11ea-a13a-137349068a90.jpg
1032
- 88e4a06e-21bc-11ea-a13a-137349068a90.jpg
1033
  8c0f47a8-21bc-11ea-a13a-137349068a90.jpg
1034
  929f0432-21bc-11ea-a13a-137349068a90.jpg
1035
  936d1ef8-21bc-11ea-a13a-137349068a90.jpg
@@ -1167,7 +1161,6 @@
1167
  8a581728-21bc-11ea-a13a-137349068a90.jpg
1168
  93589a82-21bc-11ea-a13a-137349068a90.jpg
1169
  9460bfcc-21bc-11ea-a13a-137349068a90.jpg
1170
- 94de280e-21bc-11ea-a13a-137349068a90.jpg
1171
  8697e94c-21bc-11ea-a13a-137349068a90.jpg
1172
  937a22f6-21bc-11ea-a13a-137349068a90.jpg
1173
  88612ad6-21bc-11ea-a13a-137349068a90.jpg
 
184
  943a1a20-21bc-11ea-a13a-137349068a90.jpg
185
  8ba23eec-21bc-11ea-a13a-137349068a90.jpg
186
  98536d82-21bc-11ea-a13a-137349068a90.jpg
 
 
 
 
 
187
  8bf1327c-21bc-11ea-a13a-137349068a90.jpg
188
  8c7ef620-21bc-11ea-a13a-137349068a90.jpg
189
  92b99fb8-21bc-11ea-a13a-137349068a90.jpg
 
1024
  949d098c-21bc-11ea-a13a-137349068a90.jpg
1025
  8fd985d8-21bc-11ea-a13a-137349068a90.jpg
1026
  91785bee-21bc-11ea-a13a-137349068a90.jpg
 
1027
  8c0f47a8-21bc-11ea-a13a-137349068a90.jpg
1028
  929f0432-21bc-11ea-a13a-137349068a90.jpg
1029
  936d1ef8-21bc-11ea-a13a-137349068a90.jpg
 
1161
  8a581728-21bc-11ea-a13a-137349068a90.jpg
1162
  93589a82-21bc-11ea-a13a-137349068a90.jpg
1163
  9460bfcc-21bc-11ea-a13a-137349068a90.jpg
 
1164
  8697e94c-21bc-11ea-a13a-137349068a90.jpg
1165
  937a22f6-21bc-11ea-a13a-137349068a90.jpg
1166
  88612ad6-21bc-11ea-a13a-137349068a90.jpg
iwildcam_demo.pt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:759d1ee32793a1f160d5f6a8ca75f71c7ce9f9cfc3889e59bdf395e729b49061
3
- size 127891
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa01d98dedd17fda7e2451e48884409f725a4e0c10c9066139b7ebcfb4724592
3
+ size 127187
iwildcam_demo_annotations.json CHANGED
@@ -2122,61 +2122,6 @@
2122
  "file_name": "98536d82-21bc-11ea-a13a-137349068a90.jpg",
2123
  "seq_frame_num": 0
2124
  },
2125
- {
2126
- "seq_num_frames": 10,
2127
- "location": 151,
2128
- "datetime": "2013-02-03 01:47:15.000",
2129
- "id": "8f4dd7f4-21bc-11ea-a13a-137349068a90",
2130
- "seq_id": "302607f0-7d42-11eb-8fb5-0242ac1c0002",
2131
- "width": 1920,
2132
- "height": 1080,
2133
- "file_name": "8f4dd7f4-21bc-11ea-a13a-137349068a90.jpg",
2134
- "seq_frame_num": 1
2135
- },
2136
- {
2137
- "seq_num_frames": 10,
2138
- "location": 151,
2139
- "datetime": "2013-02-03 01:47:15.000",
2140
- "id": "8f88c6e8-21bc-11ea-a13a-137349068a90",
2141
- "seq_id": "302607f0-7d42-11eb-8fb5-0242ac1c0002",
2142
- "width": 1920,
2143
- "height": 1080,
2144
- "file_name": "8f88c6e8-21bc-11ea-a13a-137349068a90.jpg",
2145
- "seq_frame_num": 2
2146
- },
2147
- {
2148
- "seq_num_frames": 10,
2149
- "location": 151,
2150
- "datetime": "2013-02-03 01:47:55.000",
2151
- "id": "8aaabb04-21bc-11ea-a13a-137349068a90",
2152
- "seq_id": "302607f0-7d42-11eb-8fb5-0242ac1c0002",
2153
- "width": 1920,
2154
- "height": 1080,
2155
- "file_name": "8aaabb04-21bc-11ea-a13a-137349068a90.jpg",
2156
- "seq_frame_num": 4
2157
- },
2158
- {
2159
- "seq_num_frames": 10,
2160
- "location": 151,
2161
- "datetime": "2013-02-03 01:48:27.000",
2162
- "id": "8f337b16-21bc-11ea-a13a-137349068a90",
2163
- "seq_id": "302607f0-7d42-11eb-8fb5-0242ac1c0002",
2164
- "width": 1920,
2165
- "height": 1080,
2166
- "file_name": "8f337b16-21bc-11ea-a13a-137349068a90.jpg",
2167
- "seq_frame_num": 7
2168
- },
2169
- {
2170
- "seq_num_frames": 10,
2171
- "location": 151,
2172
- "datetime": "2013-02-03 01:48:28.000",
2173
- "id": "8f20690e-21bc-11ea-a13a-137349068a90",
2174
- "seq_id": "302607f0-7d42-11eb-8fb5-0242ac1c0002",
2175
- "width": 1920,
2176
- "height": 1080,
2177
- "file_name": "8f20690e-21bc-11ea-a13a-137349068a90.jpg",
2178
- "seq_frame_num": 8
2179
- },
2180
  {
2181
  "seq_num_frames": 10,
2182
  "location": 408,
@@ -11738,17 +11683,6 @@
11738
  "file_name": "91785bee-21bc-11ea-a13a-137349068a90.jpg",
11739
  "seq_frame_num": 0
11740
  },
11741
- {
11742
- "seq_num_frames": 10,
11743
- "location": 151,
11744
- "datetime": "2013-02-03 01:49:15.000",
11745
- "id": "88e4a06e-21bc-11ea-a13a-137349068a90",
11746
- "seq_id": "302608ae-7d42-11eb-8fb5-0242ac1c0002",
11747
- "width": 1920,
11748
- "height": 1080,
11749
- "file_name": "88e4a06e-21bc-11ea-a13a-137349068a90.jpg",
11750
- "seq_frame_num": 1
11751
- },
11752
  {
11753
  "seq_num_frames": 10,
11754
  "location": 151,
@@ -13328,18 +13262,6 @@
13328
  "sub_location": 1,
13329
  "seq_frame_num": 0
13330
  },
13331
- {
13332
- "seq_num_frames": 5,
13333
- "location": 8,
13334
- "datetime": "2013-07-30 09:37:19.000",
13335
- "id": "94de280e-21bc-11ea-a13a-137349068a90",
13336
- "seq_id": "30060996-7d42-11eb-8fb5-0242ac1c0002",
13337
- "width": 1280,
13338
- "height": 1024,
13339
- "file_name": "94de280e-21bc-11ea-a13a-137349068a90.jpg",
13340
- "sub_location": 1,
13341
- "seq_frame_num": 1
13342
- },
13343
  {
13344
  "seq_num_frames": 5,
13345
  "location": 449,
@@ -17791,36 +17713,6 @@
17791
  "image_id": "98536d82-21bc-11ea-a13a-137349068a90",
17792
  "category_id": 101
17793
  },
17794
- {
17795
- "id": "9be77f60-21bc-11ea-a13a-137349068a90",
17796
- "image_id": "8f4dd7f4-21bc-11ea-a13a-137349068a90",
17797
- "category_id": 101
17798
- },
17799
- {
17800
- "id": "9e763bcc-21bc-11ea-a13a-137349068a90",
17801
- "image_id": "8f88c6e8-21bc-11ea-a13a-137349068a90",
17802
- "category_id": 101
17803
- },
17804
- {
17805
- "id": "a36c4fd6-21bc-11ea-a13a-137349068a90",
17806
- "image_id": "8aaabb04-21bc-11ea-a13a-137349068a90",
17807
- "category_id": 101
17808
- },
17809
- {
17810
- "id": "9e29cd1e-21bc-11ea-a13a-137349068a90",
17811
- "image_id": "8f337b16-21bc-11ea-a13a-137349068a90",
17812
- "category_id": 101
17813
- },
17814
- {
17815
- "id": "9dfeeb94-21bc-11ea-a13a-137349068a90",
17816
- "image_id": "8f20690e-21bc-11ea-a13a-137349068a90",
17817
- "category_id": 101
17818
- },
17819
- {
17820
- "id": "9dd98098-21bc-11ea-a13a-137349068a90",
17821
- "image_id": "88e4a06e-21bc-11ea-a13a-137349068a90",
17822
- "category_id": 101
17823
- },
17824
  {
17825
  "id": "9a4e46d4-21bc-11ea-a13a-137349068a90",
17826
  "image_id": "8c0f47a8-21bc-11ea-a13a-137349068a90",
@@ -19171,11 +19063,6 @@
19171
  "image_id": "950ccbc8-21bc-11ea-a13a-137349068a90",
19172
  "category_id": 24
19173
  },
19174
- {
19175
- "id": "9a83e816-21bc-11ea-a13a-137349068a90",
19176
- "image_id": "94de280e-21bc-11ea-a13a-137349068a90",
19177
- "category_id": 24
19178
- },
19179
  {
19180
  "id": "9ce2b9f2-21bc-11ea-a13a-137349068a90",
19181
  "image_id": "8ce13b82-21bc-11ea-a13a-137349068a90",
 
2122
  "file_name": "98536d82-21bc-11ea-a13a-137349068a90.jpg",
2123
  "seq_frame_num": 0
2124
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2125
  {
2126
  "seq_num_frames": 10,
2127
  "location": 408,
 
11683
  "file_name": "91785bee-21bc-11ea-a13a-137349068a90.jpg",
11684
  "seq_frame_num": 0
11685
  },
 
 
 
 
 
 
 
 
 
 
 
11686
  {
11687
  "seq_num_frames": 10,
11688
  "location": 151,
 
13262
  "sub_location": 1,
13263
  "seq_frame_num": 0
13264
  },
 
 
 
 
 
 
 
 
 
 
 
 
13265
  {
13266
  "seq_num_frames": 5,
13267
  "location": 449,
 
17713
  "image_id": "98536d82-21bc-11ea-a13a-137349068a90",
17714
  "category_id": 101
17715
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17716
  {
17717
  "id": "9a4e46d4-21bc-11ea-a13a-137349068a90",
17718
  "image_id": "8c0f47a8-21bc-11ea-a13a-137349068a90",
 
19063
  "image_id": "950ccbc8-21bc-11ea-a13a-137349068a90",
19064
  "category_id": 24
19065
  },
 
 
 
 
 
19066
  {
19067
  "id": "9ce2b9f2-21bc-11ea-a13a-137349068a90",
19068
  "image_id": "8ce13b82-21bc-11ea-a13a-137349068a90",
iwildcam_demo_images/88e4a06e-21bc-11ea-a13a-137349068a90.jpg DELETED

Git LFS Details

  • SHA256: ed534d332506ac676222623b600a62421f06b857a30b854b1f2d6a94417486e0
  • Pointer size: 131 Bytes
  • Size of remote file: 136 kB
iwildcam_demo_images/8aaabb04-21bc-11ea-a13a-137349068a90.jpg DELETED

Git LFS Details

  • SHA256: a2afd025e051a0e09dd6899c5df8b12b76fdb909461ae1e34d44786fa43ae11e
  • Pointer size: 131 Bytes
  • Size of remote file: 251 kB
iwildcam_demo_images/8f20690e-21bc-11ea-a13a-137349068a90.jpg DELETED

Git LFS Details

  • SHA256: 06c1955953c7a498d30e8f3b9973fefd6c9afd8d13de6594c2bb90a218b6ef92
  • Pointer size: 131 Bytes
  • Size of remote file: 249 kB
iwildcam_demo_images/8f337b16-21bc-11ea-a13a-137349068a90.jpg DELETED

Git LFS Details

  • SHA256: 3ed7d7420acd9f520a2e05c6368e0bb6214c7109e3d6569dedc838c38ad7ee51
  • Pointer size: 131 Bytes
  • Size of remote file: 250 kB
iwildcam_demo_images/8f4dd7f4-21bc-11ea-a13a-137349068a90.jpg DELETED

Git LFS Details

  • SHA256: 6e05e5a39683e8b21f4406a2ce5920269e65c17567edd5ef37abda1e8d3ab1d4
  • Pointer size: 131 Bytes
  • Size of remote file: 254 kB
iwildcam_demo_images/8f88c6e8-21bc-11ea-a13a-137349068a90.jpg DELETED

Git LFS Details

  • SHA256: 30bc59ad9fc62f22a106b05c44e83f7aee404f0ad01ea200707e194f9babfbbc
  • Pointer size: 131 Bytes
  • Size of remote file: 254 kB
iwildcam_demo_images/94de280e-21bc-11ea-a13a-137349068a90.jpg DELETED

Git LFS Details

  • SHA256: ae5c289205a902bf4f1000f917c4de144f83f944eea7c4ab12967cfd9a67c612
  • Pointer size: 130 Bytes
  • Size of remote file: 90 kB
iwildcam_demo_labels.pt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b5f8668a25d29e6dc28d62d3f08ee66aa5288db056a076fd3a1da32ae696d7dd
3
- size 11780
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3dd5cc82e424bd177ba9ff7e7c4a03e8cd8e4251e95c9f72db4c6148b14f1958
3
+ size 11716