CLIP can classify images it was never trained on. Each class name is turned into a text prompt, and the image is assigned to the prompt it is most similar to. No labelled training data for the new classes is needed.
Implement zero_shot_predict(img_emb, class_embs), returning the index of the best-matching class prompt.
Normalize the image and class embeddings, compute all the cosine similarities, then take the argmax.
No results yet
Run your code to check it against the examples, or submit to run every test.