From the course: Deep Learning Fundamentals for Healthcare

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Zero-shot object detection in X-rays using CLIP-based models

Zero-shot object detection in X-rays using CLIP-based models

From the course: Deep Learning Fundamentals for Healthcare

Zero-shot object detection in X-rays using CLIP-based models

- [Instructor] In this video, we're going to practice zero-shot object detection using the CLIP-based model on X-ray images. Remember to open colab.google.com. In this instance, since we are only making inference, you don't have to use GPU instance and upload the xray_normal_pneumonia_small dataset provided for you in the Exercise File. And let's go ahead to unzip it. Now, let's import the necessary libraries like torch, image from Pillow, numpy, matplotlib. We will need patches from matplotlib.patches. And then from transformers, import Automodel and Autoprocessor. We are also going to need cv2. Now let's do the BioMed CLIP, model = Automodel.from_pretrained, and this is the BioMed version of CLIP. This is available on Hugging Face. You can look it up and read more about the model and how it was trained, if you care about that. And let's specify to trust_remote_code. For the same model, we should download the processor. So this is the code downloading this pre-trained BioMed CLIP…

Contents