-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathprepare_dataset.bat
More file actions
29 lines (24 loc) · 836 Bytes
/
Copy pathprepare_dataset.bat
File metadata and controls
29 lines (24 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
@echo off
setlocal enabledelayedexpansion
REM ==================== USER CONFIGURATIONS ====================
set "TARGET_FONT_PATH=fonts/target_font.ttf"
set "REFERENCE_FONTS_DIR=fonts/jigmo/"
set "IMG_WIDTH=512"
set "IMG_HEIGHT=512"
set "SAMPLE_RATIO=1.0"
REM ==================== DO NOT MODIFY BELOW ====================
for %%f in ("%TARGET_FONT_PATH%") do (
set "FILENAME=%%~nf"
)
set "SOURCE_CHARSET_PATH=charsets/unihan_coverage/!FILENAME!/covered.txt"
if exist "data" (
echo Removing existing data/ directory...
rmdir /s /q "data"
)
python prepare_dataset.py ^
--target_font_path "%TARGET_FONT_PATH%" ^
--reference_fonts_dir "%REFERENCE_FONTS_DIR%" ^
--source_charset_path "%SOURCE_CHARSET_PATH%" ^
--img_size "%IMG_WIDTH%" "%IMG_HEIGHT%" ^
--sample_ratio "%SAMPLE_RATIO%"
exit /b %errorlevel%