Skip to main content

DiffBMP: Differentiable Rendering with Bitmap Primitives

Project description

DiffBMP: Differentiable Rendering with Bitmap Primitives

Project Page arXiv GitHub PyPI

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


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:

@misc{hong2026diffbmp,
    author    = {Hong, Seongmin and Kim, Junghun James and Kim, Daehyeop and Chung, Insoo and Chun, Se Young},
    title     = {DiffBMP: Differentiable Rendering with Bitmap Primitives},
    arxiv     = {2602.22625},
    year      = {2026}
}

🙏 Acknowledgments

This work was inspired by and builds upon several excellent open-source projects:

We thank the authors of these projects for their contributions to the community.


📝 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.3.tar.gz (553.2 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.3-py3-none-any.whl (587.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pydiffbmp-0.1.3.tar.gz
  • Upload date:
  • Size: 553.2 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.3.tar.gz
Algorithm Hash digest
SHA256 87907d780d4bbbcc602277e69b85c4aaa46efb8c8ca5e76b41e821bebfffab14
MD5 e9ab49f943599ed93b02e3ed3956b60d
BLAKE2b-256 81edf1c40b3c90ac6c58bdccb35497e8c577ab8fe262c8b23a75c28ecfdf22ba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pydiffbmp-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9a2a876d2b143bb556bc845bf33f227b5d0af88fb72e16167787bf605045e97a
MD5 68b39986a5f8e4209425f3a05eaf1d08
BLAKE2b-256 41a119e836e6c274ba55b780fc492315e76622df8228cc6db309e44ba48dead9

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