Back to blog

How to Filter and Query a Computer Vision Dataset

Updated Data management

Filter image datasets by class, tag, object count, author, issue or labeling job status, preview results live and act on them. A Supervisely filters tutorial.

How to Filter and Query a Computer Vision Dataset

Dataset filtering means selecting images by conditions such as classes, tags, object counts, authors, issues or labeling job status. Supervisely's advanced dataset filters combine conditions with logical operators, preview matches in real time and let you act on them: annotate, create a labeling job, copy, move or delete.

Filters page breakdownFilters page breakdown

What are advanced dataset filters?

They are a search and query tool inside the data management features of Supervisely. You find them on the Filter tab of an images project and in the image panel of the Image Labeling Toolbox. The docs on data filtration state the main points:

  • Self-explanatory, for beginners and data scientists alike.
  • Real-time results, built for datasets with millions of images and annotations.
  • A quick preview with main statistics.
  • Predefined presets for common tasks.
  • Actions on the filtered result: copy, move, delete, create labeling jobs, annotate.

Filters are one step in a bigger flow. The same docs list pipelines that combine data management, augmentation, filtering and neural network operations in over 150 nodes, and collections for custom selections of data.

How do I use filters step by step?

The filters guide in the docs has the same steps. This 3-minute video shows them.

  1. Open the images project and go to the Filter tab. All images sit in one table with statistics in columns.
  2. Pick a predefined filter, or click Filter to open the configuration window.
  3. Add conditions on datasets, names, image and object tags, classes, assignees, issues or labeling job status. Include or exclude criteria and set ranges on the number of objects.
  4. Click Apply and preview the matching images.
  5. Select images and act on them.

Example: images with the tag validation that have more than 5 objects of class plant.

Instant Pascal VOC 2012 dataset filtering with preview of search results

When you start annotating after applying filters, the toolbox opens with only the matching images. You label the most relevant data first.

Quick data preview in Image Annotation ToolQuick data preview in Image Annotation Tool

Which filters are available: presets vs custom conditions?

Use a ready-made preset for common tasks, or build conditions yourself.

PresetWhat it findsUse it to
All ImagesEvery image in the projectBrowse the data
With one object or moreImages with at least one objectSee what is already labeled
UnlabeledImages without objectsFind images that need labeling
Has IssuesImages with problems that a reviewer reportedFix wrong labels and outliers
Labeled by meImages labeled by the current userGo back to your own work
Custom filterWhat it finds
Images NameImages by name pattern, including regular expressions
Images TagImages with a given tag or tag value
Images Tags AuthorImages tagged by a given author
Images Without AnnotationsImages with no labels
Objects ClassObjects of a chosen class
Objects TagObjects with a given tag or value
Objects AuthorObjects labeled by a given author
IssuesImages with annotation problems
Labeling JobImages in a job with a given status: pending, annotated, accepted or rejected

Preconfigured filters and customizable filter parametersPreconfigured filters and customizable filter parameters

Even simple sorting helps. Sort by last update to follow fresh labeling, by objects count to find crowded or empty images, filter by dataset, or search by name.

Sorting data by columns
Filter by datasets and quickly annotate the filtering results

What can I do with filtered results?

Find unique data by combining filters

Suppose you need images from the "train" dataset of Pascal VOC that contain buses and cars together: at most 5 buses and at least 1 car.

  1. Apply a simple filter for the "train" dataset.
  2. Add a filter for buses and set the maximum to 5.
  3. Add a filter for cars and set the minimum to 1.
  4. Press Apply and review the results.

Combining filters to search for object classes "bus" and "car" in specific quantitiesCombining filters to search for object classes "bus" and "car" in specific quantities

Manage big datasets without scripts

Filter, then merge the result into a new labeling job, move it, or send it to review. Annotation managers do this in a few clicks instead of writing API scripts. For the API route, see the SDK and API.

Creating a new labeling job from unannotated images

Explore model predictions

Predictions of a detection model saved to a project carry a Confidence tag from 0 to 1. A filter such as "Confidence < 0.5" shows the least certain boxes. Review them to see where the model fails, or delete them. You can also use filters for exploratory data analysis, to spot outliers and likely labeling errors, to sample smaller training sets, or to build splits for K-fold cross-validation. To search images by meaning instead of metadata, see OpenAI CLIP for image retrieval.

Searching for images in the training dataset with a low threshold and removing them

Track labeling jobs and quality

Filter by labeling job status and combine it with other conditions. Images with the rejected status may need review. The status of each image in a job is visible, and a click on the status opens statistics on job activity, labeling time per object and total labeling time. Per-image tables show time in the tool, editing time and objects count. Read more on team collaboration with labeling queues and on quality assurance and interactive statistics.

Image job status and move to statistics by labeling jobImage job status and move to statistics by labeling job

Filters by annotated images that have an issue

Create jobs and copy or move data

Select multiple images to create labeling jobs or delete unneeded data. Copy or move images with annotations from the results to other datasets.

Applying actions to images of tomatoes from different datasetsApplying actions to images of tomatoes from different datasets

Saved or reused filtered subsets can change as the data does.

How do I assign classes and tags faster while labeling?

Filters find the right images. The Definitions Panel speeds up labeling them. It is part of the image labeling toolbox, and the toolbox docs describe it.

How classes and tags worked before

Classes and tags live in the Definitions tab of a project and give you consistent labels.

Definitions TabDefinitions Tab

Before, you defined classes and tags, opened the labeling interface and picked a tool (polygon, brush) first. Only classes that match the tool shape appeared in the dropdown. After each annotation you pressed SPACE to start a new one. Tags needed several clicks in the object or image properties.

Selecting a class in the object properties (old way)Selecting a class in the object properties (old way)

Click a class, start labeling

With the Definitions Panel you click a class first. The matching tool is selected and you can start at once. Click any class, including the selected one, to start a new label. To change the class of the selected object, click the small icon on its right. It shows only if the new class has the same shape as the selected object. Tags are on the same panel: with no object selected you see image tags, and you can check a tag or type its value.

Selecting a class in the definitions panel (new way)Selecting a class in the definitions panel (new way)

Single-choice tags can show as a dropdown, or as a vertical or horizontal radio list. With a short list, one click assigns the value.

Example of a vertical radio listExample of a vertical radio list

For long lists, the magnifying glass in the top right corner opens quick search. Type, then click the class or tag.

Searching a long list of classes in the Definitions PanelSearching a long list of classes in the Definitions Panel

You can still choose the tool first if you prefer. The Definitions Panel is available in the image labeling toolbox.

Pair filters with labeling jobs to distribute the work, consensus to measure agreement, and dataset versioning to keep track of training sets. For teams that run on their own infrastructure, see the enterprise page. You can try filters on your datasets in the free Community Edition.

Frequently asked questions

What is dataset filtering in computer vision?

Dataset filtering selects images by conditions on the images, the annotations or the workflow, for example images with a tag, images with more than 5 objects of a class, or images from a rejected labeling job. You use the result to review data, build a training set or start labeling.

Which criteria can I filter on in Supervisely?

Datasets, image names (including regular expressions), image tags, tag authors, object classes, object tags, object authors, issues, labeling job status, number of objects, and date and time. You can combine them into groups with logical operators.

How do I find unlabeled images?

Use the predefined Unlabeled preset (images without any objects) or sort the project table by objects count to see images with zero objects first. Then select them and create a labeling job.

Can I filter images by model confidence?

Yes. Object detection predictions saved to a project carry a Confidence tag with a value from 0 to 1. Filter with a condition such as Confidence below 0.5 to review the least certain predictions or to remove them.

Do filters work on large datasets?

Supervisely says filters run in real time and are built for datasets with millions of images and annotations. See the Data Filtration page in the docs.

What is the Definitions Panel?

The Definitions Panel in the image labeling toolbox lists the classes and tags of a project. You click a class to select the matching tool and start a new label, or click the small icon next to a class to change the class of the selected object. Tags are on the same panel.

More from the blog

All posts