elucidator8918 commited on
Commit
35e06e0
·
1 Parent(s): 03c5112

commit files to HF hub

Browse files
Files changed (4) hide show
  1. README.md +33 -0
  2. config.json +55 -0
  3. model.safetensors +3 -0
  4. preprocessor_config.json +17 -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_2
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,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "apple/mobilevit-small",
3
+ "architectures": [
4
+ "MobileViTForImageClassification"
5
+ ],
6
+ "aspp_dropout_prob": 0.1,
7
+ "aspp_out_channels": 256,
8
+ "atrous_rates": [
9
+ 6,
10
+ 12,
11
+ 18
12
+ ],
13
+ "attention_probs_dropout_prob": 0.0,
14
+ "classifier_dropout_prob": 0.1,
15
+ "conv_kernel_size": 3,
16
+ "expand_ratio": 4.0,
17
+ "hidden_act": "silu",
18
+ "hidden_dropout_prob": 0.1,
19
+ "hidden_sizes": [
20
+ 144,
21
+ 192,
22
+ 240
23
+ ],
24
+ "id2label": {
25
+ "0": "Drowsy",
26
+ "1": "Awake"
27
+ },
28
+ "image_size": 256,
29
+ "initializer_range": 0.02,
30
+ "label2id": {
31
+ "Awake": 1,
32
+ "Drowsy": 0
33
+ },
34
+ "layer_norm_eps": 1e-05,
35
+ "mlp_ratio": 2.0,
36
+ "model_type": "mobilevit",
37
+ "neck_hidden_sizes": [
38
+ 16,
39
+ 32,
40
+ 64,
41
+ 96,
42
+ 128,
43
+ 160,
44
+ 640
45
+ ],
46
+ "num_attention_heads": 4,
47
+ "num_channels": 3,
48
+ "output_stride": 32,
49
+ "patch_size": 2,
50
+ "problem_type": "single_label_classification",
51
+ "qkv_bias": true,
52
+ "semantic_loss_ignore_index": 255,
53
+ "torch_dtype": "float32",
54
+ "transformers_version": "4.42.3"
55
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d7c78572ec96fb6739be5233fefa6985a365e94e8e7c639c53eed4c45bba0541
3
+ size 19851560
preprocessor_config.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": {
3
+ "height": 256,
4
+ "width": 256
5
+ },
6
+ "do_center_crop": true,
7
+ "do_flip_channel_order": true,
8
+ "do_flip_channels": true,
9
+ "do_rescale": true,
10
+ "do_resize": true,
11
+ "image_processor_type": "MobileViTImageProcessor",
12
+ "resample": 2,
13
+ "rescale_factor": 0.00392156862745098,
14
+ "size": {
15
+ "shortest_edge": 288
16
+ }
17
+ }