赞
踩
思考:Anomalib是一个异常检测的框架,里面配备了丰富的模型,和相应的前后处理和对应数据集的处理,有很强的通用性,其通用框架也很值得参考。目前支持的模型:
CFA
CFlow
DFKDE
DFM
DRAEM
EfficientAd
FastFlow
GANomaly
PADIM
PatchCore
Reverse Distillation
STFPM
资料汇总
Github链接:https://github.com/openvinotoolkit/anomalib/blob/main/README.md
论文链接:https://arxiv.org/pdf/2202.08341v1.pdf
其他参考资料:https://paperswithcode.com/paper/efficientad-accurate-visual-anomaly-detection
要训练自己的数据集,首先要知道原本数据集的格式。
`-- category1 类别 |-- ground_truth GT数据集 | `-- bad 异常数据集(和test的异常数据集对应) | |-- wucao1-1.png | `-- wucao2.png |-- test 测试数据集 | |-- bad | | |-- wucao1-1.png | | `-- wucao2.png | `-- good | |-- wucao1-2.png | `-- wucao1.png `-- train 训练数据集 `-- good |-- wucao1-2.png `-- wucao1.png
原本的.ci/Docker
直接构建image会报错,建议参照image构建
构建image,可以把26行的 requestment.txt 改成.ci/Docker
中的module
RUN pip3 --no-cache-dir install -r requirements/base.txt
RUN pip3 --no-cache-dir install -rrequirements/openvino.txt
RUN pip3 --no-cache-dir install -rrequirements/dev.txt
或者在装好的docker里安装也可。
还要装
pip install anomalib
换源,在后面加
-i https://pypi.tuna.tsinghua.edu.cn/simple
–>
pip install anomalib -i https://pypi.tuna.tsinghua.edu.cn/simple
python3 tools/train.py --config=../src/anomalib/models/padim/config.yaml
默认padim模型,把配置文件路径传入,在results下会生成,注意要更改config.yaml里面的dataset下的path,改成自己数据集的路径,category也改成自己的类别。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。