| { |
| "schema_version": "1.0", |
| "model": { |
| "model_id": "VC05", |
| "model_name": "ST MobileNetV2 alpha=0.35 224", |
| "task": "vision_classification", |
| "architecture_family": "Depthwise CNN + residual / MobileNetV2", |
| "source_framework": "TensorFlow/Keras -> TFLite", |
| "source_repository": "https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/1423c78953a830903485135febe1dd98ff31aed8/image_classification/mobilenetv2", |
| "license": "Apache-2.0", |
| "public_quantized_available": true, |
| "paired_fp32_available": true, |
| "pair_compatibility": "VERIFIED", |
| "dataset": "ImageNet", |
| "metric": "Top-1 accuracy", |
| "input_shape": [ |
| 1, |
| 224, |
| 224, |
| 3 |
| ], |
| "output_shape": [ |
| 1, |
| 1000 |
| ], |
| "preprocessing": "RGB resize 224x224; source config rescaling scale=1/127.5, offset=-1", |
| "label_space": "ImageNet 1000 classes using the paired ST artifact's class order", |
| "eligibility": "ELIGIBLE", |
| "priority": "P0", |
| "random_seed": 20260806 |
| }, |
| "artifacts": { |
| "fp32": { |
| "artifact_id": "VC05-registered-fp32-keras", |
| "source_url": "https://raw.githubusercontent.com/STMicroelectronics/stm32ai-modelzoo/1423c78953a830903485135febe1dd98ff31aed8/image_classification/mobilenetv2/Public_pretrainedmodel_public_dataset/ImageNet/mobilenetv2_a035_224/mobilenetv2_a035_224.keras", |
| "local_path": "{model_dir}/source/fp32/source_fp32.keras", |
| "format": "Keras v3", |
| "version": "1423c78953a830903485135febe1dd98ff31aed8", |
| "sha256": "a8e532a5bb25e8d29435ef159f6fbb81cc1358ec5716c98d5120794c2334d0cd", |
| "license": "Apache-2.0" |
| }, |
| "public_quantized": { |
| "artifact_id": "VC05-public-quantized-01", |
| "source_url": "https://media.githubusercontent.com/media/STMicroelectronics/stm32ai-modelzoo/1423c78953a830903485135febe1dd98ff31aed8/image_classification/mobilenetv2/Public_pretrainedmodel_public_dataset/ImageNet/mobilenetv2_a035_224/mobilenetv2_a035_224_int8.tflite", |
| "local_path": "{model_dir}/source/quantized/source_public_quantized.tflite", |
| "format": "TFLite FlatBuffer", |
| "version": "1423c78953a830903485135febe1dd98ff31aed8", |
| "sha256": "194192ddbf615a2c2ffb842a4370e8ff88fa6547958137e97cb09aaf44747067", |
| "license": "Apache-2.0 (artifact-directory LICENSE.md)" |
| } |
| }, |
| "stages": [ |
| { |
| "id": "acquire_fp32", |
| "stage": "source_acquisition", |
| "variant": "fp32", |
| "command": [ |
| "{python}", |
| "{repo_root}/scripts/stages/copy_artifact.py", |
| "--input", |
| "{repo_root}/research/downloads/vision/VC05/mobilenetv2_a035_224.keras", |
| "--output", |
| "{model_dir}/source/fp32/source_fp32.keras", |
| "--sha256", |
| "a8e532a5bb25e8d29435ef159f6fbb81cc1358ec5716c98d5120794c2334d0cd", |
| "--report", |
| "{model_dir}/source/fp32/copy_metadata.json" |
| ], |
| "inputs": [ |
| "{repo_root}/research/downloads/vision/VC05/mobilenetv2_a035_224.keras" |
| ], |
| "outputs": [ |
| "{model_dir}/source/fp32/source_fp32.keras", |
| "{model_dir}/source/fp32/copy_metadata.json" |
| ], |
| "requires": [], |
| "timeout_sec": 180, |
| "failure_code_on_error": "FAIL_SOURCE", |
| "validation_report": "{model_dir}/source/fp32/copy_metadata.json", |
| "options": { |
| "route": "IMMUTABLE_LOCAL_COPY_FROM_REGISTRY", |
| "checksum_required": true, |
| "quantization_generated": false, |
| "weights_modified": false |
| }, |
| "patch": null |
| }, |
| { |
| "id": "validate_fp32", |
| "stage": "baseline_tensorflow_inference", |
| "variant": "fp32", |
| "command": [ |
| "{repo_root}/environment/converters/tf2onnx/.venv/bin/python", |
| "{repo_root}/scripts/stages/inspect_tensorflow.py", |
| "--format", |
| "keras", |
| "--model", |
| "{model_dir}/source/fp32/source_fp32.keras", |
| "--report", |
| "{model_dir}/baseline/fp32_validation.json", |
| "--input-shape", |
| "1,224,224,3", |
| "--input-min", |
| "0.0", |
| "--input-max", |
| "255.0", |
| "--seed", |
| "20260806", |
| "--threads", |
| "1" |
| ], |
| "inputs": [ |
| "{model_dir}/source/fp32/source_fp32.keras" |
| ], |
| "outputs": [ |
| "{model_dir}/baseline/fp32_validation.json" |
| ], |
| "requires": [ |
| "acquire_fp32" |
| ], |
| "timeout_sec": 600, |
| "failure_code_on_error": "FAIL_BASELINE", |
| "validation_report": "{model_dir}/baseline/fp32_validation.json", |
| "options": { |
| "runtime": "tensorflow-cpu 2.20.0", |
| "threads": 1, |
| "batch_size": 1 |
| }, |
| "patch": null |
| }, |
| { |
| "id": "acquire_quantized", |
| "stage": "public_quantized_acquisition", |
| "variant": "public_quantized", |
| "command": [ |
| "{python}", |
| "{repo_root}/scripts/stages/copy_artifact.py", |
| "--input", |
| "{repo_root}/research/downloads/vision/VC05/mobilenetv2_a035_224_int8.tflite", |
| "--output", |
| "{model_dir}/source/quantized/source_public_quantized.tflite", |
| "--sha256", |
| "194192ddbf615a2c2ffb842a4370e8ff88fa6547958137e97cb09aaf44747067", |
| "--report", |
| "{model_dir}/source/quantized/copy_metadata.json" |
| ], |
| "inputs": [ |
| "{repo_root}/research/downloads/vision/VC05/mobilenetv2_a035_224_int8.tflite" |
| ], |
| "outputs": [ |
| "{model_dir}/source/quantized/source_public_quantized.tflite", |
| "{model_dir}/source/quantized/copy_metadata.json" |
| ], |
| "requires": [], |
| "timeout_sec": 180, |
| "failure_code_on_error": "FAIL_PUBLIC_QUANTIZED_ARTIFACT", |
| "validation_report": "{model_dir}/source/quantized/copy_metadata.json", |
| "options": { |
| "route": "IMMUTABLE_LOCAL_COPY_FROM_REGISTRY", |
| "checksum_required": true, |
| "quantization_generated": false, |
| "weights_modified": false |
| }, |
| "patch": null |
| }, |
| { |
| "id": "validate_quantized", |
| "stage": "public_quantized_inference", |
| "variant": "public_quantized", |
| "command": [ |
| "{python}", |
| "{repo_root}/scripts/stages/inspect_tflite.py", |
| "--model", |
| "{model_dir}/source/quantized/source_public_quantized.tflite", |
| "--report", |
| "{model_dir}/baseline/public_quantized_validation.json", |
| "--seed", |
| "20260806", |
| "--threads", |
| "1" |
| ], |
| "inputs": [ |
| "{model_dir}/source/quantized/source_public_quantized.tflite" |
| ], |
| "outputs": [ |
| "{model_dir}/baseline/public_quantized_validation.json" |
| ], |
| "requires": [ |
| "acquire_quantized" |
| ], |
| "timeout_sec": 600, |
| "failure_code_on_error": "FAIL_PUBLIC_QUANTIZED_LOAD", |
| "validation_report": "{model_dir}/baseline/public_quantized_validation.json", |
| "options": { |
| "runtime": "ai-edge-litert 2.1.6", |
| "threads": 1, |
| "batch_size": 1 |
| }, |
| "patch": null |
| }, |
| { |
| "id": "document_pair_boundary", |
| "stage": "mixed_format_pair_boundary_documentation", |
| "variant": "pair", |
| "artifact_id": "VC05-mixed-format-pair-boundary", |
| "command": [ |
| "{python}", |
| "{repo_root}/scripts/stages/document_mixed_pair_boundary.py", |
| "--fp32-report", |
| "{model_dir}/baseline/fp32_validation.json", |
| "--quantized-report", |
| "{model_dir}/baseline/public_quantized_validation.json", |
| "--report", |
| "{model_dir}/baseline/mixed_pair_boundary.json", |
| "--boundary", |
| "direct", |
| "--preprocessing-evidence", |
| "RGB resize 224x224; source config rescaling scale=1/127.5, offset=-1", |
| "--label-space-evidence", |
| "ImageNet 1000 classes using the paired ST artifact's class order", |
| "--dataset-evidence", |
| "ImageNet" |
| ], |
| "inputs": [ |
| "{model_dir}/baseline/fp32_validation.json", |
| "{model_dir}/baseline/public_quantized_validation.json" |
| ], |
| "outputs": [ |
| "{model_dir}/baseline/mixed_pair_boundary.json" |
| ], |
| "requires": [ |
| "validate_fp32", |
| "validate_quantized" |
| ], |
| "timeout_sec": 120, |
| "failure_code_on_error": "FAIL_BASELINE_PAIR_MISMATCH", |
| "validation_report": "{model_dir}/baseline/mixed_pair_boundary.json", |
| "options": { |
| "boundary": "direct", |
| "does_not_replace_registry_pair_evidence": true |
| }, |
| "patch": null |
| }, |
| { |
| "id": "convert_fp32_onnx", |
| "stage": "tensorflow_fp32_to_onnx_conversion", |
| "variant": "fp32", |
| "command": [ |
| "{repo_root}/environment/converters/tf2onnx/.venv/bin/python", |
| "{repo_root}/scripts/stages/convert_tensorflow_to_onnx.py", |
| "--input", |
| "{model_dir}/source/fp32/source_fp32.keras", |
| "--output", |
| "{model_dir}/onnx/fp32/model_fp32.onnx", |
| "--report", |
| "{model_dir}/onnx/fp32/onnx_conversion.json", |
| "--opset", |
| "16", |
| "--threads", |
| "1", |
| "--format", |
| "keras", |
| "--input-shape", |
| "1,224,224,3" |
| ], |
| "inputs": [ |
| "{model_dir}/source/fp32/source_fp32.keras", |
| "{repo_root}/environment/converters/tf2onnx/tool_versions.json" |
| ], |
| "outputs": [ |
| "{model_dir}/onnx/fp32/model_fp32.onnx", |
| "{model_dir}/onnx/fp32/onnx_conversion.json" |
| ], |
| "requires": [ |
| "acquire_fp32" |
| ], |
| "timeout_sec": 1200, |
| "failure_code_on_error": "FAIL_EXPORT", |
| "validation_report": "{model_dir}/onnx/fp32/onnx_conversion.json", |
| "options": { |
| "converter": "tf2onnx 1.17.0", |
| "tensorflow": "2.20.0", |
| "opset": 16, |
| "inference_only": true, |
| "fixed_shape": [ |
| 1, |
| 224, |
| 224, |
| 3 |
| ], |
| "quantization_generated": false |
| }, |
| "patch": "INFERENCE_WRAPPER_ONLY: fixed batch=1 TensorSpec; no layer, weight, or preprocessing change" |
| }, |
| { |
| "id": "validate_fp32_onnx", |
| "stage": "onnx_checker_shape_inference_runtime", |
| "variant": "fp32", |
| "command": [ |
| "{python}", |
| "{repo_root}/scripts/stages/inspect_onnx.py", |
| "--model", |
| "{model_dir}/onnx/fp32/model_fp32.onnx", |
| "--report", |
| "{model_dir}/onnx/fp32/onnx_check.json", |
| "--inferred-model", |
| "{model_dir}/onnx/fp32/model_fp32.inferred.onnx", |
| "--seed", |
| "20260806", |
| "--threads", |
| "1" |
| ], |
| "inputs": [ |
| "{model_dir}/onnx/fp32/model_fp32.onnx" |
| ], |
| "outputs": [ |
| "{model_dir}/onnx/fp32/onnx_check.json", |
| "{model_dir}/onnx/fp32/model_fp32.inferred.onnx" |
| ], |
| "requires": [ |
| "convert_fp32_onnx" |
| ], |
| "timeout_sec": 900, |
| "failure_code_on_error": "FAIL_RUNTIME", |
| "validation_report": "{model_dir}/onnx/fp32/onnx_check.json", |
| "options": { |
| "checker": true, |
| "shape_inference": true, |
| "runtime": "onnxruntime 1.22.1" |
| }, |
| "patch": null |
| }, |
| { |
| "id": "compare_fp32_onnx", |
| "stage": "tensorflow_onnx_numerical_comparison", |
| "variant": "fp32", |
| "command": [ |
| "{repo_root}/environment/converters/tf2onnx/.venv/bin/python", |
| "{repo_root}/scripts/stages/compare_tensorflow_target.py", |
| "--source-format", |
| "keras", |
| "--target-format", |
| "onnx", |
| "--source", |
| "{model_dir}/source/fp32/source_fp32.keras", |
| "--target", |
| "{model_dir}/onnx/fp32/model_fp32.onnx", |
| "--report", |
| "{model_dir}/onnx/fp32/onnx_output_compare.json", |
| "--input-shape", |
| "1,224,224,3", |
| "--input-min", |
| "0.0", |
| "--input-max", |
| "255.0", |
| "--seed", |
| "20260806", |
| "--threads", |
| "1", |
| "--atol", |
| "1e-05", |
| "--rtol", |
| "1e-05" |
| ], |
| "inputs": [ |
| "{model_dir}/source/fp32/source_fp32.keras", |
| "{model_dir}/onnx/fp32/model_fp32.onnx" |
| ], |
| "outputs": [ |
| "{model_dir}/onnx/fp32/onnx_output_compare.json" |
| ], |
| "requires": [ |
| "validate_fp32_onnx" |
| ], |
| "timeout_sec": 900, |
| "failure_code_on_error": "FAIL_NUMERICAL_MISMATCH", |
| "validation_report": "{model_dir}/onnx/fp32/onnx_output_compare.json", |
| "options": { |
| "same_seed_source_vs_target": true, |
| "atol": 1e-05, |
| "rtol": 1e-05, |
| "official_quality_metric": "NOT_RUN" |
| }, |
| "patch": null |
| }, |
| { |
| "id": "convert_quantized_onnx", |
| "stage": "public_quantized_tflite_to_onnx", |
| "variant": "public_quantized", |
| "command": [ |
| "{python}", |
| "{repo_root}/scripts/stages/convert_tflite_to_onnx.py", |
| "--converter-python", |
| "{repo_root}/environment/converters/tf2onnx/.venv/bin/python", |
| "--input", |
| "{model_dir}/source/quantized/source_public_quantized.tflite", |
| "--output", |
| "{model_dir}/onnx/quantized/model_quantized.onnx", |
| "--report", |
| "{model_dir}/onnx/quantized/onnx_conversion.json", |
| "--tool-versions", |
| "{repo_root}/environment/converters/tf2onnx/tool_versions.json", |
| "--opset", |
| "16" |
| ], |
| "inputs": [ |
| "{model_dir}/source/quantized/source_public_quantized.tflite", |
| "{repo_root}/environment/converters/tf2onnx/tool_versions.json" |
| ], |
| "outputs": [ |
| "{model_dir}/onnx/quantized/model_quantized.onnx", |
| "{model_dir}/onnx/quantized/onnx_conversion.json" |
| ], |
| "requires": [ |
| "acquire_quantized" |
| ], |
| "timeout_sec": 1200, |
| "failure_code_on_error": "FAIL_EXPORT", |
| "validation_report": "{model_dir}/onnx/quantized/onnx_conversion.json", |
| "options": { |
| "dequantize": false, |
| "quantization_generated": false, |
| "independent_variant_conversion": true |
| }, |
| "patch": null |
| }, |
| { |
| "id": "validate_quantized_onnx", |
| "stage": "onnx_checker_shape_inference_runtime", |
| "variant": "public_quantized", |
| "command": [ |
| "{python}", |
| "{repo_root}/scripts/stages/inspect_onnx.py", |
| "--model", |
| "{model_dir}/onnx/quantized/model_quantized.onnx", |
| "--report", |
| "{model_dir}/onnx/quantized/onnx_check.json", |
| "--inferred-model", |
| "{model_dir}/onnx/quantized/model_quantized.inferred.onnx", |
| "--seed", |
| "20260806", |
| "--threads", |
| "1" |
| ], |
| "inputs": [ |
| "{model_dir}/onnx/quantized/model_quantized.onnx" |
| ], |
| "outputs": [ |
| "{model_dir}/onnx/quantized/onnx_check.json", |
| "{model_dir}/onnx/quantized/model_quantized.inferred.onnx" |
| ], |
| "requires": [ |
| "convert_quantized_onnx" |
| ], |
| "timeout_sec": 900, |
| "failure_code_on_error": "FAIL_RUNTIME", |
| "validation_report": "{model_dir}/onnx/quantized/onnx_check.json", |
| "options": { |
| "checker": true, |
| "shape_inference": true, |
| "runtime": "onnxruntime 1.22.1" |
| }, |
| "patch": null |
| }, |
| { |
| "id": "inspect_quantized_onnx_preservation", |
| "stage": "onnx_quantization_preservation", |
| "variant": "public_quantized", |
| "command": [ |
| "{python}", |
| "{repo_root}/scripts/stages/inspect_onnx_quantization.py", |
| "--onnx-check", |
| "{model_dir}/onnx/quantized/onnx_check.json", |
| "--report", |
| "{model_dir}/onnx/quantized/onnx_quantization_inspection.json" |
| ], |
| "inputs": [ |
| "{model_dir}/onnx/quantized/onnx_check.json" |
| ], |
| "outputs": [ |
| "{model_dir}/onnx/quantized/onnx_quantization_inspection.json" |
| ], |
| "requires": [ |
| "validate_quantized_onnx" |
| ], |
| "timeout_sec": 120, |
| "failure_code_on_error": "FAIL_QUANTIZATION_PRESERVATION", |
| "validation_report": "{model_dir}/onnx/quantized/onnx_quantization_inspection.json", |
| "options": { |
| "float_fallback_is_failure": true, |
| "accepted": [ |
| "QDQ", |
| "QOPERATOR", |
| "MIXED_QOPERATOR_QDQ" |
| ] |
| }, |
| "patch": null |
| }, |
| { |
| "id": "compare_quantized_onnx", |
| "stage": "tflite_onnx_numerical_comparison", |
| "variant": "public_quantized", |
| "command": [ |
| "{python}", |
| "{repo_root}/scripts/stages/compare_tflite_onnx.py", |
| "--tflite", |
| "{model_dir}/source/quantized/source_public_quantized.tflite", |
| "--onnx", |
| "{model_dir}/onnx/quantized/model_quantized.onnx", |
| "--report", |
| "{model_dir}/onnx/quantized/onnx_output_compare.json", |
| "--seed", |
| "20260806", |
| "--threads", |
| "1", |
| "--atol", |
| "0", |
| "--rtol", |
| "0" |
| ], |
| "inputs": [ |
| "{model_dir}/source/quantized/source_public_quantized.tflite", |
| "{model_dir}/onnx/quantized/model_quantized.onnx" |
| ], |
| "outputs": [ |
| "{model_dir}/onnx/quantized/onnx_output_compare.json" |
| ], |
| "requires": [ |
| "validate_quantized_onnx" |
| ], |
| "timeout_sec": 900, |
| "failure_code_on_error": "FAIL_NUMERICAL_MISMATCH", |
| "validation_report": "{model_dir}/onnx/quantized/onnx_output_compare.json", |
| "options": { |
| "strict_integer_or_float_output_match": true, |
| "atol": 0.0, |
| "rtol": 0.0 |
| }, |
| "patch": null |
| } |
| ] |
| } |
|
|