Add ONNX graphs: KvasirSEG.onnx, KvasirSEG.onnx.config.json, KvasirSEG.onnx.provenance.json (tools/hf_onnx_export.py)
Browse files- KvasirSEG.onnx +3 -0
- KvasirSEG.onnx.config.json +30 -0
- KvasirSEG.onnx.provenance.json +165 -0
KvasirSEG.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b5e467f52d15445767354d81f27d030b5d5d13a92079fd882f0131c27cf2475f
|
| 3 |
+
size 102064522
|
KvasirSEG.onnx.config.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema": "medotter/model-sidecar/v1",
|
| 3 |
+
"model": {
|
| 4 |
+
"graph": "onnx",
|
| 5 |
+
"args": {
|
| 6 |
+
"input_channel": 3,
|
| 7 |
+
"num_classes": 1
|
| 8 |
+
}
|
| 9 |
+
},
|
| 10 |
+
"inference": {
|
| 11 |
+
"normalize": {
|
| 12 |
+
"mean": [
|
| 13 |
+
0.485,
|
| 14 |
+
0.456,
|
| 15 |
+
0.406
|
| 16 |
+
],
|
| 17 |
+
"std": [
|
| 18 |
+
0.229,
|
| 19 |
+
0.224,
|
| 20 |
+
0.225
|
| 21 |
+
]
|
| 22 |
+
},
|
| 23 |
+
"scale": 255.0,
|
| 24 |
+
"size": [
|
| 25 |
+
256,
|
| 26 |
+
256
|
| 27 |
+
],
|
| 28 |
+
"threshold": 0.5
|
| 29 |
+
}
|
| 30 |
+
}
|
KvasirSEG.onnx.provenance.json
ADDED
|
@@ -0,0 +1,165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ema": "medotter/graph-provenance/v1",
|
| 3 |
+
"source": {
|
| 4 |
+
"file": "KvasirSEG.pth",
|
| 5 |
+
"sha256": "f18d9639d3e6484e47f414f5f883c6a5256e8a07cdfcf6b7ea99653edcef0192",
|
| 6 |
+
"reference": "KvasirSEG.pth",
|
| 7 |
+
"model": "Polyp_PVT",
|
| 8 |
+
"declaration_source": "sidecar",
|
| 9 |
+
"declaration": [
|
| 10 |
+
{
|
| 11 |
+
"file": "KvasirSEG.pth.config.json",
|
| 12 |
+
"sha256": "2592c5768a85a7c649fe49656fb8509cfcffd3953eb408a8fbe23842dc28f10f"
|
| 13 |
+
}
|
| 14 |
+
],
|
| 15 |
+
"float32_vs_float64": {
|
| 16 |
+
"shape": [
|
| 17 |
+
1,
|
| 18 |
+
3,
|
| 19 |
+
256,
|
| 20 |
+
256
|
| 21 |
+
],
|
| 22 |
+
"torch": "ok",
|
| 23 |
+
"float64": "ok",
|
| 24 |
+
"threads": 6,
|
| 25 |
+
"max_abs_diff": 6.520859488379216e-06,
|
| 26 |
+
"scale": 5.687302288252451,
|
| 27 |
+
"rel_diff": 1.1465646026673384e-06,
|
| 28 |
+
"kernel_noise_rel": 8.174635706791999e-07
|
| 29 |
+
}
|
| 30 |
+
},
|
| 31 |
+
"graph": {
|
| 32 |
+
"kind": "onnx",
|
| 33 |
+
"file": "KvasirSEG.onnx",
|
| 34 |
+
"sha256": "b5e467f52d15445767354d81f27d030b5d5d13a92079fd882f0131c27cf2475f",
|
| 35 |
+
"bytes": 102064522,
|
| 36 |
+
"opset": 20,
|
| 37 |
+
"dynamic": false,
|
| 38 |
+
"reason": "dynamic_export_error",
|
| 39 |
+
"input": "image",
|
| 40 |
+
"output": "logits",
|
| 41 |
+
"input_channel": 3,
|
| 42 |
+
"num_classes": 1,
|
| 43 |
+
"size": [
|
| 44 |
+
256,
|
| 45 |
+
256
|
| 46 |
+
]
|
| 47 |
+
},
|
| 48 |
+
"exporter": {
|
| 49 |
+
"api": "torch.onnx.export",
|
| 50 |
+
"name": "dynamo",
|
| 51 |
+
"dynamo": true,
|
| 52 |
+
"registered_symbolics": {},
|
| 53 |
+
"producer": "pytorch 2.13.0+cpu",
|
| 54 |
+
"torch": "2.13.0+cpu",
|
| 55 |
+
"onnx": "1.22.0",
|
| 56 |
+
"onnxruntime": "1.29.0"
|
| 57 |
+
},
|
| 58 |
+
"verification_input": {
|
| 59 |
+
"kind": "smooth_random_field",
|
| 60 |
+
"distribution": "normal",
|
| 61 |
+
"coarse_factor": 16,
|
| 62 |
+
"min_coarse": 4,
|
| 63 |
+
"interpolation": "bilinear",
|
| 64 |
+
"align_corners": false,
|
| 65 |
+
"seed": 0,
|
| 66 |
+
"pixel_domain": "uint8-range smooth field through the declaration's intensity contract",
|
| 67 |
+
"pixel_mean": 127.5,
|
| 68 |
+
"pixel_std": 45.0,
|
| 69 |
+
"through_contract": true
|
| 70 |
+
},
|
| 71 |
+
"attempts": [
|
| 72 |
+
{
|
| 73 |
+
"mode": "dynamic",
|
| 74 |
+
"exporter": "torchscript",
|
| 75 |
+
"outcome": "fell_back",
|
| 76 |
+
"reason": "dynamic_export_error",
|
| 77 |
+
"error": {
|
| 78 |
+
"kind": "export",
|
| 79 |
+
"text": "torchscript: SymbolicValueError: Unsupported: ONNX export of operator adaptive_avg_pool2d, input size not accessible. Please feel free to request support or submit a pull request on PyTorch GitHub: https://github.com/pytorch/pytorch/issues [Caused by the value 'input.715 defined in (%input.715 : Float(*, 16, *, *, strides=[16384, 1024, 32, 1], requires_grad=1, device=cpu) = onnx::Mul(%2052, %2047), scope: __main__.scored_head.<locals>.ScoredHead::/model_zoo.Transformer.Polyp_PVT.Polyp_PVT.PolypPVT::inner/model_zoo.Transformer.Polyp_PVT.Polyp_PVT.SAM::SAM # /home/csgrad/tianyulu/code/medotter/.worktrees/onnx-research/model_zoo/Transformer/Polyp_PVT/Polyp_PVT.py:98:0 )' (type 'Tensor') in the TorchScript graph. The containing node has kind 'onnx::Mul'.] (node defined in /home/csgrad/tianyulu/code/medotter/.worktrees/onnx-research/model_zoo/Transformer/Polyp_PVT/Polyp_PVT.py(98): forward /home/csgrad/tianyulu/.venvs/medotter-eval-v2/lib/python3.12/site-packages/torch/nn/modules/module.py(1768): _slow_forward /home/csgrad/tianyulu/.venvs/medotter-eval-v2/lib/python3.12/site-packages/torch/nn/modules/module.py(1789): _call_impl /home/csgrad/tianyulu/.venvs/medotter-eval-v2/lib/python3.12/site-packages/torch/nn/modules/module.py(1778): _wrapped_call_impl /home/csgrad/tianyulu/code/medotter/.worktrees/onnx-research/model_zoo/Transformer/Polyp_PVT/Polyp_PVT.py(208): forward /home/csgrad/tianyulu/.venvs/medotter-eval-v2/lib/python3.12/site-packages/torch/nn/modules/module.py(1768): _slow_forward /home/csgrad/tianyulu/.venvs/medotter-eval-v2/lib/python3.12/site-packages/torch/nn/modules/module.py(1789): _call_impl /home/csgrad/tianyulu/.venvs/medotter-eval-v2/lib/python3.12/site-packages/torch/nn/modules/module.py(1778): _wrapped_call_impl /home/csgrad/tianyulu/code/medotter/.worktrees/onnx-research/medotter/agent/tools/export_graph.py(913): forward /home/csgrad/tianyulu/.venvs/medotter-eval-v2/lib/python3.12/site-packages/torch/nn/modules/module.py(1768): _slow_forward /home/csgrad/tianyulu/.venvs/medotter-eval-v2/lib/python3.12/site-packages/torch/nn/modules/module.py(1789): _call_impl /home/csgrad/tianyulu/.venvs/medotter-eval-v2/lib/python3.12/site-packages/torch/nn/modules/module.py(1778): _wrapped_call_impl /home/csgrad/tianyulu/.venvs/medotter-eval-v2/lib/python3.12/site-packages/torch/jit/_trace.py(131): wrapper /home/csgrad/tianyulu/.venvs/medotter-eval-v2/lib/python3.12/site-packages/torch/jit/_trace.py(140): forward /home/csgrad/tianyulu/.venvs/medotter-eval-v2/lib/python3.12/site-packages/torch/nn/modules/module.py(1789): _call_impl /home/csgrad/tianyulu/.venvs/medotter-eval-v2/lib/python3.12/site-packages/torch/nn/modules/module.py(1778): _wrapped_call_impl /home/csgrad/tianyulu/.venvs/medotter-eval-v2/lib/python3.12/site-packages/torch/jit/_trace.py(1439): _get_trace_graph /home/csgrad/tianyulu/.venvs/medotter-eval-v2/lib/python3.12/site-packages/torch/onnx/_internal/torchscript_exporter/utils.py(898): _trace_and_get_graph_from_model /home/csgrad/tianyulu/.venvs/medotter-eval-v2/lib/python3.12/site-packages/torch/onnx/_internal/torchscript_exporter/utils.py(992): _create_jit_graph /home/csgrad/tianyulu/.venvs/medotter-eval-v2/lib/python3.12/site-packages/torch/onnx/_internal/torchscript_exporter/utils.py(1108): _model_to_graph /home/csgrad/tianyulu/.venvs/medotter-eval-v2/lib/python3.12/site-packages/torch/onnx/_internal/torchscript_exporter/utils.py(1510): _export /home/csgrad/tianyulu/.venvs/medotter-eval-v2/lib/python3.12/site-packages/torch/onnx/_internal/torchscript_exporter/utils.py(547): export /home/csgrad/tianyulu/.venvs/medotter-eval-v2/lib/python3.12/site-packages/torch/onnx/__init__.py(334): export /home/csgrad/tianyulu/code/medotter/.worktrees/onnx-research/medotter/agent/tools/export_graph.py(961): _export_onnx /home/csgrad/tianyulu/code/medotter/.worktrees/onnx-research/medotter/agent/tools/export_graph.py(1699): attempt /home/csgrad/tianyulu/code/medotter/.worktrees/onnx-research/medotter/agent/tools/export_graph.py(1736): cmd_export /home/csgrad/tianyulu/code/medotter/.worktrees/onnx-research/medotter/agent/tools/export_graph.py(1847): main /home/csgrad/tianyulu/code/medotter/.worktrees/onnx-research/medotter/agent/tools/export_graph.py(1851): <module> <frozen runpy>(88): _run_code <frozen runpy>(198): _run_module_as_main ) Inputs: #0: 2052 defined in (%2052 : Float(*, 16, *, *, strides=[16384, 1024, 32, 1], requires_grad=0, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%input.699, %inner.SAM.conv_proj.weight, %inner.SAM.conv_proj.bias), scope: __main__.scored_head.<locals>.ScoredHead::/model_zoo.Transformer.Polyp_PVT.Polyp_PVT.PolypPVT::inner/model_zoo.Transformer.Polyp_PVT.Polyp_PVT.SAM::SAM/torch.nn.modules.conv.Conv2d::conv_proj # /home/csgrad/tianyulu/.venvs/medotter-eval-v2/lib/python3.12/site-packages/torch/nn/modules/conv.py:560:0 ) (type 'Tensor') #1: 2047 defined in (%2047 : Float(*, 1, *, *, strides=[32768, 1024, 32, 1], requires_grad=1, device=cpu) = onnx::Unsqueeze(%2045, %2046), scope: __main__.scored_head.<locals>.ScoredHead::/model_zoo.Transformer.Polyp_PVT.Polyp_PVT.PolypPVT::inner/model_zoo.Transformer.Polyp_PVT.Polyp_PVT.SAM::SAM # /home/csgrad/tianyulu/code/medotter/.worktrees/onnx-research/model_zoo/Transformer/Polyp_PVT/Polyp_PVT.py:94:0 ) (type 'Tensor') Outputs: #0: input.715 defined in (%input.715 : Float(*, 16, *, *, strides=[16384, 1024, 32, 1], requires_grad=1, device=cpu) = onnx::Mul(%2052, %2047), scope: __main__.scored_head.<locals>.ScoredHead::/model_zoo.Transformer.Polyp_PVT.Polyp_PVT.PolypPVT::inner/model_zoo.Transformer.Polyp_PVT.Polyp_PVT.SAM::SAM # /home/csgrad/tianyulu/code/medotter/.worktrees/onnx-research/model_zoo/Transformer/Polyp_PVT/Polyp_PVT.py:98:0 ) (type 'Tensor')"
|
| 80 |
+
},
|
| 81 |
+
"verification": null
|
| 82 |
+
},
|
| 83 |
+
{
|
| 84 |
+
"mode": "static",
|
| 85 |
+
"exporter": "dynamo",
|
| 86 |
+
"outcome": "kept",
|
| 87 |
+
"reason": "dynamic_export_error",
|
| 88 |
+
"error": null,
|
| 89 |
+
"verification": [
|
| 90 |
+
{
|
| 91 |
+
"shape": [
|
| 92 |
+
1,
|
| 93 |
+
3,
|
| 94 |
+
256,
|
| 95 |
+
256
|
| 96 |
+
],
|
| 97 |
+
"torch": "ok",
|
| 98 |
+
"graph": "ok",
|
| 99 |
+
"max_abs_diff": 9.5367431640625e-06,
|
| 100 |
+
"scale": 5.687302112579346,
|
| 101 |
+
"rel_diff": 1.6768483501111792e-06
|
| 102 |
+
}
|
| 103 |
+
]
|
| 104 |
+
}
|
| 105 |
+
],
|
| 106 |
+
"verification": [
|
| 107 |
+
{
|
| 108 |
+
"shape": [
|
| 109 |
+
1,
|
| 110 |
+
3,
|
| 111 |
+
256,
|
| 112 |
+
256
|
| 113 |
+
],
|
| 114 |
+
"torch": "ok",
|
| 115 |
+
"graph": "ok",
|
| 116 |
+
"max_abs_diff": 9.5367431640625e-06,
|
| 117 |
+
"scale": 5.687302112579346,
|
| 118 |
+
"rel_diff": 1.6768483501111792e-06
|
| 119 |
+
}
|
| 120 |
+
],
|
| 121 |
+
"exported_at": "2026-09-09T23:28:38+00:00",
|
| 122 |
+
"release": {
|
| 123 |
+
"repo": "MedOtter/Polyp_PVT",
|
| 124 |
+
"revision": "e4fa7f105debb72adfb4d0abcc4df09612db1954",
|
| 125 |
+
"pth_file": "KvasirSEG.pth",
|
| 126 |
+
"pth_sha256": "f18d9639d3e6484e47f414f5f883c6a5256e8a07cdfcf6b7ea99653edcef0192",
|
| 127 |
+
"sidecar_sha256": "1445f651ec927f1196af8ad861bf4ef54128f23d2812ee825908fa7d98195fa6",
|
| 128 |
+
"sidecar_source": "hub",
|
| 129 |
+
"group": "checkout_only",
|
| 130 |
+
"reason": "dynamic_export_error",
|
| 131 |
+
"dynamic_attempt": null,
|
| 132 |
+
"reference_check": {
|
| 133 |
+
"dataset": "KvasirSEG",
|
| 134 |
+
"split": "val",
|
| 135 |
+
"samples": 4,
|
| 136 |
+
"reproducible": true,
|
| 137 |
+
"status": "pass",
|
| 138 |
+
"sizes": [
|
| 139 |
+
{
|
| 140 |
+
"size": [
|
| 141 |
+
256,
|
| 142 |
+
256
|
| 143 |
+
],
|
| 144 |
+
"predict_masks_equal": 4,
|
| 145 |
+
"pixels": 262144,
|
| 146 |
+
"disagreeing_pixels": 0,
|
| 147 |
+
"unexplained_pixels": 0,
|
| 148 |
+
"max_abs_diff": 3.147125244140625e-05,
|
| 149 |
+
"scale": 58.80316162109375,
|
| 150 |
+
"rel_diff": 5.351966046348934e-07,
|
| 151 |
+
"float32_vs_float64": {
|
| 152 |
+
"max_abs_diff": 3.847673688994746e-05,
|
| 153 |
+
"scale": 58.803138419428294,
|
| 154 |
+
"rel_diff": 6.543313490430116e-07,
|
| 155 |
+
"samples": 4,
|
| 156 |
+
"of": 4,
|
| 157 |
+
"complete": true
|
| 158 |
+
}
|
| 159 |
+
}
|
| 160 |
+
]
|
| 161 |
+
},
|
| 162 |
+
"tool": "tools/hf_onnx_export.py",
|
| 163 |
+
"stamped_at": "2026-09-09T23:28:49+00:00"
|
| 164 |
+
}
|
| 165 |
+
}
|