Add data_gen/setup_assets.sh for synthetic LP assets

- Clones qjadud1994/Korean-license-plate-Generator (MIT) on the server
- Provides plate backgrounds and pre-rendered glyph PNGs, avoiding font licensing
- Asset directory ignored from this repo

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
main
songhyeonsu 1 month ago
parent 3e5f823dd5
commit a9495e1387

3
.gitignore vendored

@ -16,6 +16,9 @@ data_gen/plate_templates/*.png
data_gen/plate_templates/*.jpg data_gen/plate_templates/*.jpg
!data_gen/plate_templates/.gitkeep !data_gen/plate_templates/.gitkeep
# 외부 자산 (setup_assets.sh로 받음, repo에 포함하지 않음)
data_gen/Korean-license-plate-Generator/
# 파이썬 # 파이썬
__pycache__/ __pycache__/
*.pyc *.pyc

@ -0,0 +1,26 @@
#!/usr/bin/env bash
# 합성 LP 생성에 필요한 자산(plate 배경 이미지 + 글자 PNG) 다운로드
# 출처: qjadud1994/Korean-license-plate-Generator (MIT License)
# 글자 PNG와 plate 배경을 사용. 합성 로직은 우리 코드에서 새로 작성.
# 실행 위치: data_gen/ 디렉토리에서
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ASSET_DIR="$SCRIPT_DIR/Korean-license-plate-Generator"
if [ -d "$ASSET_DIR" ]; then
echo "자산이 이미 존재: $ASSET_DIR (skip)"
exit 0
fi
echo "qjadud1994/Korean-license-plate-Generator 클론 중..."
git clone --depth 1 https://github.com/qjadud1994/Korean-license-plate-Generator.git "$ASSET_DIR"
echo
echo "자산 다운로드 완료. 사용 폴더:"
echo " - $ASSET_DIR/plate.jpg, plate_g.jpg, plate_y.jpg (plate 배경)"
echo " - $ASSET_DIR/char1/, char1_g/, char1_y/ (한글 글자)"
echo " - $ASSET_DIR/num/, num_g/, num_y/ (숫자)"
echo " - $ASSET_DIR/region_g/, region_y/ (지역명)"
echo "라이센스: MIT (자산 사용 시 LICENSE 동봉 권장)"
Loading…
Cancel
Save