arXiv:2608.22692cs.CVAug 2026

Manuscript Offprint

arXiv:2608.22692

Hybrid Generative-Discriminative Object Placement

Siyuan Zhou, Li Niu

Abstract

As an important operation of image composition, object placement aims to predict the plausible placement (location, scale) for the inserted foreground object. Previous object placement methods can be divided into generative methods and discriminative methods, both of which cannot balance efficiency and effectiveness well. In this work, we propose a semi-generative method in the middle ground between them. In particular, we assign uniformly distributed anchors on the background. Then, we fuse foreground and background features to predict the rationality score for each anchor and predict plausible placement sets for positive anchors. Extensive experiments on the OPA dataset show that our method can strike a good balance between efficiency and effectiveness.

1. Introduction

Image composition, aiming to combine the foreground and background from different images as a composite image, is a crucial and popular technology for image editing, which has been extensively used in augmented reality, artistic creation, and automatic advertising [24, 27, 31]. However, the obtained composite images via simple cut-and-paste could have many issues (e.g., illumination, shadow, placement) that harm the image quality. As image composition is a complicated task involving many issues to be addressed, most previous works only focus on one of the issues, giving rise to different subtasks like image harmonization [26, 4, 5], shadow generation [16, 12], and object placement learning [25, 29, 24].

In this work, we focus on object placement [25, 29, 24], which aims to predict plausible placement (i.e., location, scale) of the foreground object given a pair of foreground and background. Object placement is a challenging task due to the complex factors deciding the plausibility of placement, like the depth and physical size of object, semantic context, occlusion, etc. Existing object placement methods can be divided into generative methods and discriminative methods. They both take in a pair of foreground and background, and the difference lies in the output format. The generative methods [3, 21, 29, 9] predict one or multiple plausible placements for the foreground object, as shown in Figure 1(a). Discriminative methods predict a rationality score for each foreground scale and each location, which measures the plausibility of composite image obtained by placing the center of scaled foreground at this location, as shown in Figure 1(b).

Nevertheless, generative methods and discriminative methods have their respective drawbacks. The generative methods often encounter mode collapse issue and the predicted placements fail to cover most reasonable locations. Besides, the prediction quality is usually lower than discriminative methods. The discriminative methods can cover all the locations with better prediction quality, but the time cost is much higher than generative methods. In this work, we attempt to fill in the middle ground between discriminative method and generative method, leading to our semi-generative method which can strike a good balance between efficiency and effectiveness.

Specifically, we first extract a foreground feature vector and a background feature map from foreground and background, respectively. Then, we pass the foreground feature vector and the background feature map through a fusion module to produce the fused feature map. We treat each location in the fused feature map as an anchor, which is associated with a set of placements with the foreground center located in its neighborhood. Each anchor is classified as either a positive anchor or a negative anchor, according to whether its associated placement set has at least one plausible placement. For each positive anchor, we attempt to predict its set of plausible placements (i.e., the center offset and the foreground scale). The anchor locations and the center offset lead to the center location. Then, the center location and foreground scale further lead to a complete placement. With our designed anchor mechanism and output format, we construct a network structure in the middle ground between generative method and discriminative method. Considering the sparse annotations of existing object placement dataset, we design a two-stage training strategy. In the first stage, we train the network using the provided sparse anno-

Figure

(a)

(b)

(c)

Figure 1. The comparison among three paradigms for object placement learning. Given a pair of foreground with mask and background, the generative model (a) generates one or multiple plausible placements (center location (x,y)(x, y) and scale ss) for the foreground. The discriminative model (b) predicts a rationality score map for each foreground scale. ri,sr_{i,s} is the rationality score for the ii-th center location and scale ss. Our semi-generative model (c) predicts a rationality score rir_i for the ii-th anchor and also predicts multiple plausible placements (center offset (oxi,oyi)(ox_i, oy_i) and scale sis_i) for each positive anchor.

tations. In the second stage, we use the prediction results to refine the annotations, and retrain our network using the updated annotations.

Another contribution of our work lies in the dynamic fusion module to fuse foreground and background information. When we place one foreground object at one location on the background, the plausibility of this placement should depend on the contextual information surrounding this location, so we attempt to aggregate background contextual information for each location. The suitable scale of contextual information depends on the foreground information and background information at this location. For example, when placing a cat or an elephant on the ground, we need to observe the surrounding regions of different scales to check the unreasonable occlusion between this foreground object and other background objects. Therefore, we use foreground and background information to predict an offset map for deformable convolution, which aggregates different scales of background contextual information adaptively for different locations and different foreground objects.

Following [32], we conduct experiments on OPA dataset [17] to verify the effectiveness of our method. Our major contributions can be summarized as follows. 1) We propose a semi-generative object placement method, which fills in the middle ground between discriminative methods and generative methods. 2) We design a novel dynamic fusion module to fuse foreground and background information, which can aggregate different scales of background contextual information adaptively. 3) Extensive experiments on OPA dataset demonstrate that our method strikes a good balance between efficiency and effectiveness.