SkillAgentSearch skills...

AutoStegaFont

AutoStegaFont: Synthesizing Vector Fonts for Hiding Information in Documents

Install / Use

/learn @Kiode/AutoStegaFont
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

📝 AutoStegaFont: Synthesizing Vector Fonts for Hiding Information in Documents

Implementation of the paper:

"AutoStegaFont: Synthesizing Vector Fonts for Hiding Information in Documents" by Xi Yang, Jie Zhang, Han Fang, Chang Liu, Zehua Ma, Weiming Zhang, and Nenghai Yu.

Acknowledgments

Our code is built upon several open-source repositories, including DeepVecFont and Diffvg, which provide the foundation for our method.

Requirements

  • Python 3.9
  • Please check requirements.txt
  • We utilize the pretrained image super-resolution model and diffvg as adopted in Deepvecfont. Please visit https://github.com/yizhiwang96/deepvecfont to see how to download them.

Usage

To train the encoder and decoder in the first stage, run

$ python main.py --mode train --experiment_name times --model_name main_model --batch_size 64 --data_root data/trainset/  --l1_loss_w 1 --msg_loss_w 10 --generator_loss_w 1  --pt_c_loss_w 0.01 --font_id times

Then, generate the encoded glyph images.

$ python encoded_imgs_gen.py --mode test --experiment_name times --model_name main_model --test_epoch 950 --batch_size 52 --font_id times --char_categories 52

Convert the obtained glyph images into initial SVGs. Please install FontForge and adjust the script according to your system environment. Additionally, I think there are now better img2svg tools available.

$ python png2svg/pngs2svgs.py

To further convey the encoded information from encoded glyph images to corresponding SVGs, run

$ python transfer.py --experiment_name times --pthfile test --test_epoch 950 --font_len 52

Citation

If you find this work useful, please consider citing our paper:

@inproceedings{yang2023autostegafont,
  title={AutoStegaFont: synthesizing vector fonts for hiding information in documents},
  author={Yang, Xi and Zhang, Jie and Fang, Han and Liu, Chang and Ma, Zehua and Zhang, Weiming and Yu, Nenghai},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
  volume={37},
  number={3},
  pages={3198--3205},
  year={2023}
}

Related Skills

View on GitHub
GitHub Stars6
CategoryDevelopment
Updated6mo ago
Forks2

Languages

Python

Security Score

77/100

Audited on Sep 17, 2025

No findings