1. Learn
  2. /
  3. Courses
  4. /
  5. Hugging Face로 배우는 멀티모달 모델

Connected

Exercise

Vision Language Transformer(ViLT)로 VQA 수행하기

이제 멀티모달 생성에 직접 도전해 볼 시간이에요. 먼저 Visual Question-Answering(VQA)부터 시작해 볼게요. dandelin/vilt-b32-finetuned-vqa 모델을 사용해 다음 이미지에서 신호등의 색을 판별해 보세요:

Picture of a traffic light showing red

전처리기(processor), 모델(model), 그리고 이미지(image)는 미리 로드되어 있어요.

Instructions

100 XP
  • text 프롬프트와 image를 전처리하세요.
  • 모델에서 정답 토큰을 생성해 outputs에 할당하세요.
  • 출력 logits를 사용해 신뢰도가 가장 높은 정답의 ID를 찾으세요.