Simple code for extracting frames from videos for dataset preparation.
Asks in the terminal for:
Frame extraction mode: Enter 'random' to extract random frames or 'interval' to extract frames at a specified interval
Video directory: Enter the directory containing the videos (subfolders included)
Output directory: Enter the directory to save the captured frames
Frame density: Enter the rate of frames to capture (e.g., 0.1 = 1 frame per 10 seconds of video
Minimum number of frames to extract: Enter the minimum number of frames to capture from each video
Maximum number of frames to extract: Enter the maximum number of frames to capture from each video