cstr's picture
SAM 2.1 Hiera-tiny image-mode ONNX export (encoder, decoder), verified against PyTorch CPU
faf41b8 verified
Raw History Blame Contribute Delete
2.74 kB
{
"schema": "crisp3ds_sam_model_v1",
"model": "sam2.1_hiera_tiny",
"license": "Apache-2.0 (SAM 2, Copyright Meta Platforms, Inc. and affiliates)",
"format": "onnx",
"opset": 17,
"image_size": 1024,
"mask_size": 256,
"mean": [
0.485,
0.456,
0.406
],
"std": [
0.229,
0.224,
0.225
],
"encoder": "encoder.onnx",
"decoder": "decoder.onnx",
"dynamic_multimask": {
"enabled": false,
"stability_delta": 0.05,
"stability_threshold": 0.98
},
"files": {
"encoder.onnx": {
"bytes": 109473919,
"sha256": "4fda6e68561e27808cedffa8689749a622bba5f11ba66f4ca4e3a8a9f6360db5"
},
"decoder.onnx": {
"bytes": 20655795,
"sha256": "0ae944e08e55814c19afa4d143ef07b1a3dbad2decd77c15ec3ab220b9f57247"
}
},
"operators": {
"encoder.onnx": {
"Add": 127,
"Cast": 146,
"Concat": 113,
"Constant": 1011,
"ConstantOfShape": 12,
"Conv": 7,
"Cos": 6,
"Div": 87,
"Erf": 12,
"Expand": 7,
"Gather": 109,
"LayerNormalization": 24,
"MatMul": 77,
"MaxPool": 6,
"Mod": 48,
"Mul": 78,
"Pad": 5,
"Range": 6,
"Reshape": 94,
"Resize": 1,
"Shape": 136,
"Sin": 6,
"Slice": 54,
"Softmax": 12,
"Split": 12,
"Sqrt": 36,
"Squeeze": 36,
"Sub": 29,
"Tile": 7,
"Transpose": 94,
"Unsqueeze": 250
},
"decoder.onnx": {
"Add": 64,
"Cast": 62,
"Concat": 51,
"Constant": 378,
"ConstantOfShape": 12,
"ConvTranspose": 2,
"Cos": 1,
"Div": 33,
"Equal": 13,
"Erf": 2,
"Expand": 10,
"Gather": 117,
"Gemm": 15,
"LayerNormalization": 9,
"MatMul": 48,
"Mul": 37,
"Neg": 1,
"OneHot": 1,
"Pow": 1,
"Range": 4,
"ReduceMean": 2,
"Relu": 12,
"Reshape": 44,
"ScatterND": 2,
"Shape": 134,
"Sigmoid": 1,
"Sin": 1,
"Slice": 15,
"Softmax": 7,
"Sqrt": 22,
"Sub": 2,
"Tile": 1,
"Transpose": 31,
"Unsqueeze": 114,
"Where": 13
}
},
"exported_from": {
"checkpoint_sha256": "7402e0d864fa82708a20fbd15bc84245c2f26dff0eb43a4b5b93452deb34be69",
"config": "configs/sam2.1/sam2.1_hiera_t.yaml",
"torch": "2.7.0",
"onnx": "1.23.2"
},
"check": {
"work": "/Users/christianstrobele/code/crisp3ds/.local-tools/sam-native-229/reference/bunny-mps/work",
"photo_size": [
1749,
1155
],
"torch": "2.7.0",
"onnxruntime": "1.30.0",
"graphs": {
"encoder.onnx": {
"views": 8,
"image_embed_max_abs_difference": 1.4901161193847656e-05,
"mask_logit_max_abs_difference": 7.152557373046875e-05,
"predicted_iou_max_abs_difference": 6.556510925292969e-07,
"raw_mask_iou_minimum_over_candidates": 0.9999957481185424,
"selected_mask_iou_median": 1.0,
"selected_mask_iou_minimum": 1.0,
"same_candidate_selected": 8
}
}
}
}