thenguyentrong commited on
Commit ·
057cf2a
1
Parent(s): 36e4d82
Update notebooks
Browse files
examples/extract_preprocess_frames.py
CHANGED
|
@@ -13,9 +13,9 @@ os.environ["OPENCV_FFMPEG_READ_ATTEMPTS"] = "50000"
|
|
| 13 |
video_path = "path/to/video.mp4"
|
| 14 |
output_dir = "outputs/preprocessed"
|
| 15 |
|
| 16 |
-
frame_interval =
|
| 17 |
zoom_level = 5.0 # 5x zoom -> crop 1/5 of original frame, then resize to 640x640
|
| 18 |
-
crops_per_frame =
|
| 19 |
manual_crop = False # If True, use one fixed crop position instead of random crops
|
| 20 |
crop_x_center = 0.5 # Manual crop center X (relative: 0.0 to 1.0)
|
| 21 |
crop_y_center = 0.5 # Manual crop center Y (relative: 0.0 to 1.0)
|
|
|
|
| 13 |
video_path = "path/to/video.mp4"
|
| 14 |
output_dir = "outputs/preprocessed"
|
| 15 |
|
| 16 |
+
frame_interval = 60 # Extract every nth frame
|
| 17 |
zoom_level = 5.0 # 5x zoom -> crop 1/5 of original frame, then resize to 640x640
|
| 18 |
+
crops_per_frame = 10 # Number of random crops per extracted frame
|
| 19 |
manual_crop = False # If True, use one fixed crop position instead of random crops
|
| 20 |
crop_x_center = 0.5 # Manual crop center X (relative: 0.0 to 1.0)
|
| 21 |
crop_y_center = 0.5 # Manual crop center Y (relative: 0.0 to 1.0)
|