[BUG] Filtering class labels on COCO zoo dataset does NOT return samples matching the provided map #4795
Closed
1 of 3 tasks
Labels
bug
Bug fixes
Describe the problem
When loading a COCO dataset via
fiftyone.zoo.load_zoo_dataset
, providing a string or list of strings to only load samples that have at least one instance of the classes specified by the string (or list of strings) does not load samples that match that requested description.Expected Behavior
should return samples that all contain at least one instance of the class label
"cat"
.Observed Behavior
returns samples where all samples do contain at least one instance of an arbitrary common class label, which just doesn't happen to be
"cat"
. This behavior can be replicated regardless of the class label or list of class labels requested. For instance, specifying"chair"
will returnN
samples of which maybe one or two contain the label"chair"
, but allN
happen to have the common label"broccoli"
(Pictured below: selected images are the only samples that contain"chair"
Code to reproduce issue
System information
python --version
):Python 3.11.9
fiftyone --version
): Originally tested on FOT tagv2.1.0.dev28
(internal), replicated on open source FiftyOne tag0.25.1
zsh install.bash -d
Other info/logs
Source code analysis
As far as I can tell, the mapping function used to filter requested class labels does not exhibit any obvious bug.
which is what seems to be the underlying map being applied when
load_zoo_dataset
is used to import via theCOCODatasetImporter
class.Additional notes
Specifying the
only_matching
parameter asTrue
does nothing to rectify this.Willingness to contribute
The FiftyOne Community encourages bug fix contributions. Would you or another
member of your organization be willing to contribute a fix for this bug to the
FiftyOne codebase?
from the FiftyOne community
The text was updated successfully, but these errors were encountered: