Small edits (#1042)
Some checks are pending
CI / build (push) Waiting to run

This commit is contained in:
pollfly
2025-02-17 09:37:26 +02:00
committed by GitHub
parent 4d17794600
commit 43b0d9bae7
6 changed files with 34 additions and 3 deletions

View File

@@ -146,6 +146,8 @@ You can retrieve the Dataview frames using [`DataView.to_list()`](../references/
This example uses an ROI query to filter for frames containing at least one ROI with the label `cat`:
```python
from allegroai import DataView, IterationOrder
# Create a Dataview object for an iterator that randomly returns frames according to queries
myDataView = DataView(iteration_order=IterationOrder.random, iteration_infinite=False)
@@ -166,6 +168,8 @@ list_of_frames = myDataView.to_list()
This example uses an ROI query to filter for frames containing at least one ROI with either the label `cat` OR the label `dog`:
```python
from allegroai import DataView
# Add a query for a Dataset version
myDataView.add_query(
dataset_name='myDataset',
@@ -189,6 +193,8 @@ list_of_frames = myDataView.to_list()
This example uses an ROI query to filter for frames containing at least one ROI with both the label `Car` AND the label `partly_occluded`:
```python
from allegroai import DataView
# Add a query for a Dataset version
myDataView.add_query(
dataset_name='myDataset',
@@ -207,6 +213,8 @@ This example uses an ROI query to filter for frames containing at least one ROI
have the label `partly_occluded`:
```python
from allegroai import DataView
# Add a query for a Dataset version
# Use a Lucene Query
# "label" is a key in the rois dictionary of a frame
@@ -229,6 +237,8 @@ ROI with the label `Person`. The example demonstrates using the `roi_queries` pa
with a list of [`DataView.RoiQuery`](../references/hyperdataset/dataview.md#roiquery) objects:
```python
from allegroai import DataView
myDataview = DataView()
myDataview.add_multi_query(
dataset_id=self._dataset_id,
@@ -247,6 +257,8 @@ contain ROIs with the label `Person`. To exclude an ROI, pass `must_not=True` in
object.
```python
from allegroai import DataView
myDataview = DataView()
myDataview.add_multi_query(
dataset_id=self._dataset_id,
@@ -266,6 +278,8 @@ This example demonstrates an ROI query filtering for frames containing the ROI l
from two versions of one Dataset, and one version of another Dataset:
```python
from allegroai import DataView
# Add queries:
# The 1st Dataset version
@@ -310,6 +324,8 @@ They use the same logical OR, AND, NOT AND matching as ROI queries.
This example demonstrates a frame query filtering for frames containing the meta key `city` value of `bremen`:
```python
from allegroai import DataView
# Add a frame query for frames with the meta key "city" value of "bremen"
myDataView.add_query(
dataset_name='myDataset',
@@ -388,6 +404,8 @@ This example demonstrates creating a Dataview and setting its parameters to iter
manually terminated:
```python
from allegroai import DataView, IterationOrder
# Create a Dataview object for an iterator that returns frames
myDataView = DataView()
@@ -399,6 +417,8 @@ myDataView.set_iteration_parameters(order=IterationOrder.random, infinite=True)
This example demonstrates creating a DataView and setting its parameters to iterate and return all frames matching a query:
```python
from allegroai import DataView, IterationOrder
# Create a Dataview object for an iterator for frames
myDataView = DataView(iteration_order=IterationOrder.random, iteration_infinite=False)
@@ -425,6 +445,8 @@ This example demonstrates creating a Dataview and setting its parameters to iter
Dataset version contains fewer than that number of frames matching the query, then fewer are returned by the iterator.
```python
from allegroai import DataView, IterationOrder
# Create a Dataview object for an iterator for frames
myDataView = DataView(iteration_order=IterationOrder.random, iteration_infinite=True)
@@ -447,6 +469,8 @@ This example adjusts an imbalance in the input data to improve training for `Car
one ROI labeled with both `Car` and `largely_occluded` will be input.
```python
from allegroai import DataView, IterationOrder
myDataView = DataView(iteration_order=IterationOrder.random, iteration_infinite=True)
myDataView.add_query(
@@ -478,6 +502,8 @@ then use the labels you map **to** when setting enumeration values.
For example, if the labels `truck`, `van`, and `car` are mapped **to** `vehicle`, then set enumeration for `vehicle`.
```python
from allegroai import DataView, IterationOrder
# Create a Dataview object for an iterator that randomly returns frames according to queries
myDataView = DataView(iteration_order=IterationOrder.random, iteration_infinite=True)
@@ -528,6 +554,8 @@ third uses `Car` (upper case "C").
The example maps `Car` (upper case "C") to `car` (lower case "c"):
```python
from allegroai import DataView, IterationOrder
# Create a Dataview object for an iterator that randomly returns frames according to queries
myDataView = DataView(iteration_order=IterationOrder.random, iteration_infinite=True)
@@ -567,6 +595,8 @@ Dataview objects can be retrieved by the Dataview ID or name using the [`DataVie
class method.
```python
from allegroai import DataView
my_dataview = DataView.get(dataview_id='<dataview_id>')
```

View File

@@ -1,5 +1,5 @@
---
title: The Dataview table
title: The Dataview Table
---
The **Dataview table** is a [customizable](#customizing-the-dataview-table) list of Dataviews associated with a project.