SemFlow: Binding Semantic Segmentation and Image Synthesis via Rectified Flow

Semantic segmentation and semantic image synthesis are two representative tasks in visual perception and generation. While existing methods consider them as two distinct tasks, we propose a unified framework (SemFlow) and model them as a pair of reverse problems. Specifically, motivated by rectified flow theory, we train an ordinary differential equation (ODE) model to transport between the distributions of real images and semantic masks. As the training object is symmetric, samples belonging to the two distributions, images and semantic masks, can be effortlessly transferred reversibly. For semantic segmentation, our approach solves the contradiction between the randomness of diffusion outputs and the uniqueness of segmentation results. For image synthesis, we propose a finite perturbation approach to enhance the diversity of generated results without changing the semantic categories. Experiments show that our SemFlow achieves competitive results on semantic segmentation and semantic image synthesis tasks. We hope this simple framework will motivate people to rethink the unification of low-level and high-level vision.

Paper

Similar papers

Peer review

Reviewer eo5D5/10 · confidence 3/52024-07-07

Summary

This paper presents a work for solving semantic image segmentation and image synthesis simultaneously. This work proposed to use rectified flow and adopt a VAE encoder to compress the images and pseudo masks into the latent space. By comparing the proposed method with previous semantic segmentation models and image synthesis SOTAs, the effectiveness of this method is demonstrated. The proposed method handles the randomness issue for semantic segmentation. Finally, ablation study has been provided.

Strengths

+ This proposed an interesting formulation to bridge semantic segmentation and image synthesis in the stable diffusion framework with rectified flow framework. It is an interesting work and different to previous work on unifying semantic segmentation and image synthesis, which produces segmentation masks and synthesized images at the same time. Differently, this work trains one model to convert between segmentation masks and synthesized images. + This work also shows faster generation speed for high quality images.

Weaknesses

- What is the motivation to use Euler sampler. More discussion between Euler and DDIM/DDPM will be more helpful to understand the technical details for most readers. - For image synthesis task, the proposed method had a clear gap compared with other diffusion models.

Questions

See above.

Rating

5

Confidence

3

Soundness

4

Presentation

3

Contribution

3

Limitations

No.

Authorsrebuttal2024-08-10

Please let us know whether we address all the issues

Dear reviewer, Thank you for the comments on our paper. We have submitted the response to your comments. Please let us know if you have additional questions so that we can address them during the discussion period. We hope that you can consider raising the score after we address all the issues. Thank you

Reviewer eo5D2024-08-12

Maintain my rating - Borderline accept

Hi After reading all the reviews and authors' feedback, I prefer to maintain my initial rating - borderline accept. From my perspective, this work presents a novel model for jointly modelling image generation and synthesis, which are two reverse tasks. It is clearly different to previous work UniGS and FreeMask, as mentioned by R1. The authors also provide more explanation on the Euler sampler. I think authors need to refine this part much better in the next version, no matter for an accepted paper or a resubmission. Therefore, I insist on my initial rating, even though the performance still needs to improve to compete with other methods. Best R3

Authorsrebuttal2024-08-12

We sincerely appreciate the reviewer's comments and positive feedback. We'll carefully consider your review and make any necessary revisions to improve the quality of our manuscript. Thank you.

Reviewer 5PqV5/10 · confidence 3/52024-07-11

Summary

The paper presents SemFlow, an approach that binds semantic segmentation and semantic image synthesis using an ordinary differential equation (ODE) model. The motivation is to use rectified flow to enable LDM as a unified framework for both tasks. The key contributions include a unified framework that jointly optimizes both tasks, the specialized designs of the frameworks, including pseudo mask modelling, bi-directional training of segmentation and generation, and a finite perturbation strategy. This approach bridges the gap between semantic segmentation and semantic image synthesis, showing good visualization results.

Strengths

1. The unified framework for joint optimization of semantic segmentation and semantic image synthesis is novel. 2. The paper is generally well-written and structured.

Weaknesses

1. Lines 133-140: Why is there a necessity to transform the semantic segmentation masks into 3-channel pseudo-masks utilizing Eq. 7? Could you provide insights on how the formulations for m1 and m2 were derived? 2. Figure 4: During the model inference process (semantic image synthesis task), will noise be added to the mask? 3. Lines 147-155: SemFlow cannot use captions to guide image synthesis, and the authors claim the usage of captions is non-casual for semantic image synthesis, however, there is still some work on it [1,2]. 4. There is still a gap in quantitative results compared to the popular model within each task. [1] Xue, Han, et al. "Freestyle layout-to-image synthesis." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2023. [2] Lv, Zhengyao, et al. "Place: Adaptive layout-semantic fusion for semantic image synthesis." *Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition*. 2024.

Questions

See Weaknesses

Rating

5

Confidence

3

Soundness

3

Presentation

3

Contribution

2

Limitations

Yes

Authorsrebuttal2024-08-10

