SCKEMPER commited on
Commit
d472bbf
·
verified ·
1 Parent(s): c27b258

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +61 -0
README.md ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ library_name: onnx
6
+ tags:
7
+ - face-detection
8
+ - centerface
9
+ - dynamic-input-shape
10
+ - rootreal
11
+ ---
12
+
13
+ # CenterFace — dynamic-input-shape ONNX (RootReal-curated)
14
+
15
+ A **dynamic-input-shape** ONNX export of **CenterFace** (anchor-free face detection +
16
+ 5-point landmarks), curated by RootReal to fix [Forgejo #11856](https://git.rootreal.io/textpast/rootreal/issues/11856).
17
+
18
+ ## Why this exists
19
+
20
+ The upstream [`Star-Clouds/CenterFace`](https://github.com/Star-Clouds/CenterFace) export
21
+ (`centerface.onnx`, MIT) declared a **fully static** input `input.1 = [10, 3, 32, 32]`
22
+ (fixed batch of 10 AND fixed 32×32 spatial dims). ONNX Runtime therefore rejects any real
23
+ detection tensor `(1, 3, H, W)`:
24
+
25
+ ```
26
+ INVALID_ARGUMENT: Got invalid dimensions for input: input.1
27
+ index: 0 Got: 1 Expected: 10
28
+ index: 2 Got: H Expected: 32
29
+ index: 3 Got: W Expected: 32
30
+ ```
31
+
32
+ The CenterFace graph is **purely convolutional** (60 Conv / 59 BatchNormalization /
33
+ 42 Relu / 13 Add / 3 ConvTranspose / 1 Sigmoid — no Reshape/Flatten/Tile that could bake
34
+ in static shape values), so the static shape is **purely an export artifact**. This model
35
+ rewrites `input.1` to **`[batch(dynamic), 3, height(dynamic), width(dynamic)]`** with
36
+ **zero weight/node change** — the canonical equivalent of passing
37
+ `dynamic_axes={'input.1': {0:'batch', 2:'height', 3:'width'}}` to `torch.onnx.export`,
38
+ without needing PyTorch.
39
+
40
+ ## Provenance / reproduction
41
+
42
+ - **Derived from:** `Star-Clouds/CenterFace` `models/onnx/centerface.onnx` (MIT).
43
+ - **Upstream sha256:** `77e394b51108381b4c4f7b4baf1c64ca9f4aba73e5e803b2636419578913b5fe`
44
+ - **This artifact sha256:** `884bf341ce5ba95a30667f86eaa36f24d62041d9d28002eee3bb6926701924bf`
45
+ - **Size:** 7,532,788 bytes (362 initializers + 178 nodes, byte-identical to upstream).
46
+ - **Reproduce:** `infrastructure/scripts/ml/centerface-rewrite-input-shape-dynamic.py`
47
+ in the [RootReal repo](https://git.rootreal.io/textpast/rootreal) regenerates this file
48
+ byte-for-byte from the upstream MIT source.
49
+
50
+ ## Accuracy
51
+
52
+ WIDER FACE val Easy/Medium/Hard: 0.935 / 0.924 / 0.875 (unchanged from upstream — only the
53
+ input shape declaration differs; the trained weights are identical).
54
+
55
+ ## Migration note
56
+
57
+ Hosted under a personal namespace (`SCKEMPER/centerface-dynamic`) because the RootReal
58
+ Hugging Face org (`rootreal/`) was not writable at curation time. Migration target:
59
+ `rootreal/centerface` (pending org access). The model is a deterministic MIT derivation
60
+ fully reproducible from the upstream source via the committed script, so re-hosting is
61
+ trivial.