Skip to content

πŸ’ƒ Free CC0 mannequin pose reference library for AI image tools (Nano Banana, ChatGPT, ComfyUI, Midjourney) β€” 250+ poses Γ— 5 angles in line art, names in ja/zh/en/ko

feat(tools): costume repair rounds: intake --reset, sheets --only, QC merged by round

wquguru8ec5cdb73ebc
diff --git a/tools/costume_intake.py b/tools/costume_intake.py
index 2e0684c9..8a4646c0 100644
--- a/tools/costume_intake.py
+++ b/tools/costume_intake.py
@@ -53,12 +53,21 @@ def main() -> None:
ap.add_argument("src")
ap.add_argument("deliveries", nargs="+")
ap.add_argument("--model", default="~/.u2net/isnet-general-use.onnx")
+ ap.add_argument("--reset", help="manifest.json of a repair brief: its cells are cleared first, so a view turned "
+ "from an old front never stays next to a new one")
a = ap.parse_args()
src = pathlib.Path(a.src).expanduser()
for d in ("raw", "alpha", "grey", "dark"):
(src / d).mkdir(parents=True, exist_ok=True)
log_path = src / "intake.json"
log = json.loads(log_path.read_text()) if log_path.exists() else {}
+ if a.reset:
+ man = json.loads(pathlib.Path(a.reset).expanduser().read_text())
+ for cid, views in man["need"].items():
+ for v in views:
+ for d in ("raw", "alpha", "grey", "dark"):
+ (src / d / f"{cid}_{v}.png").unlink(missing_ok=True)
+ log[f"{cid}_{v}"] = {"from": man["run"], "status": "missing", "muse": "", "note": "reset for " + man["run"]}
sess = ort.InferenceSession(str(pathlib.Path(a.model).expanduser()),
providers=["CoreMLExecutionProvider", "CPUExecutionProvider"])
diff --git a/tools/costume_qc.py b/tools/costume_qc.py
index 4b49b010..016b3442 100644
--- a/tools/costume_qc.py
+++ b/tools/costume_qc.py
@@ -1,7 +1,8 @@
#!/usr/bin/env python3
"""Merge the costume QC inputs into data/costume-qc.json (docs/qc/costume_prompt.md).
-Inputs in data/costume-qc-input/, applied in file-name order so a later round overrides an earlier one:
+Inputs in data/costume-qc-input/, applied gen files first, then by review round (`_r<N>` in the name, e.g.
+fail_we_r2_01.json), reviewer before manual within a round, so a later round overrides an earlier one:
gen_<run>.json {"run", "missing": {"C007_front": "Muse note", …}}: cells the generator never produced
fail_<...>.json reviewer output {"reviewed": [ids], "fails": [{"id", "view", "status", "reason"}]}
manual_<...>.json same shape, written by a person; a fail entry with status "pass" re-admits a panel
@@ -10,7 +11,7 @@ A view is pass when its item was reviewed and no later file fails it; missing co
Usage: python3 -I tools/costume_qc.py
python3 -I tools/costume_qc.py --gen ~/Downloads/costume-hc/intake.json hc_run01 # record missing cells
"""
-import argparse, json, pathlib
+import argparse, json, pathlib, re
ROOT = pathlib.Path(__file__).resolve().parent.parent
INP, OUT = ROOT / "data/costume-qc-input", ROOT / "data/costume-qc.json"
@@ -32,7 +33,11 @@ def main() -> None:
items = {i["id"]: i for i in json.loads((ROOT / "data/costumes.json").read_text())["items"]}
qc = {}
- for f in sorted(INP.glob("*.json")):
+ def order(f):
+ m = re.search(r"_r(\d+)[_.]", f.name)
+ return (not f.name.startswith("gen_"), int(m.group(1)) if m else 1, f.name.startswith("manual_"), f.name)
+
+ for f in sorted(INP.glob("*.json"), key=order):
d = json.loads(f.read_text())
if f.name.startswith("gen_"):
for cell, note in d["missing"].items():
diff --git a/tools/costume_sheets.py b/tools/costume_sheets.py
index 0fb1f85a..1493b836 100644
--- a/tools/costume_sheets.py
+++ b/tools/costume_sheets.py
@@ -21,11 +21,13 @@ def main() -> None:
ap.add_argument("out")
ap.add_argument("--cat", default="")
ap.add_argument("--per", type=int, default=28)
+ ap.add_argument("--only", default="", help="comma-separated IDs, e.g. the items of a repair run")
a = ap.parse_args()
src, out = pathlib.Path(a.src).expanduser(), pathlib.Path(a.out).expanduser()
(out / "sheets").mkdir(parents=True, exist_ok=True)
big, small = ImageFont.truetype(FONT, 30), ImageFont.truetype(FONT, 22)
- items = [i for i in json.loads((ROOT / "data/costumes.json").read_text())["items"] if not a.cat or i["cat"] == a.cat]
+ items = [i for i in json.loads((ROOT / "data/costumes.json").read_text())["items"] if (not a.cat or i["cat"] == a.cat)
+ and (not a.only or i["id"] in a.only.split(","))]
made = []
for i in items:
files = [src / "dark" / f"{i['id']}_{v}.png" for v, _ in VIEWS]