Skip to content

A repository for generating images and video for product ad shoots

Notifications You must be signed in to change notification settings

sneakatyou/ProductShoot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

ProductShoot

ProductShoot is a repository dedicated to generating images and videos for product ad shoots. It uses advanced machine learning models to generate high-quality visual content based on user-defined prompts.

Mask Generation

Use this notebook to generate image masks: Generate Mask

Usage

To generate images and videos, use the following command:

python productshoot.py \
    --init_image_path '/teamspace/studios/this_studio/cropped_results/example1_cropped_no-bg.jpg' \
    --mask_image_path '/teamspace/studios/this_studio/cropped_results/example1_cropped_no-bg_mask.jpg' \
    --n 2 \
    --x 3 \
    --video_generation_model 'StableVideoDiffusion' \
    --image_generation_model 'StableDiffusionInpaintingXL' \
    --image_prompt 'product placed in a showroom' \
    --image_negative_prompt 'product changed in any form bad anatomy, deformed, ugly, disfigured' \
    --video_prompt 'zoom in on the scene' \
    --video_negative_prompt 'product changed in any form bad anatomy, deformed, ugly, disfigured' \
    --generate_image True \
    --generate_video True \
    --save_path_image 'generated_product_image_example3.png' \
    --save_path_video 'generated_product_video_example3.mp4'

init_image_path: Path to the initial image.
mask_image_path: Path to the mask image.
n: Factor to resize the initial image by.
x: Factor to calculate the position to paste the mask. Shift Image inside the frame.
video_generation_model: Model to use for video generation. Default is 'StableVideoDiffusion'. StableVideoDiffusion Doesn't support prompting. Use "I2VGenXL" if you intend to condition video based on prompt.
image_generation_model: Model to use for image generation. Default is 'StableDiffusionInpaintingXL'.
image_prompt: Prompt for image generation.
image_negative_prompt: Negative prompt for image generation.
video_prompt: Prompt for video generation.
video_negative_prompt: Negative prompt for video generation.
generate_image: Whether to generate an image. Default is True.
generate_video: Whether to generate a video. Default is True.
save_path_image: Path to save the generated image.
save_path_video: Path to save the generated video.

About

A repository for generating images and video for product ad shoots

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages