TDN-M commited on
Commit
2583666
·
verified ·
1 Parent(s): f9a70bb

Update avatar.py

Browse files
Files changed (1) hide show
  1. avatar.py +5 -4
avatar.py CHANGED
@@ -188,7 +188,7 @@ class Avatar:
188
  # Kiểm tra và thiết lập device
189
  if not hasattr(self, 'device') or self.device is None:
190
  self.device = 'cuda' if torch.cuda.is_available() else 'cpu'
191
-
192
  # Khởi tạo detector với cấu hình đơn giản hơn
193
  detector = FaceAlignment(
194
  LandmarksType.TWO_D,
@@ -196,9 +196,10 @@ class Avatar:
196
  face_detector='sfd' # Sử dụng SFD thay vì mặc định
197
  )
198
 
199
- images = [frame for frame in full_frames]
200
-
201
- # Xử lý batch
 
202
  predictions = []
203
  while True:
204
  try:
 
188
  # Kiểm tra và thiết lập device
189
  if not hasattr(self, 'device') or self.device is None:
190
  self.device = 'cuda' if torch.cuda.is_available() else 'cpu'
191
+
192
  # Khởi tạo detector với cấu hình đơn giản hơn
193
  detector = FaceAlignment(
194
  LandmarksType.TWO_D,
 
196
  face_detector='sfd' # Sử dụng SFD thay vì mặc định
197
  )
198
 
199
+ # Chuyển đổi full_frames thành list
200
+ images = [frame for frame in full_frames]
201
+
202
+ # Xử lý batch
203
  predictions = []
204
  while True:
205
  try: