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

New model layout, deleted a few redundant images

Browse files
app.py CHANGED
@@ -53,9 +53,11 @@ NAME_TO_CLASS_IDX = {name: idx for idx, name in enumerate(CLASS_NAMES)}
53
 
54
  # Model information from models.txt
55
  MODEL_INFO = [
 
56
  {"org": "Google", "name": "SigLIP2", "logo": "logos/google.png"},
57
  {"org": "OpenAI", "name": "CLIPViT-L", "logo": "logos/openai.png"},
58
- {"org": "Imageomics", "name": "BioCLIP", "logo": "logos/imageomics.png"}
 
59
  ]
60
 
61
  DEMO_LEARNING_RATE = 0.05 # don't use default; use something more fun
@@ -205,7 +207,7 @@ def add_logo_to_x_axis(ax, x_pos, logo_path, model_name, height_px=35):
205
  imagebox = OffsetImage(img, zoom=zoom)
206
 
207
  # Position logo to the left of the x-tick
208
- logo_offset = -0.2 # Adjust this to move logo left/right relative to tick
209
  y_offset = -0.08
210
  ab = AnnotationBbox(imagebox, (x_pos + logo_offset, y_offset),
211
  xycoords=('data', 'axes fraction'), frameon=False)
@@ -333,7 +335,7 @@ def create_probability_chart():
333
  else:
334
  probs_tensor = coda_selector.get_pbest()
335
  probabilities = probs_tensor.detach().cpu().numpy().flatten()
336
- model_labels = [" " + info['name'] for info in MODEL_INFO[:len(probabilities)]]
337
 
338
  # Find the index of the highest probability
339
  best_idx = np.argmax(probabilities)
@@ -397,7 +399,9 @@ def create_accuracy_chart():
397
  confusion_matrices.append(conf_matrix)
398
 
399
  # Create subplots for each model
400
- fig, axes = plt.subplots(1, num_models, figsize=(8, 2.8), dpi=150)
 
 
401
  if num_models == 1:
402
  axes = [axes]
403
 
 
53
 
54
  # Model information from models.txt
55
  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
 
207
  imagebox = OffsetImage(img, zoom=zoom)
208
 
209
  # Position logo to the left of the x-tick
210
+ logo_offset = -0.28 # Adjust this to move logo left/right relative to tick
211
  y_offset = -0.08
212
  ab = AnnotationBbox(imagebox, (x_pos + logo_offset, y_offset),
213
  xycoords=('data', 'axes fraction'), frameon=False)
 
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)
 
399
  confusion_matrices.append(conf_matrix)
400
 
401
  # Create subplots for each model
402
+ # Adjust width based on number of models (2.4 inches per model works well)
403
+ fig_width = num_models * 2.4
404
+ fig, axes = plt.subplots(1, num_models, figsize=(fig_width, 2.8), dpi=150)
405
  if num_models == 1:
406
  axes = [axes]
407
 
images.txt CHANGED
@@ -1,5 +1,4 @@
1
  92ef0bc6-21bc-11ea-a13a-137349068a90.jpg
2
- 89e3a9c4-21bc-11ea-a13a-137349068a90.jpg
3
  902e0068-21bc-11ea-a13a-137349068a90.jpg
4
  8bbbf896-21bc-11ea-a13a-137349068a90.jpg
5
  8caf22be-21bc-11ea-a13a-137349068a90.jpg
@@ -188,11 +187,8 @@
188
  8f4dd7f4-21bc-11ea-a13a-137349068a90.jpg
189
  8f88c6e8-21bc-11ea-a13a-137349068a90.jpg
190
  8aaabb04-21bc-11ea-a13a-137349068a90.jpg
191
- 8768fa28-21bc-11ea-a13a-137349068a90.jpg
192
- 9505e7fe-21bc-11ea-a13a-137349068a90.jpg
193
  8f337b16-21bc-11ea-a13a-137349068a90.jpg
194
  8f20690e-21bc-11ea-a13a-137349068a90.jpg
195
- 92789e50-21bc-11ea-a13a-137349068a90.jpg
196
  8bf1327c-21bc-11ea-a13a-137349068a90.jpg
197
  8c7ef620-21bc-11ea-a13a-137349068a90.jpg
198
  92b99fb8-21bc-11ea-a13a-137349068a90.jpg
@@ -886,7 +882,6 @@
886
  8a9d3d26-21bc-11ea-a13a-137349068a90.jpg
887
  91bea306-21bc-11ea-a13a-137349068a90.jpg
