Skip to main content

DiffBMP: Fast Differentiable Painting with Any Image Primitives

Project description

DiffBMP: Differentiable Rendering with Bitmap Primitives

Project Page arXiv PyPI GitHub stars

Accepted to CVPR 2026

Authors

Seongmin Hong1,, Junghun James Kim2,, Daehyeop Kim3, Insoo Chung3, Se Young Chun1,2,3,†

1 INMC, 2 IPAI, 3 Dept. of ECE, Seoul National University, Republic of Korea

* Co-first authors    Corresponding author

Contact: {smhongok, jonghean12, 2012abcd, insoo_chung, sychun}@snu.ac.kr


Overview

DiffBMP is a fast differentiable rendering framework for creating vector art with arbitrary bitmap primitives. Unlike traditional vector graphics that rely on geometric primitives, DiffBMP enables the use of any image as a primitive, opening new possibilities for artistic expression and image synthesis.

🚀 Installation

You have two options for installation:

Option 1: PyPI Installation (Linux/WSL Only - Simple & Fast)

Best for users who want to quickly use DiffBMP without building from source.

# Install PyTorch first (if not already installed)
# Note: You can use any CUDA version compatible with your system (cu118, cu121, cu124, etc.)
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121

# Install pydiffbmp
pip install pydiffbmp

# Install system dependencies
sudo apt-get install poppler-utils

# Install additional Python dependencies (if needed)
pip install tqdm nvidia-ml-py fonttools svgwrite svgpathtools scour cairosvg psd-tools piq moviepy pyvista pandas scikit-image scipy

System Requirements

  • Python: 3.8, 3.9, 3.10, or 3.11
  • Platform: Linux x86_64 (Windows/macOS not supported for PyPI installation)
  • GPU: NVIDIA GPU with CUDA capability 8.6+ (RTX 3090, A100, RTX 4090, L40S, etc.)
  • CUDA Driver: 11.8+ (CUDA toolkit NOT required for PyPI installation)
  • PyTorch: 1.13.0+

⚠️ Note: Pre-built binaries are currently available for Linux only. Windows users should use WSL2 or build from source.

Option 2: Build from Source (All Platforms - Flexible)

Best for developers, customization, or if you need to build on Windows/macOS.

# Clone the repository
git clone https://github.com/smhongok/diffbmp.git
cd diffbmp

# Install dependencies
pip install -r requirements.txt

# Build CUDA extensions
cd cuda_tile_rasterizer
python setup.py build_ext --inplace
python setup_fp16.py build_ext --inplace
python setup_psd_export.py build_ext --inplace
cd ..

# Install in editable mode
pip install -e .

Build Requirements:

  • CUDA Toolkit 12.3+ (recommended)
  • C++ compiler (GCC 9.4.0+ recommended)
  • PyTorch 1.13.0+

For detailed build instructions and troubleshooting, see DEVELOPMENT.md.

Running the Original Research Code

The original research implementation is available in the GitHub repository:

# Clone the repository
git clone https://github.com/smhongok/diffbmp.git
cd diffbmp

# Run with configuration
python main.py --config configs/default.json

For more details on research code, evaluation scripts, and advanced features, see DEVELOPMENT.md.


📚 Citation

If you use DiffBMP in your research, please cite our paper:

@inproceedings{hong2026diffbmp,
  title={DiffBMP: Differentiable Rendering with Bitmap Primitives},
  author={Hong, Seongmin and Kim, Junghun James and Kim, Daehyeop and Chung, Insoo and Chun, Se Young},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  year={2026}
}

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.


For questions or issues, please open an issue on GitHub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydiffbmp-0.1.1.tar.gz (553.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydiffbmp-0.1.1-py3-none-any.whl (587.6 kB view details)

Uploaded Python 3

File details

Details for the file pydiffbmp-0.1.1.tar.gz.

File metadata

  • Download URL: pydiffbmp-0.1.1.tar.gz
  • Upload date:
  • Size: 553.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.18

File hashes

Hashes for pydiffbmp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e9a9279e1e329786a89bf0c6489127972e6a2785c479659b5e0b886b157ffd81
MD5 e2c0d73cdaf4662273e6f84dda96aec4
BLAKE2b-256 1cd2c2f46a17db24fd295cb305a120b81150dcabec3b816dae33d8af758cff8f

See more details on using hashes here.

File details

Details for the file pydiffbmp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pydiffbmp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 587.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.18

File hashes

Hashes for pydiffbmp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c3273e32b25df5f6079b6799029d541d998d182982df207071313740873ca252
MD5 a97329b031bb2f4d8a9318df6b470dc5
BLAKE2b-256 a1521c52d4f26e183681105de769fd1924c0c3d996ff9b3ae2ccdb500a36c12f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page