1. 학습
  2. /
  3. 강의
  4. /
  5. Hugging Face로 배우는 멀티모달 모델

Connected

연습 문제

캡션 품질 자동 평가

드레스 이미지를 정확히 분류하셨네요. 그렇다면 원래 설명은 얼마나 괜찮았을까요?

Maa Fab wrap with a Trendy design dress with Vibrant color for an elegant touch of Fabric completely Soft and Comfortable wear with amazing design of Solid Boat ? Neck Flared Dress to make a perfect addition to your wardrobe collection.

이제 CLIP 점수를 사용해 이 설명이 얼마나 정확한지 정량적으로 평가해 볼 거예요. torchmetrics의 clip_score() 함수와 함께 캡션(description), 이미지(image), ToTensor 클래스가 이미 로드되어 있습니다.

지침

100 XP
  • 이미지를 0-255 범위의 강도를 갖는 PyTorch 텐서로 변환하세요.
  • clip_score() 함수를 사용해 openai/clip-vit-base-patch32 모델로 image_tensor와 description을 비교하여 캡션의 품질을 평가하세요.