Wildbook icon indicating copy to clipboard operation
Wildbook copied to clipboard

Subspecies is incorrectly listed as a valid IA class in Manual Annotation tool

Open JasonWildMe opened this issue 2 months ago • 0 comments

Expected Behavior Subspecies should not appear as an IA class in the Manual Anntation tool.

Current Behavior This error occurs when we allow a species and subspecies to be selectable options, such as allowing "Phoca vitulina" and "Phoca vitulina vitulina" as options. If the user sets "Phoca vitulina" as a species on an Encounter, then the Manual Annotation tool thinks that the subspecies of "vitulina" as defined in IA.json is an IA class key. This can cause matching errors because the subspecies may not be defined for matching (WBIA error) and/or may cause missed matching due to only matching against other annotations of the same class (Wildbook error).

Image Image

Example species:

  • Giraffa camelopardalis camelopardalis and Giraffa camelopardalis
  • Phoca vitulina vitulina and Phoca vitulina

The logic of IAJSONProperties.getValidIAClasses(Taxonomy taxy) needs to be modified to exclude subspecies from the returned list of IA classes. This could happen by inspection the subspecies definition for _detect_conf or some other key that clearly indicates that it is not a matchable class.

Testing Notes Fix can be tested with data from GiraffeSpotter or Seals Wildbook.

Example test for Seals Wildbooks:

  1. Set an Encounter to have species "Phoca vitulina"
  2. Try to create a manual annotation.
  3. From the IA class dropdown list, you should NOT be able to see the subspecies "vitulina" as a class option but rather just just "seal" and "seal+head".

Community link https://community.wildme.org/t/sealbook-match-bias-towards-rare-individuals/5243

JasonWildMe avatar Nov 11 '25 20:11 JasonWildMe