Frame Extractor for LoRA Style Datasets
I've just released on Github "Frame Extractor," a tool I developed to automatically extract frames from videos. This way, it's no longer necessary to manually extract frames. I created it because I wanted to make a style LoRA based on the photography and settings of Blade Runner 2049, and since the film is 2:43:47 long (about 235,632 frames), this script helps me avoid the lengthy process of manually selecting images.Although I believe I've optimized it as much as possible, I realized there isn't much difference when used via CPU or GPU, but this might depend on both my PC and the complexity of operations it performs, such as checking frame sharpness to determine which one to choose within the established range. The scene detection took about 24 minutes, while the evaluation and extraction of frames took approximately 3.5 hours.While it extracts images, you can start eliminating those you don't need if you wish. For example, I removed all images where there were recognizable faces that I didn't want to include in the LoRA training. This way, I manually reduced the useful images to about 1/4 of the total, which I then used for the final LoRA training.Main features: • Automatically detects scene changes in videos (including different camera angles) • Selects the sharpest frames for each scene • Easy-to-use interactive menu • Fully customizable settings • Available in Italian and EnglishHow to use it:GitHub Link: https://github.com/Tranchillo/Frame_ExtractorFollow the instructions in the README.md filePS: Setting Start and End points helps avoid including the opening and closing credits of the film, or to extract only the part of the film you're interested in. This is useful for creating an even more specific LoRA or if it's not necessary to work on an entire film to extract a useful dataset, for example when creating a LoRA based on a cartoon whose similar style is maintained throughout its duration.