File size: 544 Bytes
6e4d127
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from avatar import Avatar
import pickle

# 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
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"Đã lưu face detection results vào {output_path}")