Details
Filter Expression Overview
The Deep Learning filter grammar allows you to write expressions that will evaluate to a Boolean, integer, or floating point value for each view in the current stream database.
View-Level and Axis-Level Variables
The filter grammar includes variables that are defined for views. You use these simply by including them in an expression that evaluates to a Boolean result :
- width > 1500 // Filter to views with width greater than 1500
In addition to view-level variables, the grammar also supports tool-specific axis-level variables that you can to filter views based on the presence, absence, or values of individual markings, labels, and other view elements. Blue tool views, for example, include a feature axis for filtering based on individual features in the view. Axis-level filters are entered within square brackets following the axis name :
- feature[score > 0.95] // Filter to views containing a feature with score greater than 0.95
Where Filter Expressions can be Used in ViDi Suite/ VisionPro Deep Learning
The following table summarizes the contexts in which filter expressions are available. Some of them can also be used during runtime to filter results :
| Notes | Runtime setting | |
View Browser - Display Filter and Sort Filter ![]() | Display Filter:
Sort Filter:
| No |
| ROI definition (Upstream Blue Tool and Green Tool) | Following a Blue Locate tool :
![]() Following a Green Classify tool :
![]() | Yes |
Region Filter (Red Tool) ![]() | Red Analyze tool :
| Yes |
Feature Filter (Blue Tool) ![]() | Blue Locate tool :
| Yes |
Database Overview Filter (Expert Mode only) ![]() |
|
Filter Grammar
- https://community.cognex.com/support/s/article/filter-literal-values
- https://community.cognex.com/support/s/article/deep-learning-filter-grammar-filter-built-in-variables-generic-view
- https://community.cognex.com/support/s/article/deep-learning-filter-grammar-built-in-variables-tool-specific-view-level-variables
- https://community.cognex.com/support/s/article/deep-learning-filter-grammar-built-in-variables-axis-level-variables
- https://community.cognex.com/support/s/article/Deep-Learning-Filter-Grammar-Operators
- https://community.cognex.com/support/s/article/deep-learning-filter-grammar-regular-expressions-in-filters





