NOTE: This is validated in Google Colab T4 GPU
Here we are going to discuss how to classify images using DINOv2 embeddings and a C-Support Vector Classification (SVC) linear classification model. We will have a model trained on the Kaggle Vegiable Dataset that classifies vegitable images.
git clone https://github.com/facebookresearch/dinov2.git
cd dinov2
pip3 install -r requirements.txt
For Download Kaggle Vegiable Dataset follow below steps
pip3 install kaggle
- Goto Kaggle Settings
- Click on
Create New Tokenwill getkaggle.jsonfile - Put this json filr to
~/.kaggle/
Run following command that will download respecctive dataset
kaggle datasets download -d misrakahmed/vegetable-image-dataset
dinov2_classify_and_predict.ipynb