Image Classification
Transformers
Safetensors
deit
vision
document-layout-analysis
document-classification
doclaynet
Instructions to use kaixkhazaki/deit_doclaynet_base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kaixkhazaki/deit_doclaynet_base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="kaixkhazaki/deit_doclaynet_base") 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("kaixkhazaki/deit_doclaynet_base") model = AutoModelForImageClassification.from_pretrained("kaixkhazaki/deit_doclaynet_base") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -59,4 +59,12 @@ Test Loss: 0.8134, Test Acc: 81.56%
|
|
| 59 |
|
| 60 |
|
| 61 |
## Usage
|
|
|
|
|
|
|
| 62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
|
| 61 |
## Usage
|
| 62 |
+
```python
|
| 63 |
+
from transformers import pipeline
|
| 64 |
|
| 65 |
+
# Load the model using the image-classification pipeline
|
| 66 |
+
pipe = pipeline("image-classification", model="kaixkhazaki/vit_doclaynet_base")
|
| 67 |
+
|
| 68 |
+
# Test it with an image
|
| 69 |
+
result = pipe("path_to_image.jpg")
|
| 70 |
+
print(result)
|