Skip to content
Hozan KousaCreative Developer & Filmmaker
Back to projects

Raster to Vector

Comparison of the original photograph and its vectorized version, created using my raster-to-vector conversion tool.
Raster to Vector — Original photo © Anders Hellberg, via Wikimedia Commons, CC BY-SA 4.0.

Developed as my bachelor’s thesis in Computer Science at TU Dortmund University, this project explores how raster images can be converted into editable SVG graphics. It compares classical image processing, deep learning, and a hybrid approach to investigate the balance between visual detail, meaningful image regions, and vector complexity.

Technologies

  • AI Development
  • Jupyter Notebook
  • NumPy
  • OpenCV
  • Python
  • PyTorch
  • scikit-image
  • Torchvision

Project links

University project

I built a modular Python pipeline covering image segmentation, region merging, contour extraction, and SVG generation. The project investigates how different segmentation methods influence the quality and structure of the resulting vector graphics. For the classical approach, I used SLIC superpixels to divide images into small regions, then implemented region adjacency graph (RAG) merging strategies based on color similarity, region area, and boundary characteristics. These methods provide control over the level of abstraction and detail. For the deep learning approach, I used DeepLabv3 with a ResNet-101 backbone in PyTorch and fine-tuned the model on facial images and annotations from CelebAMask-HQ. I also implemented a hybrid method that intersects semantic labels with classical image regions, combining semantic boundaries with finer visual subdivisions. The vectorization stage extracts region contours using OpenCV, simplifies them with the Ramer–Douglas–Peucker algorithm, and exports colored paths as editable SVG files, including support for holes within shapes. I developed Jupyter notebooks for training, experimentation, and visual comparison. Evaluation combined RMSE, PSNR, and SSIM with edge and region-based measures to examine image similarity, boundary preservation, and segmentation complexity.

More projects

View all projects

Loading more projects...