From e5cd3ec33bfaa14eaf037be937b720c394810274 Mon Sep 17 00:00:00 2001 From: jinkun Date: Thu, 16 Jul 2026 14:29:43 +0800 Subject: [PATCH] recipe(yolos-fashionpedia): add object detection recipes --- examples/recipes/README.md | 3 +- .../object-detection_fp16_config.json | 84 +++++++++++++++++++ .../object-detection_w8a8_config.json | 82 ++++++++++++++++++ 3 files changed, 168 insertions(+), 1 deletion(-) create mode 100644 examples/recipes/valentinafevu_yolos-fashionpedia/object-detection_fp16_config.json create mode 100644 examples/recipes/valentinafevu_yolos-fashionpedia/object-detection_w8a8_config.json diff --git a/examples/recipes/README.md b/examples/recipes/README.md index 86aa01869..54c0b0cf0 100644 --- a/examples/recipes/README.md +++ b/examples/recipes/README.md @@ -14,7 +14,7 @@ Each *(model, task)* includes: ## Models -Total: **75** (model, task) tuples that pass fp16 eval on all 10 (EP, device) buckets. +Total: **76** (model, task) tuples that pass fp16 eval on all 10 (EP, device) buckets. | Model | Task | |---|---| @@ -93,4 +93,5 @@ Total: **75** (model, task) tuples that pass fp16 eval on all 10 (EP, device) bu | sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 | feature-extraction | | sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 | sentence-similarity | | sentence-transformers/paraphrase-multilingual-mpnet-base-v2 | sentence-similarity | +| valentinafevu/yolos-fashionpedia | object-detection | | w11wo/indonesian-roberta-base-posp-tagger | token-classification | diff --git a/examples/recipes/valentinafevu_yolos-fashionpedia/object-detection_fp16_config.json b/examples/recipes/valentinafevu_yolos-fashionpedia/object-detection_fp16_config.json new file mode 100644 index 000000000..0f7c6af81 --- /dev/null +++ b/examples/recipes/valentinafevu_yolos-fashionpedia/object-detection_fp16_config.json @@ -0,0 +1,84 @@ +{ + "export": { + "opset_version": 17, + "batch_size": 1, + "export_params": true, + "do_constant_folding": true, + "verbose": false, + "dynamo": false, + "enable_hierarchy_tags": true, + "clean_onnx": false, + "hierarchy_tag_format": "full", + "input_tensors": [ + { + "name": "pixel_values", + "dtype": "float32", + "shape": [ + 1, + 3, + 512, + 864 + ], + "value_range": [ + 0, + 1 + ] + } + ], + "output_tensors": [ + { + "name": "logits" + }, + { + "name": "pred_boxes" + } + ] + }, + "optim": {}, + "quant": { + "mode": "fp16", + "samples": 10, + "calibration_method": "minmax", + "weight_type": "uint8", + "activation_type": "uint8", + "per_channel": false, + "symmetric": false, + "weight_symmetric": null, + "activation_symmetric": null, + "save_calibration": false, + "distribution": "uniform", + "seed": null, + "calibration_load_path": null, + "calibration_save_path": null, + "op_types_to_quantize": null, + "nodes_to_exclude": null, + "task": "object-detection", + "model_id": "valentinafevu/yolos-fashionpedia", + "model_type": "yolos", + "fp16_keep_io_types": true, + "fp16_op_block_list": null + }, + "compile": null, + "loader": { + "task": "object-detection", + "model_class": "AutoModelForObjectDetection", + "model_type": "yolos" + }, + "eval": { + "task": "object-detection", + "dataset": { + "path": "detection-datasets/fashionpedia", + "split": "val", + "samples": 100, + "shuffle": true, + "seed": 42, + "columns_mapping": { + "annotation_column": "objects", + "bbox_key": "bbox", + "category_key": "category", + "box_format": "xyxy", + "box_coords": "absolute" + } + } + } +} diff --git a/examples/recipes/valentinafevu_yolos-fashionpedia/object-detection_w8a8_config.json b/examples/recipes/valentinafevu_yolos-fashionpedia/object-detection_w8a8_config.json new file mode 100644 index 000000000..4788b9b1e --- /dev/null +++ b/examples/recipes/valentinafevu_yolos-fashionpedia/object-detection_w8a8_config.json @@ -0,0 +1,82 @@ +{ + "export": { + "opset_version": 17, + "batch_size": 1, + "export_params": true, + "do_constant_folding": true, + "verbose": false, + "dynamo": false, + "enable_hierarchy_tags": true, + "clean_onnx": false, + "hierarchy_tag_format": "full", + "input_tensors": [ + { + "name": "pixel_values", + "dtype": "float32", + "shape": [ + 1, + 3, + 512, + 864 + ], + "value_range": [ + 0, + 1 + ] + } + ], + "output_tensors": [ + { + "name": "logits" + }, + { + "name": "pred_boxes" + } + ] + }, + "optim": {}, + "quant": { + "mode": "static", + "samples": 10, + "calibration_method": "minmax", + "weight_type": "uint8", + "activation_type": "uint8", + "per_channel": false, + "symmetric": false, + "weight_symmetric": null, + "activation_symmetric": null, + "save_calibration": false, + "distribution": "uniform", + "seed": null, + "calibration_load_path": null, + "calibration_save_path": null, + "op_types_to_quantize": null, + "nodes_to_exclude": null, + "task": "object-detection", + "model_id": "valentinafevu/yolos-fashionpedia", + "model_type": "yolos" + }, + "compile": null, + "loader": { + "task": "object-detection", + "model_class": "AutoModelForObjectDetection", + "model_type": "yolos" + }, + "eval": { + "task": "object-detection", + "dataset": { + "path": "detection-datasets/fashionpedia", + "split": "val", + "samples": 500, + "shuffle": true, + "seed": 42, + "columns_mapping": { + "annotation_column": "objects", + "bbox_key": "bbox", + "category_key": "category", + "box_format": "xyxy", + "box_coords": "absolute" + } + } + } +}