WildMeOrg / Wildbook

Wild Me's first product, Wildbook supports researchers by allowing collaboration across the globe and automation of photo ID matching
https://www.wildme.org/wildbook.html
GNU General Public License v2.0
103 stars 64 forks source link

Manual submission combined with Encounter cloning causes only one algorithm to be referenced in match results when >1 are configured in IA.json #632

Open holmbergius opened 2 months ago

holmbergius commented 2 months ago

Expected Behavior When multiple annotations are detected on an image that has been manually submitted (submit.jsp route), each annotation should have all configured default=true algorithms run for matching.

Current Behavior Only one is currently displayed per annotation when clicking "match results", yet the correct number and combination are actually run in WBIA.

This is easily reproducible (see below).

Related community issues:

Testing Notes These images can help reproduce the issue. 20111104-IMG_6539 - Copy 20111104-IMG_6539

holmbergius commented 2 months ago

Progress/investigation:

if (opts.size() == 1 && annotsByIaClass.size() == 1) { newTaskParams.put("ibeis.identification", ((opts.get(0) == null) ? "DEFAULT" : opts.get(0))); topTask.setParameters(newTaskParams); tasks.add(topTask); // topTask will be used as *the*(only) task -- no children } else { **for (int i = 0; i < opts.size(); i++) {** //clustering by algorithm Task t = new Task(); t.setObjectAnnotations(annsOneIAClass); newTaskParams.put("ibeis.identification", ((opts.get(i) == null) ? "DEFAULT" : opts.get(i))); // overwrites each time t.setParameters(newTaskParams); topTask.addChild(t); tasks.add(t); } }

Clistering by algorithm causes the "match results" reference to point too low in the hierarchy tree and appear like only one algorithm was run.

holmbergius commented 2 months ago

Can reproduce via manual submission with >=2 images as well. Seems to hit the same logical block, which is unused by bulk import.