PPS-Ctrl: Controllable Sim-to-Real Translation for Colonoscopy Depth Estimation

This repository profile is provided by osrepos.com, an open source repository discovery platform.

PPS-Ctrl: Controllable Sim-to-Real Translation for Colonoscopy Depth Estimation

Summary

PPS-Ctrl is an innovative image translation framework designed for controllable sim-to-real translation in colonoscopy depth estimation. It leverages Stable Diffusion and ControlNet, guided by a unique Per-Pixel Shading (PPS) map. This approach provides a physics-informed structural prior, enhancing texture realism and structure preservation in medical imaging applications.

Repository Information

Analyzed by OSRepos on November 28, 2025

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

Introduction

PPS-Ctrl introduces a novel image translation framework for controllable sim-to-real translation, specifically tailored for colonoscopy depth estimation. This project combines the power of Stable Diffusion and ControlNet, uniquely guided by a Per-Pixel Shading (PPS) map. Unlike traditional sim-to-real methods that rely on depth maps, PPS-Ctrl utilizes a physics-informed representation of surface-light interactions, ensuring a more faithful and geometrically consistent structural prior. This results in superior texture realism and structure preservation, crucial for accurate medical image translation.

Installation

To get started with PPS-Ctrl, follow these steps to set up your environment and prepare your data.

1. Environment Setup

It is recommended to use Python 3.9 with PyTorch ? 2.0 and the HuggingFace diffusers library.

conda create -n ppsctrl python=3.9
conda activate ppsctrl
pip install -r requirements.txt

2. Prepare Data

Download the necessary datasets:

After downloading, precompute PPS maps using the provided utility script:

pip install opencv-python # Required for compute_pps.py
python utils/compute_pps.py --depth_dir path/to/depth --output_dir path/to/pps

Examples

PPS-Ctrl's workflow involves a two-stage training process followed by inference.

1. Train

Stage 1: Fine-tune Stable Diffusion

bash scripts/train_sd.sh

Stage 2: Train ControlNet with PPS conditioning

bash scripts/train_controlnet.sh

2. Inference

Once trained, you can perform inference to generate images:

python scripts/infer.py --depth path/to/test/depth --output path/to/save

Why Use PPS-Ctrl?

PPS-Ctrl offers significant advantages for researchers and developers working on medical image translation, particularly in colonoscopy. By leveraging a Per-Pixel Shading map as a structural prior, it achieves superior texture realism and maintains geometric consistency, which are critical for accurate depth estimation in complex anatomical environments. This physics-informed approach provides a robust foundation for developing more reliable sim-to-real translation models, potentially leading to advancements in surgical simulation, training, and diagnostic tools.

Links

Related repositories

Similar repositories that may be relevant next.

webassets: Asset Management for Python Web Development

webassets: Asset Management for Python Web Development

July 26, 2026

webassets is a robust library designed for asset management in Python web development. It simplifies the process of merging and compressing JavaScript and CSS files, enhancing application performance. This tool is essential for developers looking to optimize their frontend assets efficiently.

PythonWeb DevelopmentAsset Management
requests-html: Pythonic HTML Parsing with JavaScript Support

requests-html: Pythonic HTML Parsing with JavaScript Support

July 25, 2026

requests-html is a Python library designed to simplify HTML parsing and web scraping. It extends the familiar Requests experience with powerful parsing capabilities, including full JavaScript support via Chromium, CSS selectors, and XPath. This makes it an ideal tool for developers needing to interact with dynamic web content.

PythonWeb ScrapingHTML Parsing
Grab: A Powerful Python Web Scraping Framework

Grab: A Powerful Python Web Scraping Framework

July 24, 2026

Grab is a robust Python web scraping framework designed to simplify complex data extraction tasks. It provides comprehensive tools for handling network requests, processing scraped content, and managing asynchronous operations through its powerful Spider component. Developers can leverage features like automatic cookie support, HTTP/SOCKS proxies, and XPath queries for efficient web data collection.

PythonWeb ScrapingFramework
Awesome Django: A Curated List of Essential Django Resources and Packages

Awesome Django: A Curated List of Essential Django Resources and Packages

July 24, 2026

Awesome Django is a comprehensive curated list of outstanding Django apps, projects, and resources. It focuses on mature, well-maintained packages with good documentation and active user bases. This repository serves as an invaluable guide for developers looking for high-quality tools and examples within the Django ecosystem.

DjangoAwesome ListPython

Source repository

Open the original repository on GitHub.

8 counted GitHub visits

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️