Hmn-032-mr.mp4 -
# Do something with features...
# Extract features features = [] with torch.no_grad(): for frame in frames: frame = transform(frame) frame = frame.unsqueeze(0) # Add batch dimension output = model(frame) features.append(output.detach().cpu().numpy()) HMN-032-MR.mp4
For example, if you're using PyTorch and want to extract features from a video using a pre-trained model, a basic approach might look something like this: # Do something with features