LRCN_activity_recognition

这篇博客详细介绍了如何使用Caffe框架重新训练LRCN(Long Short-Term Memory)活动识别模型。步骤包括从UCF-101视频中提取RGB帧和计算光流,然后训练单帧模型和LRCN模型。提供的脚本包括run_singleFrame_RGB.sh、run_singleFrame_flow.sh、run_lstm_RGB.sh和run_lstm_flow.sh。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

http://www.eecs.berkeley.edu/~lisa_anne/LRCN_video

作者用的是caffe。。

Steps to retrain the LRCN activity recognition models:

  1. Extract RGB frames: The script “extract_frames.sh” will convert UCF-101 .avi files to .jpg images. I extracted frames at 30 frames/second.
    提取视频帧。
  2. Compute flow frames: After downloading the code from [1], you can use “create_flow_images_LRCN.m” to compute flow frames. Example flow images for the video “YoYo_g25_c03” are here.
    计算光流。
  3. Train single frame models: Finetune the hybrid model (found here) with video frames to train a single frame model. Use “run_singleFrame_RGB.sh” and “run_singleFrame_flow.sh” to train the RGB and flow models respectively. Make sure to change the “root_folder” param in “train_test_singleFrame_RGB.prototxt” and “train_test_singleFrame_flow.prototxt” as needed. The single frame models I trained can be found here.
    对RGB和flow分别训练baseline模型。
  4. Train LRCN models: Using the single frame models as a starting point, train the LRCN models by running “run_lstm_RGB.sh” and “run_lstm_flow.sh“. The data layer for the LRCN model is a python layer (“sequence_input_layer.py”). Make sure to set “WITH_PYTHON_LAYER := 1” in Makefile.config. Change the paths “flow_frames” and “RGB_frames” in “sequence_input_layer.py” as needed. The models I trained can be found here.
    分别训练LRCN模型。

run_singleFrame_RGB.sh

#!/bin/sh
TOOLS=../../build/tools

GLOG_logtostderr=1 $TOOLS/caffe train -solver singleFrame_solver_RGB.prototxt -weights caffe_imagenet_hyb2_wr_rc_solver_sqrt_iter_310000 
echo 'Done.'

GLOG_logtostderr=1 设置glog日志。glog是google 出的一个C++轻量级日志库,介绍请看

评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值