r/StableDiffusion • • 1d ago

Resource - Update Free Windows tool for pulling LoRA training frames out of video: picks the sharpest frame per interval and skips near-duplicates

When I build a character dataset from video, the slow part is never the frame extraction itself. It's deleting the hundreds of motion-blurred and nearly identical frames afterwards.

So I made Stillsift, a small desktop app for that step. You drop in one or more videos, set a start and end time if needed, and pick how frames are chosen: N per second, N in total, or one per scene. Then two options do most of the work:

  • Sharpest of each interval: ask for 300 frames and it takes the least blurry frame from each of 300 slices of the clip, instead of whatever lands on the timestamp.
  • Skip similar: compares each frame with the last saved one using a perceptual hash, so a static talking-head shot doesn't give you 80 copies.

It can also write a CSV with the frame number, timestamp and sharpness score for each saved frame, which is handy if you want to sort or filter later.

Everything runs locally, it's MIT licensed, and it's a single exe. Windows only for now.

Download and a short demo of how frames get picked: https://misutesu.com/stillsift/
Source: https://github.com/misutesu-desu/stillsift

Sharpness is plain Laplacian variance, nothing clever. It works well for motion blur but it's fooled by heavy grain and noise. If you know a cheap measure that holds up better on grainy anime or film sources, I'd like to hear it.

41 Upvotes

7 comments sorted by

4

u/Choowkee 1d ago

Sounds interesting though a good dataset would need a manual review of each frame anyway to get the desired subject framed in a proper way. And sometimes a blurry rare shot is better than no shot at all.

1

u/reeight 1d ago

I noticed too many blurry shots makes the output blurry.

Maybe do some weird upsample/sharpen/detail/downsample to get around it?

1

u/Zueuk 7h ago

how do you avoid teaching the LORA to generate video compression artifacts anyway? some sources say to mention them in the captions so it knows the difference, others say that mention will teach the model to generate them 😕

1

u/Ill_Profile_8808 6h ago

the tool won't fix that, it just drops blurry and duplicate frames. best fix is a better source, highest bitrate you can get, save as png and downscale a bit. tagging artifacts only helps if some images have them and some don't, if they're in every frame the tag won't separate anything

2

u/stroud 1d ago

thank you for sharing.

2

u/arbybean 1d ago

Impressive and fast. Chewed through a 30 minute show, picked out the scenes, and saved about 300 images in less than 2 minutes.

1

u/Jimmy2shoes2222 1d ago

Sounds like a handy tool 👍