SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2408.00372 · 2024

Few-shot Defect Image Generation based on Consistency Modeling

arXiv · PDF · Open in the Atlas

Code that ran

15 of 19 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; 4 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 11 failures of our instrument; 4 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/2408.00372.json · badge: /api/ran/2408.00372.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
ffdd-diffusion/defectdiffu canonical (classifier label)
classifier basis: census
15 ran · 4 no recorded run
FunctionStatusWhere it lives
Normalize Ran
ran; our contract draft was wrong, not the code
ffdd-diffusion/defectdiffu/autoencoder.py
pointer only (licence: NONE) · get_code("9fcdaa6e423e8aa7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ffdd-diffusion/defectdiffu 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.

approx_standard_normal_cdf Ran
ran; our contract draft was wrong, not the code
ffdd-diffusion/defectdiffu/diffusion/diffusion_utils.py
pointer only (licence: NONE) · get_code("d6a68e210556f857")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ffdd-diffusion/defectdiffu 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.

basic_clean Ran
ran; our contract draft was wrong, not the code
ffdd-diffusion/defectdiffu/clip/simple_tokenizer.py
pointer only (licence: NONE); the stored copy get_code serves, from ltpwy/MSCI, is pointer only (licence: NONE) · get_code("98f385d847636a3e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ffdd-diffusion/defectdiffu 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.

continuous_gaussian_log_likelihood Ran
ran; our contract draft was wrong, not the code
ffdd-diffusion/defectdiffu/diffusion/diffusion_utils.py
pointer only (licence: NONE); the stored copy get_code serves, from rerv/vdt, is pointer only (licence: NOASSERTION) · get_code("ab1c9568b4e13899")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ffdd-diffusion/defectdiffu 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.

create_named_schedule_sampler Ran
ran; our contract draft was wrong, not the code
ffdd-diffusion/defectdiffu/diffusion/timestep_sampler.py
pointer only (licence: NONE); the stored copy get_code serves, from vainf/remix-dit, is pointer only (licence: NOASSERTION) · get_code("e48218d7d73db0b3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ffdd-diffusion/defectdiffu 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.

get_2d_sincos_pos_embed Ran
ran, honoured the contract we drafted
ffdd-diffusion/defectdiffu/models_add_cross_concate.py
pointer only (licence: NONE) · get_code("c92c27c924b517e8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ffdd-diffusion/defectdiffu 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.

get_beta_schedule Ran
ran, honoured the contract we drafted
ffdd-diffusion/defectdiffu/diffusion/gaussian_diffusion.py
pointer only (licence: NONE); the stored copy get_code serves, from xuyanwu/SIDDMs-UFOGen, is pointer only (licence: NONE) · get_code("3e0fa4efc22272d4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ffdd-diffusion/defectdiffu 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.

get_named_beta_schedule Ran
ran, honoured the contract we drafted
ffdd-diffusion/defectdiffu/diffusion/gaussian_diffusion.py
pointer only (licence: NONE); the stored copy get_code serves, from xuyanwu/SIDDMs-UFOGen, is pointer only (licence: NONE) · get_code("36e30c7fb679ec78")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ffdd-diffusion/defectdiffu 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.

get_pairs Ran
ran; our contract draft was wrong, not the code
ffdd-diffusion/defectdiffu/clip/simple_tokenizer.py
pointer only (licence: NONE) · get_code("d919ae32e5e4e616")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ffdd-diffusion/defectdiffu 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.

mean_flat Ran
ran; our contract draft was wrong, not the code
ffdd-diffusion/defectdiffu/diffusion/gaussian_diffusion.py
pointer only (licence: NONE) · get_code("f6d7c009a8efb8b7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ffdd-diffusion/defectdiffu 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.

modulate Ran
ran; our contract draft was wrong, not the code
ffdd-diffusion/defectdiffu/models_add_cross_concate.py
pointer only (licence: NONE) · get_code("03310bba324ae4fb")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ffdd-diffusion/defectdiffu 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.

nonlinearity Ran
ran; our contract draft was wrong, not the code
ffdd-diffusion/defectdiffu/autoencoder.py
pointer only (licence: NONE) · get_code("3137073275f8c21a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ffdd-diffusion/defectdiffu 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.

normal_kl Ran
ran, honoured the contract we drafted
ffdd-diffusion/defectdiffu/diffusion/diffusion_utils.py
pointer only (licence: NONE); the stored copy get_code serves, from rerv/vdt, is pointer only (licence: NOASSERTION) · get_code("8afbfc42c6ea0448")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ffdd-diffusion/defectdiffu 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.

space_timesteps Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ffdd-diffusion/defectdiffu/diffusion/respace.py
pointer only (licence: NONE); the stored copy get_code serves, from ianyeung/mgld-vsr, is pointer only (licence: NOASSERTION) · get_code("ea9dbc131adf582e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ffdd-diffusion/defectdiffu 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.

whitespace_clean Ran
ran; our contract draft was wrong, not the code
ffdd-diffusion/defectdiffu/clip/simple_tokenizer.py
pointer only (licence: NONE); the stored copy get_code serves, from ltpwy/MSCI, is pointer only (licence: NONE) · get_code("9542161e9640b858")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ffdd-diffusion/defectdiffu 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.

build_model Not yet run
unverified (harvested, no recorded run)
ffdd-diffusion/defectdiffu/clip/model.py
pointer only (licence: NONE) · get_code("39e6b23b55f376ea")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ffdd-diffusion/defectdiffu 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. No invocation recorded.

get_2d_sincos_pos_embed_from_grid Not yet run
unverified (harvested, no recorded run)
ffdd-diffusion/defectdiffu/models_add_cross_concate.py
pointer only (licence: NONE) · get_code("665d8a4e8f673a4c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ffdd-diffusion/defectdiffu 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. No invocation recorded.

load Not yet run
unverified (harvested, no recorded run)
ffdd-diffusion/defectdiffu/clip/clip.py
pointer only (licence: NONE); the stored copy get_code serves, from mrflogs/ICLR24, is pointer only (licence: NONE) · get_code("f6f30e41636ae569")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ffdd-diffusion/defectdiffu 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. No invocation recorded.

make_attn Not yet run
unverified (harvested, no recorded run)
ffdd-diffusion/defectdiffu/autoencoder.py
pointer only (licence: NONE); the stored copy get_code serves, from leaplabthu/enat, is pointer only (licence: NONE) · get_code("f97adc1ae5efb785")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ffdd-diffusion/defectdiffu 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. No invocation recorded.

Also present in other papers' code

Of 19 samples lifted from this paper's linked repositories, 19 carry a function identity and 0 do not. Of the 19 distinct functions with an identity, 19 are also present in other papers whose code we hold (19 with at least one paper dated earlier, 18 the same month, 19 later) and 0 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
get_pairs 258 other papers
169 dated earlier, 5 the same month, 76 later, 7 same year, order not determinable, 1 undated · 4 only as an assembly brick
1802.06474 (2018-02)
A Closed-form Solution to Photorealistic Image Stylization
1803.01128 (2018-03)
Seq2Sick: Evaluating the Robustness of Sequence-to-Sequence Models with Adversarial Examples
1809.00125 (2018-09)
Simple Fusion: Return of the Language Model
and 255 more not named here
whitespace_clean 231 other papers
148 dated earlier, 5 the same month, 70 later, 7 same year, order not determinable, 1 undated · 4 only as an assembly brick
1901.07441 (2019-01)
PadChest: A large chest x-ray image dataset with multi-label annotated reports
2107.06383 (2021-07)
How Much Can CLIP Benefit Vision-and-Language Tasks?
2108.10904 (2021-08)
SimVLM: Simple Visual Language Model Pretraining with Weak Supervision
and 228 more not named here
basic_clean 218 other papers
149 dated earlier, 4 the same month, 57 later, 7 same year, order not determinable, 1 undated · 4 only as an assembly brick
1901.07441 (2019-01)
PadChest: A large chest x-ray image dataset with multi-label annotated reports
2107.06383 (2021-07)
How Much Can CLIP Benefit Vision-and-Language Tasks?
2108.10904 (2021-08)
SimVLM: Simple Visual Language Model Pretraining with Weak Supervision
and 215 more not named here
get_2d_sincos_pos_embed_from_grid 190 other papers
104 dated earlier, 6 the same month, 79 later, 1 same year, order not determinable · 65 only as an assembly brick
1807.10221 (2018-07)
Unified Perceptual Parsing for Scene Understanding
2105.12723 (2021-05)
Nested Hierarchical Transformer: Towards Accurate, Data-Efficient and Interpretable Visual Understanding
2111.06377 (2021-11)
Masked Autoencoders Are Scalable Vision Learners
and 187 more not named here
normal_kl 160 other papers
119 dated earlier, 2 the same month, 37 later, 2 same year, order not determinable · 19 only as an assembly brick
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
and 157 more not named here
nonlinearity 156 other papers
95 dated earlier, 6 the same month, 51 later, 4 same year, order not determinable · 25 only as an assembly brick
2104.07652 (2021-04)
Geometry-Free View Synthesis: Transformers and no 3D Priors
2106.00132 (2021-06)
On Fast Sampling of Diffusion Probabilistic Models
2106.06819 (2021-06)
D2C: Diffusion-Denoising Models for Few-shot Conditional Generation
and 153 more not named here
approx_standard_normal_cdf 154 other papers
113 dated earlier, 2 the same month, 37 later, 2 same year, order not determinable · 17 only as an assembly brick
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
and 151 more not named here
modulate 101 other papers
40 dated earlier, 2 the same month, 58 later, 1 undated · 29 only as an assembly brick
2202.04200 (2022-02)
MaskGIT: Masked Generative Image Transformer
2203.10897 (2022-03)
Unified Multivariate Gaussian Mixture for Efficient Neural Image Compression
2212.09748 (2022-12)
Scalable Diffusion Models with Transformers
and 98 more not named here
get_2d_sincos_pos_embed 69 other papers
29 dated earlier, 1 the same month, 39 later · 12 only as an assembly brick
2203.10897 (2022-03)
Unified Multivariate Gaussian Mixture for Efficient Neural Image Compression
2212.09748 (2022-12)
Scalable Diffusion Models with Transformers
2303.14389 (2023-03)
Masked Diffusion Transformer is a Strong Image Synthesizer
and 66 more not named here
mean_flat 60 other papers
38 dated earlier, 1 the same month, 21 later · 25 only as an assembly brick
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
2201.06503 (2022-01)
Analytic-DPM: an Analytic Estimate of the Optimal Reverse Variance in Diffusion Probabilistic Models
and 57 more not named here
space_timesteps 57 other papers
37 dated earlier, 1 the same month, 19 later · 2 only as an assembly brick
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
2111.14818 (2021-11)
Blended Diffusion for Text-driven Editing of Natural Images
and 54 more not named here
Normalize 54 other papers
32 dated earlier, 2 the same month, 19 later, 1 same year, order not determinable · 3 only as an assembly brick
2204.06125 (2022-04)
Hierarchical Text-Conditional Image Generation with CLIP Latents
2208.13753 (2022-08)
Frido: Feature Pyramid Diffusion for Complex Scene Image Synthesis
2211.13221 (2022-11)
Latent Video Diffusion Models for High-Fidelity Long Video Generation
and 51 more not named here
build_model 53 other papers
33 dated earlier, 1 the same month, 17 later, 2 same year, order not determinable
2107.06383 (2021-07)
How Much Can CLIP Benefit Vision-and-Language Tasks?
2210.01115 (2022-10)
LASP: Text-to-Text Optimization for Language-Aware Soft Prompting of Vision & Language Models
2211.09552 (2022-11)
UniFormerV2: Spatiotemporal Learning by Arming Image ViTs with Video UniFormer
and 50 more not named here
create_named_schedule_sampler 45 other papers
32 dated earlier, 1 the same month, 12 later
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
2111.14818 (2021-11)
Blended Diffusion for Text-driven Editing of Natural Images
and 42 more not named here
get_beta_schedule 31 other papers
14 dated earlier, 1 the same month, 16 later
2202.09671 (2022-02)
TRUNCATED DIFFUSION PROBABILISTIC MODELS AND DIFFUSION-BASED ADVERSARIAL AUTO-ENCODERS
2210.07574 (2022-10)
Is synthetic data from generative models ready for image recognition?
2306.02562 (2023-06)
Video Diffusion Models with Local-Global Context Guidance
and 28 more not named here
continuous_gaussian_log_likelihood 26 other papers
12 dated earlier, 1 the same month, 12 later, 1 same year, order not determinable
2305.13311 (2023-05)
VDT: General-purpose Video Diffusion Transformers via Mask Modeling
2306.14770 (2023-06)
ProtoDiff: Learning to Learn Prototypical Networks by Task-Guided Diffusion
2312.02139 (2023-12)
DiffiT: Diffusion Vision Transformers for Image Generation
and 23 more not named here
get_named_beta_schedule 25 other papers
12 dated earlier, 1 the same month, 12 later
2210.07574 (2022-10)
Is synthetic data from generative models ready for image recognition?
2306.02562 (2023-06)
Video Diffusion Models with Local-Global Context Guidance
2306.12511 (2023-06)
Semi-Implicit Denoising Diffusion Models (SIDDMs)
and 22 more not named here
load 23 other papers
16 dated earlier, 1 the same month, 4 later, 1 same year, order not determinable, 1 undated
2208.05318 (2022-08)
Generative Action Description Prompts for Skeleton-based Action Recognition
2210.01115 (2022-10)
LASP: Text-to-Text Optimization for Language-Aware Soft Prompting of Vision & Language Models
2212.04501 (2022-12)
Learning Video Representations from Large Language Models
and 20 more not named here
make_attn 5 other papers
4 dated earlier, 1 later
2211.13221 (2022-11)
Latent Video Diffusion Models for High-Fidelity Long Video Generation
2306.09305 (2023-06)
Fast Training of Diffusion Models with Masked Transformers
2402.14167 (2024-02)
T-Stitch: Accelerating Sampling in Pre-Trained Diffusion Models with Trajectory Stitching
and 2 more not named here

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

Image generation can solve insufficient labeled data issues in defect detection. Most defect generation methods are only trained on a single product without considering the consistencies among multiple products, leading to poor quality and diversity of generated results. To address these issues, we propose DefectDiffu, a novel text-guided diffusion method to model both intra-product background consistency and inter-product defect consistency across multiple products and modulate the consistency perturbation directions to control product type and defect strength, achieving diversified defect image generation. Firstly, we leverage a text encoder to separately provide consistency prompts for background, defect, and fusion parts of the disentangled integrated architecture, thereby disentangling defects and normal backgrounds. Secondly, we propose the double-free strategy to generate defect images through two-stage perturbation of consistency direction, thereby controlling product type and defect strength by adjusting the perturbation scale. Besides, DefectDiffu can generate defect mask annotations utilizing cross-attention maps from the defect part. Finally, to improve the generation quality of small defects and masks, we propose the adaptive attention-enhance loss to increase the attention to defects. Experimental results demonstrate that DefectDiffu surpasses state-of-the-art methods in terms of generation quality and diversity, thus effectively improving downstream defection performance. Moreover, defect perturbation directions can be transferred among various products to achieve zero-shot defect generation, which is highly beneficial for addressing insufficient data issues. The code are available at https://github.com/FFDD-diffusion/DefectDiffu.

For agents

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

get_harvested_code_for_paper("2408.00372")
get_code_for_paper("2408.00372")
have("2408.00372")

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

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

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

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

Connect an agent — have() is free.