This folder contains benchmark_models.py, which compares a local ONNX/TFLite model against a Roboflow YOLO model on a YOLO-format test set.
The ONNX model used here was created with One AI from One Ware.
A full walkthrough of this benchmark and the dataset is available in the demo: Lemons.
Before running, set your API key:
export ROBOFLOW_API_KEY=your_api_key_herepython benchmark_models.py --model lemons.onnx --dataset yolo_dataset--modelPath to local.onnxor.tflitemodel.--yolo-modelRoboflow model ID (default:limeline/1).--datasetYOLO dataset root (expectsimages/testandlabels/test).--max-imagesLimit number of test images (0= all).--output-jsonOutput path for benchmark results JSON.--iou-thresholdIoU threshold for TP/FP/FN matching.--class-agnostic-metricsIgnore class IDs during matching.--onnx-class-offsetOffset added to ONNX predicted classes (default:-1).--onnx-box-formatONNX box format:xywhorxyxy.--onnx-coordsONNX coordinate scale:auto,pixels, ornormalized.
YOLO baseline models in this benchmark were trained using Roboflow and YOLO tooling.
Some compontents used in the evaluation pipeline are licensed under APGL-3.0. To comply with this license, the full benchmark script used for evaluation is included in this repository.
This repository only contains the evaluation script and does not redistribute Roboflow or YOLO source code.