Dataset Viewer
Auto-converted to Parquet
Search is not available for this dataset
image_id
int64
0
5.87k
image
imagewidth (px)
100
7.36k
width
int64
100
7.36k
height
int64
49
6k
objects
dict
0
416
416
{ "bbox": [ [ 207, 110, 46.349998474121094, 37.5 ] ], "category": [ 19 ] }
1
416
416
{ "bbox": [ [ 16, 15, 259.1600036621094, 142.1699981689453 ] ], "category": [ 25 ] }
2
1,024
683
{ "bbox": [ [ 103, 168, 171, 166 ] ], "category": [ 25 ] }
3
650
344
{ "bbox": [ [ 179, 33, 274.0400085449219, 366.9200134277344 ] ], "category": [ 21 ] }
4
650
344
{ "bbox": [ [ 161, 80, 183, 55 ], [ 297, 193, 173, 72 ] ], "category": [ 20, 20 ] }
5
650
344
{ "bbox": [ [ 73, 210, 1444.280029296875, 600 ] ], "category": [ 25 ] }
6
800
600
{ "bbox": [ [ 185, 90, 529.6900024414062, 142.5 ], [ 185, 240, 593.4099731445312, 167.5 ], [ 223, 417, 648.3900146484375, 182.5 ] ], "category": [ 21, 21, 21 ] }
7
800
600
{ "bbox": [ [ 303, 181, 24, 65 ] ], "category": [ 28 ] }
8
800
600
{ "bbox": [ [ 197, 45, 135, 188 ] ], "category": [ 20 ] }
9
736
736
{ "bbox": [ [ 47, 18, 570, 247 ] ], "category": [ 20 ] }
10
736
736
{ "bbox": [ [ 382, 142, 38, 23 ] ], "category": [ 28 ] }
11
736
736
{ "bbox": [ [ 347, 410, 91.87999725341797, 81.5 ] ], "category": [ 3 ] }
12
1,736
4,032
{ "bbox": [ [ 0, 17, 499, 340 ] ], "category": [ 20 ] }
13
1,736
4,032
{ "bbox": [ [ 0, 198, 722.2000122070312, 790 ] ], "category": [ 21 ] }
14
1,071
731
{ "bbox": [ [ 128, 777, 862.739990234375, 556.3300170898438 ] ], "category": [ 25 ] }
15
589
400
{ "bbox": [ [ 8, 86, 300, 270 ] ], "category": [ 19 ] }
16
416
416
{ "bbox": [ [ 218, 222, 584.4099731445312, 166.72300720214844 ] ], "category": [ 14 ] }
17
416
416
{ "bbox": [ [ 377, 149, 48, 19 ] ], "category": [ 28 ] }
18
300
432
{ "bbox": [ [ 32, 127, 763, 255 ] ], "category": [ 20 ] }
19
300
432
{ "bbox": [ [ 37, 30, 56, 228 ], [ 142, 113, 137, 169 ] ], "category": [ 25, 25 ] }
20
300
432
{ "bbox": [ [ 97, 3, 346.1199951171875, 468.2699890136719 ] ], "category": [ 21 ] }
21
300
432
{ "bbox": [ [ 12, 145, 275, 230 ] ], "category": [ 19 ] }
22
1,000
667
{ "bbox": [ [ 418, 176, 51.040000915527344, 64.22000122070312 ] ], "category": [ 4 ] }
23
1,000
667
{ "bbox": [ [ 234, 256, 554.5800170898438, 278 ], [ 191, 696, 294.69000244140625, 260 ] ], "category": [ 21, 21 ] }
24
1,000
667
{ "bbox": [ [ 8, 102, 302, 259 ] ], "category": [ 19 ] }
25
1,024
681
{ "bbox": [ [ 110, 34, 321.3500061035156, 327.30999755859375 ] ], "category": [ 21 ] }
26
1,024
707
{ "bbox": [ [ 118, 128, 1337.68994140625, 825 ] ], "category": [ 25 ] }
27
1,024
707
{ "bbox": [ [ 479, 307, 272.9800109863281, 173.3300018310547 ] ], "category": [ 25 ] }
28
620
249
{ "bbox": [ [ 302, 19, 494.0299987792969, 246.8699951171875 ], [ 224, 161, 564.6599731445312, 263.75 ], [ 199, 314, 571.5399780273438, 324.25 ] ], "category": [ 21, 21, 21 ] }
29
620
249
{ "bbox": [ [ 6, 126, 407.0799865722656, 162.77999877929688 ] ], "category": [ 6 ] }
30
450
300
{ "bbox": [ [ 31, 126, 257, 194 ] ], "category": [ 19 ] }
31
450
300
{ "bbox": [ [ 538, 187, 1070.8800048828125, 628.3300170898438 ] ], "category": [ 21 ] }
32
450
300
{ "bbox": [ [ 368, 0, 380, 1037 ] ], "category": [ 21 ] }
33
640
480
{ "bbox": [ [ 5, 164, 599.72998046875, 166.36000061035156 ] ], "category": [ 21 ] }
34
450
300
{ "bbox": [ [ 355, 453, 380.9800109863281, 1046.6700439453125 ] ], "category": [ 21 ] }
35
450
300
{ "bbox": [ [ 214, 133, 24, 32 ] ], "category": [ 19 ] }
36
450
300
{ "bbox": [ [ 509, 146, 119, 95 ] ], "category": [ 28 ] }
37
640
480
{ "bbox": [ [ 5, 15, 628, 165 ] ], "category": [ 20 ] }
38
640
480
{ "bbox": [ [ 157, 58, 872.8800048828125, 764.1699829101562 ] ], "category": [ 21 ] }
39
640
480
{ "bbox": [ [ 6, 23, 493, 352 ] ], "category": [ 20 ] }
40
640
480
{ "bbox": [ [ 174, 290, 51, 59 ] ], "category": [ 24 ] }
41
640
480
{ "bbox": [ [ 248, 168, 111, 180 ] ], "category": [ 28 ] }
42
640
480
{ "bbox": [ [ 0, 523, 743.8599853515625, 738.3300170898438 ] ], "category": [ 21 ] }
43
640
480
{ "bbox": [ [ 23, 59, 393.0199890136719, 332.7799987792969 ], [ 7, 83, 116.58000183105469, 74.44000244140625 ], [ 349, 329, 67.47000122070312, 56.66999816894531 ], [ 266, 292, 73.20999908447266, 46.66999816894531 ], [ 356, 182, 59.689998626708984, 44.439998626708984 ] ], "category": [ 6, 6, 6, 6, 6 ] }
44
640
480
{ "bbox": [ [ 2, 47, 593, 125 ] ], "category": [ 20 ] }
45
640
480
{ "bbox": [ [ 51, 48, 338.6700134277344, 349.4100036621094 ] ], "category": [ 6 ] }
46
1,080
813
{ "bbox": [ [ 529, 377, 469.760009765625, 286.1809997558594 ] ], "category": [ 14 ] }
47
1,080
813
{ "bbox": [ [ 0, 224, 630, 212 ] ], "category": [ 20 ] }
48
1,080
813
{ "bbox": [ [ 0, 17, 631, 453 ] ], "category": [ 20 ] }
49
1,080
813
{ "bbox": [ [ 356, 132, 462.0799865722656, 110.2030029296875 ] ], "category": [ 14 ] }
50
1,200
527
{ "bbox": [ [ 17, 0, 308.69000244140625, 416 ], [ 106, 83, 286.32000732421875, 164.7100067138672 ] ], "category": [ 11, 6 ] }
51
1,200
527
{ "bbox": [ [ 0, 0, 683, 1024 ], [ 39, 207, 643.9199829101562, 816.8599853515625 ] ], "category": [ 11, 6 ] }
52
1,200
527
{ "bbox": [ [ 83, 11, 320.2099914550781, 114.29000091552734 ] ], "category": [ 21 ] }
53
1,200
527
{ "bbox": [ [ 0, 172, 435.0799865722656, 70.41999816894531 ] ], "category": [ 21 ] }
54
1,200
902
{ "bbox": [ [ 397, 26, 280.6199951171875, 558 ], [ 801, 0, 290.4700012207031, 327 ] ], "category": [ 21, 21 ] }
55
562
420
{ "bbox": [ [ 472, 22, 313.79998779296875, 910.3300170898438 ] ], "category": [ 21 ] }
56
1,600
901
{ "bbox": [ [ 0, 0, 128, 109 ], [ 121, 44, 118, 100 ] ], "category": [ 28, 28 ] }
57
562
420
{ "bbox": [ [ 79, 21, 117.31999969482422, 141.85000610351562 ] ], "category": [ 21 ] }
58
562
420
{ "bbox": [ [ 445, 731, 381, 769 ] ], "category": [ 21 ] }
59
1,600
901
{ "bbox": [ [ 22, 146, 191, 172 ] ], "category": [ 25 ] }
60
562
420
{ "bbox": [ [ 210, 57, 771.22998046875, 875.3300170898438 ] ], "category": [ 21 ] }
61
1,600
901
{ "bbox": [ [ 1290, 17, 237.60000610351562, 1188.3299560546875 ] ], "category": [ 21 ] }
62
1,600
901
{ "bbox": [ [ 421, 270, 830.780029296875, 485 ] ], "category": [ 21 ] }
63
562
420
{ "bbox": [ [ 3, 112, 413.0199890136719, 264.44000244140625 ] ], "category": [ 6 ] }
64
622
361
{ "bbox": [ [ 404, 307, 138.1300048828125, 73.44000244140625 ] ], "category": [ 3 ] }
65
622
361
{ "bbox": [ [ 28, 6, 234.8699951171875, 170.4499969482422 ] ], "category": [ 25 ] }
66
622
361
{ "bbox": [ [ 428, 396, 106.4800033569336, 127.80999755859375 ] ], "category": [ 4 ] }
67
416
416
{ "bbox": [ [ 0, 11, 886, 232 ] ], "category": [ 20 ] }
68
416
416
{ "bbox": [ [ 148, 178, 63, 165 ] ], "category": [ 25 ] }
69
416
416
{ "bbox": [ [ 28, 51, 961.280029296875, 341.4150085449219 ] ], "category": [ 14 ] }
70
1,024
683
{ "bbox": [ [ 38, 120, 411.7799987792969, 197.5 ] ], "category": [ 21 ] }
71
760
507
{ "bbox": [ [ 13, 15, 388.20001220703125, 396.1099853515625 ] ], "category": [ 6 ] }
72
1,024
681
{ "bbox": [ [ 5, 7, 291.8699951171875, 96.80000305175781 ] ], "category": [ 25 ] }
73
1,800
1,200
{ "bbox": [ [ 130, 123, 206, 208 ] ], "category": [ 20 ] }
74
1,800
1,200
{ "bbox": [ [ 32, 89, 517, 234 ] ], "category": [ 20 ] }
75
1,800
1,200
{ "bbox": [ [ 355, 462, 98.16999816894531, 115.83999633789062 ] ], "category": [ 4 ] }
76
730
264
{ "bbox": [ [ 6, 77, 634, 196 ] ], "category": [ 20 ] }
77
1,024
576
{ "bbox": [ [ 138, 19, 44.72999954223633, 173.07000732421875 ] ], "category": [ 21 ] }
78
800
533
{ "bbox": [ [ 915, 160, 622.989990234375, 272.5 ], [ 6, 138, 902.6500244140625, 590 ] ], "category": [ 25, 25 ] }
79
1,024
681
{ "bbox": [ [ 423, 172, 551.510009765625, 250 ], [ 903, 332, 376.7300109863281, 177 ] ], "category": [ 21, 21 ] }
80
1,024
681
{ "bbox": [ [ 0, 9, 296.94000244140625, 74.80000305175781 ] ], "category": [ 25 ] }
81
1,200
312
{ "bbox": [ [ 0, 95, 767, 928 ] ], "category": [ 13 ] }
82
1,024
681
{ "bbox": [ [ 0, 39, 616, 144 ] ], "category": [ 20 ] }
83
1,200
312
{ "bbox": [ [ 246, 117, 517.5499877929688, 387.1400146484375 ] ], "category": [ 21 ] }
84
1,200
312
{ "bbox": [ [ 378, 353, 947.6500244140625, 890 ] ], "category": [ 21 ] }
85
1,024
681
{ "bbox": [ [ 211, 67, 170.11000061035156, 348.94000244140625 ], [ 44, 124, 296.9200134277344, 292.4700012207031 ] ], "category": [ 6, 11 ] }
86
980
653
{ "bbox": [ [ 21, 206, 251, 194 ], [ 3, 35, 307, 176 ] ], "category": [ 25, 25 ] }
87
980
653
{ "bbox": [ [ 319, 208, 94, 47 ] ], "category": [ 20 ] }
88
980
653
{ "bbox": [ [ 372, 353, 169.0800018310547, 83.76000213623047 ] ], "category": [ 3 ] }
89
980
653
{ "bbox": [ [ 630, 224, 275.8399963378906, 150.56700134277344 ] ], "category": [ 13 ] }
90
1,024
809
{ "bbox": [ [ 83, 88, 163.69000244140625, 65.91000366210938 ] ], "category": [ 25 ] }
91
1,024
809
{ "bbox": [ [ 0, 5, 636, 101 ] ], "category": [ 20 ] }
92
1,024
809
{ "bbox": [ [ 2, 93, 219.66000366210938, 42.16999816894531 ] ], "category": [ 21 ] }
93
900
514
{ "bbox": [ [ 14, 183, 473, 114 ] ], "category": [ 20 ] }
94
900
514
{ "bbox": [ [ 0, 106, 392, 96 ], [ 260, 143, 380, 81 ], [ 0, 227, 375, 100 ], [ 258, 281, 382, 78 ], [ 0, 0, 370, 82 ], [ 268, 39, 369, 65 ] ], "category": [ 20, 20, 20, 20, 20, 20 ] }
95
900
514
{ "bbox": [ [ 6, 6, 391.75, 113.33000183105469 ] ], "category": [ 21 ] }
96
1,024
892
{ "bbox": [ [ 428, 3, 374.3699951171875, 750 ] ], "category": [ 21 ] }
97
1,024
892
{ "bbox": [ [ 15, 112, 484, 219 ] ], "category": [ 20 ] }
98
400
267
{ "bbox": [ [ 55, 31, 141.5800018310547, 117.22000122070312 ] ], "category": [ 21 ] }
99
1,024
892
{ "bbox": [ [ 0, 8, 584, 273 ] ], "category": [ 20 ] }
End of preview. Expand in Data Studio

