视频分析与可解释人工智能在计算机视觉中的应用
1. 视频分析的应用
1.1 安全监控
在当今时代,安全问题备受关注,视频监控的方式也在不断变革,人工智能的应用让自动化监控成为现实。我们可以通过视频处理检测受限或敏感区域内是否有人移动,从而避免人工24小时不间断查看监控画面。当检测到移动时,系统会自动向相关安全人员发出警报。
以下是实现这一功能的具体步骤和代码:
# 获取指定路径下的所有图像
image_location = []
path_sets = ['/content/movement']
# 加载停车场视频的所有图像
for path in path_sets:
for img_path in glob.glob(os.path.join(path, '*.jpg')):
image_location.append(img_path)
image_location[:3]
# 统计每张图像中的人数
list_df = []
# 遍历每张图像,检查是否有人在禁入区域
for i in image_location :
count, img_den, dnst_mp = get_count_people(i)
generate_dens_map(img_den, dnst_mp.cpu().detach().numpy(), 0, i)
list_df = list_df + [[i,count]]
# 将数据保存到DataFrame中
detected_df = pd.DataFrame(list_df,columns=['image',
超级会员免费看
订阅专栏 解锁全文

被折叠的 条评论
为什么被折叠?



