Instructions to use microsoft/dit-base-finetuned-rvlcdip with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/dit-base-finetuned-rvlcdip with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="microsoft/dit-base-finetuned-rvlcdip") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("microsoft/dit-base-finetuned-rvlcdip") model = AutoModelForImageClassification.from_pretrained("microsoft/dit-base-finetuned-rvlcdip") - Inference
- Notebooks
- Google Colab
- Kaggle
Custom train
#1
by Ashv27 - opened
How to custom train on own data?
Hi,
To fine-tune this model I'd recommend checking out the official example notebook: https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb.
Tip: make sure to set ignore_mismatched_sizes=True in the from_pretrained method to replace the head of the model.