gimlidc / font2image

Tool for conversion of vector fonts into numpy array for AI training

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Font2Image

Purpose of this tool is to create dataset useful for training AI for classification of set of fonts. The source here is the collection of google fonts (but simply other can be added, please check their LICENSE first) in vector format. Vector format is converted into raster format and finally these rasters are loaded into a numpy array suitable for Pythonic training.

Requirements

Run

poetry install
python scripts/font2h5matrix.py --fonts-root fonts --mode letters --symbols a --image-output-format jpeg -o letter-a-as-jpeg.h5

Roadmap (TBD)

  • dockerization for comaptibility

About

Tool for conversion of vector fonts into numpy array for AI training


Languages

Language:Python 100.0%