888
  98027508-21bc-11ea-a13a-137349068a90.jpg
889
- 93ca69e6-21bc-11ea-a13a-137349068a90.jpg
890
  8a31dad6-21bc-11ea-a13a-137349068a90.jpg
891
  8f803276-21bc-11ea-a13a-137349068a90.jpg
892
  92ae2b6a-21bc-11ea-a13a-137349068a90.jpg
@@ -1034,7 +1029,6 @@
1034
  949d098c-21bc-11ea-a13a-137349068a90.jpg
1035
  8fd985d8-21bc-11ea-a13a-137349068a90.jpg
1036
  91785bee-21bc-11ea-a13a-137349068a90.jpg
1037
- 8d76206c-21bc-11ea-a13a-137349068a90.jpg
1038
  88e4a06e-21bc-11ea-a13a-137349068a90.jpg
1039
  8c0f47a8-21bc-11ea-a13a-137349068a90.jpg
1040
  929f0432-21bc-11ea-a13a-137349068a90.jpg
 
1
  92ef0bc6-21bc-11ea-a13a-137349068a90.jpg
 
2
  902e0068-21bc-11ea-a13a-137349068a90.jpg
3
  8bbbf896-21bc-11ea-a13a-137349068a90.jpg
4
  8caf22be-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
 
882
  8a9d3d26-21bc-11ea-a13a-137349068a90.jpg
883
  91bea306-21bc-11ea-a13a-137349068a90.jpg
884
  98027508-21bc-11ea-a13a-137349068a90.jpg
 
885
  8a31dad6-21bc-11ea-a13a-137349068a90.jpg
886
  8f803276-21bc-11ea-a13a-137349068a90.jpg
887
  92ae2b6a-21bc-11ea-a13a-137349068a90.jpg
 
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
iwildcam_demo.pt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:22671a83d662556a98fe14daaa122da9e9a22f9f08e24c7c2a4467c58fc3d206
3
- size 128467
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:759d1ee32793a1f160d5f6a8ca75f71c7ce9f9cfc3889e59bdf395e729b49061
3
+ size 127891
iwildcam_demo_annotations.json CHANGED
@@ -11,17 +11,6 @@
11
  "file_name": "92ef0bc6-21bc-11ea-a13a-137349068a90.jpg",
12
  "seq_frame_num": 0
13
  },
14
- {
15
- "seq_num_frames": 10,
16
- "location": 372,
17
- "datetime": "2015-02-11 01:13:30.000",
18
- "id": "89e3a9c4-21bc-11ea-a13a-137349068a90",
19
- "seq_id": "302f54e0-7d42-11eb-8fb5-0242ac1c0002",
20
- "width": 1920,
21
- "height": 1080,
22
- "file_name": "89e3a9c4-21bc-11ea-a13a-137349068a90.jpg",
23
- "seq_frame_num": 1
24
- },
25
  {
26
  "seq_num_frames": 10,
27
  "location": 372,
@@ -2166,28 +2155,6 @@
2166
  "file_name": "8aaabb04-21bc-11ea-a13a-137349068a90.jpg",
2167
  "seq_frame_num": 4
2168
  },
2169
- {
2170
- "seq_num_frames": 10,
2171
- "location": 151,
2172
- "datetime": "2013-02-03 01:47:56.000",
2173
- "id": "8768fa28-21bc-11ea-a13a-137349068a90",
2174
- "seq_id": "302607f0-7d42-11eb-8fb5-0242ac1c0002",
2175
- "width": 1920,
2176
- "height": 1080,
2177
- "file_name": "8768fa28-21bc-11ea-a13a-137349068a90.jpg",
2178
- "seq_frame_num": 5
2179
- },
2180
- {
2181
- "seq_num_frames": 10,
2182
- "location": 151,
2183
- "datetime": "2013-02-03 01:48:26.000",
2184
- "id": "9505e7fe-21bc-11ea-a13a-137349068a90",
2185
- "seq_id": "302607f0-7d42-11eb-8fb5-0242ac1c0002",
2186
- "width": 1920,
2187
- "height": 1080,
2188
- "file_name": "9505e7fe-21bc-11ea-a13a-137349068a90.jpg",
2189
- "seq_frame_num": 6
2190
- },
2191
  {
2192
  "seq_num_frames": 10,
2193
  "location": 151,
@@ -2210,17 +2177,6 @@
2210
  "file_name": "8f20690e-21bc-11ea-a13a-137349068a90.jpg",
2211
  "seq_frame_num": 8
2212
  },
