Quick Start
Quick walkthrough of the core DX-ModelZoo workflow: browse, evaluate, and compile models in minutes.
Before running these commands, make sure you have installed DX-ModelZoo.
Quick Start Overview
Basic Workflow
- Step 1. Browse Available Models - Explore pre-configured models
- Step 2. View Model Information - Check model details and profiles
- Step 3. Evaluate with ONNX Runtime - Run CPU/GPU inference
- Step 4. Evaluate with NPU Runtime - Run NPU inference (optional)
Advanced Options (choose as needed)
- Optional 1. Compile a Model - Compile for NPU deployment
- Optional 2. Benchmark - Batch evaluation across multiple models
- Optional 3. Run with YAML File - Use custom configurations
- Optional 4. Create a Custom Model - Add your own models
Basic Workflow
Step 1: Browse Available Models
# Interactive TUI browser
dxmz list
# Text output (for CI/scripts)
dxmz list --all
# Filter by domain/task
dxmz list --domain cv --task image_classification
Step 2: View Model Information
dxmz info resnet50_224x224
Example output:
Name: resnet50_224x224
Inputs: [{'name': 'input', 'shape': [1, 3, 224, 224], 'dtype': 'float32', 'layout': 'NCHW'}]
Profiles: ['onnx', 'c-lite', 'q-lite', 'q-pro']
Dataset: {'type': 'ILSVRC2012', 'eval_path': '${DATA_ROOT}/ILSVRC2012/val'}
- onnx: ONNX Runtime (CPU/GPU)
- c-lite: Compile profile with
opt_level: 0 - q-lite: Compile and run on NPU with standard calibration
- q-pro: Compile and run on NPU with
use_q_pro: true
Step 3: Evaluate with ONNX Runtime
dxmz eval resnet50_224x224 --profile onnx --save
See CLI Reference for all options (--data-root, --model-path, --seed, etc.).
With --save, a JSON file is saved to the result/ directory:
{
"model": "resnet50_224x224",
"dataset": "imagenet",
"metrics": [
{"name": "Top-1", "metric_value": 69.76},
{"name": "Top-5", "metric_value": 89.08}
],
"fps": 624.7,
"elapsed_time": 82,
"profile": "onnx"
}
Step 4: Evaluate with NPU Runtime
# Evaluate a compiled dxnn model
dxmz eval resnet50_224x224 --profile q-lite
DX-ModelZoo does not compile a missing model during evaluation. For a
target: dxnn profile, provide the .dxnn artifact in the configured
artifact directory or set DXMZ_MODEL_URL so the matching artifact can be
downloaded. Use dxmz compile to create the artifact explicitly.
Profiles with target: dxnn always use batch_size=1, regardless of what is set in the YAML.
Only ONNX profiles support adjustable batch_size.
Advanced Options (choose as needed)
Optional 1: Compile a Model
dxmz compile resnet50_224x224 --profile q-lite
See CLI Reference for all options (--output, --profile q-pro, etc.).
Optional 2: Benchmark
dxmz benchmark --profile onnx --save
See CLI Reference for domain/task filters and multi-device options (--domain, --devices, etc.).
Benchmark results are saved in JSON format:
result/benchmark_<profile>_<timestamp>.json
[
{
"model": "resnet50_224x224",
"profile": "onnx",
"metrics": [
{"name": "Top-1", "metric_value": 69.76},
{"name": "Top-5", "metric_value": 89.08}
],
"fps": 624.7,
"elapsed_time": 82
}
]
Optional 3: Run with a YAML File Directly
# Evaluate with a custom YAML
dxmz eval ./my_models/custom_model.yaml --profile onnx
# Compile with a custom YAML
dxmz compile ./my_models/custom_model.yaml --profile q-lite
Optional 4: Create a Custom Model
# Scaffold a new custom model (interactive wizard)
dxmz create
This creates a template in the ./custom/ directory with:
- YAML configuration file
- Custom preprocessing/postprocessing stubs
- Dataset loader template
Environment Variables
See CLI Reference for the full list of environment variables. The most common ones can be placed in a .env file for automatic loading:
DATA_ROOT=/data/datasets
MODEL_ROOT=/data/models
DXMZ_MODEL_URL=https://sdk.deepx.ai/modelzoo