# FireSmokeDetectionByEfficientNet
[EfficientNet](https://arxiv.org/abs/1905.11946) is a wonderful classification network. the efficientnet implementation refer to [[EfficientNet-PyTorch](https://github.com/lukemelas/EfficientNet-PyTorch)](https://github.com/lukemelas/EfficientNet-PyTorch). I refer much of the code from the above implementation, and construct a network with the efficientnet feature extract layers and a fc layer of 3 output node for my fire & smoke detection task.
## 1. Introduction
Fire and smoke classification and detection by training an efficientnet classifier,detections are implemented through classify crop patch of the input image.
## 2. Requirements
Python 3.7、PyTorch1.3...
### 3. Running demos
Download the pretrained model and simkai.ttf font from [BaiduNetDisk:](https://pan.baidu.com/s/14CM-U6bmVjXG6gNQ2CC8fw) code: awnf
simple run:
```shell
python fire_smoke_demo.py
```
will get the classification results as follows:
![avatar](./results/result_7e9ee24563cc31d34de2020e1acaecc5.jpeg)
or try the detection demo:
```shell
python fire_smoke_detection.py
```
will get results:
![avatar](./results/det_results000127.jpg)
## 4. Visual the CNN
I visual the activation of some of the feature map as follows:
![avatar](./featmap/5rd_depthwise_conv_featmap5_7e9ee24563cc31d34de2020e1acaecc5.jpeg)
![avatar](./featmap/5rd_depthwise_conv_featmap4_7e9ee24563cc31d34de2020e1acaecc5.jpeg)
As we can see, the cnn can automatically learn the edge or shape or ROI of the predict targets,
some of the filters can recognize the fire, some can deal with other features.
## 5. Train Custom Dataset
here offer a scrip to train ur own classification model using EfficientNet:
```shell
python train.py --data [ur dataset path] --arch [efficientnet model:efficientnet-b0-7] --num_cls [ur task class num]
```
Refer to the cold for args details.
For inference, u should change the label map txt for ur task.
In my task:
```shell
python train.py --data ./cropdata --arch efficientnet-b0 --num_cls 3
```
![avatar](./results/acc_loss.png)
## Dataset
https://pan.baidu.com/s/1eRXtYVrn6baJ6PRMOTjyzQ code: srav
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
FireSmokeDetectionByEfficientNet-master.zip (44个子文件)
FireSmokeDetectionByEfficientNet-master
fire_smoke_demo.py 2KB
efficientnet_pytorch
utils.py 12KB
__init__.py 189B
fire_smoke_model.py 11KB
model.py 10KB
__pycache__
fire_smoke_model.cpython-37.pyc 8KB
__init__.cpython-37.pyc 384B
utils.cpython-37.pyc 11KB
model.cpython-37.pyc 7KB
setup.py 3KB
checkpoint.pth.tar 46.2MB
cropdata
train
fire
000016.jpg 68KB
smoke
000002.png 202KB
LICENSE 11KB
featmap
5rd_depthwise_conv_featmap4_7e9ee24563cc31d34de2020e1acaecc5.jpeg 157KB
5rd_depthwise_conv_featmap3_7e9ee24563cc31d34de2020e1acaecc5.jpeg 145KB
5rd_depthwise_conv_featmap5_7e9ee24563cc31d34de2020e1acaecc5.jpeg 142KB
simkai.ttf 11.24MB
tests
7e9ee24563cc31d34de2020e1acaecc5.jpeg 18KB
000127.jpg 59KB
examples
imagenet
main.py 17KB
data
README.md 219B
README.md 1KB
simple
img2.jpg 17KB
example.ipynb 1.04MB
labels_map.txt 31KB
img.jpg 113KB
check.ipynb 1.04MB
fire_smoke_map.txt 44B
Conv_visual.py 5KB
.idea
FireSmokeDetectionByEfficientNet.iml 552B
vcs.xml 180B
misc.xml 198B
inspectionProfiles
profiles_settings.xml 174B
modules.xml 316B
.gitignore 39B
fire_smoke_detection.py 3KB
train.py 18KB
model_vusal.py 2KB
results
result_7e9ee24563cc31d34de2020e1acaecc5.jpeg 26KB
result_000127.jpg 61KB
det_results000127.jpg 60KB
acc_loss.png 37KB
README.md 2KB
共 44 条
- 1
资源评论
yanglamei1962
- 粉丝: 2602
- 资源: 902
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功