Skip to content
/ APM Public

The Code of Paper "Content-Aware Explainable Pavement Distress Detection Model"

Notifications You must be signed in to change notification settings

LiAo365/APM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8ffd621 · May 9, 2024

History

34 Commits
Jul 24, 2022
Jul 10, 2022
Jul 25, 2022
Jul 28, 2022
Jul 26, 2022
Jul 28, 2022
Jul 10, 2022
May 9, 2024
Jul 10, 2022
Jul 14, 2022
Jul 13, 2022
Jul 10, 2022
Jul 12, 2022
Jul 25, 2022
Jul 25, 2022
Jul 13, 2022
Jul 17, 2022
Jul 16, 2022
Jul 10, 2022
Jul 16, 2022
Jul 10, 2022
Jul 13, 2022

Repository files navigation

Attention

Updating, Not The Final Version

Pavement disease detection method with adaptive perception of high-resolution image content

OSCS Status Documentation

1. 训练代码说明

文件名称 说明
apm_run.py 执行apm的训练与测试
apm_conv_run.py 消融实验: apm_conv
apm_res_run.py 消融实验: apm_res
apm_cbam_run.py 消融实验: apm_cbam
upsample_run.py 对比实验代码, 传统的Upsample方法对比
resizer_run.py 对比实验代码, Resizer

2. 模型定义代码

模型定义与训练工具类代码均在src路径下

3. 单个方法的代码文件说明

以apm为例,首先在src目录中定义了apm.py文件(模型定义及实现文件),对于模型的训练测试文件apm_train.py, 其中定义了优化器、学习率调整策略等训练参数,最终执行训练和测试时,直接运行根目录下的apm_run.py

ps:

  1. apm_run.py中定义学习率、权重衰减、训练epoch、数据集所在路径、结果和log保存路径等。每次运行需要指定使用的GPU序号
  2. str/utils.py中定义了一些基本的工具,比如自定义数据集,自定义的data_loader、torch和numpy随机种子固定方法等等自定义的方法
  3. src/train_utils.py中定义了train_one_epochtest_model,用于模型训练的基本function
  4. 确保实验结果可复现,应在apm_run.py中指定torch和numpy的随机数种子
  5. bpdd_src文件夹定义的是针对CQU-BPDD数据集的模型定义文件和训练文件-作为方法鲁棒性的证明补充实验代码

4. How to use NNI

  1. 配置文件, 在yml文件夹配置NNI的配置文件, 主要涉及到执行的命令、使用GPU、GPU编号、以及搜索空间json文件的路径
  2. 配置搜索空间,在json文件夹下面,配置搜索空间, 具体配置可以参考Search Space
  3. 终端执行超惨搜索nnictl create --config ./yml/apm_config.yml --port 8022, 可以在Web端查看搜索过程和中间结果

5. Best Result Records

{
    // Best Acc: 0.8462
    "backbone": "tf_efficientnetv2_b3",
    "pool": 1,
    "pool_size": 320,
    "pool_type": "max",
    "lr": 0.01,
    "drop_rate": 0.6,
    "loss": "cross"
}
{
    // 0.8259
    "backbone": "tf_efficientnetv2_b1",
    "pool": 1,
    "pool_size": 300,
    "pool_type": "max",
    "lr": 0.001,
    "drop_rate": 0.5,
    "loss": "cross"
}

About

The Code of Paper "Content-Aware Explainable Pavement Distress Detection Model"

Resources

Stars

Watchers

Forks

Languages