This is a simple unsupervised segmentation based method for turning a raster image into SVG.
You first need to install pypotrace.
Here are the steps to install pypotrace:
sudo apt-get install build-essential python-dev libagg-dev libpotrace-dev pkg-config
git clone https://github.com/mehdidc/pypotrace
cd pypotrace
git checkout to_xml
rm -f potrace/*.c potrace/*.cpp potrace/agg/*.cpp potrace/*.so potrace/agg/*.so
pip install .
Once pypotrace is available, you can install this repo. Here are the steps:
git clone https://github.com/mehdidc/pixel_to_svg
cd pixel_to_svg
python setup.py install
Please check the example in https://github.com/mehdidc/pixel_to_svg/tree/master/examples