diff --git a/docs/hyperdatasets/webapp/webapp_datasets_frames.md b/docs/hyperdatasets/webapp/webapp_datasets_frames.md index c3602113..957aa35d 100644 --- a/docs/hyperdatasets/webapp/webapp_datasets_frames.md +++ b/docs/hyperdatasets/webapp/webapp_datasets_frames.md @@ -95,154 +95,6 @@ a dropdown list in the **Current Source** section. ![Frame dropdown menu in FrameGroup](../../img/hyperdatasets/framegroup_01.png) -## Filtering Frames -### Simple Frame Filtering - -Simple frame filtering applies one annotation object (ROI) label and returns frames containing at least one annotation -with that label. - -**To apply a simple frame filter:** - -* In the **Version Browser**, choose a label on the label list. - -For example: -* The **version browser** in the image below contains 101 frames. - -
-View a screenshot -
- - -![Unfiltered version browser](../../img/hyperdatasets/frame_filtering_01.png) - - -
-
-
- -* A simple label filter for `teddy bear` shows three frames with each containing at least one ROI labeled `teddy bear`. - -
-View a screenshot -
- -![Filtered version browser](../../img/hyperdatasets/frame_filtering_02.png) - -
-
- -### Advanced Frame Filtering - -Advanced frame filtering applies sophisticated filtering logic, which is composed of as many frame filters as needed, -where each frame filter can be a combination of ROI, frame, and source rules. -* ROI rules use include and exclude logic to match frames by ROI label; an ROI label can match frames containing at least - one annotation object (ROI) with all labels in the rule. -* Frame rules and source rules use Lucene queries with AND, OR, and NOT logic. Frame rules apply to frame metadata. -* Source rules apply to frame source information. - -**To apply advanced filters:** - -1. In the **Version Browser**, click **Switch to advanced filters**. -1. In a **FRAME FILTER**, create one of the following rules: - - * ROI rule - - * Choose **Include** or **Exclude**, select ROI labels, and optionally set the confidence level range. - - * To switch from the ROI dropdown list to a Lucene query mode, click edit pencil. - - * Frame rule - Enter a Lucene query using frame metadata fields in the format `meta.:`. - - * Source rule - Enter a Lucene query using frame metadata fields in the format `sources.:`. - -### Examples - -#### ROI Rules - - -* Create one ROI rule for the `teddy bear` label, which shows the same three frames as the simple frame filter (above). -
- View a screenshot -
- - ![Adding an ROI rule](../../img/hyperdatasets/frame_filtering_03.png) - -
-
-
- -* In the ROI rule, add a second label. Add `partially_occluded`. Only frames containing at least one ROI labeled as both - `teddy bear` and `partially_occluded` match the filter. -
- View a screenshot -
- - ![Add label to ROI rule](../../img/hyperdatasets/frame_filtering_04.png) - -
-
-
- - By opening a frame in the frame viewer, you can see an ROI labeled with both. - -
- View a screenshot -
- - ![Labeled ROIs in frame viewer](../../img/hyperdatasets/frame_filtering_05.png) - -
-
-
- - -#### Frame Rules - -Filter by metadata using Lucene queries. - -* Add a frame rule to filter by the metadata key `dangerous` for the value of `yes`. - -
- View a screenshot -
- - ![Filter by metadata ](../../img/hyperdatasets/frame_filtering_08.png) - -
-
-
- - By opening a frame in the frame viewer, you can see the metadata. - -
- View a screenshot -
- - ![Frame metadata in frame viewer](../../img/hyperdatasets/frame_filtering_09.png) - -
-
-
- - -#### Source Rules - -Filter by sources using Lucene queries. - -* Add a source rule to filter for sources URIs with wildcards. - -
- View a screenshot -
- - ![Filter by source](../../img/hyperdatasets/frame_filtering_10.png) - -
-
-
- -Lucene queries can also be used in ROI label filters and frame rules. - ## Masks Use the **MASKS** panel to select which masks to apply over the frame. diff --git a/docs/hyperdatasets/webapp/webapp_datasets_versioning.md b/docs/hyperdatasets/webapp/webapp_datasets_versioning.md index 21e90d7e..9ac981a9 100644 --- a/docs/hyperdatasets/webapp/webapp_datasets_versioning.md +++ b/docs/hyperdatasets/webapp/webapp_datasets_versioning.md @@ -93,24 +93,39 @@ Simple frame filtering returns frames containing at least one annotation with a Alternatively, a combination of ROI, frame, and source rules can be specified to apply more elaborate and specific filters. -* ROI rules use include and exclude logic to match frames by ROI label; an ROI label can match frames containing at least - one annotation object (ROI) with all labels in the rule. -* Frame rules and source rules use Lucene queries with AND, OR, and NOT logic. Frame rules apply to frame metadata. -* Source rules apply to frame source information. **To apply advanced filters:** 1. In the **FRAMES** tab, click **Advanced filters**. 1. In a **FRAME FILTER**, create one of the following rules: - * ROI rule - * Choose **Include** or **Exclude**, select ROI labels, and optionally set the confidence level range. - * To switch from the ROI dropdown list to a Lucene query mode, click Setting Gear. - * Frame rule - Enter a Lucene query using frame metadata fields in the format `meta.:`. - * Source rule - Enter a Lucene query using frame metadata fields in the format `sources.:`. + * ROI rule - Use "Include" and "Exclude" conditions to match frames by ROI label; frames match the rule when + containing at least one annotation object (ROI) with **all** labels in the rule. Click Lucene query mode + to explicitly specify your rule with Lucene + * Frame rule - Query frame metadata. Enter a Lucene query of frame metadata fields in the format `meta.:` + (can use AND, OR, and NOT operators). + * Source rule - Query frame source information. Enter a Lucene query of frame metadata fields in the format + `sources.:` (can use AND, OR, and NOT operators). + +A frame filter can contain a number of rules. For each frame filter, the rules are applied with a logical AND operator. For example, the dataset version in the image below has one filter. “Frame Filter 1” has two rules: +1. ROI rule - the frame must include an ROI with the `cat` label +2. Source rule - the frames must be 640 pixels wide. + +The returned frames are those that match the first rule AND the second rule within the frame filter. + +![Multiple rules filter](../../img/hyperdatasets/multiple_rules.png) + +Create additional frame filters by clicking Add new. +Multiple frame filters are applied with a logical OR operator. + +For example, the dataset version in the image below has two frame filters. "Frame Filter 1" has the same two rules +described in the example above. "Frame Filter 2" specifies an ROI rule for the frame to contain an ROI with the label +`dog`. So the frames returned are those that match ALL of Frame Filter 1’s rules OR ALL of Frame Filter 2’s rules. + +![Multiple filters](../../img/hyperdatasets/multiple_filters.png) To clear all filters click Clear filters. -### Filtering Examples +#### Filtering Examples
ROI Rules diff --git a/docs/img/hyperdatasets/multiple_filters.png b/docs/img/hyperdatasets/multiple_filters.png new file mode 100644 index 00000000..c756b66c Binary files /dev/null and b/docs/img/hyperdatasets/multiple_filters.png differ diff --git a/docs/img/hyperdatasets/multiple_rules.png b/docs/img/hyperdatasets/multiple_rules.png new file mode 100644 index 00000000..03c0b063 Binary files /dev/null and b/docs/img/hyperdatasets/multiple_rules.png differ