2213
- {
2214
- "seq_num_frames": 10,
2215
- "location": 151,
2216
- "datetime": "2013-02-03 01:49:12.000",
2217
- "id": "92789e50-21bc-11ea-a13a-137349068a90",
2218
- "seq_id": "302607f0-7d42-11eb-8fb5-0242ac1c0002",
2219
- "width": 1920,
2220
- "height": 1080,
2221
- "file_name": "92789e50-21bc-11ea-a13a-137349068a90.jpg",
2222
- "seq_frame_num": 9
2223
- },
2224
  {
2225
  "seq_num_frames": 10,
2226
  "location": 408,
@@ -10111,17 +10067,6 @@
10111
  "file_name": "98027508-21bc-11ea-a13a-137349068a90.jpg",
10112
  "seq_frame_num": 0
10113
  },
10114
- {
10115
- "seq_num_frames": 6,
10116
- "location": 261,
10117
- "datetime": "2013-01-22 23:58:11.000",
10118
- "id": "93ca69e6-21bc-11ea-a13a-137349068a90",
10119
- "seq_id": "980276ac-21bc-11ea-a13a-137349068a90",
10120
- "width": 1920,
10121
- "height": 1080,
10122
- "file_name": "93ca69e6-21bc-11ea-a13a-137349068a90.jpg",
10123
- "seq_frame_num": 1
10124
- },
10125
  {
10126
  "seq_num_frames": 6,
10127
  "location": 261,
@@ -11793,17 +11738,6 @@
11793
  "file_name": "91785bee-21bc-11ea-a13a-137349068a90.jpg",
11794
  "seq_frame_num": 0
11795
  },
11796
- {
11797
- "seq_num_frames": 10,
11798
- "location": 151,
11799
- "datetime": "2013-02-03 01:49:13.000",
11800
- "id": "8d76206c-21bc-11ea-a13a-137349068a90",
11801
- "seq_id": "302608ae-7d42-11eb-8fb5-0242ac1c0002",
11802
- "width": 1920,
11803
- "height": 1080,
11804
- "file_name": "8d76206c-21bc-11ea-a13a-137349068a90.jpg",
11805
- "seq_frame_num": 0
11806
- },
11807
  {
11808
  "seq_num_frames": 10,
11809
  "location": 151,
@@ -17872,16 +17806,6 @@
17872
  "image_id": "8aaabb04-21bc-11ea-a13a-137349068a90",
17873
  "category_id": 101
17874
  },
17875
- {
17876
- "id": "9aa54646-21bc-11ea-a13a-137349068a90",
17877
- "image_id": "8768fa28-21bc-11ea-a13a-137349068a90",
17878
- "category_id": 101
17879
- },
17880
- {
17881
- "id": "9cf35c76-21bc-11ea-a13a-137349068a90",
17882
- "image_id": "9505e7fe-21bc-11ea-a13a-137349068a90",
17883
- "category_id": 101
17884
- },
17885
  {
17886
  "id": "9e29cd1e-21bc-11ea-a13a-137349068a90",
17887
  "image_id": "8f337b16-21bc-11ea-a13a-137349068a90",
@@ -17892,16 +17816,6 @@
17892
  "image_id": "8f20690e-21bc-11ea-a13a-137349068a90",
17893
  "category_id": 101
17894
  },
17895
- {
17896
- "id": "a2bf592a-21bc-11ea-a13a-137349068a90",
17897
- "image_id": "92789e50-21bc-11ea-a13a-137349068a90",
17898
- "category_id": 101
17899
- },
17900
- {
17901
- "id": "a16d237c-21bc-11ea-a13a-137349068a90",
17902
- "image_id": "8d76206c-21bc-11ea-a13a-137349068a90",
17903
- "category_id": 101
17904
- },
17905
  {
17906
  "id": "9dd98098-21bc-11ea-a13a-137349068a90",
17907
  "image_id": "88e4a06e-21bc-11ea-a13a-137349068a90",
@@ -18092,11 +18006,6 @@
18092
  "image_id": "98027508-21bc-11ea-a13a-137349068a90",
18093
  "category_id": 101
18094
  },
18095
- {
18096
- "id": "9a89691c-21bc-11ea-a13a-137349068a90",
18097
- "image_id": "93ca69e6-21bc-11ea-a13a-137349068a90",
18098
- "category_id": 101
18099
- },
18100
  {
18101
  "id": "9fafba7c-21bc-11ea-a13a-137349068a90",
18102
  "image_id": "8a31dad6-21bc-11ea-a13a-137349068a90",
@@ -18717,11 +18626,6 @@
18717
  "image_id": "92ef0bc6-21bc-11ea-a13a-137349068a90",
18718
  "category_id": 102
18719
  },
