Maurdekye / training-picker

Extension for stable-diffusion-webui that allows the user to mux through the keyframes of a video, and automatically pick and export training examples from individual keyframes.
109 stars 16 forks source link

training-picker

Adds a tab to the webui that allows the user to automatically extract keyframes from video, and manually extract 512x512 crops of those frames for use in model training.

image

Installation:

  1. Install AUTOMATIC1111's Stable Diffusion Webui
  2. Install ffmpeg for your operating system
  3. Clone this repository into the extensions folder inside the webui

Make sure you don't already have python-ffmpeg installed globally, as the library this program uses is ffmpeg-python, and your installation will conflict with it.

Usage:

Creating an extracted frame set

  1. Drop videos you want to extract cropped frames from into the training-picker/videos folder
  2. Open up the Training Picker tab of the webui
  3. Select one of the videos you placed in the training-picker/videos folder from the dropdown on the left
  4. Click 'Extract Frames`
  5. After the extraction finishes, a new keyframe set for the video should be selectable in the dropdown on the right
  6. Select the keyframe set, and the frames will appear in the browser below

Optionally, you can also just supply a large collection of individual images you would like to work with directly by placing them into a folder within training-picker/extracted-frames.

Cropping