ArdaYagiz Subh775 commited on
Commit
2d28c29
·
0 Parent(s):

Duplicate from Subh775/WeaponDetection

Browse files

Co-authored-by: Subhansh Malviya <Subh775@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
12
+ *.mds filter=lfs diff=lfs merge=lfs -text
13
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
14
+ *.model filter=lfs diff=lfs merge=lfs -text
15
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
16
+ *.npy filter=lfs diff=lfs merge=lfs -text
17
+ *.npz filter=lfs diff=lfs merge=lfs -text
18
+ *.onnx filter=lfs diff=lfs merge=lfs -text
19
+ *.ot filter=lfs diff=lfs merge=lfs -text
20
+ *.parquet filter=lfs diff=lfs merge=lfs -text
21
+ *.pb filter=lfs diff=lfs merge=lfs -text
22
+ *.pickle filter=lfs diff=lfs merge=lfs -text
23
+ *.pkl filter=lfs diff=lfs merge=lfs -text
24
+ *.pt filter=lfs diff=lfs merge=lfs -text
25
+ *.pth filter=lfs diff=lfs merge=lfs -text
26
+ *.rar filter=lfs diff=lfs merge=lfs -text
27
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
28
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
29
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
30
+ *.tar filter=lfs diff=lfs merge=lfs -text
31
+ *.tflite filter=lfs diff=lfs merge=lfs -text
32
+ *.tgz filter=lfs diff=lfs merge=lfs -text
33
+ *.wasm filter=lfs diff=lfs merge=lfs -text
34
+ *.xz filter=lfs diff=lfs merge=lfs -text
35
+ *.zip filter=lfs diff=lfs merge=lfs -text
36
+ *.zst filter=lfs diff=lfs merge=lfs -text
37
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
38
+ # Audio files - uncompressed
39
+ *.pcm filter=lfs diff=lfs merge=lfs -text
40
+ *.sam filter=lfs diff=lfs merge=lfs -text
41
+ *.raw filter=lfs diff=lfs merge=lfs -text
42
+ # Audio files - compressed
43
+ *.aac filter=lfs diff=lfs merge=lfs -text
44
+ *.flac filter=lfs diff=lfs merge=lfs -text
45
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
46
+ *.ogg filter=lfs diff=lfs merge=lfs -text
47
+ *.wav filter=lfs diff=lfs merge=lfs -text
48
+ # Image files - uncompressed
49
+ *.bmp filter=lfs diff=lfs merge=lfs -text
50
+ *.gif filter=lfs diff=lfs merge=lfs -text
51
+ *.png filter=lfs diff=lfs merge=lfs -text
52
+ *.tiff filter=lfs diff=lfs merge=lfs -text
53
+ # Image files - compressed
54
+ *.jpg filter=lfs diff=lfs merge=lfs -text
55
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
56
+ *.webp filter=lfs diff=lfs merge=lfs -text
57
+ # Video files - compressed
58
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
59
+ *.webm filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
data/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b69ddd8a13e47b5cb229571cd03f492b21dc362b03ca9926e777e494cb122a08
3
+ size 90123847
data/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:88e6b733dbc445ca8ac34543207764ca43a78e09f89d03f81a77d270a255f006
3
+ size 418659928
data/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b603f3968ef19acee03a1159c4f61c050537c8c52bf1ebef6bcccdc6a1e94cce
3
+ size 74208238