Skip to content

TheSolY/lr-tmi

Repository files navigation

Image Template Generation and Clique Search

This repository provides two scripts to support the paper's experiments:

  1. generate_image_templates.py: Generates images from template-style text prompts.
  2. clique_search.py: Performs a clique search with image segmentation.

Requirements

conda env create -f environment.yml\
conda activate lr-tmi

Reproduction Instructions

Step 1: Generate Synthetic Images

python generate_image_templates.py \
    -t "skg Shower Curtain" \
    -t "skg Round Beach Towel"

This will generate two sets of images in generated_images/, e.g.:

  • generated_images/skg_Shower_Curtain/
  • generated_images/skg_Round_Beach_Towel/

Alternatively, to generate images with Stable Diffusion V. 3.5 Medium:

python generate_image_templates.py \
    -t "skg Shower Curtain" \
    -t "skg Round Beach Towel"\
    --model_id "stabilityai/stable-diffusion-3.5-medium"

Step 2: Run Clique Search

python clique_search.py \
    -p "generated_images/skg_Shower_Curtain" \
    -d ADE \
    -c curtain

This searches for image cliques among the generated "Shower Curtain" images with segmentation on ADE category curtain. The results will be saved to "./clique_results".


Notes

  • All outputs are saved in the working directory.
  • This setup is intended for quick verification of the proposed pipeline.

About

Low Resource Attack on Stable Diffusion to extract Template Memorized Images.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages