Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,21 @@ onnx = [
ovms = [
"tritonclient[http]<2.59",
]
tools = [
"ultralytics",
"torch",
"torchvision",
"transformers",
"timm",
"nncf",
"huggingface-hub",
]
tests = [
"httpx",
"pytest",
"pytest-cov",
"pytest-mock",
"defusedxml",
"ultralytics>=8.0.114,<=8.0.205",
"onnx",
"onnxruntime",
Expand Down
12 changes: 11 additions & 1 deletion tools/model_converter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This tool reads a JSON configuration file containing model specifications, downl

```bash
# Required packages
uv pip install torch torchvision openvino
uv sync --extra tools

```

Expand Down Expand Up @@ -91,6 +91,8 @@ The configuration file is a JSON file with the following structure:
"models": [
{
"model_short_name": "resnet50",
"license": "bsd-3-clause",
"license_link": "https://spdx.org/licenses/BSD-3-Clause.html",
"model_class_name": "torchvision.models.resnet.resnet50",
"model_full_name": "ResNet-50",
"description": "ResNet-50 image classification model",
Expand Down Expand Up @@ -119,13 +121,21 @@ Common `model_type` values:
#### Required Fields

- **`model_short_name`** (string): Short identifier for the model (used for output filename)
- **`license`** (string): SPDX license identifier for the upstream model (for example `bsd-3-clause` or `apache-2.0`)
- **`license_link`** (string): URL to the upstream license text used in generated README files
- **`model_class_name`** (string): Full Python path to the model class (e.g., `torchvision.models.resnet.resnet50`)
- **`weights_url`** (string): URL to download the PyTorch weights (.pth file)

For Hugging Face-backed models, use these required fields instead of `model_class_name` / `weights_url`:

- **`huggingface_repo`** (string): Hugging Face repository ID (for example `timm/mobilenetv2_100.ra_in1k`)
- **`huggingface_revision`** (string): Immutable commit SHA to pin the download and model load to a specific repository state

#### Optional Fields

- **`model_full_name`** (string): Full descriptive name of the model
- **`description`** (string): Description of the model
- **`docs`** (string): Documentation URL for the model
- **`input_shape`** (array of integers): Input tensor shape (default: `[1, 3, 224, 224]`)
- **`input_names`** (array of strings): Names for input tensors (default: `["input"]`)
- **`output_names`** (array of strings): Names for output tensors (default: auto-generated)
Expand Down
514 changes: 498 additions & 16 deletions tools/model_converter/config.json

Large diffs are not rendered by default.

Loading
Loading