aharley/rvl_cdip
Updated • 1.37k • 80
How to use fathyshalab/invoicevsadvertisement with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-classification", model="fathyshalab/invoicevsadvertisement")
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("fathyshalab/invoicevsadvertisement")
model = AutoModelForImageClassification.from_pretrained("fathyshalab/invoicevsadvertisement")# Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification
processor = AutoImageProcessor.from_pretrained("fathyshalab/invoicevsadvertisement")
model = AutoModelForImageClassification.from_pretrained("fathyshalab/invoicevsadvertisement")This model is a fine-tuned version of microsoft/dit-base-finetuned-rvlcdip on the rvl_cdip dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 0.4353 | 0.98 | 41 | 0.0758 | 0.9837 |
| 0.0542 | 1.98 | 82 | 0.0359 | 0.9860 |
| 0.0349 | 2.98 | 123 | 0.0336 | 0.9867 |
| 0.0323 | 3.98 | 164 | 0.0304 | 0.9876 |
| 0.0288 | 4.98 | 205 | 0.0292 | 0.9892 |
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="fathyshalab/invoicevsadvertisement") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")