Please let us know whether we address all the issues

Dear reviewer, Thank you for the comments on our paper. We have submitted the response to your comments. Please let us know if you have additional questions so that we can address them during the discussion period. We hope that you can consider raising the score after we address all the issues. Thank you

Reviewer 3dM24/10 · confidence 5/52024-07-12

Summary

This paper proposed a unified diffusion-based framework for semantic segmentation and semantic image synthesis. The proposed SemFlow applied the existing ordinary differential equation (ODE) model and modified the transport problem setting. Additionally, it incorporates techniques such as perturbation and straight trajectory to enhance model performance. The proposed method was compared with a simple diffusion-based conditional generation modeling and a transformer-based method (Mask2Former) for semantic segmentation, as well as several GAN-based and diffusion-based methods for semantic image synthesis. However, the results did not surpass existing methods, and performance in the semantic segmentation task was even 10% lower in mIoU compared to basic segmentation methods.

Strengths

1. The motivation behind this paper is well though out. It adds value by attempting to unify low-level and high-level vision tasks. 2.The writing style is clear and easy to understand.

Weaknesses

1. The literature review is insufficient and lacks citations of relevant works such as FreeMask, NeurIPS, 2023. 2. Although the motivation is thoughtful, the theoretical and practical value of the proposed method is limited. The application results are not promising, as the semantic segmentation performance is over 10% lower than Mask2Former. The method does not demonstrate advantages over existing training data synthesis methods. 3. The key components of the proposed method are commonly used in generative fields and therefore lack novelty. 4. The experiments are insufficient. It is recommended that the authors include FreeMask and other relevant methods for comparison in the semantic segmentation task, as well as ControlNet or Freestyle generation methods for semantic image synthesis. Additionally, the authors should provide complete quantitative results on all three datasets for both semantic image synthesis and semantic segmentation tasks. 5. The authors claim limited computational resources as a reason to leave training data synthesis methods for future work, yet the experiments were conducted on 8 NVIDIA A100 GPUs, which is more than the resources used in most training data synthesis studies. Also, the computational cost advantages are unclear due to the absence of computation time data.

Questions

Although I appreciate the motivation and exploration in this paper, the results do not convince me that the proposed method is promising and practical for image synthetic and semantic segmentation tasks.

Rating

4

Confidence

5

Soundness

2

Presentation

2

Contribution

2

Limitations

Yes

Authorsrebuttal2024-08-10

Please let us know whether we address all the issues

Dear reviewer, Thank you for the comments on our paper. We have submitted the response to your comments. Please let us know if you have additional questions so that we can address them during the discussion period. We hope that you can consider raising the score after we address all the issues. Thank you

Reviewer 3dM22024-08-13

Thank the authors for their response. I have carefully read the responses and the comments from other reviewers. I think my original concerns have been partially addressed. Although the motivation is good, I remain unconvinced that the new framework is more practical or has greater potential in contributing to both image synthesis and semantic segmentation tasks compared to other approaches. The exclusion of text prompts and the inability to leverage existing foundation models reduce the flexibility and practicality of this framework. Additionally, it is unclear how the authors conducted the experiments on Freestyle and ControlNet. It seems that the results for ControlNet are not optimal. Generally, it is not supposed to perform such worse than Freestyle. For these reasons, I am inclined to increase my original score to borderline reject, which is the highest score I can give.

Authorsrebuttal2024-08-13

Thanks for your comments. Issue 1: This framework seems unpractical and lacks potential. A1: First, our method builds a deterministic transport from images to masks, which solves the stochasticity problem in existing diffusion-based segmentation models (Fig.2, Sec.3.1). Second, our method significantly reduces the sampling steps of diffusion-based segmentation methods through straight trajectory modeling (Tab.3). Third, our framework models image segmentation and generation as a pair of reversible problems. We believe it is helpful for the community and has the potential to achieve better performance when scaled up, as discussed in future works. As for research potential discussion, recently, lots of works use generative model for segmentation. We acknowledge that existing diffusion pipeline for segmentation cannot compete with traditional segmentation models. However, it is also one of solution towards an unified model and should be encouraged considering the diversity of research. Issue 2: The details of experiments on Freestyle and ControlNet. A2: For Freestyle, we use the official layout-to-image synthesis script for ADE task. This official script formulates the text prompts as "[class 1] [class 2] ..." where "class n" is the name of the specified category. The checkpoint we use is from the Freestyle official repository. For ControlNet, we adopt the official checkpoint named "Controlnet - v1.1 - seg Version", which is designed for ADE dataset. We use the provided scripts in README and only replace the text prompts from a complete sentence with a string of category names, which is **in the same way as Freestyle**. We observed that the synthesized results of ControlNet and Freestyle are significantly different in domains, including style, texture, material, etc. This difference is also observed in Freestyle's visualization. The samples of Freestyle are much closer to those of the realistic ADE dataset.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC