Metadata-Version: 2.4
Name: edgefirst-validator
Version: 6.0.1
Summary: EdgeFirst Validator
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: tqdm
Requires-Dist: Pillow
Requires-Dist: PyYAML
Requires-Dist: matplotlib
Requires-Dist: requests
Requires-Dist: numpy
Requires-Dist: lmdb
Requires-Dist: polars
Requires-Dist: edgefirst-client>=2.9.3
Requires-Dist: edgefirst-cameraadaptor[transform]>=0.1.1
Provides-Extra: keras
Requires-Dist: tensorflow[and-cuda]; extra == "keras"
Provides-Extra: onnx
Requires-Dist: onnxruntime-gpu; extra == "onnx"
Provides-Extra: tensorrt
Requires-Dist: tensorrt; extra == "tensorrt"
Requires-Dist: pycuda; extra == "tensorrt"
Provides-Extra: tflite
Requires-Dist: tflite_runtime; extra == "tflite"
Provides-Extra: hal
Requires-Dist: edgefirst-hal>=0.18.0; extra == "hal"
Provides-Extra: kinara
Requires-Dist: edgefirst-ara2>=0.4.0; extra == "kinara"
Provides-Extra: studio
Requires-Dist: tensorflow[and-cuda]; extra == "studio"
Requires-Dist: onnxruntime-gpu; extra == "studio"
Requires-Dist: torch; extra == "studio"
Requires-Dist: torchvision; extra == "studio"
Requires-Dist: opencv-python-headless; extra == "studio"

# EdgeFirst Validator

EdgeFirst Validator is a Python CLI tool for validating computer vision models
(object detection, instance segmentation, semantic segmentation, multitask)
against annotated datasets. It supports multiple inference backends — ONNX,
TFLite, Keras, TensorRT, DeepViewRT, and Kinara Ara2 — and integrates with
EdgeFirst Studio for cloud and on-target validation workflows. Published to
PyPI as `edgefirst-validator`.

## Overview

- [Changelog](#changelog)
- [Installation](#installation)
- [Usage](#usage)
- [Architecture](ARCHITECTURE.md)
- [Testing Results](TESTING.md)
- [Documentation](#documentation)

## Changelog
- Mar 10, 2026 [v5.5.0]: HAL decode_masks() migration, process_masks_retina, edgefirst-hal optional dependency, artifact download fix.
- Feb 17, 2026 [v5.4.0]: Split tensor decoding, cached dataset validation.
- Jan 28, 2026 [v5.3.0]: YOLO26 support and GREY color space support
- Jan 20, 2026 [v5.2.0]: Migrate color conversions to edgefirst-cameraadaptor library.
- Dec 19, 2025 [v5.1.0]: Handle metadata embedded in the model. Integrate changes to EdgeFirst HAL (`edgefirst_hal`)
- Nov 26, 2025 [v5.0.0]: Merge Ultralytics and Deployment (EdgeFirst) metrics. Computation of deployment metrics @ optimal thresholds. Defined validation stages.
- Nov 14, 2025 [v4.2.0]: Added HAL support (`edgefirst_python`). Added Kinara model support. Distinguish semantic and instance segmentation metrics.
- Aug 24, 2025 [v4.1.0]: Added ModelPack external decoding. Added Keras support. Added TP vs FP scores chart. Removed +1 padding to the NumPy NMS.
- June 16, 2025 [v4.0.0]: EdgeFirst Validator (formerly Deep View Validator) - Ultralytics metrics and EdgeFirst Studio integrations.

## Installation

For on target validation, the system may already contain the dependencies needed to run the model such as `tflite_runtime` for TensorFlow Lite. In such cases, it is recommended to first [create a python virtual environment](https://docs.python.org/3/library/venv.html#creating-virtual-environments) with the `--system-site-packages` option enabled.

EdgeFirst-Validator is available in PyPI and can be installed via pip.

```shell
pip install edgefirst-validator
```

Validation of specific models requires these installations which includes the packages needed to run the models, in case the system at present does not contain these packages.

- HAL (GPU-accelerated preprocessing and mask decoding): `pip install edgefirst-validator[hal]`
- Keras: `pip install edgefirst-validator[keras]`
- ONNX: `pip install edgefirst-validator[onnx]`
- TensorRT: `pip install edgefirst-validator[tensorrt]`
- TFLite: `pip install edgefirst-validator[tflite]`
- Studio (all backends for cloud validation): `pip install edgefirst-validator[studio]`


## Usage

1. As a quickstart, deploy default validation of a YOLOv5 model with COCO128 dataset.

    ```shell
    edgefirst-validator
    ```

2. Deploy validation as a user-managed session in EdgeFirst Studio. First login with EdgeFirst Client.

    ```shell
    edgefirst-client login
    ```

    ```shell
    edgefirst-validator --session-id <validator session ID>
    ```

    Otherwise, you can specify the credentials directly.

    ```shell
    edgefirst-validator --token <token> --session-id <validator session ID>
    ```

    ```shell
    edgefirst-validator --username <username> --password <password> --session-id <Validator Session ID>
    ```

3. Deploy standalone validation.

    ```shell
    edgefirst-validator <model path> <dataset path>
    ```

## Documentation

Run the following commands to generate the documentation.

```shell
cd doc
pip install -r requirements.txt
```

```shell
make clean
make html
```

## Unit Tests

Run the following commands to run the unit tests

```shell
pip install -r test/requirements.txt
```

```shell
python -m pytest
```
