# SafetyHelmetWearing-Dataset(安全帽佩戴检测数据集)
Safety helmet (hardhat) wearing detect dataset(安全帽佩戴检测数据集, SHWD). We also provide pretrained models.
## Introduction
SHWD provide the dataset used for both safety helmet wearing and human head detection. It includes 7581 images with 9044 human safety helmet wearing objects(positive) and 111514 normal head objects(not wearing or negative). The positive objects got from goolge or baidu, and we manually labeld with LabelImg. Some of negative objects got from [SCUT-HEAD](https://github.com/HCIILAB/SCUT-HEAD-Dataset-Release). We fixed some bugs for original SCUT-HEAD and make the data can be directly loaded as normal Pascal VOC format. Also we provide some pretrained models with MXNet GluonCV.
<p align="center">
<img src="https://github.com/njvisionpower/SafetyHelmetWearing-Dataset/blob/master/demo1.jpg" width = 70% height = 70%>
</p>
## Dataset and model download
### Dataset
[BaiduDrive](https://pan.baidu.com/s/1UbFkGm4EppdAU660Vu7SdQ)
[GoogleDrive](https://drive.google.com/open?id=1qWm7rrwvjAWs1slymbrLaCf7Q-wnGLEX)
### Model
[BaiduDrive](https://pan.baidu.com/s/1dWNU_q59sw1a3TVtV7VXEg)
[GoogleDrive](https://drive.google.com/open?id=1_0A-bQbsprzStefQOMiQpLn8JZBchqho)
### Benchmark
model | darknet | mobile1.0 | mobile0.25
--------- | ------------- | ------------- | -------------
map | 88.5 | 86.3 | 75.0
## How to use dataset
We annotate the data as Pascal VOC format:
```
---VOC2028
---Annotations
---ImageSets
---JPEGImages
```
Two object class names for the task, "hat" for positive object and "person" for negative object.
## How to run
### Dependency
Make sure you install MXNet, GluonCV, OpenCV
### Test with pretrained models
Two way to inference.
#### First way
Download models from link [BaiduDrive](https://pan.baidu.com/s/1dWNU_q59sw1a3TVtV7VXEg).
```
Run "python test_yolo.py" with default settings, or change options:
--network: darknet/mobile1.0/mobile0.25 network, default darknet53;
--threshold: confidence that filter object;
--gpu: use gpu or cpu, default gpu;
--short: short side input size for original image.
```
#### Second way, inference with mxnet symbol
Download symbol models from [BaiduDrive](https://pan.baidu.com/s/1EEdsjECJy_y00dekRre0eA), (or [GoogleDrive](https://drive.google.com/open?id=19iS7fdVneX1HTYQb3iQAbDJnpa0W9asB)), then inference with symbol:
```
python test_symbol.py
```
### Notice
**1.** This repo provide 3 yolo models with different size, default darknet53.
**2.** Parameter "short" means the input size of short side for original image, you can try larger value if want to detect dense objects or big size image.
**3.** Hyper-parameter threshold means the confidence for detect, change it for different task.
## How to train
You can see function "get_dataset" in the file "train_yolo.py" to set dataset path. An example, download dataset and unzip to the path such as "D:\VOCdevkit\VOC2028", train/val dataset can set as:
```
train_dataset = VOCLike(root='D:\VOCdevkit', splits=[(2028, 'trainval')])
val_dataset = VOCLike(root='D:\VOCdevkit', splits=[(2028, 'test')])
```
Then check train_yolo.py to set options and train, such as:
```
python train_yolo.py --batch-size 4 -j 4 --warmup-epochs 3
```
### Notice
**1.** One common problem when train yolo is gradient explosion, try more epoches to warmup or use smaller learning rate.
**2.** Much time spent on dataset loading with CPU, set "-j" number bigger if you have multi-core CPU and will improve train speed.
**3.** If train on Windows, sometimes program may blocked, see https://discuss.gluon.ai/t/topic/9388/11, if train on Linux make sure you have enough share memory.
## Demo
<p align="center">
<img src="https://github.com/njvisionpower/SafetyHelmetWearing-Dataset/blob/master/image/3_result.jpg" width = 50% height = 50%>
</p>
<p align="center">
<img src="https://github.com/njvisionpower/SafetyHelmetWearing-Dataset/blob/master/image/4_result.jpg" width = 50% height = 50%>
</p>
<p align="center">
<img src="https://github.com/njvisionpower/SafetyHelmetWearing-Dataset/blob/master/image/5_result.jpg" width = 50% height = 50%>
</p>
<p align="center">
<img src="https://github.com/njvisionpower/SafetyHelmetWearing-Dataset/blob/master/image/6_result.jpg" width = 50% height = 50%>
</p>
<p align="center">
<img src="https://github.com/njvisionpower/SafetyHelmetWearing-Dataset/blob/master/image/7_result.jpg" width = 50% height = 50%>
</p>
<p align="center">
<img src="https://github.com/njvisionpower/SafetyHelmetWearing-Dataset/blob/master/image/8_result.jpg" width = 50% height = 50%>
</p>
<p align="center">
<img src="https://github.com/njvisionpower/SafetyHelmetWearing-Dataset/blob/master/image/1_result.jpg" width = 50% height = 50%>
</p>
<p align="center">
<img src="https://github.com/njvisionpower/SafetyHelmetWearing-Dataset/blob/master/image/2_result.jpg" width = 50% height = 50%>
</p>
<p align="center">
<img src="https://github.com/njvisionpower/SafetyHelmetWearing-Dataset/blob/master/image/9_result.jpg" width = 50% height = 50%>
</p>
<p align="center">
<img src="https://github.com/njvisionpower/SafetyHelmetWearing-Dataset/blob/master/image/10_result.jpg" width = 50% height = 50%>
</p>
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
SafetyHelmetWearing-Dataset(安全帽附加检测数据集) 安全帽(安全帽)佩戴检测数据集(SHWD)。 我们还提供预训练的模型。 介绍 SHWD提供了用于安全帽佩戴和人头检测的数据集。 它包含7581张图像,其中带有9044张人类安全头盔的佩戴物(正)和111514正常头部的物品(未佩戴或负)。 阳性对象来自goolge或baidu,我们用LabelImg手动标记。 一些负物体来自 。 我们修复了原始SCUT-HEAD的一些错误,并使数据可以按正常的Pascal VOC格式直接加载。 此外,我们还提供了一些带有MXNet GluonCV的预训练模型。 数据集和模型下载 数据集 模型 基准 模型 暗网 mobile1.0 手机0.25 地图 88.5 86.3 75.0 如何使用数据集 我们将数据注释为Pascal VOC格式: ---VOC2028
资源详情
资源评论
资源推荐
收起资源包目录
safety-helmet-wearing-dataset-master.zip (26个子文件)
Safety-Helmet-Wearing-Dataset-master
test_yolo.py 2KB
train_yolo.py 17KB
LICENSE 1KB
README.md 5KB
test_symbol.py 787B
image
7_result.jpg 128KB
2_result.jpg 137KB
6_result.jpg 191KB
2.jpg 210KB
5_result.jpg 128KB
10_result.jpg 129KB
8.jpg 302KB
6.jpg 168KB
3_result.jpg 115KB
1_result.jpg 145KB
1.jpg 151KB
9_result.jpg 151KB
4.jpg 144KB
5.jpg 130KB
9.jpg 160KB
4_result.jpg 144KB
10.jpg 458KB
7.jpg 49KB
8_result.jpg 144KB
3.jpg 54KB
demo1.jpg 288KB
共 26 条
- 1
谁家扁舟子
- 粉丝: 27
- 资源: 4680
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论5