You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.5 kB

2 years ago
123456789101112131415161718192021222324252627282930313233
  1. ## 安装环境
  2. conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.1 -c pytorch -c conda-forge
  3. pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple
  4. pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.8.0/index.html
  5. pip install terminaltables
  6. pip install pycocotools
  7. ## 筛选需要检测的NG类别
  8. python AOI_select.py --AOI_path AOI数据文件夹
  9. ## 找到图像中白色目标框并生成对应的box和label
  10. python AOI_get_box --AOI_path AOI数据文件夹 --coco_path COCO格式文件夹 --classes_file 类别文件
  11. ## 转换为COCO数据集
  12. python AOI_to_coco.py --root_dir COCO格式文件夹 --save_path json标签命名(./train.json)
  13. ## 修改参数文件
  14. configs/AD_detection/AD_dsxw_test66.py
  15. ## 单卡训练
  16. python tools/train.py configs/AD_detection/AD_dsxw_test66.py --gpus 1
  17. ## 多卡训练
  18. tools/dist_train.sh configs/AD_detection/AD_dsxw_test66.py 8(GPU数量)
  19. ## 模型评估
  20. python tools/test.py 参数文件 权重文件 --eval bbox
  21. ## 搜索最优置信度
  22. python select_threshold.py --config_file 模型参数文件 --checkpoint_file 模型权重文件 --images_path 测试集路径(包含ok和ng两个文件夹) --test_batch_size 测试阶段的batch size大小
  23. ## 推理结果(置信度,feature等)
  24. python get_score_csv.py --config_file 模型参数文件 --checkpoint_file 模型权重文件 --images_path 测试集路径(未标注数据) --test_batch_size 测试阶段的batch size大小 --result_path test.csv(绝对路径)

No Description

Contributors (3)