How to use a pytorch tensor or an openCV iamge correctly as input for for OpenAi CLIP?
I tried the following but this didn't work so far :
device = "cuda" if torch.cuda.is_available() else "cpu"
clip_model, clip_preprocess = clip.load("ViT-B/32", device=device)
clip_preprocess(torch.from_numpy(OpenCVImage)).unsqueeze(0).to(device)
- the preprocess step fails with message
Process finished with exit code 137 (interrupted by signal 9: SIGKILL)
- openCVImage is a object that was already processed with cv2.COLOR_BGR2RGB