用于 3DGS 数据集准备的视频帧提取和图像分析。使用与 Sharp Frames 应用程序相同的选择方法。
Extract and select the sharpest frames from videos or directories of images using advanced sharpness scoring algorithms. Features a modern text-based interface for easy configuration and powerful command-line options for automation.
pip install sharp-framesOr with pipx for isolated installation:
pipx install sharp-framesIMPORTANT: Video Processing Requirement: Install an FFmpeg distribution that includes both ffmpeg and ffprobe. Both executables must be on PATH; image-directory processing does not require them.
brew install ffmpegsudo apt install ffmpegHDR-to-SDR extraction additionally requires an FFmpeg build with the zscale filter (libzimg). You can verify support with ffmpeg -filters | grep zscale. Non-HDR video processing does not require zscale.
sharp-framesLaunches an intuitive step-by-step wizard for configuring your processing options.
sharp-frames input_video.mp4 output_folder
sharp-frames image_directory output_foldersharp-frames (default) - Step-by-step with validationsharp-frames --interactive - Terminal prompts for all optionssharp-frames [options]Input Types:
.mp4, .avi, .mov, .mkv, .wmv, .flv, .webm, .m4v, .3gp, .3g2, .ogv, .ts, .mts, .m2ts, .mpg, .mpeg, .vob.jpg, .jpeg, .png, .bmp, .tif, .tiff, .webp, .ppm, .pgm, .pbmSelects a target number of the sharpest frames while maintaining distribution across the source.
--selection-method best-n --num-frames 300 --min-buffer 3Divides content into batches and selects the sharpest frame from each batch.
--selection-method batched --batch-size 5 --batch-buffer 2Removes unusually blurry frames by comparing each frame to its neighbors.
--selection-method outlier-removal --outlier-window-size 15 --outlier-sensitivity 60--fps : Frame extraction rate for videos (default: 10)--format : Output image format (default: jpg)--width : Resize width in pixels, maintains aspect ratio (default: 0, no resize)--force-overwrite: Overwrite existing output files without confirmation--num-frames : Number of frames to select (best-n, default: 300)--min-buffer : Minimum number of intervening frames between selected frames (best-n, default: 3)--batch-size : Frames per batch (batched, default: 5)--batch-buffer : Frames to skip between batches (batched, default: 2)--outlier-window-size : Local comparison window, minimum 5 (outlier-removal, default: 15)--outlier-sensitivity : Detection sensitivity 0-100 (outlier-removal, default: 60)# Default settings
sharp-frames video.mp4 output_frames
# Custom frame rate and selection
sharp-frames video.mp4 output --fps 15 --num-frames 500
# Batch selection with resizing
sharp-frames video.mp4 output --selection-method batched --width 1920
# Process all videos in a directory
sharp-frames video_folder output_frames --fps 5# Select best images from directory
sharp-frames image_folder selected_images --num-frames 100
# Remove blurry images
sharp-frames photos selected --selection-method outlier-removal --outlier-sensitivity 75opencv-python, numpy, tqdm,
textual, textual-imagezscale/libzimg support (for HDR-to-SDR processing only)selected_metadata.json with processing details, parameters, and sharpness scoresjpg by default)F1 in the textual interface for context-sensitive helpCtrl+C to safely cancel processing at any time暂无开放 Issues,或尚未同步最近议题。