Home

Awesome

Optimize and Reduce: A Top-Down Approach for Image Vectorization

Pytorch license AAAI

πŸ”” News

We propose Optimize & Reduce (O&R), a top-down approach to vectorization that is both fast and domain-agnostic. O&R aims to attain a compact representation of input images by iteratively optimizing BΓ©zier curve parameters and significantly reducing the number of shapes, using a devised importance measure.

title

By Or Hirschorn*, Amir Jevnisek*, and Shai Avidan

Where * denotes equal contribution.

πŸ“• Setup

cd docker
docker build -t optimize_and_reduce_aaai .
cd ..
docker run -v $(pwd):/home/code -it optimize_and_reduce_aaai /bin/bash

πŸš€ Run

  1. Running O&R:
python reduce_or_add_and_optimize.py --target target_images/083.png \
  --scheduler  256 128 64  --num_iter  100 100 100 \
   --recons_loss_type l1_and_clip_mix  --l1_and_clip_alpha 0.95  \
  --geometric_loss_type geometric --ranking_loss_type mse      \
  --canvas_width 256 --canvas_height 256  --advanced_logging
  1. Running the baseline DiffVG:
python basic_diffvg.py --target target_images/083.png \
  --num_paths 64       --num_epochs 1 --num_iter 400 \
  --recons_loss_type l1       --geometric_loss_type none \
  --canvas_width 256       --canvas_height 256 --scheduler 400 \
  --init_type random

πŸ“š Dataset Download

  1. Old Emojis, take the images from this list
  2. New Emojis, take the images from this list
  3. Free-SVG
  4. NFT-Apes
  5. Midjourney Images

🌈 Cite:

Please consider citing this paper if you found the code or data useful.

@inproceedings{DBLP:conf/aaai/OptimizeReduce,
  author       = {Or Hirchorn and
                  Amir Jevnisek and
                  Shai Avidan},
  title        = {Optimize and Reduce: A Top-Down Approach for Image Vectorization},
  booktitle    = {{AAAI}},
  publisher    = {{AAAI} Press},
  year         = {2024}
}