TL;DR
Diff-2-in-1 is a unified diffusion framework that seamlessly bridges generative and discriminative learning within a single model for dense visual perception tasks. By leveraging a novel self-improving mechanism with dual parameter sets, the model generates high-quality, in-distribution synthetic data that iteratively boosts its own perception performance.
What Problem Does This Paper Address?
While diffusion models are celebrated for high-fidelity image generation, researchers have recently started using them as feature extractors for dense perception tasks like semantic segmentation and depth estimation. However, most existing approaches treat generation and perception as completely isolated pipelines.
When diffusion models are used purely for data augmentation, they typically generate images from scratch (starting from pure Gaussian noise). This creates a significant domain gap between the synthetic data and the real training set, limiting how much the perception model can actually learn from it. Diff-2-in-1 tackles this sub-optimal separation by creating a single, coherent framework where multi-modal data generation and dense perception mutually reinforce one another.
Methods
The core philosophy of Diff-2-in-1 is that the diffusion-denoising process naturally connects generative and discriminative tasks.
The framework consists of three main components:
- Unified Architecture: For discriminative tasks, the model takes an RGB image, runs a one-step denoising process through a U-Net to extract multi-scale features, and passes them to a task head to predict pixel-level attributes. For generative tasks, it can synthesize paired RGB images and corresponding attribute maps simultaneously.
- In-Distribution Data Generation: To avoid the domain shift of generating from pure noise, the authors use a partial noising strategy (inspired by SDEdit). They add noise to a real training image up to a specific timestep $T$ and then denoise it. This preserves the structural context of the original data while introducing realistic variations.
- Self-Improving Learning Paradigm: The training features two interplaying sets of parameters:
- Data Creation Parameters ($\theta_C$): Responsible for generating diverse synthetic image-attribute pairs.
- Data Exploitation Parameters ($\theta_E$): Trained on a mix of real and synthetic data using a standard discriminative loss.
Crucially, $\theta_C$ is continuously updated using an Exponential Moving Average (EMA) of $\theta_E$'s weights. This feedback loop ensures that as the model gets better at perception, it generates higher-quality, better-aligned synthetic data.
Datasets
The authors evaluated their framework across several standard dense prediction benchmarks:
- NYUv2: Used for single-task surface normal estimation (specifically utilizing a small subset of 795 training samples to test data efficiency).
- ADE20K: Used for semantic segmentation.
- NYUD-MT: A multi-task benchmark spanning semantic segmentation, monocular depth estimation, and surface normal estimation.
- PASCAL-Context: A multi-task benchmark evaluating semantic segmentation, human parsing, saliency detection, and surface normal estimation.
- ScanNet: Employed strictly for cross-domain evaluation to test the model's generalizability.
Key Insights and Ideas
- The Denoising Link: Denoising is inherently dual-purpose. It removes noise to generate high-fidelity data, but the intermediate features produced during this cleanup are incredibly rich and informative for discriminative tasks.
- Timestep $T$ as a Modulator: The choice of noising timestep $T$ acts as a crucial control knob. A larger $T$ yields greater diversity but higher domain shift, while a smaller $T$ ensures fidelity to the original dataset. The authors found $T=600$ (out of 1000) provided the optimal sweet spot.
- Closing the Loop with EMA: Rather than using a static, pre-trained generator for data augmentation, the EMA feedback loop ensures the generator evolves alongside the discriminator. This prevents the generator from producing "distracting," low-quality data.
Key Results
Diff-2-in-1 demonstrated substantial improvements over state-of-the-art baselines across all configurations:
- Surface Normal Estimation: When applied to the iDisc baseline on NYUv2 using only 795 real samples, Diff-2-in-1 reduced the Mean Error from 17.8 to 12.7, outperforming other popular diffusion augmentation methods like DA-Fusion.
- Multi-Task Performance: On the PASCAL-Context benchmark, integrating Diff-2-in-1 into the TaskPrompter architecture improved semantic segmentation mIoU from 80.89 to 80.93 and reduced surface normal mean error from 13.72 to 13.64.
- Synthetic vs. Real Data: In a striking validation of data quality, the authors replaced 500 synthetic pairs with 500 real captured images from NYUv2 video clips. Training with the synthetic data yielded virtually identical performance to training with real data, proving its premium quality.
Limitations and Future Work
The primary bottleneck of Diff-2-in-1 is computational speed. Because data generation relies on diffusion models, it requires multi-step denoising, which is inherently time-consuming during the training phase.
To mitigate this, the authors suggest that future iterations could integrate recent fast-sampling and consistency distillation techniques to accelerate generation. They also note that extending this unified framework to 3D perception tasks (like 3D object detection) represents a promising future direction.
Summary updated