elucidator8918 commited on
Commit
d92f956
1 Parent(s): c1babae

commit files to HF hub

Browse files
Files changed (4) hide show
  1. README.md +33 -0
  2. config.json +32 -0
  3. model.safetensors +3 -0
  4. preprocessor_config.json +22 -0
README.md ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ language: en
4
+ license: mit
5
+ tags:
6
+ - VIT
7
+ - image-classification
8
+ - drowsiness-detection
9
+ ---
10
+
11
+ # VIT_Drowsiness
12
+
13
+ This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) for drowsiness detection.
14
+
15
+ ## Model description
16
+
17
+ This model is a Vision Transformer (ViT) fine-tuned for drowsiness detection. It classifies images into two categories: drowsy and not drowsy.
18
+
19
+ ## Intended uses & limitations
20
+
21
+ This model is intended for drowsiness detection in images. It should be used on facial images similar to those in the training dataset.
22
+
23
+ ## Training data
24
+
25
+ The model was trained on a custom dataset located at /kaggle/input/nthuddd2/train_data. The dataset was split into 70% training, 15% validation, and 15% test sets.
26
+
27
+ ## Training procedure
28
+
29
+ The model was trained for 10 epochs using the Lion optimizer with a learning rate of 0.0001 and weight decay of 0.01. A cosine learning rate scheduler with 0.1 warmup ratio was used.
30
+
31
+ ## Evaluation results
32
+
33
+ [Add your evaluation results here after training]
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "google/vit-base-patch16-224",
3
+ "architectures": [
4
+ "ViTForImageClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.0,
7
+ "encoder_stride": 16,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.0,
10
+ "hidden_size": 768,
11
+ "id2label": {
12
+ "0": "Drowsy",
13
+ "1": "Awake"
14
+ },
15
+ "image_size": 224,
16
+ "initializer_range": 0.02,
17
+ "intermediate_size": 3072,
18
+ "label2id": {
19
+ "Awake": 1,
20
+ "Drowsy": 0
21
+ },
22
+ "layer_norm_eps": 1e-12,
23
+ "model_type": "vit",
24
+ "num_attention_heads": 12,
25
+ "num_channels": 3,
26
+ "num_hidden_layers": 12,
27
+ "patch_size": 16,
28
+ "problem_type": "single_label_classification",
29
+ "qkv_bias": true,
30
+ "torch_dtype": "float32",
31
+ "transformers_version": "4.42.3"
32
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4b5110ce4073645d4612e43efd3f1a758998e1f3a278e1356e1f25d70df5292a
3
+ size 343223968
preprocessor_config.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_normalize": true,
3
+ "do_rescale": true,
4
+ "do_resize": true,
5
+ "image_mean": [
6
+ 0.5,
7
+ 0.5,
8
+ 0.5
9
+ ],
10
+ "image_processor_type": "ViTImageProcessor",
11
+ "image_std": [
12
+ 0.5,
13
+ 0.5,
14
+ 0.5
15
+ ],
16
+ "resample": 2,
17
+ "rescale_factor": 0.00392156862745098,
18
+ "size": {
19
+ "height": 224,
20
+ "width": 224
21
+ }
22
+ }