-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathsam21_mask_decoder_ov.json
More file actions
83 lines (83 loc) · 2.53 KB
/
Copy pathsam21_mask_decoder_ov.json
File metadata and controls
83 lines (83 loc) · 2.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{
"input_model": {
"type": "PyTorchModel",
"model_path": "facebook/sam2.1-hiera-small",
"model_script": "ov_model_utils.py",
"model_loader": "load_sam21_mask_decoder"
},
"systems": {
"local_system": {
"type": "LocalSystem",
"accelerators": [
{
"device": "npu",
"execution_providers": [
"OpenVINOExecutionProvider"
]
}
]
}
},
"data_configs": [
{
"name": "decoder_data_config",
"user_script": "ov_decoder_quant.py",
"load_dataset_config": {
"type": "coco128_decoder_dataset",
"decoder_inputs_dir": "quantization_dataset/decoder_inputs"
},
"dataloader_config": {
"batch_size": 1
}
}
],
"passes": {
"convert": {
"type": "OpenVINOConversion",
"user_script": "ov_model_utils.py",
"example_input_func": "example_sam21_mask_decoder_input",
"static": true,
"compress_to_fp16": false,
"model_name": "sam21_decoder_pt_ov_int8"
},
"ov_quantize": {
"type": "OpenVINOQuantization",
"target_device": "npu",
"data_config": "decoder_data_config",
"model_type": "TRANSFORMER",
"user_script": "ov_decoder_quant.py",
"transform_fn": "decoder_transform_fn",
"extra_configs": [
{
"advanced_quantization_parameters": {
"smooth_quant_alpha": 0.6
}
}
]
},
"io_update": {
"type": "OpenVINOIoUpdate",
"static": true,
"input_names": [
"image_embeddings", "high_res_feats_256", "high_res_feats_128",
"point_coords", "point_labels"
],
"input_shapes": [
[1, 256, 64, 64], [1, 32, 256, 256],
[1, 64, 128, 128], [1, 5, 2],
[1, 5]
],
"reuse_cache": true
},
"encapsulation": {
"type": "OpenVINOEncapsulation",
"target_device": "npu",
"ov_version": "2025.1",
"reuse_cache": true
}
},
"search_strategy": false,
"target": "local_system",
"evaluate_input_model": false,
"output_dir": "model/decoder"
}