게임·미디어 제작Games & media

ai-sprite-pipeline-audit

AI로 대량 생산한 스프라이트를 감사합니다. 스타일 기준 고정, 생성 원장, 중복 프레임, 진짜 투명도를 확인하고 배경도 제거합니다.

GitHub에서 보기View on GitHub

어떤 문제를 푸나The problem

대량 생성은 흐트러집니다. 스타일 기준 이미지가 몰래 바뀌고, 기록 없이 손으로 고친 프레임이 생기고, 배경이 PNG에 구워져 들어갑니다. audit_production.py는 그런 것들이 드러나게 합니다.

key_background.py는 가장자리와 이어진 밝은 단색 배경만 투명하게 만들어 눈동자 같은 안쪽 흰색은 지키고, 원본은 .prekey.png로 남깁니다.

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

게임 캐릭터나 스프라이트 프레임을 이미지 생성기로 대량 만들어 파이프라인으로 관리하는 사람.

무엇을 하나What it does

  • 마스터 락과 매니페스트의 스타일 기준이 같고 체크섬이 변하지 않았는지 확인하며, 기준이 락에 고정된 마스터가 아니면 실패합니다.
  • 모든 프레임에 원장 이벤트가 있어야 하고, 원장에 sha256이 있으면 파일과 같아야 합니다(없으면 경고, --require-ledger-hash로 실패).
  • RGBA인지, 완전 투명 픽셀이 충분한지(--min-transparent), 테두리가 투명한지, 반투명 안개가 없는지, 바이트 중복이 없는지 봅니다.
  • 배경 제거는 PNG만 받고 백업 파일은 건너뛰며, 한 장이 거부돼도 나머지를 계속 처리합니다.

직접 돌려 본 출력Real output

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

$ bash examples/demo.sh
# 1. A complete, consistent production passes
$ python3 scripts/audit_production.py .demo-tmp
WARN A: ledger event has no sha256, so a hand-edited file would not be detected
WARN B: ledger event has no sha256, so a hand-edited file would not be detected
{"expected": 2, "present": 2, "errors": 0}
[exit 0]

# 2. Someone quietly swaps the style master after frames were generated from it
$ python3 scripts/audit_production.py .demo-tmp
FAIL H01: approved master checksum changed (the style reference must be immutable)
FAIL H01: approved master is not a readable image (UnidentifiedImageError)
WARN A: ledger event has no sha256, so a hand-edited file would not be detected
WARN B: ledger event has no sha256, so a hand-edited file would not be detected
{"expected": 2, "present": 2, "errors": 2}
[exit 1]

알아둘 한계Limits

  • Pillow가 필요합니다.
  • 구조를 검사할 뿐 그림의 예술적 품질은 보지 않습니다.

받아서 쓰기Get it

# 저장소를 받습니다
git clone https://github.com/Kein-chronicle/ai-sprite-pipeline-audit.git

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

정보Info

분류Category
게임·미디어 제작Games & media
형태Type
명령줄 도구Command-line tool
라이선스License
MIT
필요한 것Requires
Python 3.10 이상, Pillow
저장소Repository
ai-sprite-pipeline-audit
토픽Topics
sprites game-art generative-ai image-generation pixel-art audit pillow claude-skills

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

공유하기Share

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