Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
徐勇 f4562c5e58 | 3 years ago | |
---|---|---|
.META-INF | 3 years ago | |
__pycache__ | 3 years ago | |
models | 3 years ago | |
AnomalyDtectionTest.py | 3 years ago | |
AnomalyDtectionTrain.py | 3 years ago | |
Dataset.py | 3 years ago | |
config.py | 3 years ago | |
evaluate.py | 3 years ago | |
losses.py | 3 years ago | |
readme.md | 3 years ago | |
train.py | 3 years ago | |
utils.py | 3 years ago |
基于生成对抗网络的异常行为检测
黄超
实现复杂场景中异常行为的实时检测
数据集 | AUC |
---|---|
UCSD Ped2 | 95.4% |
平均检测速度为25fps. |
AUC
UCSD Ped2
代码运行的环境与依赖。如下所示:
类别 | 名称 | 版本 |
---|---|---|
os | ubuntu | 16.04 |
深度学习框架 | pytorch | >= 1.1 |
Python | >= 3.6 | |
tensorboardX | ||
cupy | ||
sklearn | ||
Other common packages. |
代码的输入与输出。如下所示:
名称 | 说明 |
---|---|
输入 | RGB图像。大小为256X256(宽x高) |
输出 | 异常分数。范围0到1,分数越大异常概率越大 |
下载光流预训练模型链接:https://pan.baidu.com/s/1zP8jb3ew1iPSXsTczAdtIQ
提取码:25ro
将其放到/models/liteFlownet文件夹里
下载异常检测预训练模型链接:https://pan.baidu.com/s/19ClStpgDS26KcBccRDiKYg
提取码:5rud
将其放到/weights文件夹里
下载数据集链接:https://pan.baidu.com/s/1j0TEt-2Dw3kcfdX-LCF0YQ
提取码:i9b3
在terminal下运行以下命令。
# Train by default with specified dataset.
python train.py --dataset=avenue
# Train with different batch_size, you might need to tune the learning rate by yourself.
python train.py --dataset=avenue --batch_size=16
# Set the max training iterations.
python train.py --dataset=avenue --iters=80000
# Set the save interval and the validation interval.
python train.py --dataset=avenue --save_interval=2000 --val_interval=2000
# Resume training with the latest trained model or a specified model.
python train.py --dataset=avenue --resume latest [or avenue_10000.pth]
# Train with Flownet2SD instead of lite-flownet.
python train.py --dataset=avenue --flownet=2sd
# Visualize the optic flow during training.
python train.py --dataset=avenue --show_flow
tensorboard --logdir=tensorboard_log/ped2_bs4
# Validate with a trained model.
python evaluate.py --dataset=ped2 --trained_model=ped2_26000.pth
# Show and save the psnr curve and the difference heatmap between the gt frame and the
# generated frame during evaluating. This drops fps.
python evaluate.py --dataset=ped2 --trained_model=ped2_26000.pth --show_curve --show_heatmap
基于生成对抗网络的异常行为检测
Python
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》