스타일 (Classes)
| 클래스 | 한국어 | 프롬프트 표현 |
|---|
| formal | 포멀 | formal |
| street | 스트릿 | street |
| sporty | 스포티 | sporty |
| feminine | 페미닌 | feminine |
| casual | 캐주얼 | casual |
| vintage | 빈티지 | vintage |
사용법
# pip install open_clip_torch huggingface_hub safetensors
import json, torch, open_clip
from huggingface_hub import hf_hub_download
from safetensors.torch import load_file
repo = "2lY0/wearlystyle" # 비공개 저장소면 먼저 `huggingface-cli login`
cfg = json.load(open(hf_hub_download(repo, "musinsa_clip_config.json")))
model, _, preprocess = open_clip.create_model_and_transforms(cfg["model"], pretrained=None)
model.load_state_dict(load_file(hf_hub_download(repo, "model.safetensors"))); model.eval()
tok = open_clip.get_tokenizer(cfg["model"])
texts = [cfg["templates"][0].format(cfg["en_phrase"][c]) for c in cfg["classes"]]
질감 분류
tex = json.load(open(hf_hub_download(repo, "texture_prompts.json")))
# 클래스마다 tex['classes'][i]['texts'] 문장 임베딩 평균 → 사진(전체+조각 5개 평균) 임베딩과 cosine × 100 → softmax
라이선스
- 이 파인튜닝 가중치: CC BY-NC 4.0 (비상업적 이용)
- 원본 CLIP: MIT License, Copyright (c) 2021 OpenAI —
LICENSE_CLIP 파일 참고