From 37dc7332a562c6c3d98653d5da2c2ef6bf2c4393 Mon Sep 17 00:00:00 2001 From: "Tybulewicz, Tomasz" Date: Wed, 24 Jun 2026 13:34:47 +0200 Subject: [PATCH 01/13] Allow to specify license name. In case of Apache-2.0 license, the official name is capitalized, but in Hugging Face metadata a lowercased version must be used. This change allows to specify license and license_name separately. What's more, for known case of apache-2.0, correct name will be used automatically. --- model_converter/README.md | 1 + model_converter/src/model_converter/converters/base.py | 10 ++++++++++ .../model_converter/templates/README-getitune-fp16.md | 2 +- .../model_converter/templates/README-getitune-int8.md | 2 +- .../src/model_converter/templates/README-timm-fp16.md | 2 +- .../src/model_converter/templates/README-timm-int8.md | 2 +- .../templates/README-torchvision-fp16.md | 2 +- .../templates/README-torchvision-int8.md | 2 +- 8 files changed, 17 insertions(+), 6 deletions(-) diff --git a/model_converter/README.md b/model_converter/README.md index 99faf96c3..bfd5aadf4 100644 --- a/model_converter/README.md +++ b/model_converter/README.md @@ -158,6 +158,7 @@ The configuration file is a JSON file with the following structure: { "model_short_name": "resnet50", "license": "bsd-3-clause", + "license_name": "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", diff --git a/model_converter/src/model_converter/converters/base.py b/model_converter/src/model_converter/converters/base.py index f08a17e08..7cdbdac36 100644 --- a/model_converter/src/model_converter/converters/base.py +++ b/model_converter/src/model_converter/converters/base.py @@ -30,6 +30,14 @@ from model_converter.metrics import CocoDetectionMAP, Metric +def _get_human_license_name(name: str) -> str: + mapping = { + "apache-2.0": "Apache-2.0", + } + + return mapping.get(name, name) + + class BaseConverter(ABC): """Abstract base class for model converters. @@ -337,6 +345,7 @@ def copy_readme( model_short_name = str(model_config.get("model_short_name", "")).strip() model_library = str(model_config.get("model_library", "timm")).strip() model_license = str(model_config.get("license", "")).strip() + model_license_name = _get_human_license_name(model_license) model_license_link = str(model_config.get("license_link", "")).strip() docs = str(model_config.get("docs", "")).strip() @@ -373,6 +382,7 @@ def template_placeholder(name: str) -> str: placeholders = { template_placeholder("license"): model_license, + template_placeholder("license"): model_license_name, template_placeholder("license_link"): model_license_link, template_placeholder("model_name"): model_short_name, template_placeholder("model_short_name"): model_short_name, diff --git a/model_converter/src/model_converter/templates/README-getitune-fp16.md b/model_converter/src/model_converter/templates/README-getitune-fp16.md index 11d756b3d..9c54acabf 100644 --- a/model_converter/src/model_converter/templates/README-getitune-fp16.md +++ b/model_converter/src/model_converter/templates/README-getitune-fp16.md @@ -61,7 +61,7 @@ Check the original [model documentation](<>) for limitations. ## Legal information -The original model is distributed under the [<>](<>) license. More details can be found in [training_extensions](https://github.com/open-edge-platform/training_extensions). +The original model is distributed under the [<>](<>) license. More details can be found in [training_extensions](https://github.com/open-edge-platform/training_extensions). ## Disclaimer diff --git a/model_converter/src/model_converter/templates/README-getitune-int8.md b/model_converter/src/model_converter/templates/README-getitune-int8.md index f34918c0e..e1853478e 100644 --- a/model_converter/src/model_converter/templates/README-getitune-int8.md +++ b/model_converter/src/model_converter/templates/README-getitune-int8.md @@ -70,7 +70,7 @@ Check the original [model documentation](<>) for limitations. ## Legal information -The original model is distributed under the [<>](<>) license. More details can be found in [training_extensions](https://github.com/open-edge-platform/training_extensions). +The original model is distributed under the [<>](<>) license. More details can be found in [training_extensions](https://github.com/open-edge-platform/training_extensions). ## Disclaimer diff --git a/model_converter/src/model_converter/templates/README-timm-fp16.md b/model_converter/src/model_converter/templates/README-timm-fp16.md index 3ff9a3822..626e61c53 100644 --- a/model_converter/src/model_converter/templates/README-timm-fp16.md +++ b/model_converter/src/model_converter/templates/README-timm-fp16.md @@ -63,7 +63,7 @@ Check the original [model card](https://huggingface.co/<>) for ## Legal information -The original model is distributed under the [<>](<>) license. More details can be found in [<>](https://huggingface.co/<>) +The original model is distributed under the [<>](<>) license. More details can be found in [<>](https://huggingface.co/<>) ## Disclaimer diff --git a/model_converter/src/model_converter/templates/README-timm-int8.md b/model_converter/src/model_converter/templates/README-timm-int8.md index 1fff675f4..e280cdda9 100644 --- a/model_converter/src/model_converter/templates/README-timm-int8.md +++ b/model_converter/src/model_converter/templates/README-timm-int8.md @@ -72,7 +72,7 @@ Check the original [model card](https://huggingface.co/<>) for ## Legal information -The original model is distributed under the [<>](<>) license. More details can be found in [<>](https://huggingface.co/<>) +The original model is distributed under the [<>](<>) license. More details can be found in [<>](https://huggingface.co/<>) ## Disclaimer diff --git a/model_converter/src/model_converter/templates/README-torchvision-fp16.md b/model_converter/src/model_converter/templates/README-torchvision-fp16.md index 664da42ed..3481283c0 100644 --- a/model_converter/src/model_converter/templates/README-torchvision-fp16.md +++ b/model_converter/src/model_converter/templates/README-torchvision-fp16.md @@ -60,7 +60,7 @@ Check the original [model implementation](https://github.com/pytorch/vision) for ## Legal information -The original model is distributed under the [<>](<>) license. More details can be found in [https://github.com/pytorch/vision](https://github.com/pytorch/vision). +The original model is distributed under the [<>](<>) license. More details can be found in [https://github.com/pytorch/vision](https://github.com/pytorch/vision). ## Disclaimer diff --git a/model_converter/src/model_converter/templates/README-torchvision-int8.md b/model_converter/src/model_converter/templates/README-torchvision-int8.md index f6c710956..e6bde9ad2 100644 --- a/model_converter/src/model_converter/templates/README-torchvision-int8.md +++ b/model_converter/src/model_converter/templates/README-torchvision-int8.md @@ -69,7 +69,7 @@ Check the original [model implementation](https://github.com/pytorch/vision) for ## Legal information -The original model is distributed under the [<>](<>) license. More details can be found in [https://github.com/pytorch/vision](https://github.com/pytorch/vision). +The original model is distributed under the [<>](<>) license. More details can be found in [https://github.com/pytorch/vision](https://github.com/pytorch/vision). ## Disclaimer From b7df3dcf174f6d6f7bda3bef0c89d5e278cb7999 Mon Sep 17 00:00:00 2001 From: "Tybulewicz, Tomasz" Date: Thu, 25 Jun 2026 09:30:09 +0200 Subject: [PATCH 02/13] More details will lead to documentation --- .../src/model_converter/templates/README-getitune-fp16.md | 2 +- .../src/model_converter/templates/README-getitune-int8.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/model_converter/src/model_converter/templates/README-getitune-fp16.md b/model_converter/src/model_converter/templates/README-getitune-fp16.md index 9c54acabf..42f49127a 100644 --- a/model_converter/src/model_converter/templates/README-getitune-fp16.md +++ b/model_converter/src/model_converter/templates/README-getitune-fp16.md @@ -61,7 +61,7 @@ Check the original [model documentation](<>) for limitations. ## Legal information -The original model is distributed under the [<>](<>) license. More details can be found in [training_extensions](https://github.com/open-edge-platform/training_extensions). +The original model is distributed under the [<>](<>) license. More details can be found in [<>](<>). ## Disclaimer diff --git a/model_converter/src/model_converter/templates/README-getitune-int8.md b/model_converter/src/model_converter/templates/README-getitune-int8.md index e1853478e..c0a6affeb 100644 --- a/model_converter/src/model_converter/templates/README-getitune-int8.md +++ b/model_converter/src/model_converter/templates/README-getitune-int8.md @@ -70,7 +70,7 @@ Check the original [model documentation](<>) for limitations. ## Legal information -The original model is distributed under the [<>](<>) license. More details can be found in [training_extensions](https://github.com/open-edge-platform/training_extensions). +The original model is distributed under the [<>](<>) license. More details can be found in [<>](<>). ## Disclaimer From a9ababd01736b9131a090761ff92e38f53ea08a2 Mon Sep 17 00:00:00 2001 From: "Tybulewicz, Tomasz" Date: Thu, 25 Jun 2026 09:42:35 +0200 Subject: [PATCH 03/13] Documentation links for exported Tune models updated to original docs --- model_converter/presets/config.json | 52 ++++++++++++++--------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/model_converter/presets/config.json b/model_converter/presets/config.json index bc7b4be2e..bd2c54c2f 100644 --- a/model_converter/presets/config.json +++ b/model_converter/presets/config.json @@ -651,7 +651,7 @@ "labels": "IMAGENET1K_V1", "model_full_name": "DINOv2 Classification", "description": "DINOv2 - Self-supervised Vision Transformer for image classification", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://huggingface.co/timm/vit_small_patch14_dinov2.lvd142m", "getitune_task": "MULTI_CLASS_CLS", "getitune_recipe": "dino_v2", "model_type": "Classification", @@ -726,7 +726,7 @@ "labels": "IMAGENET1K_V1", "model_full_name": "ViT-Tiny Classification", "description": "Vision Transformer Tiny trained with getitune for multi-class classification", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://huggingface.co/timm/vit_tiny_patch16_224.augreg_in21k", "getitune_recipe": "vit_tiny", "getitune_task": "MULTI_CLASS_CLS", "model_type": "Classification", @@ -826,7 +826,7 @@ "model_library": "getitune", "model_full_name": "YOLOX-S", "description": "YOLOX-S single-stage object detection model trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/open-mmlab/mmdetection/tree/main/configs/yolox", "getitune_task": "DETECTION", "getitune_recipe": "yolox_s", "model_type": "YOLOX", @@ -840,7 +840,7 @@ "model_library": "getitune", "model_full_name": "YOLOX-L", "description": "YOLOX-L single-stage object detection model trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/open-mmlab/mmdetection/tree/main/configs/yolox", "getitune_task": "DETECTION", "getitune_recipe": "yolox_l", "model_type": "YOLOX", @@ -854,7 +854,7 @@ "model_library": "getitune", "model_full_name": "YOLOX-X", "description": "YOLOX-X single-stage object detection model trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/open-mmlab/mmdetection/tree/main/configs/yolox", "getitune_task": "DETECTION", "getitune_recipe": "yolox_x", "model_type": "YOLOX", @@ -868,7 +868,7 @@ "model_library": "getitune", "model_full_name": "SSD MobileNet-V2", "description": "SSD with MobileNet-V2 backbone for object detection trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/open-mmlab/mmdetection/tree/main/configs/ssd", "getitune_task": "DETECTION", "getitune_recipe": "ssd_mobilenetv2", "model_type": "SSD", @@ -882,7 +882,7 @@ "model_library": "getitune", "model_full_name": "ATSS MobileNet-V2", "description": "ATSS with MobileNet-V2 backbone for object detection trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/open-mmlab/mmdetection/tree/main/configs/atss", "getitune_task": "DETECTION", "getitune_recipe": "atss_mobilenetv2", "model_type": "SSD", @@ -910,7 +910,7 @@ "model_library": "getitune", "model_full_name": "YOLOX-Tiny", "description": "YOLOX-Tiny single-stage object detection model trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/open-mmlab/mmdetection/tree/main/configs/yolox", "getitune_recipe": "yolox_tiny", "getitune_task": "DETECTION", "model_type": "YOLOX", @@ -924,7 +924,7 @@ "model_library": "getitune", "model_full_name": "DEIM D-FINE-L", "description": "DEIM D-FINE Large transformer-based object detection model trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/Intellindust-AI-Lab/DEIM", "getitune_recipe": "deim_dfine_l", "getitune_task": "DETECTION", "model_type": "SSD", @@ -938,7 +938,7 @@ "model_library": "getitune", "model_full_name": "DEIM D-FINE-M", "description": "DEIM D-FINE Medium transformer-based object detection model trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/Intellindust-AI-Lab/DEIM", "getitune_recipe": "deim_dfine_m", "getitune_task": "DETECTION", "model_type": "SSD", @@ -952,7 +952,7 @@ "model_library": "getitune", "model_full_name": "DEIM D-FINE-X", "description": "DEIM D-FINE Extra-Large transformer-based object detection model trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/Intellindust-AI-Lab/DEIM", "getitune_recipe": "deim_dfine_x", "getitune_task": "DETECTION", "model_type": "SSD", @@ -966,7 +966,7 @@ "model_library": "getitune", "model_full_name": "DEIMv2-L", "description": "DEIMv2 Large transformer-based object detection model trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/Intellindust-AI-Lab/DEIMv2", "getitune_recipe": "deimv2_l", "getitune_task": "DETECTION", "model_type": "SSD", @@ -980,7 +980,7 @@ "model_library": "getitune", "model_full_name": "DEIMv2-M", "description": "DEIMv2 Medium transformer-based object detection model trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/Intellindust-AI-Lab/DEIMv2", "getitune_recipe": "deimv2_m", "getitune_task": "DETECTION", "model_type": "SSD", @@ -994,7 +994,7 @@ "model_library": "getitune", "model_full_name": "DEIMv2-S", "description": "DEIMv2 Small transformer-based object detection model trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/Intellindust-AI-Lab/DEIMv2", "getitune_recipe": "deimv2_s", "getitune_task": "DETECTION", "model_type": "SSD", @@ -1022,7 +1022,7 @@ "model_library": "getitune", "model_full_name": "RF-DETR Large", "description": "RF-DETR Large transformer-based object detection model trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/roboflow/rf-detr", "getitune_recipe": "rfdetr_large", "getitune_task": "DETECTION", "model_type": "SSD", @@ -1036,7 +1036,7 @@ "model_library": "getitune", "model_full_name": "RF-DETR Medium", "description": "RF-DETR Medium transformer-based object detection model trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/roboflow/rf-detr", "getitune_recipe": "rfdetr_medium", "getitune_task": "DETECTION", "model_type": "SSD", @@ -1050,7 +1050,7 @@ "model_library": "getitune", "model_full_name": "RF-DETR Small", "description": "RF-DETR Small transformer-based object detection model trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/roboflow/rf-detr", "getitune_recipe": "rfdetr_small", "getitune_task": "DETECTION", "model_type": "SSD", @@ -1064,7 +1064,7 @@ "model_library": "getitune", "model_full_name": "RT-DETR ResNet-50", "description": "RT-DETR with ResNet-50 backbone for real-time object detection trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/roboflow/rf-detr", "getitune_recipe": "rtdetr_50", "getitune_task": "DETECTION", "model_type": "SSD", @@ -1078,7 +1078,7 @@ "model_library": "getitune", "model_full_name": "Mask R-CNN ResNet-50", "description": "Mask R-CNN with ResNet-50 for instance segmentation trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://docs.pytorch.org/vision/main/models/generated/torchvision.models.detection.maskrcnn_resnet50_fpn.html", "getitune_task": "INSTANCE_SEGMENTATION", "getitune_recipe": "maskrcnn_r50", "model_type": "MaskRCNN", @@ -1092,7 +1092,7 @@ "model_library": "getitune", "model_full_name": "Mask R-CNN EfficientNet-B2B", "description": "Mask R-CNN with EfficientNet-B2B backbone for instance segmentation trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/open-mmlab/mmdetection/tree/main/configs/efficientnet", "getitune_task": "INSTANCE_SEGMENTATION", "getitune_recipe": "maskrcnn_efficientnetb2b", "model_type": "MaskRCNN", @@ -1106,7 +1106,7 @@ "model_library": "getitune", "model_full_name": "Mask R-CNN Swin-Tiny", "description": "Mask R-CNN with Swin-Tiny backbone for instance segmentation trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/open-mmlab/mmdetection/tree/main/configs/swin", "getitune_recipe": "maskrcnn_swint", "getitune_task": "INSTANCE_SEGMENTATION", "model_type": "MaskRCNN", @@ -1121,7 +1121,7 @@ "model_library": "getitune", "model_full_name": "RF-DETR Segmentation Large", "description": "RF-DETR Large for instance segmentation trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/roboflow/rf-detr", "getitune_recipe": "rfdetr_seg_large", "getitune_task": "INSTANCE_SEGMENTATION", "model_type": "MaskRCNN", @@ -1135,7 +1135,7 @@ "model_library": "getitune", "model_full_name": "RF-DETR Segmentation Medium", "description": "RF-DETR Medium for instance segmentation trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/roboflow/rf-detr", "getitune_recipe": "rfdetr_seg_medium", "getitune_task": "INSTANCE_SEGMENTATION", "model_type": "MaskRCNN", @@ -1149,7 +1149,7 @@ "model_library": "getitune", "model_full_name": "RF-DETR Segmentation Small", "description": "RF-DETR Small for instance segmentation trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/roboflow/rf-detr", "getitune_recipe": "rfdetr_seg_small", "getitune_task": "INSTANCE_SEGMENTATION", "model_type": "MaskRCNN", @@ -1163,7 +1163,7 @@ "model_library": "getitune", "model_full_name": "RF-DETR Segmentation X-Large", "description": "RF-DETR Extra-Large for instance segmentation trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/roboflow/rf-detr", "getitune_recipe": "rfdetr_seg_xlarge", "getitune_task": "INSTANCE_SEGMENTATION", "model_type": "MaskRCNN", @@ -1177,7 +1177,7 @@ "model_library": "getitune", "model_full_name": "RTMDet Instance Tiny", "description": "RTMDet Tiny for instance segmentation trained with getitune", - "docs": "https://github.com/open-edge-platform/training_extensions", + "docs": "https://github.com/open-mmlab/mmdetection/tree/main/configs/rtmdet", "getitune_recipe": "rtmdet_inst_tiny", "getitune_task": "INSTANCE_SEGMENTATION", "model_type": "MaskRCNN", From fb7030163836cfa1f04448a990a907a80c50cfe7 Mon Sep 17 00:00:00 2001 From: "Tybulewicz, Tomasz" Date: Fri, 26 Jun 2026 08:30:54 +0200 Subject: [PATCH 04/13] Update link to Geti --- .../src/model_converter/templates/README-getitune-fp16.md | 4 ++-- .../src/model_converter/templates/README-getitune-int8.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/model_converter/src/model_converter/templates/README-getitune-fp16.md b/model_converter/src/model_converter/templates/README-getitune-fp16.md index 42f49127a..aae99d12f 100644 --- a/model_converter/src/model_converter/templates/README-getitune-fp16.md +++ b/model_converter/src/model_converter/templates/README-getitune-fp16.md @@ -6,12 +6,12 @@ tags: # <>-fp16-ov -- Model creator: [Geti™](https://github.com/open-edge-platform/training_extensions) +- Model creator: [Geti™](https://github.com/open-edge-platform/geti) - Original model: [<>](<>) ## Description -This is a [Geti™](https://github.com/open-edge-platform/training_extensions) version of [<>](<>) model converted to the [OpenVINO™ IR](https://docs.openvino.ai/2026/documentation/openvino-ir-format.html) (Intermediate Representation) format with weights compressed to FP16. +This is a [Geti™](https://github.com/open-edge-platform/geti) version of [<>](<>) model converted to the [OpenVINO™ IR](https://docs.openvino.ai/2026/documentation/openvino-ir-format.html) (Intermediate Representation) format with weights compressed to FP16. To fine-tune your model with a custom dataset, you can use Geti™ to annotate data, perform fine-tuning, and export the resulting model. diff --git a/model_converter/src/model_converter/templates/README-getitune-int8.md b/model_converter/src/model_converter/templates/README-getitune-int8.md index c0a6affeb..5ec2a1f89 100644 --- a/model_converter/src/model_converter/templates/README-getitune-int8.md +++ b/model_converter/src/model_converter/templates/README-getitune-int8.md @@ -6,12 +6,12 @@ tags: # <>-int8-ov -- Model creator: [Geti™](https://github.com/open-edge-platform/training_extensions) +- Model creator: [Geti™](https://github.com/open-edge-platform/geti) - Original model: [<>](<>) ## Description -This is a [Geti™](https://github.com/open-edge-platform/training_extensions) version of [<>](<>) model converted to the [OpenVINO™ IR](https://docs.openvino.ai/2026/documentation/openvino-ir-format.html) (Intermediate Representation) format with weights compressed to INT8. +This is a [Geti™](https://github.com/open-edge-platform/geti) version of [<>](<>) model converted to the [OpenVINO™ IR](https://docs.openvino.ai/2026/documentation/openvino-ir-format.html) (Intermediate Representation) format with weights compressed to INT8. To fine-tune your model with a custom dataset, you can use Geti™ to annotate data, perform fine-tuning, and export the resulting model. From ff3f78bb9460e6dbfa77a26e4374b6cff49f5092 Mon Sep 17 00:00:00 2001 From: "Tybulewicz, Tomasz" Date: Fri, 26 Jun 2026 08:31:21 +0200 Subject: [PATCH 05/13] Allow for separate license name --- model_converter/src/model_converter/converters/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model_converter/src/model_converter/converters/base.py b/model_converter/src/model_converter/converters/base.py index 7cdbdac36..03bcf3971 100644 --- a/model_converter/src/model_converter/converters/base.py +++ b/model_converter/src/model_converter/converters/base.py @@ -382,7 +382,7 @@ def template_placeholder(name: str) -> str: placeholders = { template_placeholder("license"): model_license, - template_placeholder("license"): model_license_name, + template_placeholder("license_name"): model_license_name, template_placeholder("license_link"): model_license_link, template_placeholder("model_name"): model_short_name, template_placeholder("model_short_name"): model_short_name, From 898f34c75300ecbf99826cd930cbb0d762e77633 Mon Sep 17 00:00:00 2001 From: "Tybulewicz, Tomasz" Date: Fri, 26 Jun 2026 13:47:56 +0200 Subject: [PATCH 06/13] describe more details link for tune models --- .../src/model_converter/converters/base.py | 14 +++++++++++++- .../templates/README-getitune-fp16.md | 2 +- .../templates/README-getitune-int8.md | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/model_converter/src/model_converter/converters/base.py b/model_converter/src/model_converter/converters/base.py index 03bcf3971..282f01c85 100644 --- a/model_converter/src/model_converter/converters/base.py +++ b/model_converter/src/model_converter/converters/base.py @@ -38,6 +38,14 @@ def _get_human_license_name(name: str) -> str: return mapping.get(name, name) +def _get_model_docs_page_name(url: str) -> str: + if "github" in url: + return "repository" + if "huggingface" in url: + return "card" + return "documentation" + + class BaseConverter(ABC): """Abstract base class for model converters. @@ -348,6 +356,9 @@ def copy_readme( model_license_name = _get_human_license_name(model_license) model_license_link = str(model_config.get("license_link", "")).strip() docs = str(model_config.get("docs", "")).strip() + model_docs_page_name = str( + model_config.get("model_docs_page_name", _get_model_docs_page_name(url=docs)), + ).strip() def template_placeholder(name: str) -> str: return f"<<{name}>>" @@ -388,6 +399,7 @@ def template_placeholder(name: str) -> str: template_placeholder("model_short_name"): model_short_name, template_placeholder("variant"): variant, template_placeholder("docs"): docs, + template_placeholder("model_docs_page_name"): model_docs_page_name, } # Handle tags list → YAML formatting @@ -563,7 +575,7 @@ def create_calibration_dataset( Tuple of (images, labels); both empty lists when dataset is unavailable. """ if not dataset_path or not dataset_path.exists(): - self.logger.warning("Dataset path not provided or doesn't exist. Skipping quantization.") + self.logger.warning(f"Dataset path `{dataset_path=}` not provided or doesn't exist. Skipping quantization.") return [], [] # Parse mean and scale values diff --git a/model_converter/src/model_converter/templates/README-getitune-fp16.md b/model_converter/src/model_converter/templates/README-getitune-fp16.md index aae99d12f..9b1ab192b 100644 --- a/model_converter/src/model_converter/templates/README-getitune-fp16.md +++ b/model_converter/src/model_converter/templates/README-getitune-fp16.md @@ -61,7 +61,7 @@ Check the original [model documentation](<>) for limitations. ## Legal information -The original model is distributed under the [<>](<>) license. More details can be found in [<>](<>). +The original model is distributed under the [<>](<>) license. More details can be found in the original [model <>](<>). ## Disclaimer diff --git a/model_converter/src/model_converter/templates/README-getitune-int8.md b/model_converter/src/model_converter/templates/README-getitune-int8.md index 5ec2a1f89..9ae197251 100644 --- a/model_converter/src/model_converter/templates/README-getitune-int8.md +++ b/model_converter/src/model_converter/templates/README-getitune-int8.md @@ -70,7 +70,7 @@ Check the original [model documentation](<>) for limitations. ## Legal information -The original model is distributed under the [<>](<>) license. More details can be found in [<>](<>). +The original model is distributed under the [<>](<>) license. More details can be found in the original [model <>](<>). ## Disclaimer From bfb1b9fd2ab129bf7b9207bc14a293c14edc666c Mon Sep 17 00:00:00 2001 From: "Tybulewicz, Tomasz" Date: Fri, 26 Jun 2026 15:54:21 +0200 Subject: [PATCH 07/13] Tests for license_name and docs_page_name --- model_converter/tests/unit/test_converters.py | 89 ++++++++++++++++++- 1 file changed, 87 insertions(+), 2 deletions(-) diff --git a/model_converter/tests/unit/test_converters.py b/model_converter/tests/unit/test_converters.py index 8ea5ea829..b50bef80d 100644 --- a/model_converter/tests/unit/test_converters.py +++ b/model_converter/tests/unit/test_converters.py @@ -33,8 +33,10 @@ def test_renders_placeholders_and_tags_yaml(self, converter, template_dir, tmp_p (template_dir / "README-torchvision-fp16.md").write_text( "# <>\n" "License: <>\n" + "License name: <>\n" "License link: <>\n" "Docs: <>\n" + "Docs page name: <>\n" "Variant: <>\n" "Tags:\n" "<>", @@ -46,7 +48,7 @@ def test_renders_placeholders_and_tags_yaml(self, converter, template_dir, tmp_p { "model_short_name": "test_model", "model_library": "torchvision", - "license": "Apache-2.0", + "license": "apache-2.0", "license_link": "https://apache.org/licenses/LICENSE-2.0", "docs": "https://docs.example.com", "tags": ["vision", "classification"], @@ -57,13 +59,96 @@ def test_renders_placeholders_and_tags_yaml(self, converter, template_dir, tmp_p content = (output_folder / "README.md").read_text() assert "# test_model" in content - assert "License: Apache-2.0" in content + assert "License: apache-2.0" in content + assert "License name: Apache-2.0" in content assert "License link: https://apache.org/licenses/LICENSE-2.0" in content assert "Docs: https://docs.example.com" in content + assert "Docs page name: documentation" in content assert "Variant: fp16" in content assert " - vision" in content assert " - classification" in content + @pytest.mark.parametrize( + ("license_id", "license_name"), + [ + ("apache-2.0", "Apache-2.0"), + ("BSD", "BSD"), + ("rAnDoM", "rAnDoM"), + ], + ) + def test_selects_correct_license_name( + self, + converter, + template_dir, + tmp_path, + monkeypatch, + license_id, + license_name, + ): + """copy_readme fills placeholders from config and renders tags as YAML.""" + _set_template_root(monkeypatch, template_dir) + (template_dir / "README-torchvision-fp16.md").write_text( + "License: <>\nLicense name: <>\n", + ) + output_folder = tmp_path / "test_model-fp16-ov" + output_folder.mkdir() + + converter.copy_readme( + { + "model_short_name": "test_model", + "model_library": "torchvision", + "license": license_id, + "license_link": "https://apache.org/licenses/LICENSE-2.0", + "docs": "https://docs.example.com", + }, + output_folder, + variant="fp16", + ) + + content = (output_folder / "README.md").read_text() + assert f"License: {license_id}" in content + assert f"License name: {license_name}" in content + + @pytest.mark.parametrize( + ("docs_url", "docs_page_name"), + [ + ("https://docs.example.com", "documentation"), + ("https://huggingface.com/foo/bar", "card"), + ("https://github.com/foo/bar", "repository"), + ], + ) + def test_selects_correct_docs_page_name( + self, + converter, + template_dir, + tmp_path, + monkeypatch, + docs_url, + docs_page_name, + ): + """copy_readme fills placeholders from config and renders tags as YAML.""" + _set_template_root(monkeypatch, template_dir) + (template_dir / "README-torchvision-fp16.md").write_text( + "Docs page name: <>\n", + ) + output_folder = tmp_path / "test_model-fp16-ov" + output_folder.mkdir() + + converter.copy_readme( + { + "model_short_name": "test_model", + "model_library": "torchvision", + "license": "apache-2.0", + "license_link": "https://apache.org/licenses/LICENSE-2.0", + "docs": docs_url, + }, + output_folder, + variant="fp16", + ) + + content = (output_folder / "README.md").read_text() + assert f"Docs page name: {docs_page_name}" in content + @pytest.mark.parametrize( ("config", "expected"), [ From 3952a2f04b8ebd3c2bec4178f5ca5e68ce8ccf32 Mon Sep 17 00:00:00 2001 From: Tomasz Tybulewicz Date: Fri, 26 Jun 2026 16:01:28 +0200 Subject: [PATCH 08/13] Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- model_converter/src/model_converter/converters/base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/model_converter/src/model_converter/converters/base.py b/model_converter/src/model_converter/converters/base.py index 282f01c85..d6c704ad9 100644 --- a/model_converter/src/model_converter/converters/base.py +++ b/model_converter/src/model_converter/converters/base.py @@ -39,6 +39,7 @@ def _get_human_license_name(name: str) -> str: def _get_model_docs_page_name(url: str) -> str: + url = url.lower() if "github" in url: return "repository" if "huggingface" in url: From 4a77a028553770c37dabc0e75a764dfb09ae6acd Mon Sep 17 00:00:00 2001 From: "Tybulewicz, Tomasz" Date: Mon, 29 Jun 2026 09:19:58 +0200 Subject: [PATCH 09/13] Unify link handling --- .../src/model_converter/templates/README-getitune-fp16.md | 4 ++-- .../src/model_converter/templates/README-getitune-int8.md | 4 ++-- .../src/model_converter/templates/README-timm-fp16.md | 2 +- .../src/model_converter/templates/README-timm-int8.md | 2 +- .../src/model_converter/templates/README-torchvision-fp16.md | 2 +- .../src/model_converter/templates/README-torchvision-int8.md | 2 +- .../src/model_converter/templates/README-yolo-fp16.md | 2 +- .../src/model_converter/templates/README-yolo-int8.md | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/model_converter/src/model_converter/templates/README-getitune-fp16.md b/model_converter/src/model_converter/templates/README-getitune-fp16.md index 9b1ab192b..f42029381 100644 --- a/model_converter/src/model_converter/templates/README-getitune-fp16.md +++ b/model_converter/src/model_converter/templates/README-getitune-fp16.md @@ -57,11 +57,11 @@ For more examples and possible optimizations, refer to the [Model API Documentat ## Limitations -Check the original [model documentation](<>) for limitations. +Check the [original model documentation](<>) for limitations. ## Legal information -The original model is distributed under the [<>](<>) license. More details can be found in the original [model <>](<>). +The original model is distributed under the [<>](<>) license. More details can be found in the [original model <>](<>). ## Disclaimer diff --git a/model_converter/src/model_converter/templates/README-getitune-int8.md b/model_converter/src/model_converter/templates/README-getitune-int8.md index 9ae197251..21f9c3e2e 100644 --- a/model_converter/src/model_converter/templates/README-getitune-int8.md +++ b/model_converter/src/model_converter/templates/README-getitune-int8.md @@ -66,11 +66,11 @@ For more examples and possible optimizations, refer to the [Model API Documentat ## Limitations -Check the original [model documentation](<>) for limitations. +Check the [original model documentation](<>) for limitations. ## Legal information -The original model is distributed under the [<>](<>) license. More details can be found in the original [model <>](<>). +The original model is distributed under the [<>](<>) license. More details can be found in the [original model <>](<>). ## Disclaimer diff --git a/model_converter/src/model_converter/templates/README-timm-fp16.md b/model_converter/src/model_converter/templates/README-timm-fp16.md index 626e61c53..7ea857023 100644 --- a/model_converter/src/model_converter/templates/README-timm-fp16.md +++ b/model_converter/src/model_converter/templates/README-timm-fp16.md @@ -59,7 +59,7 @@ For more examples and possible optimizations, refer to the [Model API Documentat ## Limitations -Check the original [model card](https://huggingface.co/<>) for limitations. +Check the [original model card](https://huggingface.co/<>) for limitations. ## Legal information diff --git a/model_converter/src/model_converter/templates/README-timm-int8.md b/model_converter/src/model_converter/templates/README-timm-int8.md index e280cdda9..c897e1ac0 100644 --- a/model_converter/src/model_converter/templates/README-timm-int8.md +++ b/model_converter/src/model_converter/templates/README-timm-int8.md @@ -68,7 +68,7 @@ For more examples and possible optimizations, refer to the [Model API Documentat ## Limitations -Check the original [model card](https://huggingface.co/<>) for limitations. +Check the [original model card](https://huggingface.co/<>) for limitations. ## Legal information diff --git a/model_converter/src/model_converter/templates/README-torchvision-fp16.md b/model_converter/src/model_converter/templates/README-torchvision-fp16.md index 3481283c0..ffd0922cc 100644 --- a/model_converter/src/model_converter/templates/README-torchvision-fp16.md +++ b/model_converter/src/model_converter/templates/README-torchvision-fp16.md @@ -56,7 +56,7 @@ For more examples and possible optimizations, refer to the [Model API Documentat ## Limitations -Check the original [model implementation](https://github.com/pytorch/vision) for limitations. +Check the [original model implementation](https://github.com/pytorch/vision) for limitations. ## Legal information diff --git a/model_converter/src/model_converter/templates/README-torchvision-int8.md b/model_converter/src/model_converter/templates/README-torchvision-int8.md index e6bde9ad2..d0d5cbe3d 100644 --- a/model_converter/src/model_converter/templates/README-torchvision-int8.md +++ b/model_converter/src/model_converter/templates/README-torchvision-int8.md @@ -65,7 +65,7 @@ For more examples and possible optimizations, refer to the [Model API Documentat ## Limitations -Check the original [model implementation](https://github.com/pytorch/vision) for limitations. +Check the [original model implementation](https://github.com/pytorch/vision) for limitations. ## Legal information diff --git a/model_converter/src/model_converter/templates/README-yolo-fp16.md b/model_converter/src/model_converter/templates/README-yolo-fp16.md index 4b95398f6..50ffa9cb3 100644 --- a/model_converter/src/model_converter/templates/README-yolo-fp16.md +++ b/model_converter/src/model_converter/templates/README-yolo-fp16.md @@ -59,7 +59,7 @@ For more examples and possible optimizations, refer to the [Model API Documentat ## Limitations -Check the original [model card](https://huggingface.co/Ultralytics/YOLO11) for limitations. +Check the [original model card](https://huggingface.co/Ultralytics/YOLO11) for limitations. ## Legal information diff --git a/model_converter/src/model_converter/templates/README-yolo-int8.md b/model_converter/src/model_converter/templates/README-yolo-int8.md index c034c6cbe..d6bb1f646 100644 --- a/model_converter/src/model_converter/templates/README-yolo-int8.md +++ b/model_converter/src/model_converter/templates/README-yolo-int8.md @@ -70,7 +70,7 @@ For more examples and possible optimizations, refer to the [Model API Documentat ## Limitations -Check the original [model card](https://huggingface.co/Ultralytics/YOLO11) for limitations. +Check the [original model card](https://huggingface.co/Ultralytics/YOLO11) for limitations. ## Legal information From 240c0a5d1efe7b712c7d53bce43ea07a1717ad78 Mon Sep 17 00:00:00 2001 From: "Tybulewicz, Tomasz" Date: Mon, 29 Jun 2026 14:20:51 +0200 Subject: [PATCH 10/13] Licenses for getitune models updated --- model_converter/presets/config.json | 52 ++++++++++++++--------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/model_converter/presets/config.json b/model_converter/presets/config.json index bd2c54c2f..50ad92f69 100644 --- a/model_converter/presets/config.json +++ b/model_converter/presets/config.json @@ -732,7 +732,7 @@ "model_type": "Classification", "quantization_model_type": "transformer", "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/apache-2.0.md", "tags": ["image-classification", "vision"], "dataset_type": "imagenet-1k" }, @@ -832,7 +832,7 @@ "model_type": "YOLOX", "tags": ["object-detection", "vision"], "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://github.com/open-mmlab/mmdetection/blob/main/LICENSE", "dataset_type": "coco-detection" }, { @@ -846,7 +846,7 @@ "model_type": "YOLOX", "tags": ["object-detection", "vision"], "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://github.com/open-mmlab/mmdetection/blob/main/LICENSE", "dataset_type": "coco-detection" }, { @@ -860,7 +860,7 @@ "model_type": "YOLOX", "tags": ["object-detection", "vision"], "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://github.com/open-mmlab/mmdetection/blob/main/LICENSE", "dataset_type": "coco-detection" }, { @@ -874,7 +874,7 @@ "model_type": "SSD", "tags": ["object-detection", "vision"], "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://github.com/open-mmlab/mmdetection/blob/main/LICENSE", "dataset_type": "coco-detection" }, { @@ -888,7 +888,7 @@ "model_type": "SSD", "tags": ["object-detection", "vision"], "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://github.com/open-mmlab/mmdetection/blob/main/LICENSE", "dataset_type": "coco-detection" }, { @@ -915,7 +915,7 @@ "getitune_task": "DETECTION", "model_type": "YOLOX", "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://github.com/open-mmlab/mmdetection/blob/main/LICENSE", "tags": ["object-detection", "vision"], "dataset_type": "coco-detection" }, @@ -929,7 +929,7 @@ "getitune_task": "DETECTION", "model_type": "SSD", "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://github.com/Intellindust-AI-Lab/DEIM/blob/main/LICENSE", "tags": ["object-detection", "vision"], "dataset_type": "coco-detection" }, @@ -943,7 +943,7 @@ "getitune_task": "DETECTION", "model_type": "SSD", "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://github.com/Intellindust-AI-Lab/DEIM/blob/main/LICENSE", "tags": ["object-detection", "vision"], "dataset_type": "coco-detection" }, @@ -957,7 +957,7 @@ "getitune_task": "DETECTION", "model_type": "SSD", "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://github.com/Intellindust-AI-Lab/DEIM/blob/main/LICENSE", "tags": ["object-detection", "vision"], "dataset_type": "coco-detection" }, @@ -971,7 +971,7 @@ "getitune_task": "DETECTION", "model_type": "SSD", "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://github.com/Intellindust-AI-Lab/DEIM/blob/main/LICENSE", "tags": ["object-detection", "vision"], "dataset_type": "coco-detection" }, @@ -985,7 +985,7 @@ "getitune_task": "DETECTION", "model_type": "SSD", "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://github.com/Intellindust-AI-Lab/DEIM/blob/main/LICENSE", "tags": ["object-detection", "vision"], "dataset_type": "coco-detection" }, @@ -999,7 +999,7 @@ "getitune_task": "DETECTION", "model_type": "SSD", "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://github.com/Intellindust-AI-Lab/DEIM/blob/main/LICENSE", "tags": ["object-detection", "vision"], "dataset_type": "coco-detection" }, @@ -1027,7 +1027,7 @@ "getitune_task": "DETECTION", "model_type": "SSD", "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://roboflow.com/licensing", "tags": ["object-detection", "vision"], "dataset_type": "coco-detection" }, @@ -1041,7 +1041,7 @@ "getitune_task": "DETECTION", "model_type": "SSD", "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://roboflow.com/licensing", "tags": ["object-detection", "vision"], "dataset_type": "coco-detection" }, @@ -1055,7 +1055,7 @@ "getitune_task": "DETECTION", "model_type": "SSD", "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://roboflow.com/licensing", "tags": ["object-detection", "vision"], "dataset_type": "coco-detection" }, @@ -1069,7 +1069,7 @@ "getitune_task": "DETECTION", "model_type": "SSD", "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://roboflow.com/licensing", "tags": ["object-detection", "vision"], "dataset_type": "coco-detection" }, @@ -1084,7 +1084,7 @@ "model_type": "MaskRCNN", "tags": ["image-segmentation", "instance-segmentation", "vision"], "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://github.com/pytorch/vision/blob/main/LICENSE", "dataset_type": "coco-detection" }, { @@ -1098,7 +1098,7 @@ "model_type": "MaskRCNN", "tags": ["image-segmentation", "instance-segmentation", "vision"], "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://github.com/open-mmlab/mmdetection/blob/main/LICENSE", "dataset_type": "coco-detection" }, { @@ -1112,7 +1112,7 @@ "model_type": "MaskRCNN", "quantization_model_type": "transformer", "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://github.com/open-mmlab/mmdetection/blob/main/LICENSE", "tags": ["image-segmentation", "instance-segmentation", "vision"], "dataset_type": "coco-detection" }, @@ -1126,7 +1126,7 @@ "getitune_task": "INSTANCE_SEGMENTATION", "model_type": "MaskRCNN", "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://roboflow.com/licensing", "tags": ["image-segmentation", "instance-segmentation", "vision"], "dataset_type": "coco-detection" }, @@ -1140,7 +1140,7 @@ "getitune_task": "INSTANCE_SEGMENTATION", "model_type": "MaskRCNN", "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://roboflow.com/licensing", "tags": ["image-segmentation", "instance-segmentation", "vision"], "dataset_type": "coco-detection" }, @@ -1154,7 +1154,7 @@ "getitune_task": "INSTANCE_SEGMENTATION", "model_type": "MaskRCNN", "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://roboflow.com/licensing", "tags": ["image-segmentation", "instance-segmentation", "vision"], "dataset_type": "coco-detection" }, @@ -1168,7 +1168,7 @@ "getitune_task": "INSTANCE_SEGMENTATION", "model_type": "MaskRCNN", "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://roboflow.com/licensing", "tags": ["image-segmentation", "instance-segmentation", "vision"], "dataset_type": "coco-detection" }, @@ -1182,7 +1182,7 @@ "getitune_task": "INSTANCE_SEGMENTATION", "model_type": "MaskRCNN", "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://github.com/open-mmlab/mmdetection/blob/main/LICENSE", "tags": ["image-segmentation", "instance-segmentation", "vision"], "dataset_type": "coco-detection" }, @@ -1238,7 +1238,7 @@ "getitune_task": "SEMANTIC_SEGMENTATION", "model_type": "Segmentation", "license": "apache-2.0", - "license_link": "https://spdx.org/licenses/Apache-2.0.html", + "license_link": "https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/apache-2.0.md", "tags": ["image-segmentation", "semantic-segmentation", "vision"], "dataset_type": "ade20k" }, From d77826e58328288e101419f89887893d101ba63d Mon Sep 17 00:00:00 2001 From: "Tybulewicz, Tomasz" Date: Mon, 29 Jun 2026 15:31:35 +0200 Subject: [PATCH 11/13] Proper capitalization of licenses --- model_converter/src/model_converter/converters/base.py | 2 ++ model_converter/tests/unit/test_converters.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/model_converter/src/model_converter/converters/base.py b/model_converter/src/model_converter/converters/base.py index d6c704ad9..8a9f269ce 100644 --- a/model_converter/src/model_converter/converters/base.py +++ b/model_converter/src/model_converter/converters/base.py @@ -32,7 +32,9 @@ def _get_human_license_name(name: str) -> str: mapping = { + "agpl-3.0": "AGPL-3.0-only", "apache-2.0": "Apache-2.0", + "bsd-3-clause": "BSD-3-Clause", } return mapping.get(name, name) diff --git a/model_converter/tests/unit/test_converters.py b/model_converter/tests/unit/test_converters.py index b50bef80d..21a2da886 100644 --- a/model_converter/tests/unit/test_converters.py +++ b/model_converter/tests/unit/test_converters.py @@ -72,8 +72,9 @@ def test_renders_placeholders_and_tags_yaml(self, converter, template_dir, tmp_p ("license_id", "license_name"), [ ("apache-2.0", "Apache-2.0"), - ("BSD", "BSD"), ("rAnDoM", "rAnDoM"), + ("agpl-3.0", "AGPL-3.0-only"), + ("bsd-3-clause", "BSD-3-Clause"), ], ) def test_selects_correct_license_name( From 256c913b7fe1d655d2089eea91d06a8fcbcb3eb1 Mon Sep 17 00:00:00 2001 From: "Tybulewicz, Tomasz" Date: Mon, 29 Jun 2026 15:32:33 +0200 Subject: [PATCH 12/13] Correct license for resnet --- model_converter/presets/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model_converter/presets/config.json b/model_converter/presets/config.json index 50ad92f69..97cc83712 100644 --- a/model_converter/presets/config.json +++ b/model_converter/presets/config.json @@ -1083,7 +1083,7 @@ "getitune_recipe": "maskrcnn_r50", "model_type": "MaskRCNN", "tags": ["image-segmentation", "instance-segmentation", "vision"], - "license": "apache-2.0", + "license": "bsd-3-clause", "license_link": "https://github.com/pytorch/vision/blob/main/LICENSE", "dataset_type": "coco-detection" }, From d1709850f0a88a288df18923335c2083f48bdf28 Mon Sep 17 00:00:00 2001 From: "Tybulewicz, Tomasz" Date: Mon, 29 Jun 2026 15:48:45 +0200 Subject: [PATCH 13/13] Drop debug --- model_converter/src/model_converter/converters/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model_converter/src/model_converter/converters/base.py b/model_converter/src/model_converter/converters/base.py index 8a9f269ce..079d36727 100644 --- a/model_converter/src/model_converter/converters/base.py +++ b/model_converter/src/model_converter/converters/base.py @@ -578,7 +578,7 @@ def create_calibration_dataset( Tuple of (images, labels); both empty lists when dataset is unavailable. """ if not dataset_path or not dataset_path.exists(): - self.logger.warning(f"Dataset path `{dataset_path=}` not provided or doesn't exist. Skipping quantization.") + self.logger.warning("Dataset path not provided or doesn't exist. Skipping quantization.") return [], [] # Parse mean and scale values