18720
- {
18721
- "id": "9fa8440e-21bc-11ea-a13a-137349068a90",
18722
- "image_id": "89e3a9c4-21bc-11ea-a13a-137349068a90",
18723
- "category_id": 102
18724
- },
18725
  {
18726
  "id": "9d1c56c6-21bc-11ea-a13a-137349068a90",
18727
  "image_id": "902e0068-21bc-11ea-a13a-137349068a90",
 
11
  "file_name": "92ef0bc6-21bc-11ea-a13a-137349068a90.jpg",
12
  "seq_frame_num": 0
13
  },
 
 
 
 
 
 
 
 
 
 
 
14
  {
15
  "seq_num_frames": 10,
16
  "location": 372,
 
2155
  "file_name": "8aaabb04-21bc-11ea-a13a-137349068a90.jpg",
2156
  "seq_frame_num": 4
2157
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2158
  {
2159
  "seq_num_frames": 10,
2160
  "location": 151,
 
2177
  "file_name": "8f20690e-21bc-11ea-a13a-137349068a90.jpg",
2178
  "seq_frame_num": 8
2179
  },
 
 
 
 
 
 
 
 
 
 
 
2180
  {
2181
  "seq_num_frames": 10,
2182
  "location": 408,
 
10067
  "file_name": "98027508-21bc-11ea-a13a-137349068a90.jpg",
10068
  "seq_frame_num": 0
10069
  },
 
 
 
 
 
 
 
 
 
 
 
10070
  {
10071
  "seq_num_frames": 6,
10072
  "location": 261,
 
11738
  "file_name": "91785bee-21bc-11ea-a13a-137349068a90.jpg",
11739
  "seq_frame_num": 0
11740
  },
 
 
 
 
 
 
 
 
 
 
 
11741
  {
11742
  "seq_num_frames": 10,
11743
  "location": 151,
 
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",
 
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",
 
18006
  "image_id": "98027508-21bc-11ea-a13a-137349068a90",
18007
  "category_id": 101
18008
  },
 
 
 
 
 
18009
  {
18010
  "id": "9fafba7c-21bc-11ea-a13a-137349068a90",
18011
  "image_id": "8a31dad6-21bc-11ea-a13a-137349068a90",
 
18626
  "image_id": "92ef0bc6-21bc-11ea-a13a-137349068a90",
18627
  "category_id": 102
18628
  },
 
 
 
 
 
18629
  {
18630
  "id": "9d1c56c6-21bc-11ea-a13a-137349068a90",
18631
  "image_id": "902e0068-21bc-11ea-a13a-137349068a90",
iwildcam_demo_images/8768fa28-21bc-11ea-a13a-137349068a90.jpg DELETED

Git LFS Details

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

Git LFS Details

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

Git LFS Details

  • SHA256: 25272ab6109d35d2a8851ccc4afdf7536c540c9bbde6965c213b69b51ec1c9e9
  • Pointer size: 131 Bytes
  • Size of remote file: 139 kB
iwildcam_demo_images/92789e50-21bc-11ea-a13a-137349068a90.jpg DELETED

Git LFS Details

  • SHA256: 06fd7c6525cd4b968ea67d8892cc40509d2c475230cd51a286eb99a63c77ecdb
  • Pointer size: 131 Bytes
  • Size of remote file: 248 kB
iwildcam_demo_images/93ca69e6-21bc-11ea-a13a-137349068a90.jpg DELETED

Git LFS Details

  • SHA256: 670858a92847ee519a3db974df3b08a3b72d38deeed2741093333db80c8fc68c
  • Pointer size: 131 Bytes
  • Size of remote file: 225 kB
iwildcam_demo_images/9505e7fe-21bc-11ea-a13a-137349068a90.jpg DELETED

Git LFS Details

  • SHA256: d2107a7a7ae267ba3eee846d3f4c4eea342de9ee979999b8f57abb8117a11434
  • Pointer size: 131 Bytes
  • Size of remote file: 253 kB
iwildcam_demo_labels.pt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:67935d5cd3e5616d16f1105afdfdb936b5fc3bacd6fba733584efc2c2a951b90
3
  size 11780
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b5f8668a25d29e6dc28d62d3f08ee66aa5288db056a076fd3a1da32ae696d7dd
3
  size 11780