SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.14490 · 2021

Making Images Real Again: A Comprehensive Survey on Deep Image Composition

arXiv · PDF · Open in the Atlas

Code that ran

10 of 15 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 7 have no contract verdict; 1 failure of our instrument; 5 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2106.14490.json · badge: /api/ran/2106.14490.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
bcmi/libcom canonical (classifier label)
classifier basis: census
7 ran · 5 no recorded run
copy not recorded community
not in the paper's declared repositories
2 ran · 0 no recorded run
bcmi/ObjectStitch-Image-Composition reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
binary_classifier Ran
ran on a synthesized input
bcmi/libcom/libcom/fos_score/source/networks.py
code served (permissive licence) · get_code("bbbe8d9d4e08bd78")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Sequential. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "in_ch": 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
chunk Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from vicgalle/stable-diffusion-aesthetic-gradients
pointer only; the stored copy get_code serves, from vicgalle/stable-diffusion-aesthetic-gradients, is pointer only (licence: NOASSERTION) · get_code("8241c0562bc710fd")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

clip2sd Ran
ran, honoured the contract we drafted
bcmi/ObjectStitch-Image-Composition/scripts/inference.py
pointer only (licence: NONE) · get_code("3e5f67215d50b497")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bcmi/ObjectStitch-Image-Composition when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

conv_relu_x2 Ran
ran on a synthesized input
bcmi/libcom/libcom/fos_score/source/networks.py
code served (permissive licence) · get_code("8a6243cd7c50b377")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Sequential. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "in_ch": 3,
    "out_ch": 16,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
custom_kl_loss Ran
ran on a synthesized input
bcmi/libcom/libcom/fos_score/source/loss_function.py
code served (permissive licence) · get_code("1071f8dab5fd3248")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function expects:
# p_mu: tensor, used as first arg to MultivariateNormal
# p_var: tensor, used with torch.diag_embed, then as covariance for MultivariateNormal
# q_mu: tensor, used as first arg to MultivariateNormal
# q_var: tensor, used with torch.diag_embed, then as covariance for MultivariateNormal

# MultivariateNormal expects:
# - loc (mean): shape (..., D)
# - covariance_matrix: shape (..., D, D) after diag_embed
# So the variance tensors should be shape (..., D) to become (..., D, D) after diag_embed

batch_size = 2
dim = 4

p_mu = torch.randn(batch_size, dim)
p_var = torch.ones(batch_size, dim) * 0.5  # positive variances
q_mu = torch.randn(batch_size, dim)
q_var = torch.ones(batch_size, dim) * 0.7  # positive variances

