(face_loss_helper, frames, device)
| 67 | |
| 68 | |
| 69 | def get_aligned_face(face_loss_helper, frames, device): |
| 70 | print("This is the process of getting aligned faces") |
| 71 | print("Please check the number of detected faces") |
| 72 | print(frames.shape) |
| 73 | print(1/0) |
| 74 | face_loss_helper.clean_all() |
| 75 | faces = mtcnn.align(frames) |
| 76 | transfroms = Compose( |
| 77 | [ToTensor(), Normalize([0.5, 0.5, 0.5], [0.5, 0.5, 0.5])]) |
| 78 | return transfroms(faces).to(device) |
| 79 | |
| 80 | |
| 81 | def save_to_mp4(frames, save_path, fps=7): |
no outgoing calls
no test coverage detected