Papers
Topics
Authors
Recent
Search
2000 character limit reached

MCPMix: Mask-Consistent Paired Mixing

Updated 10 November 2025
  • The paper introduces a framework that pairs real images with synthetically generated counterparts using identical masks to preserve pixel-level semantics.
  • It employs a multi-stage pipeline with depth prior estimation and ControlNet diffusion synthesis to generate consistent synthetic samples for robust segmentation training.
  • The approach integrates Real-Anchored Learnable Annealing (RLA) to adaptively balance mixed sample influence and mitigate domain shift, yielding state-of-the-art segmentation results.

Mask-Consistent Paired Mixing (MCPMix) is a data augmentation framework for dense prediction tasks, designed to harness the benefits of both sample mixing and generative approaches while addressing core limitations such as label ambiguity and domain shift. By generating synthetic images under exactly matching object masks and subsequently mixing only the image appearance while preserving pixel-level semantics via hard mask supervision, MCPMix facilitates the construction of continuous, semantically consistent sample distributions. The Real-Anchored Learnable Annealing (RLA) strategy further adaptively schedules the influence of mixed samples and enforces domain alignment, yielding enhanced segmentation robustness and generalization in endoscopic and dermoscopic image analysis.

1. Motivation and Conceptual Framework

MCPMix addresses two critical deficiencies in standard augmentation for dense prediction: the label noise from misaligned mask mixing (e.g., MixUp), and the domain mismatch when training on synthetic images generated without strict mask conditioning. Standard mixing techniques increase data diversity but can introduce soft-label ambiguity. Meanwhile, generative synthesis methods produce novel visual distributions but often fail to preserve structural consistency with ground-truth masks, leading to a synthetic-real gap.

The core innovation of MCPMix is a paired, mask-consistent paradigm whereby every real image is coupled with a synthetic counterpart generated using the same binary mask. During training, only the appearance is blended while supervision remains strictly with the original, unblended (hard) mask. This procedure maintains pixel-level semantics, reduces label ambiguity, and produces a continuous set of intermediate appearances spanning the real-synthetic axis.

2. MCPMix Pipeline

The MCPMix pipeline is structured into three principal stages:

  1. Depth Prior Estimation: A frozen DPT network estimates a depth map D=DepthEstimator(Ir)D = \mathrm{DepthEstimator}(I_r) for each real image IrI_r. Depth is utilized exclusively for conditioning the downstream diffusion model to enhance generation fidelity.
  2. Conditional Diffusion Synthesis (ControlNet):

A ControlNet diffusion model, initialized from Stable Diffusion v1.5, is fine-tuned on the domain-specific dataset. Inputs comprise: - Binary object mask MM (as spatial control) - Depth map DD - Short text prompt PP describing lesion context The model samples synthetic images by

Isgs(M,D,P,z)I_s \sim g_s(M, D, P, z)

where zz is random noise. After fine-tuning, gsg_s is frozen and used to produce on-the-fly paired synthetic images each training epoch.

  1. Mask-Consistent Mixing and Segmentation: For each pair (Ir,M)(I_r, M), a synthetic counterpart IsI_s (same IrI_r0, IrI_r1) is generated. The mixed sample is computed by

IrI_r2

where IrI_r3 is the learnable mixing strength at training step IrI_r4. Importantly, only the appearance is mixed; the segmentation mask supervision remains the original binary IrI_r5 without any softening.

Comparison to Classical Mixing: Whereas MixUp and derivatives blend both image and mask (yielding soft labels), MCPMix preserves hard label supervision, maintaining precise correspondence between input and label, thereby reducing semantic drift.

3. Real-Anchored Learnable Annealing (RLA)

RLA is an adaptive scheduling mechanism designed to dynamically control (1) the mixing strength IrI_r6 and (2) the loss weighting IrI_r7 for mixed samples, with the following elements:

3.1 Schedule Parameterization

Two learnable gates, IrI_r8 and IrI_r9, with upper bounds MM0, MM1, produce

MM2

where MM3 denotes the sigmoid function, ensuring values within admissible intervals.

3.2 Distribution Alignment via MMD

To anchor the learning process to the real image domain and mitigate synthetic bias, a maximum mean discrepancy (MMD) penalty is introduced between mixed (MM4) and real (MM5) feature representations, with

MM6

where MM7 is a frozen ResNet-50 feature extractor.

A dynamic threshold MM8 schedules tolerance for synthetic drift, decaying over epochs, and the distribution penalty term is

MM9

3.3 Prior Regularization

Weak prior curves DD0, DD1 (via cosine annealing) penalize large deviations of the learned schedules to stabilize optimization:

DD2

3.4 Composite Objective

The full loss at step DD3 is:

DD4

where

DD5

and DD6 is standard per-pixel cross-entropy.

In early training, a large DD7 encourages exploration; as DD8, optimization shifts toward ‘real-anchored’ samples. The schedules DD9 and PP0 are optimized by gradient descent with backpropagation (Algorithm 1 in the source).

4. Model Architectures and Implementation

Diffusion Generator PP1:

  • ControlNet (Stable Diffusion v1.5 backbone), fine-tuned on target data.
  • Spatial conditioning: mask PP2 via “zero-convs”.
  • Depth PP3 injected as an additional condition.
  • Short prompt PP4 tokenized for cross-attention.
  • After fine-tuning, generator is frozen.

Segmentation Backbone PP5:

5. Experimental Evaluation

Datasets:

MCPMix was empirically validated on both endoscopic and dermoscopic segmentation benchmarks:

Endoscopy Dermoscopy
Kvasir-SEG ISIC 2017
PICCOLO
CVC-ClinicDB
NPC-LES (private)

5.1 Main Results

  • Across endoscopic datasets, MCPMix+RLA consistently achieved the highest mean Intersection-over-Union (PP9) and Dice Similarity Coefficient (DSC):
    • Kvasir-SEG: Isgs(M,D,P,z)I_s \sim g_s(M, D, P, z)0 (vs. DiffuseMix Isgs(M,D,P,z)I_s \sim g_s(M, D, P, z)1), DSC Isgs(M,D,P,z)I_s \sim g_s(M, D, P, z)2 (vs. Isgs(M,D,P,z)I_s \sim g_s(M, D, P, z)3).
    • NPC-LES: Isgs(M,D,P,z)I_s \sim g_s(M, D, P, z)4, DSC Isgs(M,D,P,z)I_s \sim g_s(M, D, P, z)5.

5.2 Boundary Metrics

  • Improved spatial accuracy, as measured by boundary-sensitive metrics:
    • Kvasir-SEG: Isgs(M,D,P,z)I_s \sim g_s(M, D, P, z)6 reduced from Isgs(M,D,P,z)I_s \sim g_s(M, D, P, z)7 to Isgs(M,D,P,z)I_s \sim g_s(M, D, P, z)8; B-F1@2px improved from Isgs(M,D,P,z)I_s \sim g_s(M, D, P, z)9 to zz0.

5.3 Comparison with Generative Baselines

  • Outperformed ControlPolypNet, GenSRRFI, and SatSynth by zz1–zz2 zz3/DSC on the NPC-LES dataset.

5.4 Ablation Studies

  • +MCPMix led to a zz4 gain in zz5 over full-supervised only (zz6 at Kvasir-SEG).
  • +MCPMix+RLA provided an additional zz7 increment.

5.5 Cross-Domain Generalization

  • Demonstrated gains also on non-endoscopic data (ISIC 2017): zz8, DSC zz9.

A plausible implication is that the framework’s design generalizes beyond the strict confines of its original domain, reflecting robustness to modality variation.

6. Significance and Broader Implications

MCPMix, by synthesizing appearance-consistent image pairs under shared geometric supervision, achieves a continuous and semantically stable family of augmented samples that bridge the real and generative domains. Its strict use of mask-preserving hard label supervision directly resolves the mask-labelling ambiguity introduced by previous mixing methods. The RLA scheduling ensures that model optimization remains grounded in the real data domain, counterbalancing potential synthetic bias and promoting stable generalization. Experimental results consistently report state-of-the-art segmentation on multiple public and private datasets, with improvements confirmed on both region overlap and fine boundary metrics.

This approach establishes a principled, trainable, and deployment-ready paradigm for augmenting segmentation models under data scarcity or domain shift. While the effectiveness is validated for endoscopic and dermoscopic segmentation, extension to other dense prediction fields is a plausible direction.

7. Key Equations and Formal Summary

Process Equation(s) Core Purpose
Appearance Mixing gsg_s0 Blend real/synthetic appearance
Loss Terms gsg_s1, gsg_s2 Supervise with hard mask
Schedule Param. gsg_s3 (from gate/sigmoid) RLA control
Domain Penalty gsg_s4, gsg_s5 Prevent synthetic drift
Objective gsg_s6 (Eqn. 10) Optimize segmentation and RLA

MCPMix represents an overview of conditional generative modeling and hard-label sample mixing, with adaptive anchor mechanisms for robust and generalizable dense prediction.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Mask-Consistent Paired Mixing (MCPMix).