Logic

The Logic stage directs tasks to different outputs according to logical rules you set.

Settings

From the Logic stage's settings panel, you can pick one or more logical functions (rules) with which to direct tasks.

Rules will be run top to bottom. When a task is sent to the logic stage, the first rule will be run on the task. If the task matches the rule, then it will be sent out from that rule's output. If not, the second rule will be run on the task, and so on. If, after running all rules, none match, the task is sent out from the 'Else' output.

Rule Options

Annotation Type

Returns as output tasks which contain a specific annotation type, such as an object or a classification answer. All conditions must be true for the logic stage to send the task from the true output.

In the example above, for a task to be sent from true, it must have a Vehicle-class object, and it must not have a Person-class object. If any of those is false (e.g. it does not have a vehicle, or it has a person) then the task will be sent out from the False output. (in short, assume there is an "AND" operator between all conditions.

Annotator

Returns as output tasks which were annotated by one or more annotators you specify.

Random Sample

Returns as output a random percentage of tasks. For example, if you enter 55%, a randomly selected ~55% of tasks will be sent from the True output and a ~45% of tasks from the False output.

The percentage you set in the Random Sample logic gate is the likelihood a task passed in is passed out from the True output.

For example, if you set the percentage to 50%, each asset passed in has a 50% chance of being passed out from the True output. This calculation is repeated for each asset passed in and is independent from the number of tasks passed to the outputs before.

As a result of this, asset numbers passed out might be slightly different from what you expect. For example, setting up a 20% / 80% ratio and then sending through 100 items might result in a 83/17 split. Similarly, setting the percentage to 50% on a batch of 10'000 assets may lead to a 4998/5002 split instead of a precise 5000/5000 one.

Because of the way the random sample logic stage works, the more assets are passed to it, the smaller the divergence from your intended percentage. Passing only 4 assets with a 50/50 split may cause a 0/4 or a 1/3 split, while larger datasets will tend towards the average, causing a lower divergence from the intended ratio.

Task Duration

Returns as output tasks based on how long it has taken to annotate them.

Batch

Returns as output tasks belonging to one or more batches you specify.

Last updated