Personal Color Classifier
한국인 얼굴 이미지에서 퍼스널컬러 4계절 유형을 분류하는 EfficientNet-B0 기반 모델입니다.
Model source
- Kind
- Other
- File size
- 46.4 MB
- Version
- vRevision 7315a0c
- Updated
- Sep 28, 2026
- Downloads
- 0
- Source
- Hugging Face
Source description
Personal Color Classifier (퍼스널컬러 분류기)
한국인 얼굴 이미지에서 퍼스널컬러 4계절 유형을 분류하는 EfficientNet-B0 기반 모델입니다.
모델 성능
| Metric | Score |
|---|---|
| Test Accuracy (TTA) | 70.8% |
| Test Accuracy (단일 추론) | 68.3% |
| Macro F1 | 0.71 |
클래스별 성능 (TTA 기준)
| 클래스 | Precision | Recall | F1 |
|---|---|---|---|
| spring_warm (봄웜) | 0.69 | 0.80 | 0.74 |
| summer_cool (여쿨) | 0.97 | 0.84 | 0.90 |
| autumn_warm (가을웜) | 0.54 | 0.58 | 0.56 |
| winter_cool (겨울쿨) | 0.68 | 0.61 | 0.64 |
학습 전략
ImageNet pretrained EfficientNet-B0
→ Deep Armocromia base training (소스 도메인: 유럽인 얼굴, ~4,000장)
→ Korean celebrity fine-tuning (타겟 도메인: 한국 셀럽, ~2,368장)
- 전처리: MTCNN 얼굴 검출 → BiSeNet 피부 마스킹 (머리카락·눈·입술 제거)
- 정규화: Mixup (α=0.2), Label smoothing (0.1), Strong augmentation
- TTA: 6-crop 평균 (center crop + horizontal flip × 3 scale)
파일 구성
| 파일 | 설명 |
|---|---|
personal_color_korean_tuned_v2.pt | 메인 모델 — 최고 성능 fine-tuned 체크포인트 |
deep_armocromia_efficientnet_b0_base_rgb.pt | Base 체크포인트 (Deep Armocromia 학습) |
src/infer_personal_color.py | 단일 이미지 추론 스크립트 |
src/evaluate_personal_color.py | 테스트셋 평가 스크립트 |
PROGRESS_SNAPSHOT.md | 전체 실험 기록 요약 |
사용 방법
설치
pip install timm torch torchvision huggingface_hub
빠른 추론
import torch
import timm
from PIL import Image
from torchvision import transforms
from huggingface_hub import hf_hub_download
# 모델 로드
LABEL_ORDER = ["spring_warm", "summer_cool", "autumn_warm", "winter_cool"]
LABEL_KO = ["봄웜", "여쿨", "가을웜", "겨울쿨"]
ckpt_path = hf_hub_download(
"jiwoonkim00/personal-color-classifier",
"personal_color_korean_tuned_v2.pt"
)
model = timm.create_model("efficientnet_b0.ra_in1k", pretrained=False, num_classes=4)
ckpt = torch.load(ckpt_path, map_location="cpu")
model.load_state_dict(ckpt["model_state_dict"])
model.eval()
# 전처리
tf = transforms.Compose([
transforms.Resize(256),
transforms.CenterCrop(224),
transforms.ToTensor(),
transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]),
])
# 추론
img = Image.open("face.jpg").convert("RGB") # 얼굴이 크롭된 이미지
x = tf(img).unsqueeze(0)
with torch.no_grad():
probs = torch.softmax(model(x), dim=1).squeeze()
pred = probs.argmax().item()
print(f"예측: {LABEL_KO[pred]} ({LABEL_ORDER[pred]})")
print(f"확신도: {probs[pred]:.1%}")
추론 스크립트 사용 (얼굴 자동 검출 포함)
# 추가 패키지 필요
pip install facenet-pytorch opencv-python-headless
python src/infer_personal_color.py \
--image path/to/image.jpg \
--checkpoint personal_color_korean_tuned_v2.pt
출력 예시:
예측 결과: 여쿨 (summer_cool)
확신도: 0.84 (confident)
전체 확률:
봄웜 (spring_warm): 0.06
여쿨 (summer_cool): 0.84 ← 예측
가을웜 (autumn_warm): 0.04
겨울쿨 (winter_cool): 0.06
확신도 정책
| 확신도 | 등급 | 처리 |
|---|---|---|
| ≥ 0.70 | confident | 결과 신뢰 |
| 0.55 ~ 0.70 | moderate | 참고 수준 |
| < 0.55 | low | 재촬영 또는 수동 보정 권장 |
한계 및 주의사항
- 한국 셀럽 스크린샷 기반 데이터 — 메이크업·조명·편집 편향 존재
- 가을웜(autumn_warm) ↔ 봄웜(spring_warm) 혼동이 가장 잦음 (둘 다 웜톤)
- 프로토타입/포트폴리오 실험 목적으로 개발됨
- 임상·전문가 수준의 퍼스널컬러 진단 도구로 사용 불가
- 전문 진단이 필요한 경우 자격을 갖춘 퍼스널컬러 전문가에게 문의하세요
데이터셋
| 데이터셋 | 용도 | 이미지 수 |
|---|---|---|
| Korean Celebrity (자체 수집) | Fine-tuning | ~2,368장 |
| Deep Armocromia | Base training | ~4,920장 |
모델 아키텍처
- 백본:
efficientnet_b0.ra_in1k(timm) - 파라미터: 약 5.3M
- 입력: 224 × 224 RGB (피부 마스킹 적용 얼굴 이미지)
- 출력: 4-class softmax
Sources
1 source
Sources
1 sourceVerified Sep 28
Model artifacts
2 artifacts
Model artifacts
2 artifactsSource excerpts
2 excerpts
Source excerpts
2 excerpts--- license: mit language: - ko tags: - image-classification - personal-color - korean - efficientnet - timm - face datasets: - korean-celebrity - deep-armocromia metrics: - accuracy - f1 --- # Personal Color Classifier (퍼스널컬러 분류기) 한국인 얼굴 이미지에서 퍼스널컬러 4계절 유형을 분류하는 EfficientNet-B0 기반 모델입니다. ## 모델 성능 | Metric | Score | |---|---| | Test Accuracy (TTA) | **70.8%** | | Test Accuracy (단일 추론) | 68.3% | | Macro F1 | 0.71 | ### 클래스별 성능 (TTA 기준) | 클래스 | Precision | Recall | F1 | |---|---|---|---| | spring_warm (봄웜) | 0.69 | 0.80 | 0.74 | | summer_cool (여쿨) | 0.97 | 0.84 | 0.90 | | autumn_warm (가을웜) | 0.54 | 0.58 | 0.56 | | winter_cool (겨울쿨) | 0.68 | 0.61 | 0.64 | ## 학습 전략 ``` ImageNet pretrained EfficientNet-B0 → Deep Armocromia base training (소스 도메인: 유럽인 얼굴, ~4,000장) → Korean celebrity fine-tuning (타겟 도메인: 한국 셀럽, ~2,368장) ``` - **전처리**: MTCNN 얼굴 검출 → BiSeNet 피부 마스킹 (머리카락·눈·입술 제거) - **정규화**: Mixup (α=0.2), Label smoothing (0.1), Strong augmentation - **TTA**: 6-crop 평균 (center crop + horizontal flip × 3 scale) ## 파일 구성 | 파일 | 설명 | |---|---| | `personal_color_korean_tuned_v2.pt` | **메인 모델** — 최고 성능 fine-tuned 체크포인트 | | `deep_armocromia_efficientnet_b0_base_rgb.pt` | Base 체크포인트 (Deep Armocromia 학습) | | `src/infer_personal_color.py` | 단일 이미지 추론 스크립트 | | `src/evaluate_personal_color.py` | 테스트셋 평가 스크립트 | | `PROGRESS_SNAPSHOT.md` | 전체 실험 기록 요약 | ## 사용 방법 ### 설치 ```bash pip install timm torch torchvision huggingface_hub ``` ### 빠른 추론 ```python import torch import timm from PIL import Image from torchvision import transforms from huggingface_hub import hf_hub_download # 모델 로드 LABEL_ORDER = ["spring_warm", "summer_cool", "autumn_warm", "winter_cool"] LABEL_KO = ["봄웜", "여쿨", "가을웜", "겨울쿨"] ckpt_path = hf_hub_download( "jiwoonkim00/personal-color-classifier", "personal_color_korean_tuned_v2.pt" ) model = timm.create_model("efficientnet_b0.ra_in1k", pretrained=False, num_classes=4) ckpt = torch.load(ckpt_path, map_location="cpu") model.load_state_dict(ckpt["model_state_dict"]) model.eval() # 전처리 tf = transforms.Compose([ transforms.Resize(256), transforms.CenterCrop(224), transforms.ToTensor(), transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]), ]) # 추론 img = Image.open("face.jpg").convert("RGB") # 얼굴이 크롭된 이미지 x = tf(img).unsqueeze(0) with torch.no_grad(): probs = torch.softmax(model(x), dim=1).squeeze() pred = probs.argmax().item()...
Source context: 0 downloads · 0 likes · Pipeline image-classification · Library timm · Repo jiwoonkim00/personal-color-classifier
