Luna-Skywalker commited on
Commit
ad13261
·
verified ·
1 Parent(s): c339176

VIT-cctv-crime-detection

Browse files
Files changed (5) hide show
  1. README.md +70 -0
  2. config.json +57 -0
  3. model.safetensors +3 -0
  4. preprocessor_config.json +23 -0
  5. training_args.bin +3 -0
README.md ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ base_model: google/vit-base-patch16-224-in21k
5
+ tags:
6
+ - generated_from_trainer
7
+ metrics:
8
+ - accuracy
9
+ - precision
10
+ - recall
11
+ - f1
12
+ model-index:
13
+ - name: crime_cctv_image_detection
14
+ results: []
15
+ ---
16
+
17
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
18
+ should probably proofread and complete it, then remove this comment. -->
19
+
20
+ # crime_cctv_image_detection
21
+
22
+ This model is a fine-tuned version of [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k) on the None dataset.
23
+ It achieves the following results on the evaluation set:
24
+ - Loss: 0.0332
25
+ - Accuracy: 0.9957
26
+ - Precision: 0.9954
27
+ - Recall: 0.9954
28
+ - F1: 0.9954
29
+
30
+ ## Model description
31
+
32
+ More information needed
33
+
34
+ ## Intended uses & limitations
35
+
36
+ More information needed
37
+
38
+ ## Training and evaluation data
39
+
40
+ More information needed
41
+
42
+ ## Training procedure
43
+
44
+ ### Training hyperparameters
45
+
46
+ The following hyperparameters were used during training:
47
+ - learning_rate: 5e-06
48
+ - train_batch_size: 64
49
+ - eval_batch_size: 16
50
+ - seed: 42
51
+ - optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
52
+ - lr_scheduler_type: linear
53
+ - lr_scheduler_warmup_steps: 50
54
+ - num_epochs: 3
55
+
56
+ ### Training results
57
+
58
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 |
59
+ |:-------------:|:-----:|:-----:|:---------------:|:--------:|:---------:|:------:|:------:|
60
+ | 0.7736 | 1.0 | 4608 | 0.1649 | 0.9874 | 0.9857 | 0.9827 | 0.9842 |
61
+ | 0.0836 | 2.0 | 9216 | 0.0487 | 0.9951 | 0.9948 | 0.9948 | 0.9948 |
62
+ | 0.0337 | 3.0 | 13824 | 0.0332 | 0.9957 | 0.9954 | 0.9954 | 0.9954 |
63
+
64
+
65
+ ### Framework versions
66
+
67
+ - Transformers 4.53.3
68
+ - Pytorch 2.6.0+cu124
69
+ - Datasets 4.1.1
70
+ - Tokenizers 0.21.2
config.json ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "ViTForImageClassification"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.0,
6
+ "encoder_stride": 16,
7
+ "hidden_act": "gelu",
8
+ "hidden_dropout_prob": 0.0,
9
+ "hidden_size": 768,
10
+ "id2label": {
11
+ "0": "Abuse",
12
+ "1": "Arrest",
13
+ "2": "Arson",
14
+ "3": "Assault",
15
+ "4": "Burglary",
16
+ "5": "Explosion",
17
+ "6": "Fighting",
18
+ "7": "Normal",
19
+ "8": "RoadAccidents",
20
+ "9": "Robbery",
21
+ "10": "Shooting",
22
+ "11": "Shoplifting",
23
+ "12": "Stealing",
24
+ "13": "Vandalism"
25
+ },
26
+ "image_size": 224,
27
+ "initializer_range": 0.02,
28
+ "intermediate_size": 3072,
29
+ "label2id": {
30
+ "Abuse": 0,
31
+ "Arrest": 1,
32
+ "Arson": 2,
33
+ "Assault": 3,
34
+ "Burglary": 4,
35
+ "Explosion": 5,
36
+ "Fighting": 6,
37
+ "Normal": 7,
38
+ "RoadAccidents": 8,
39
+ "Robbery": 9,
40
+ "Shooting": 10,
41
+ "Shoplifting": 11,
42
+ "Stealing": 12,
43
+ "Vandalism": 13
44
+ },
45
+ "layer_norm_eps": 1e-12,
46
+ "model_type": "vit",
47
+ "num_attention_heads": 12,
48
+ "num_channels": 3,
49
+ "num_hidden_layers": 12,
50
+ "patch_size": 16,
51
+ "pooler_act": "tanh",
52
+ "pooler_output_size": 768,
53
+ "problem_type": "single_label_classification",
54
+ "qkv_bias": true,
55
+ "torch_dtype": "float32",
56
+ "transformers_version": "4.53.3"
57
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:18620e6999e2987cae076eb4a781ca5fdb5ce7aedf91fbf8146c99791e6b26db
3
+ size 343260888
preprocessor_config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_convert_rgb": null,
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": 224,
21
+ "width": 224
22
+ }
23
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3835476d171569f9fb1944a26c3497f753131ab5195322cf60aefb4ace6400ac
3
+ size 5304