Skip to main content

DiffBMP: Differentiable Rendering with Bitmap 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.2.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.2-py3-none-any.whl (587.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pydiffbmp-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 3f35a8925f15d0714c025945672fe196ea35e2f284cac95e82b267d23be02ce3
MD5 d4c75c20e7626c48b0776ccc63bf9e60
BLAKE2b-256 d5171a3ef7f078735577a7c65a5ead7291b1390d0cd8a9eb4b3fa594db2c32a4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pydiffbmp-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e54415927c8c802b51175a797f5bdf84ddb62eaefdcb9003c0cff61321688947
MD5 2d6a67227af96ddbb432338504c39715
BLAKE2b-256 180f952c188d5ff01b6a0eddbf5fc44f2c4fadcc5d3e07f54ba8fb92d566e19f

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