justinkay commited on
Commit
3496b5b
·
1 Parent(s): 672baca

Update text content

Browse files
Files changed (1) hide show
  1. app.py +39 -10
app.py CHANGED
@@ -80,7 +80,7 @@ def create_species_guide_content():
80
  gr.Image("species_id/jaguar.jpg", label="Jaguar example image", show_label=False)
81
 
82
  gr.Markdown("""
83
- The largest cat in the Americas, with a stocky, muscular build and a broad head; its golden coat is patterned with rosettes that often have central spots inside.
84
 
85
  ----
86
 
@@ -91,7 +91,7 @@ def create_species_guide_content():
91
  gr.Image("species_id/ocelot.jpg", label="Ocelot example image", show_label=False)
92
 
93
  gr.Markdown("""
94
- A medium-sized spotted cat about twice the size of a domestic cat, with a slender body, large eyes, and striking chain-link or stripe-like rosettes. It differs from jaguars by its smaller size, leaner build, and more elongated markings.
95
 
96
  ----
97
 
@@ -101,7 +101,7 @@ def create_species_guide_content():
101
  gr.Image("species_id/mountainlion.jpg", label="Mountain lion example image", show_label=False)
102
 
103
  gr.Markdown("""
104
- Also called cougar or puma, this cat has a plain tawny or grayish coat without spots or rosettes. Its long tail and uniformly colored fur distinguish it from jaguars and ocelots.
105
 
106
  ----
107
 
@@ -112,7 +112,7 @@ def create_species_guide_content():
112
  gr.Image("species_id/commoneland.jpg", label="Eland example image", show_label=False)
113
 
114
  gr.Markdown("""
115
- The largest antelope species, with a robust body, spiraled horns on both sexes, and a characteristic dewlap hanging from the throat. It differs from waterbuck by its lighter tan coat, faint body stripes, and massive size.
116
 
117
  ----
118
 
@@ -122,7 +122,7 @@ def create_species_guide_content():
122
  gr.Image("species_id/waterbuck.jpg", label="Waterbuck example image", show_label=False)
123
 
124
  gr.Markdown("""
125
- A shaggy, dark brown antelope recognized by its white rump ring and backward-curving horns in males. Smaller and darker than the common eland, waterbuck prefer wet habitats and lack the eland's throat dewlap.
126
 
127
  ----
128
 
@@ -837,20 +837,32 @@ with gr.Blocks(title="CODA: Wildlife Photo Classification Challenge",
837
  gr.Markdown("""
838
  ## CODA Model Selection Probabilities
839
 
840
- This chart shows CODA's current confidence in each candidate model being the best performer.
841
 
842
  **How to read this chart:**
843
- - Each bar represents one of the candidate machine learning models
844
  - The height of each bar shows the probability (0-100%) that this model is the best, according to CODA
845
  - The orange bar indicates CODA's current best guess
846
  - As you provide more labels, CODA updates these probabilities
847
 
848
  **What you'll see:**
849
- - CODA initializes these probabilities based on each model's agreement with the consensus, providing informative priors
 
850
  - As you label images, some models will gain confidence while others lose it
851
  - The goal is for one model to clearly emerge as the winner
852
 
 
 
 
 
 
 
 
 
 
 
853
  """)
 
854
  prob_help_close = gr.Button("Close", variant="secondary")
855
 
856
  with gr.Group(visible=False, elem_classes="help-popup-overlay") as acc_help_popup:
@@ -877,10 +889,27 @@ with gr.Blocks(title="CODA: Wildlife Photo Classification Challenge",
877
  with gr.Group(visible=False, elem_classes="help-popup-overlay") as selection_help_popup:
878
  with gr.Group(elem_classes="help-popup-content"):
879
  gr.Markdown("""
880
- ## How CODA Selects Images for Labeling
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
881
 
882
- [Placeholder]
883
  """)
 
 
884
  selection_help_close = gr.Button("Close", variant="secondary")
885
 
886
  # Species guide popup during demo
 
80
  gr.Image("species_id/jaguar.jpg", label="Jaguar example image", show_label=False)
81
 
82
  gr.Markdown("""
83
+ #### The largest cat in the Americas, with a stocky, muscular build and a broad head. Coat is patterned with rosettes that often have central spots inside.
84
 
85
  ----
86
 
 
91
  gr.Image("species_id/ocelot.jpg", label="Ocelot example image", show_label=False)
92
 
93
  gr.Markdown("""
94
+ #### Smaller and leaner than a jaguar, with more elongated markings and rounder ears.
95
 
96
  ----
97
 
 
101
  gr.Image("species_id/mountainlion.jpg", label="Mountain lion example image", show_label=False)
102
 
103
  gr.Markdown("""
104
+ #### Also called cougar or puma, this cat has a plain tawny or grayish coat without spots. Its long tail and uniformly colored fur distinguish it from jaguars and ocelots.
105
 
106
  ----
107
 
 
112
  gr.Image("species_id/commoneland.jpg", label="Eland example image", show_label=False)
113
 
114
  gr.Markdown("""
115
+ ### The largest antelope species. Identifiable by its spiraled horns on both sexes. Lighter tan coat than a waterbuck.
116
 
117
  ----
118
 
 
122
  gr.Image("species_id/waterbuck.jpg", label="Waterbuck example image", show_label=False)
123
 
124
  gr.Markdown("""
125
+ #### A shaggy, dark brown antelope. Identifiable by backward-curving horns in males, no horns on females. Larger, rounder ears and darker coat than the common eland.
126
 
127
  ----
128
 
 
837
  gr.Markdown("""
838
  ## CODA Model Selection Probabilities
839
 
840
+ This chart shows CODA's current confidence in each candidate classifier being the best performer.
841
 
842
  **How to read this chart:**
843
+ - Each bar represents one of the candidate machine learning classifiers
844
  - The height of each bar shows the probability (0-100%) that this model is the best, according to CODA
845
  - The orange bar indicates CODA's current best guess
846
  - As you provide more labels, CODA updates these probabilities
847
 
848
  **What you'll see:**
849
+ - CODA initializes these probabilities based on each classifier's agreement with the consensus votes of *all* classifiers,
850
+ providing informative priors
851
  - As you label images, some models will gain confidence while others lose it
852
  - The goal is for one model to clearly emerge as the winner
853
 
854
+ More details can be found in [the paper](https://www.arxiv.org/abs/2507.23771)!
855
+
856
+ **What models are these?**
857
+
858
+ For this demo, we selected 5 zero-shot classifiers that would be reasonable choices for someone who
859
+ wanted to classify wildlife imagery. The models are: facebook/PE-Core-L14-336,
860
+ google/siglip2-so400m-patch16-naflex, openai/clip-vit-large-patch14, imageomics/bioclip-2, and
861
+ laion/CLIP-ViT-L-14-laion2B-s32B-b82K. Our goal is not to make any general claims about the performance
862
+ of these models but rather to provide a realistic set of candidates for demonstrating CODA.
863
+
864
  """)
865
+ gr.HTML("<div style='margin-top: 0.1em;'></div>")
866
  prob_help_close = gr.Button("Close", variant="secondary")
867
 
868
  with gr.Group(visible=False, elem_classes="help-popup-overlay") as acc_help_popup:
 
889
  with gr.Group(visible=False, elem_classes="help-popup-overlay") as selection_help_popup:
890
  with gr.Group(elem_classes="help-popup-content"):
891
  gr.Markdown("""
892
+ ## How CODA selects images for labeling
893
+
894
+ CODA selects images that best differentiate top-performing classifiers from each other. It
895
+ does this by constructing a probabilistic model of which classifier is best (see
896
+ the plot at the bottom-left). Each iteration, CODA selects an image to be labeled
897
+ based on how much a label for that image is expected to affect the probabilistic model.
898
+
899
+ Intuitively, CODA will select images where the top classifiers disagree, since knowing the ground truth for these images will provide
900
+ the most information about which classifier is best overall.
901
+
902
+ More details can be found in [the paper](https://www.arxiv.org/abs/2507.23771)!
903
+
904
+ **What data is this?**
905
+
906
+ We selected a subset of 5 species from the iWildcam dataset, and subsampled a dataset of ~500 images for this demo.
907
+ Each refresh will generate a slightly different subset, leading to slightly different model selection
908
+ performance.
909
 
 
910
  """)
911
+ gr.HTML("<div style='margin-top: 0.1em;'></div>")
912
+
913
  selection_help_close = gr.Button("Close", variant="secondary")
914
 
915
  # Species guide popup during demo