Mozilla/docornot
Viewer • Updated • 16k • 50 • 6
How to use Mozilla/docornot with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-classification", model="Mozilla/docornot")
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("Mozilla/docornot")
model = AutoModelForImageClassification.from_pretrained("Mozilla/docornot")# Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification
processor = AutoImageProcessor.from_pretrained("Mozilla/docornot")
model = AutoModelForImageClassification.from_pretrained("Mozilla/docornot")This model is a fine-tuned version of facebook/deit-tiny-distilled-patch16-224 on the docornot dataset.
It achieves the following results on the evaluation set:
This model was trained on an M1 and took 0.322 g of CO2 (measured with CodeCarbon)
This model is distilled Vision Transformer (ViT) model. Images are presented to the model as a sequence of fixed-size patches (resolution 16x16), which are linearly embedded.
You can use this model to detect if an image is a picture or a document.
Source code used to generate this model : https://github.com/mozilla/docornot
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 0.0 | 1.0 | 1600 | 0.0000 | 1.0 |
Base model
facebook/deit-tiny-distilled-patch16-224
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="Mozilla/docornot") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")