Spaces:
Runtime error
Runtime error
| from avatar import Avatar | |
| import pickle | |
| import sys | |
| try: | |
| # Khởi tạo Avatar | |
| avatar = Avatar() | |
| # Load video MC6 | |
| video_path = "ref_videos/MC6.mp4" | |
| avatar.get_video_full_frames(video_path) | |
| # Tạo face detection results | |
| print("Creating face detection results...") | |
| face_det_results = avatar.create_face_detection_results(avatar.video_full_frames, save_result=False) | |
| # Lưu kết quả vào file pkl | |
| output_path = "ref_videos/MC6_face_det_result.pkl" | |
| with open(output_path, 'wb') as f: | |
| pickle.dump(face_det_results, f) | |
| print(f"Successfully saved face detection results to {output_path}") | |
| sys.exit(0) | |
| except Exception as e: | |
| print(f"Error: {str(e)}") | |
| sys.exit(1) |