게임·미디어 제작Games & media

ai-image-pairwise-eval

AI 생성 이미지를 감으로 평가하지 않고 쌍 비교와 참조 이미지 유사도로 평가합니다. 위치 편향을 걸러 냅니다.

GitHub에서 보기View on GitHub

어떤 문제를 푸나The problem

LLM이 '이 이미지가 더 낫다'고 말할 때 상당수는 '이게 먼저 보였다'를 말합니다. 두 이미지의 순서를 바꿔 두 번 물어보고, 답이 순서에 따라 뒤집히면 동점으로 처리합니다.

참조 이미지가 있을 때는 설명 대신 임베딩 유사도를 측정합니다. art_similarity.py는 open_clip(선택적으로 DINOv2)으로 후보와 참조의 코사인 유사도를 계산하고 임계값에 못 미치면 종료 코드 1입니다.

이런 분께 맞습니다Who it is for

AI 이미지 생성물의 일관성을 재현 가능한 방식으로 점검하고 싶은 제작자.

무엇을 하나What it does

  • pairwise.py는 두 실행에서 고른 위치(first 또는 second)로 승자를 정하거나 동점을 선언합니다.
  • art_similarity.py는 의존성이 없거나 이미지가 없으면 모델을 내려받기 전에 종료 코드 3으로 멈춥니다.
  • 임계값 0.85는 시작점이며 모든 곳에 통하는 기준이 아닙니다.

직접 돌려 본 출력Real output

저장소의 examples 폴더를 실행한 결과입니다.

$ bash examples/demo.sh
# Position bias: ask the judge twice with the two images swapped.
# Each answer is the POSITION picked (first|second). Consistent picks mean a real preference:
$ python3 scripts/pairwise.py first second
A
[exit 0]

# Picking 'first' both times means the judge likes position, not the image: a tie
$ python3 scripts/pairwise.py first first
TIE (answer flipped with order: position bias)
[exit 1]

# Embedding similarity to references needs:  pip install torch pillow open_clip_torch
$ python3 scripts/art_similarity.py
UNMEASURED: missing dependency (No module named 'torch'); pip install torch pillow open_clip_torch
[exit 3]

알아둘 한계Limits

  • 베타입니다. 테스트가 쌍 비교 로직만 다루고 모델 추론은 검증하지 않았습니다.
  • 임베딩 유사도는 품질 점수가 아닙니다.
  • 처음 실행할 때 공개 모델 저장소에서 가중치를 내려받습니다.

받아서 쓰기Get it

# 저장소를 받습니다
git clone https://github.com/Kein-chronicle/ai-image-pairwise-eval.git

# Claude Code 스킬로 쓰려면 이 폴더 이름으로 받습니다
git clone https://github.com/Kein-chronicle/ai-image-pairwise-eval.git ~/.claude/skills/art-eval

정보Info

분류Category
게임·미디어 제작Games & media
형태Type
명령줄 도구Command-line tool
라이선스License
MIT
필요한 것Requires
Python 3.10 이상, Pillow, torch, pillow, open_clip_torch(art_similarity.py를 쓸 때)
저장소Repository
ai-image-pairwise-eval
토픽Topics
generative-ai image-generation evaluation clip open-clip art game-art claude-skills

2026-10-18 기준: 저장소의 테스트를 로컬에서 실행해 통과했고, 예제 출력은 저장소의 examples 폴더를 실제로 실행한 결과입니다.

공유하기Share

문자Message 네이버 블로그Naver Blog X Facebook