Buckets:
| """Quick test of the preprocessing pipeline on first 5 videos.""" | |
| import sys | |
| import os | |
| sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) | |
| from scripts.preprocess import FaceProcessor, process_video | |
| from pathlib import Path | |
| output_dir = Path("data/processed_test") | |
| output_dir.mkdir(parents=True, exist_ok=True) | |
| face_proc = FaceProcessor(min_detection_confidence=0.5) | |
| vids = sorted(Path("data/raw").glob("*.mp4"))[:5] | |
| for v in vids: | |
| print(f"Processing {v.name}...") | |
| try: | |
| meta = process_video(v, output_dir, face_proc, target_fps=25) | |
| if meta: | |
| print(f" OK: {meta['total_frames']} frames, {meta['duration']:.1f}s") | |
| else: | |
| print(" SKIPPED (too few frames)") | |
| except Exception as e: | |
| print(f" ERROR: {e}") | |
| import traceback | |
| traceback.print_exc() | |
| face_proc.close() | |
| print("Done!") | |
Xet Storage Details
- Size:
- 904 Bytes
- Xet hash:
- f6830834898e64f38f36904848e8e52c5667ce350139ce4565cbd8a987b7233a
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.