README.md 2.66 KB
Newer Older
mashun's avatar
mashun 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
# ParticleNet

## 论文

`Jet Tagging via Particle Clouds`

* https://arxiv.org/pdf/1902.08570

## 模型结构

本项目使用ParticleNet(Lite),包含 EdgeConv 操作进行卷积,该操作能够利用粒子云的局部空间结构,并保持置换不变性。模型包含多个 EdgeConv 块,每个块使用不同数量的邻居和通道数,以学习不同尺度的特征。

<img src="readme_imgs/arch.png" style="zoom:70%">

## 算法原理

该算法将喷注视为“粒子云”,即无序的粒子集合。 它利用 EdgeConv 操作和动态图更新方法,有效地提取粒子云的局部空间结构和特征,从而实现对喷注的准确分类。


## 环境配置

注意:所有文件均在`tf-keras`目录下。

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

    docker run --shm-size 50g --network=host --name=particlenet --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
dcuai's avatar
dcuai committed
29
30
    
    cd tf-keras
mashun's avatar
mashun committed
31
32
33
34
35
36
37
38
    pip install -r requirements.txt

### Dockerfile(方法二)

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

    docker run --shm-size 50g --network=host --name=particlenet --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

dcuai's avatar
dcuai committed
39
    cd tf-keras
mashun's avatar
mashun committed
40
41
42
43
44
45
46
    pip install -r requirements.txt


## 数据集

仅在tf-keras目录下可用

chenzk's avatar
chenzk committed
47
[zenodo](https://zenodo.org/records/2603256)
mashun's avatar
mashun committed
48

chenzk's avatar
chenzk committed
49
数据存储结构:
mashun's avatar
mashun committed
50
51
52
53
54
55
56
```
original/
├── test.h5
├── train.h5
└── val.h5
```

dcuai's avatar
dcuai committed
57
58
59
60
61
运行`convert_dataset.py`对数据进行处理,
```
python convert_dataset.py
```
处理后
mashun's avatar
mashun committed
62
63
64
65
66
67
68
```
converted/
├── test_file_0.awkd
├── train_file_0.awkd
└── val_file_0.awkd
```

mashun's avatar
mashun committed
69
<!-- 提示:执行下述命令启动服务,`jupyter notebook --no-browser --ip=0.0.0.0 --allow-root` -->
mashun's avatar
mashun committed
70
71
72

## 训练

mashun's avatar
mashun committed
73
74
75
```bash
python keras_train.py
```
mashun's avatar
mashun committed
76
77
78

## 推理

mashun's avatar
mashun committed
79
80
81
82
83
```bash
python predict_demo.py
```

注意:代码仅提供简单的推理测试,需根据需求进行修改。
mashun's avatar
mashun committed
84
85
86

## result

mashun1's avatar
mashun1 committed
87
![alt txt](readme_imgs/r.jpg)
mashun's avatar
mashun committed
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

### 精度

所有结果均使用项目中的默认参数训练得到.

||val_acc|
|:---:|:---:|
|k100ai|0.9229|
|gpu|0.9145|

## 应用场景

### 算法类别

`ai for science`

### 热点应用行业

`高能物理,医疗,金融`


## 源码仓库及问题反馈

* https://developer.sourcefind.cn/codes/modelzoo/particlenet_tensorflow

## 参考资料

* https://github.com/hqucms/ParticleNet