File size: 4,015 Bytes
c5a149d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{
  "model": "dfine_s_coco",
  "upstream": {
    "model": "D-FINE-S (COCO), HF transformers port",
    "weights": {
      "repo": "ustc-community/dfine-small-coco",
      "revision": "f79e65b5fbb33ceb9d3ebba042955d7410c608f8",
      "file": "model.safetensors",
      "sha256": "a144baff3a27bfd538fe37b11fa8d4fca5744b8c054b5301e7c699a1379cd18f",
      "verified_against": {
        "repo": "Peterande/D-FINE",
        "revision": "19214e91f5ce4c1e609022c38b1fc953c47404e7",
        "file": "dfine_s_coco.pth",
        "sha256": "48a6c8cc43eb57186843f752e2e8461ddd3326e0d3c575e71e6e960844683e89",
        "result": "all 764 tensors bit-identical (verify_official.py)"
      }
    },
    "license": "Apache-2.0"
  },
  "versions": {
    "python": "3.12.15+meta",
    "torch": "2.14.1+cpu",
    "torchao": "0.18.0+cpu",
    "executorch": "1.5.1+cpu",
    "executorch_git": "3b60683923245cf472b7323426920e15623ba361",
    "transformers": "5.19.0",
    "huggingface_hub": "2.2.0"
  },
  "export": {
    "api": "torch.export.export(strict=False) -> to_edge_transform_and_lower(partitioner=[WebGPUPartitioner()]) -> to_executorch()",
    "partitioner": "executorch.backends.webgpu.partitioner.WebGPUPartitioner() (default compile options; wraps VulkanPartitioner)",
    "inputs": [
      {
        "shape": [
          1,
          3,
          640,
          640
        ],
        "dtype": "float32",
        "layout": "NCHW"
      }
    ],
    "outputs": [
      {
        "shape": [
          1,
          84,
          300
        ],
        "dtype": "float32"
      }
    ],
    "dtype": "float32",
    "quantization": "none (fp32)",
    "preprocessing_outside_graph": "RGB resize to 640x640 (letterbox also works), / 255; no mean/std",
    "postprocessing_outside_graph": "output [1, 84, 300]: cx, cy, w, h (input px) + 80 sigmoid probs; threshold; NMS optional",
    "rewrites": "see recipes/detector-dfine-small.py docstring and recipes/_detector.py"
  },
  "files": {
    "dfine_s_coco_webgpu.pte": {
      "bytes": 42260612,
      "sha256": "96cc65f615dc2c79d1da80ef075b831fac8e39e8dcb58af9aff5bab154a4c4d6"
    },
    "dfine_s_coco_portable.pte": {
      "bytes": 42299640,
      "sha256": "f36da046a83ee72fe4083e61253e6ae5dc52d843ba38faaf73fb10ecd29da8ac",
      "note": "CPU-only validation artifact (portable kernels, no delegate); not for release"
    }
  },
  "graph": {
    "non_delegated_kernels": {},
    "delegates": [
      {
        "id": "VulkanBackend",
        "ops": {
          "et_vk.prepack.default": 603,
          "aten.convolution.default": 99,
          "aten.mul.Tensor": 281,
          "aten.add.Tensor": 254,
          "aten.relu.default": 48,
          "aten.constant_pad_nd.default": 2,
          "aten.max_pool2d_with_indices.default": 1,
          "aten.cat.default": 66,
          "aten.clone.default": 5,
          "aten.view_copy.default": 110,
          "aten.permute_copy.default": 37,
          "aten.expand_copy.default": 8,
          "aten.bmm.default": 11,
          "aten._softmax.default": 11,
          "aten.linear.default": 59,
          "aten.native_layer_norm.default": 12,
          "aten.squeeze_copy.dims": 33,
          "aten.gelu.default": 1,
          "aten.upsample_nearest2d.vec": 2,
          "aten.sigmoid.default": 47,
          "aten.split_with_sizes_copy.default": 7,
          "aten.slice_copy.Tensor": 190,
          "aten.sub.Tensor": 358,
          "aten.gt.Scalar": 71,
          "aten.where.self": 308,
          "aten.lt.Scalar": 89,
          "aten.ge.Scalar": 97,
          "aten.sum.dim_IntList": 56,
          "dim_order_ops._to_dim_order_copy.default": 71,
          "aten.unsqueeze_copy.default": 6,
          "aten.gather.default": 5,
          "aten.div.Tensor": 25,
          "aten.neg.default": 1,
          "aten.le.Scalar": 4,
          "aten.mean.dim": 1
        },
        "inputs": 1,
        "outputs": 1
      }
    ]
  },
  "command": "python recipes/detector-dfine-small.py --out out/detector-dfine-small --image photo.jpg"
}