Subh775 commited on
Commit
4d890ab
·
verified ·
1 Parent(s): 4d1b0bc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +104 -69
README.md CHANGED
@@ -1,71 +1,106 @@
1
  ---
2
- dataset_info:
3
- features:
4
- - name: image_id
5
- dtype: int64
6
- - name: image
7
- dtype: image
8
- - name: width
9
- dtype: int64
10
- - name: height
11
- dtype: int64
12
- - name: objects
13
- sequence:
14
- - name: bbox
15
- sequence: float32
16
- length: 4
17
- - name: category
18
- dtype:
19
- class_label:
20
- names:
21
- '0': weapons
22
- '1': Aggressor
23
- '2': Blood
24
- '3': Guns
25
- '4': Guns perspective
26
- '5': Hand
27
- '6': Heavy Gun
28
- '7': Knife
29
- '8': Knife_Deploy
30
- '9': Knife_Weapon
31
- '10': Long guns
32
- '11': Person
33
- '12': Pistol
34
- '13': Rifle
35
- '14': Shotgun
36
- '15': Stabbing
37
- '16': Victim
38
- '17': al
39
- '18': guns
40
- '19': handgun
41
- '20': heavyweapon
42
- '21': larga
43
- '22': person
44
- '23': pistol
45
- '24': pistols
46
- '25': rifle
47
- '26': shotgun
48
- '27': violence
49
- '28': weapon
50
- splits:
51
- - name: train
52
- num_bytes: 444829039.988
53
- num_examples: 5871
54
- - name: validation
55
- num_bytes: 72917317.116
56
- num_examples: 1491
57
- - name: test
58
- num_bytes: 119828512.98
59
- num_examples: 2295
60
- download_size: 582992013
61
- dataset_size: 637574870.084
62
- configs:
63
- - config_name: default
64
- data_files:
65
- - split: train
66
- path: data/train-*
67
- - split: validation
68
- path: data/validation-*
69
- - split: test
70
- path: data/test-*
71
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: cc-by-4.0
3
+ tags:
4
+ - object-detection
5
+ - image-classification
6
+ - computer-vision
7
+ - weapons
8
+ - security
9
+ task_categories:
10
+ - image-classification
11
+ language:
12
+ - en
13
+ size_categories:
14
+ - 1K<n<10K
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  ---
16
+
17
+ # Weapon and Threat Detection Dataset
18
+
19
+ This dataset is a cleaned, restructured, and ready-to-use version of a comprehensive object detection dataset for identifying weapons, aggressors, and other security-related items. It has been specifically formatted for easy use with the Hugging Face `datasets` library and modern training frameworks like `ultralytics` for YOLO models.
20
+
21
+ ## Original Source
22
+
23
+ This dataset is a derivative work based on the **[weapon-detection Object Detection Model](https://universe.roboflow.com/yolov7test-pdxwq/weapon-detection-m7tpo)** dataset, originally created and shared by **yolov7test** on Roboflow Universe.
24
+
25
+ All images and original annotations belong to the original author. This version was created to resolve data integrity issues, including inconsistent filenames and directory structures, to prepare it for robust training.
26
+
27
+ ## Dataset Details
28
+
29
+ The dataset is divided into three splits for standard model training and evaluation workflows.
30
+
31
+ * **Train:** 5,871 images
32
+ * **Validation:** 1,491 images
33
+ * **Test:** 2,295 images
34
+
35
+ ### Classes
36
+
37
+ The dataset contains **29 distinct classes** for object detection:
38
+ `'weapons'`, `'Aggressor'`, `'Blood'`, `'Guns'`, `'Guns perspective'`, `'Hand'`, `'Heavy Gun'`, `'Knife'`, `'Knife_Deploy'`, `'Knife_Weapon'`, `'Long guns'`, `'Person'`, `'Pistol'`, `'Rifle'`, `'Shotgun'`, `'Stabbing'`, `'Victim'`, `'al'`, `'guns'`, `'handgun'`, `'heavyweapon'`, `'larga'`, `'person'`, `'pistol'`, `'pistols'`, `'rifle'`, `'shotgun'`, `'violence'`, `'weapon'`
39
+
40
+ ## Dataset Structure
41
+
42
+ Each item in the dataset is a dictionary with the following structure:
43
+
44
+ ```python
45
+ {
46
+ 'image_id': 5,
47
+ 'image': <PIL.JpegImagePlugin.JpegImageFile image>,
48
+ 'width': 640,
49
+ 'height': 640,
50
+ 'objects': {
51
+ 'bbox': [
52
+ [250.0, 150.0, 100.5, 200.0],
53
+ # ... more boxes
54
+ ],
55
+ 'category': [
56
+ 12, # Corresponds to 'Pistol'
57
+ # ... more category IDs
58
+ ]
59
+ }
60
+ }
61
+ ```
62
+
63
+ - `image_id`: A unique integer identifier for the image.
64
+
65
+ - `image`: The image object itself, in PIL format.
66
+
67
+ - `width`,`height`: The dimensions of the image.
68
+
69
+ - `objects`: A dictionary containing the bounding box annotations.
70
+
71
+ - `bbox`: A list of bounding boxes, each in the COCO format [x_min, y_min, width, height].
72
+
73
+ - `category`: A list of corresponding integer class labels. The mapping from integer to class name can be found in the dataset's features.
74
+
75
+ # How to Use
76
+ You can easily load this dataset using the datasets library:
77
+
78
+ ```Python
79
+
80
+ from datasets import load_dataset
81
+
82
+ # Load the dataset from the Hugging Face Hub
83
+ dataset = load_dataset("Subh775/WeaponDetection")
84
+
85
+ # Access a specific split
86
+ train_dataset = dataset["train"]
87
+
88
+ # Print the first example
89
+ print(train_dataset[0])
90
+ ```
91
+
92
+ # Citation
93
+ If you use this dataset in your work, please cite the original creator and provide a link to the Roboflow Universe page.
94
+
95
+ ```BibTeX:
96
+
97
+ Code snippet
98
+
99
+ @misc{yolov7test_weapon_detection,
100
+ title={Weapon Detection Object Detection Model},
101
+ author={yolov7test},
102
+ howpublished={\url{[https://universe.roboflow.com/yolov7test-pdxwq/weapon-detection-m7tpo](https://universe.roboflow.com/yolov7test-pdxwq/weapon-detection-m7tpo)}},
103
+ year={2022}
104
+ }
105
+ ```
106
+