# 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>
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
安全帽佩戴检测数据集+安全帽佩戴检测模型,包括7581张图像,并采用LabelImg手动标记 如何使用数据集 我们将数据注释为Pascal VOC格式: ---VOC2028 ---Annotations ---ImageSets ---JPEGImages 任务的两个对象类名,“hat”表示正对象,“person”表示负对象。 运行程序前请确保安装MXNet、GloonCV、OpenCV 使用预先训练的模型进行测试
资源推荐
资源详情
资源评论
收起资源包目录
Safety-Helmet-Wearing-Dataset-master.zip (25个子文件)
Safety-Helmet-Wearing-Dataset-master
test_yolo.py 2KB
image
5_result.jpg 128KB
2.jpg 210KB
10.jpg 458KB
6.jpg 168KB
1.jpg 151KB
3_result.jpg 115KB
6_result.jpg 191KB
5.jpg 130KB
8_result.jpg 144KB
7_result.jpg 128KB
4_result.jpg 144KB
8.jpg 302KB
9_result.jpg 151KB
1_result.jpg 145KB
3.jpg 54KB
2_result.jpg 137KB
7.jpg 49KB
9.jpg 160KB
10_result.jpg 129KB
4.jpg 144KB
train_yolo.py 17KB
demo1.jpg 288KB
test_symbol.py 787B
README.md 5KB
共 25 条
- 1
资源评论
云哲-吉吉2021
- 粉丝: 3325
- 资源: 1129
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于Golang实现的加权pagerank算法实现.zip
- 基于Java实现的pagerank算法.zip
- 基于C++实现的pagerank算法.zip
- 基于Python实现的pagerank算法.zip
- java面试题-leetcode题解之第14题最长公共前缀.zip
- java面试题-leetcode题解之第28题找出字符串中第一个匹配项的下标.zip
- java面试题-leetcode题解之第31题下一个排列.zip
- java面试题-leetcode题解之第6题Z字形变换.zip
- java面试题-leetcode题解之第8题字符串转换整数atoi.zip
- java面试题-leetcode题解之第13题罗马数字转整数.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功