跳到正文
r/MachineLearning· /u/Chroma-Crash·· 3 小时前AI 评分22

用神经网络为每种字体生成嵌入,Google Fonts 语料库呈现出花朵状结构

Embedding Every Font with Neural Networks makes some Nice Structures (including a flower) [P]

AI 导读

一位开发者用预训练神经网络为每种字体的全部字形生成嵌入向量,再用 tSNE 降维到 XYZ 与 RGB 通道进行可视化,发现相近位置或颜色的字体共享视觉特征。基于 Google Fonts 语料库生成的可视化意外呈现花朵形状,多数手写体(cursive)落在花蕊位置。该工具已开发约一年,相关代码仓库已公开。

正文
Embedding Every Font with Neural Networks makes some Nice Structures (including a flower) [P]

I've been working on a font searching tool for about a year now, and my investigations have centered around pre-training neural networks to produce embeddings of each font. I usually then need to post-train the networks to adapt them to the task of font searching. However, the most interesting thing I created in the course of the project came from the pre-trained models.

The process looks like this: I take every glyph in a font, turn them into images, feed them through my custom pre-trained neural network, and get an embedding that represents that font's visual characteristics. I can then squish down the embeddings with tSNE (produces the best structures compared to PCA and UMAP) into XYZ, and RGB channels and visualize them as dots so I can poke around the structure. Fonts that are close to each other in position or color therefore share visual characteristics, and you can find different little clusters or paths of types of fonts in the maps.

My favorite is one I made from the Google Fonts corpus, but I also made another one out of all the fonts you can search on my site. The Google Fonts corpus resembled a flower in ways I was not prepared for. It even placed most of the cursive fonts in the stamen. Here's the site if you're interested in viewing the whole thing yourself: https://www.font-search.com/map

You can also check out the repository although it is a huge mess. https://github.com/dylan-berndt/Briefcase

submitted by /u/Chroma-Crash
[link] [留言]

来源:r/MachineLearning · reddit.com