Da (3).mp4 -
# Get features with torch.no_grad(): features = model(tensor_frame)
# 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
# Process features as needed print(features.shape) # Get features with torch
while True: ret, frame = video_capture.read() if not ret: break # Convert to RGB and apply transform rgb_frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) tensor_frame = transform(rgb_frame) da (3).mp4
# Display or save frame if needed # ...
# Read video video_capture = cv2.VideoCapture('da (3).mp4')