ARGS = {
    "p_mu": p_mu,
    "p_var": p_var,
    "q_mu": q_mu,
    "q_var": q_var,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
download_entire_folder Ran
ran on a synthesized input
bcmi/libcom/libcom/utils/model_download.py
code served (permissive licence) · get_code("c4921cc4e93b1490")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile
import shutil

# Create a temporary directory for testing
temp_dir = tempfile.mkdtemp()

# Create a test folder structure
test_folder_path = os.path.join(temp_dir, 'test_model_folder')
os.makedirs(test_folder_path, exist_ok=True)

# Add some files to make it a non-empty folder
with open(os.path.join(test_folder_path, 'file1.txt'), 'w') as f:
    f.write('test content 1')
with open(os.path.join(test_folder_path, 'file2.txt'), 'w') as f:
    f.write('test content 2')

ARGS = {
    'folder_path': test_folder_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
huggingface_hub, modelscope — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
kl_divergence_loss Ran
ran on a synthesized input
bcmi/libcom/libcom/fos_score/source/loss_function.py
code served (permissive licence) · get_code("c548e9c1b67153a9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small tensors for the KL divergence loss function
# log_var: log variance, shape (batch_size, latent_dim)
# mu: mean, shape (batch_size, latent_dim)

batch_size = 2
latent_dim = 4

log_var = torch.randn(batch_size, latent_dim)
mu = torch.randn(batch_size, latent_dim)

ARGS = {
    "log_var": log_var,
    "mu": mu,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
mask_iou_loss Ran
ran on a synthesized input
bcmi/libcom/libcom/fos_score/source/loss_function.py
code served (permissive licence) · get_code("a0cbbe6df7f2b9d1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small binary mask tensors
# inputs and targets should be tensors that can be flattened
# The function flattens them to (batch_size, flattened_dims)
# Let's use batch size 2 and spatial dimensions that flatten to 4

batch_size = 2
inputs = torch.randint(0, 2, (batch_size, 2, 2)).float()  # Shape: (2, 2, 2) -> flattens to (2, 4)
targets = torch.randint(0, 2, (batch_size, 2, 2)).float()  # Shape: (2, 2, 2) -> flattens to (2, 4)

ARGS = {
    "inputs": inputs,
    "targets": targets,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
numpy_to_pil Ran
ran, violated the contract we drafted
this paper's copy was not recorded; identical code first harvested from vicgalle/stable-diffusion-aesthetic-gradients
pointer only; the stored copy get_code serves, from vicgalle/stable-diffusion-aesthetic-gradients, is pointer only (licence: NOASSERTION) · get_code("1e63d588563eb90a")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

reinhard Ran
ran on a synthesized input
bcmi/libcom/libcom/color_transfer/reinhard.py
code served (permissive licence) · get_code("afc884a2a95172a8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 3, dtype family int, shape (100, 80, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import cv2

# Create a small composite image (BGR format)
# Using shape (100, 80, 3) for height, width, channels
comp_img = np.random.randint(0, 256, size=(100, 80, 3), dtype=np.uint8)

# Create a mask with values 0-255
# Shape (100, 80) for height, width
comp_mask = np.random.randint(0, 256, size=(100, 80), dtype=np.uint8)

ARGS = {
    'comp_img': comp_img,
    'comp_mask': comp_mask,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (100, 80, 3) — shape (100, 80, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
color_transfer Not yet run
unverified (harvested, no recorded run)
bcmi/libcom/libcom/color_transfer/reinhard.py
code served (permissive licence) · get_code("892e3fedcdabebd6")
How it ran

no invocation recorded.

download_pretrained_model Not yet run
unverified (harvested, no recorded run)
bcmi/libcom/libcom/utils/model_download.py
code served (permissive licence) · get_code("cca242a41d647f71")
How it ran

no invocation recorded.

fill_box_with_specified_pixel Not yet run
unverified (harvested, no recorded run)
bcmi/libcom/libcom/fos_score/fos_score_prediction.py
code served (permissive licence) · get_code("f15b5e79d5612ae4")
How it ran

no invocation recorded.

get_distillation_module Not yet run
unverified (harvested, no recorded run)
bcmi/libcom/libcom/fos_score/source/networks.py
code served (permissive licence) · get_code("ed39e42e5a7eb3b3")
How it ran

no invocation recorded.

padding_to_square Not yet run
unverified (harvested, no recorded run)
bcmi/libcom/libcom/fos_score/fos_score_prediction.py
code served (permissive licence) · get_code("bc8e3ebc8aaebb10")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 12 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
chunk 40 other papers
40 later
2112.10752 (2021-12)
High-Resolution Image Synthesis with Latent Diffusion Models
2204.11824 (2022-04)
Semi-Parametric Neural Image Synthesis
2208.12242 (2022-08)
DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Driven Generation
and 37 more not named here
numpy_to_pil 23 other papers
23 later
2112.10752 (2021-12)
High-Resolution Image Synthesis with Latent Diffusion Models
2209.12330 (2022-09)
Personalizing Text-to-Image Generation via Aesthetic Gradients
2210.06886 (2022-10)
ImaginaryNet: Learning Object Detectors without Real Images and Annotations
and 20 more not named here
clip2sd 3 other papers
3 later
2212.00932 (2022-12)
ObjectStitch: Generative Object Compositing
2308.10040 (2023-08)
ControlCom: Controllable Image Composition using Diffusion Model
2411.07462 (2024-11)
MureObjectStitch: Multi-reference Image Composition

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

As a common image editing operation, image composition/compositing, which is also called object/subject insertion/addition/compositing, aims to combine the foreground from one image and another background image to produce a composite image. However, there are many issues that could make the composite images unrealistic. These issues can be summarized as the inconsistency between foreground and background, which includes appearance inconsistency, geometry inconsistency, and semantic inconsistency. The image composition task could be decomposed into multiple sub-tasks, in which each sub-task targets one or more issues. Specifically, object placement aims to find reasonable scale, location, and shape for the foreground. Image blending aims to address the unnatural boundary between foreground and background. Image harmonization aims to adjust the illumination statistics of foreground. Shadow (resp., reflection) generation aims to generate plausible shadow (resp., reflection) for the foreground. These sub-tasks can be executed sequentially or in parallel to acquire realistic composite images. To the best of our knowledge, there is no previous survey on image composition. In this paper, we conduct a comprehensive survey over the sub-tasks and combined task of image composition. For each one, we summarize the existing methods, available datasets, and common evaluation metrics. Datasets and codes for image composition are summarized at https://github.com/bcmi/Awesome-Object-Insertion. We have also contributed the first image composition toolbox: libcom https://github.com/bcmi/libcom, which assembles 10+ image-composition-related functions. The ultimate goal of this toolbox is to solve all image composition problems with simple `import libcom'. Based on libcom toolbox, we also develop an online image composition workbench https://libcom.ustcnewly.com.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2106.14490")
get_code_for_paper("2106.14490")
have("2106.14490")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2106.14490.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2106.14490.svg)](https://syntology.ai/paper/2106.14490)

Connect an agent — have() is free.