Da (3).mp4 -

# Get features with torch.no_grad(): features = model(tensor_frame)

# Display or save frame if needed # ...

# Move to GPU if available device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') tensor_frame = tensor_frame.to(device) model.to(device) da (3).mp4

# Read video video_capture = cv2.VideoCapture('da (3).mp4') # Get features with torch

# Transform to apply to frames transform = transforms.Compose([ transforms.ToTensor(), transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]) ]) da (3).mp4