README.md 3.01 KB
Newer Older
maming's avatar
maming committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# https://github.com/zhangzhengde0225/binary_distinguish_GRB_by_DL

## 论文

Application of Deep Learning Methods for Distinguishing Gamma-Ray Bursts from Fermi/GBM TTE Data
- https://arxiv.org/abs/2303.00370

## 模型结构

卷积神经网络(CNN)架构的示意图如下。每个卷积块顶部和底部的数字分别表示卷积步幅(默认值为1)和卷积核的数量。图底部的数字描述了特征图的长度和宽度的变化。
<div align=left>
    <img src="./assets/architectures.png"/>
</div>


## 环境配置

### Docker(方法一)
    
    docker pull image.sourcefind.cn:5000/dcu/admin/base/tensorflow:2.13.1-ubuntu20.04-dtk24.04.1-py3.10

    docker run --shm-size 50g --network=host --name=binary_distinguish_GRB_by_DL --privileged --device=/dev/kfd --device=/dev/dri --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v 项目地址(绝对路径):/home/ -v /opt/hyhal:/opt/hyhal:ro -it <your IMAGE ID> bash

    pip install matplotlib -i https://mirrors.aliyun.com/pypi/simple/  --trusted-host mirrors.aliyun.com

### Dockerfile(方法二)

    docker build -t <IMAGE_NAME>:<TAG> .

    docker run --shm-size 50g --network=host --name=binary_distinguish_GRB_by_DL --privileged --device=/dev/kfd --device=/dev/dri --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v 项目地址(绝对路径):/home/ -v /opt/hyhal:/opt/hyhal:ro -it <your IMAGE ID> bash

    pip install matplotlib -i https://mirrors.aliyun.com/pypi/simple/  --trusted-host mirrors.aliyun.com

## 数据集

```
Binary_Distinguish_GRB_Datasetv1/data/
└── dataset_256ms/
    ├── test_count_map_256ms.npy
    ├── test_info.npy
    ├── train_count_map_256ms.npy
    ├── train_info.npy
    ├── validate_count_map_256ms.npy
    └── validate_info.npy
└── ......
```


## 训练

```bash
#jupter文件参考train_model.ipynb
cd /path/your_code_data/code
python train.py
```

注意:请根据您的需求修改choonse_time_bin、 choose_model="plain-CNN-、data_set_dir等参数

## 推理

```bash
#jupter文件参考test_model.ipynb
cd /path/your_code_data/code
python test.py
```

## result


### 精度
模型信息:
- Epoch :20
- choose_model :ResNet-CBAM
- choonse_time_bin :256 ms

硬件:
- DCU :K100 AI
- GPU :A800

|         |  accu | precision  | recall |  f1_score  |
|:-------:|:------------:|:----------:|:--------:|:----------:|
| k100 ai |   93.718257%| 97.597977% |88.684664% |  92.9281%  |
|  A800   |   93.611334%| 98.514212% |87.593337% |  92.7334%  |

### 性能
模型信息:
- Epoch :20
- choose_model :ResNet-CBAM
- choonse_time_bin :256 ms

硬件:
- DCU :K100 AI
- GPU :A800

|         |   train    |   test    | 
|:-------:|:----------:|:---------:|
| k100 ai | 140ms/step | 39ms/step | 
|  A800   | 66ms/step  | 20ms/step |



## 应用场景

### 算法类别

`AI for science`

### 热点应用行业

`科研,教育`

## 源码仓库及问题反馈



## 参考资料

* https://github.com/zhangzhengde0225/binary_distinguish_GRB_by_DL