Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/AxGord/claude-workflow --skill domain-reid명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Debugging meta-patterns — what to do when fixes don't stick
Game dev precision and physics gotchas
Claude Code configuration gotchas — permission rule syntax and evaluation order, settings hierarchy, plugin install scopes, hook behavior
SOC 직업 분류 기준
SKILL.md 표시 중
| name | domain-reid |
| description | Person re-identification ML gotchas |
BNNeck = BatchNorm before classifier. The trick:
This direction is commonly reversed — getting it wrong silently degrades results.
Typical: loss = CE_label_smoothing + triplet_hard_mining + 0.0005 * center_loss
The center loss weight (lambda=0.0005) is critical — too high destabilizes training.
Two-stage approach (NOT generic CLIP fine-tuning):
MSMT17 ~86.7% mAP is the SIE+OLP + re-ranking configuration — plain ViT-B CLIP-ReID lands in the low-to-mid 70s mAP. Don't quote 86.7 as the vanilla-model number.
| Method | Market-1501 R1/mAP | MSMT17 R1/mAP |
|---|---|---|
| CLIP-ReID (ViT-B, SIE+OLP, +re-rank) | 96.4 / 93.3 | 91.1 / 86.7 |
| TransReID (ViT-B) | 95.2 / 89.5 | 86.2 / 69.4 |
| BoT (ResNet-50) | 94.5 / 85.9 | 77.5 / 47.5 |
The CLIP-ReID row already includes k-reciprocal re-ranking — do NOT add the re-ranking boost from the section below on top of these numbers (double-count).
| Dataset | IDs | Images | Notes |
|---|---|---|---|
| Market-1501 | 1,501 | 32,668 | Most widely used |
| MSMT17 | 4,101 | 126,441 | Largest, preferred for SOTA |
| CUHK03 | 1,467 | 14,096 | Use "new protocol" (767/700 split) |
| MARS | 1,261 | 1,191,003 | Video-based (tracklets) |
Note: DukeMTMC-reID was retracted due to privacy concerns — avoid citing it.
Parameters: k1=20, k2=6, lambda=0.3. Boosts mAP by 5-10%. Use for offline, skip for real-time.
pip install torchreid fetches a stale 0.2.5 (2019) with a different API — import torchreid
often outright fails on a modern torch/numpy. The real KaiyangZhou/deep-person-reid is 1.4.x, git-only. Its setup.py imports numpy/Cython
at build time, so a plain pip install git+... fails under PEP-517 build isolation
(error: getting requirements to build wheel → ModuleNotFoundError: No module named 'torchreid'
/ numpy). Two working installs (both need numpy+Cython in the env):
pip install --no-build-isolation git+https://github.com/KaiyangZhou/deep-person-reid.git, or the
official git clone … && cd deep-person-reid && pip install -r requirements.txt && python setup.py develop
(its requirements.txt does NOT pin torch, so a preinstalled CUDA torch survives).
So a "package is installed but import raises" state ≠ missing — detect it with
importlib.util.find_spec(m) is not None + a real import attempt, and surface the actual exception
(don't report "missing" and re-suggest the PyPI name that caused it).
torchreid.metrics.evaluate_rank (run by every engine at the final epoch, and whenever
eval_freq fires) drops, for each query, every gallery sample sharing that query's
(pid, camid), then asserts num_valid_q > 0 → AssertionError: all query identities do not appear in gallery. A query is "valid" only if the same pid appears in gallery under a different
camid.
Trap when registering a custom ImageDataset for fine-tuning: if you build a throwaway
query/gallery by splitting one identity's crops but leave them under one camid, every query is
invalid → training crashes at the FINAL-EPOCH eval (not at data load, so it looks like a late,
unrelated failure). Fix: assign query camid=0, gallery camid=1 (or any distinct pair) with the
same pids on both sides.
Note the value gap vs cosine ReID: the evaluator ranks by that removal rule (Market1501 protocol); it is NOT a plain cosine-margin metric, so its CMC/mAP on a tiny throwaway split is meaningless — do the real margin eval separately.