aboutsummaryrefslogtreecommitdiff
path: root/convert.py
diff options
context:
space:
mode:
authorOnur Gündüz <ogunduz@gmail.com>2026-10-21 17:47:57 +0200
committerOnur Gündüz <ogunduz@gmail.com>2026-10-21 17:47:57 +0200
commit8b8acffcf5f1e9e9ddb552b8ac125e50f68987ac (patch)
tree9b618133a468585087ff4b014b22029d40b24bc5 /convert.py
parent2ce585cc96a3fffba65f1bafbfbc796c6370308f (diff)
downloadfacedet-master.tar.gz
facedet-master.zip
Rename to facedetHEADv0.1.0master
Diffstat (limited to 'convert.py')
-rw-r--r--convert.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/convert.py b/convert.py
index 429d122..678a6ba 100644
--- a/convert.py
+++ b/convert.py
@@ -153,7 +153,7 @@ def main():
onnx.checker.check_model(model)
heads = head_map(nodes)
plan, weights, shapes, offsets, arena = compile_plan(nodes, init, heads)
- lines = ["#ifndef YUNET_MODEL_DATA_H", "#define YUNET_MODEL_DATA_H", "",
+ lines = ["#ifndef FACEDET_MODEL_DATA_H", "#define FACEDET_MODEL_DATA_H", "",
"static const float model_weight_data[] = {"]
weight_offsets = []
pos = 0
@@ -166,14 +166,14 @@ def main():
pos += len(flat)
lines += ["};", "", "static const float *const model_weights[] = {"]
lines += [f" model_weight_data + {off}," for off in weight_offsets]
- lines += ["};", "", "static const yunet_op model_ops[] = {"]
+ lines += ["};", "", "static const facedet_op model_ops[] = {"]
for p in plan:
fields = [p["op"], p.get("group", 0), p.get("k", 0), p.get("s", 0),
p.get("pad", 0), p.get("relu", 0), p.get("widx", 0),
*p["in_shape"], *p["out_shape"], p["in_off"][0],
p["in_off"][1] if len(p["in_off"]) > 1 else 0, p["out_off"]]
lines.append(" {" + ", ".join(map(str, fields)) + "},")
- lines += ["};", "", "static const yunet_map_info model_maps[] = {"]
+ lines += ["};", "", "static const facedet_map_info model_maps[] = {"]
for name, (tensor, sigmoid) in heads.items():
c, h, w = shapes[tensor]
lines.append(f' {{"{name}", {offsets[tensor]}, {c}, {h}, {w}, {int(sigmoid)}}},')