Zero-Shot Image Classification
OpenCLIP
Safetensors
clip
fashion
style-classification
korean-fashion
Instructions to use 2lY0/wearlystyle with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- OpenCLIP
How to use 2lY0/wearlystyle with OpenCLIP:
import open_clip model, preprocess_train, preprocess_val = open_clip.create_model_and_transforms('hf-hub:2lY0/wearlystyle') tokenizer = open_clip.get_tokenizer('hf-hub:2lY0/wearlystyle') - Notebooks
- Google Colab
- Kaggle
์คํ์ผ (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ํ์ผ ์ฐธ๊ณ
- Downloads last month
- 45
Model tree for 2lY0/wearlystyle
Base model
openai/clip-vit-large-patch14