# Label Validation

Ango Hub allows you to implement and manage validation scripts that apply across all project stages. These scripts offer flexibility through continuous editability as your project requirements change.

<div data-with-frame="true"><figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FHGiigOollbhXfiOxMWJA%2Fimage.png?alt=media&#x26;token=03bebdbd-41d5-4a29-afdb-17b6a553538d" alt=""><figcaption></figcaption></figure></div>

{% hint style="success" %}
Post-publication edits to the validation script will take affect to batches where the user will explicitly trigger the ‘Validation' feature again on the tool.
{% endhint %}

## **Types of Validation Scripts**

Validation scripts are executed using a decorator-based approach. Each type of validation uses specific decorators to target different elements like frames, classes, or task attributes.

### **1. Frame-wise Validation**

Frame-wise validation ensures that each individual frame is validated according to specific rules. A decorator for this type of validation specifies that the function will process one frame at a time.

#### **Decorator Usage:**

* The decorator `@dec({"type": "frame"})` tells the system that the function is working on individual frame data.

#### **Function Definition:**

* The function receives one parameter, which is the data for a specific frame.
* The function processes this frame and can return an error log if any issue is found.

### **2. Class Validation Across Multiple Frames**

Class validation checks specific classes across multiple frames. This ensures that particular classes (e.g., "Vehicle", "Trucks", etc.) are consistently annotated across all frames.

#### **Decorator Usage:**

* The decorator `@dec({"type": "object", "selector": "class", "value": ["<class1>", "<class2>"]})` tells the system to pass annotations of the specified classes across all frames into the function.

#### **Function Definition:**

* The function receives one parameter for each specified class. If you validate two classes, you need two parameters.
* The function compares or processes the classes across multiple frames.

**3. Task-wise Attribute Validation Across Frames**

This type of validation ensures that attributes related to a task are validated across all frames in the task.

#### **Decorator Usage:**

* The decorator `@dec({"type": "attribute", "selector": "task"})` indicates that the function will work with task-level attributes across multiple frames.

#### **Function Definition:**

* The function receives one parameter that includes all attributes related to the task, across all frames.

## Validations on the 3D MSF Tool

The **Interactive Validation** performs real-time checks on annotations before the data moves to the next stage in the taskflow. It uses pre-defined validations  setup and highlights potential issues. The tool allows users to view, validate, and fix problems interactively without leaving the annotation workspace.

{% hint style="success" %}
Validation enhances the workflow by ensuring consistent and high-quality results across sequences.
{% endhint %}

<figure><img src="https://docs.imerit-prod.io/~gitbook/image?url=https%3A%2F%2F254647936-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FzGccvqLYeyaJ6Dgazh7K%252Fuploads%252F2z3yGDpP3AMP9gjXL03C%252FIValidation.gif%3Falt%3Dmedia%26token%3Dd7920da9-0cec-45ba-897c-19666340cca6&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=5e95bb87&#x26;sv=2" alt=""><figcaption></figcaption></figure>