Weapon and Threat Detection Dataset

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.

Original Source

This dataset is a derivative work based on the weapon-detection Object Detection Model dataset, originally created and shared by yolov7test on Roboflow Universe.

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.

Dataset Details

The dataset is divided into three splits for standard model training and evaluation workflows.

  • Train: 5,871 images
  • Validation: 1,491 images
  • Test: 2,295 images

Classes

The dataset contains 29 distinct classes for object detection: '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'

Dataset Structure

Each item in the dataset is a dictionary with the following structure:

{
    'image_id': 5,
    'image': <PIL.JpegImagePlugin.JpegImageFile image>,
    'width': 640,
    'height': 640,
    'objects': {
        'bbox': [
            [250.0, 150.0, 100.5, 200.0], 
            # ... more boxes
        ],
        'category': [
            12, # Corresponds to 'Pistol'
            # ... more category IDs
        ]
    }
}
  • image_id: A unique integer identifier for the image.

  • image: The image object itself, in PIL format.

  • width,height: The dimensions of the image.

  • objects: A dictionary containing the bounding box annotations.

  • bbox: A list of bounding boxes, each in the COCO format [x_min, y_min, width, height].

  • category: A list of corresponding integer class labels. The mapping from integer to class name can be found in the dataset's features.

How to Use

You can easily load this dataset using the datasets library:


from datasets import load_dataset

# Load the dataset from the Hugging Face Hub
dataset = load_dataset("Subh775/WeaponDetection")

# Access a specific split
train_dataset = dataset["train"]

# Print the first example
print(train_dataset[0])

Citation

If you use this dataset in your work, please cite the original creator and provide a link to the Roboflow Universe page.


Code snippet

@misc{yolov7test_weapon_detection,
    title={Weapon Detection Object Detection Model},
    author={yolov7test},
    howpublished={\url{[https://universe.roboflow.com/yolov7test-pdxwq/weapon-detection-m7tpo](https://universe.roboflow.com/yolov7test-pdxwq/weapon-detection-m7tpo)}},
    year={2022}
}
Downloads last month
80