Instructions to use huji-iml-image-hackathon-2026/validate_API with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use huji-iml-image-hackathon-2026/validate_API with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="huji-iml-image-hackathon-2026/validate_API") 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("huji-iml-image-hackathon-2026/validate_API") model = AutoModelForImageClassification.from_pretrained("huji-iml-image-hackathon-2026/validate_API", device_map="auto") - Notebooks
- Google Colab
- Kaggle
validate settings
Browse files- README.md +29 -0
- config.json +30 -0
- model.safetensors +3 -0
- preprocessor_config.json +23 -0
README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
tags:
|
| 4 |
+
- image-classification
|
| 5 |
+
- dummy
|
| 6 |
+
pipeline_tag: image-classification
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
# Dummy Image Classification Submission
|
| 10 |
+
|
| 11 |
+
This is a tiny random-weight dummy model for testing a Hugging Face image-classification submission workflow.
|
| 12 |
+
|
| 13 |
+
It is **not trained** and should not be used for real scoring.
|
| 14 |
+
|
| 15 |
+
Expected loading pattern:
|
| 16 |
+
|
| 17 |
+
```python
|
| 18 |
+
from transformers import AutoImageProcessor, AutoModelForImageClassification
|
| 19 |
+
|
| 20 |
+
repo_id = "huji-iml-hackathon-2026/test-submission"
|
| 21 |
+
processor = AutoImageProcessor.from_pretrained(repo_id)
|
| 22 |
+
model = AutoModelForImageClassification.from_pretrained(repo_id, trust_remote_code=False)
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
Labels:
|
| 26 |
+
|
| 27 |
+
- cat
|
| 28 |
+
- dog
|
| 29 |
+
- bird
|
config.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"ViTForImageClassification"
|
| 4 |
+
],
|
| 5 |
+
"model_type": "vit",
|
| 6 |
+
"attention_probs_dropout_prob": 0.0,
|
| 7 |
+
"hidden_act": "gelu",
|
| 8 |
+
"hidden_dropout_prob": 0.0,
|
| 9 |
+
"hidden_size": 32,
|
| 10 |
+
"image_size": 32,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"intermediate_size": 64,
|
| 13 |
+
"layer_norm_eps": 1e-12,
|
| 14 |
+
"num_attention_heads": 4,
|
| 15 |
+
"num_channels": 3,
|
| 16 |
+
"num_hidden_layers": 1,
|
| 17 |
+
"patch_size": 16,
|
| 18 |
+
"qkv_bias": true,
|
| 19 |
+
"num_labels": 3,
|
| 20 |
+
"id2label": {
|
| 21 |
+
"0": "cat",
|
| 22 |
+
"1": "dog",
|
| 23 |
+
"2": "bird"
|
| 24 |
+
},
|
| 25 |
+
"label2id": {
|
| 26 |
+
"cat": 0,
|
| 27 |
+
"dog": 1,
|
| 28 |
+
"bird": 2
|
| 29 |
+
}
|
| 30 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dc366d2aa509c93a1708f032ff781616c78d863d84bc6c1d8bd04ff5d48f78ab
|
| 3 |
+
size 136532
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"do_convert_rgb": true,
|
| 3 |
+
"do_normalize": true,
|
| 4 |
+
"do_rescale": true,
|
| 5 |
+
"do_resize": true,
|
| 6 |
+
"image_mean": [
|
| 7 |
+
0.5,
|
| 8 |
+
0.5,
|
| 9 |
+
0.5
|
| 10 |
+
],
|
| 11 |
+
"image_processor_type": "ViTImageProcessor",
|
| 12 |
+
"image_std": [
|
| 13 |
+
0.5,
|
| 14 |
+
0.5,
|
| 15 |
+
0.5
|
| 16 |
+
],
|
| 17 |
+
"resample": 2,
|
| 18 |
+
"rescale_factor": 0.00392156862745098,
|
| 19 |
+
"size": {
|
| 20 |
+
"height": 32,
|
| 21 |
+
"width": 32
|
| 22 |
+
}
|
| 23 |
+
}
|