• 大小: 14.05MB
    文件类型: .gz
    金币: 1
    下载: 0 次
    发布日期: 2023-07-25
  • 语言: Matlab
  • 标签: 行为识别  matlab  

资源简介

基于姿势的行为识别matlab程序,使用pose提取关节特征进行行为识别,matlab版本要2014年的,16年的估计也行

代码片段和文件信息

% % Copyright (C) 2014 LEAR Inria Grenoble France

% Permission is hereby granted free of charge to any person obtaining
% a copy of this software and associated documentation files (the
% “Software“) to deal in the Software without restriction including
without limitation the rights to use copy modify merge publish
% distribute sublicense and/or sell copies of the Software and to
% permit persons to whom the Software is furnished to do so subject to
% the following conditions:

% The above copyright notice and this permission notice shall be
% included in all copies or substantial portions of the Software.

% THE SOFTWARE IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY KIND
% EXPRESS OR IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
% MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND
% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
% LIABLE FOR ANY CLAIM DAMAGES OR OTHER LIABILITY WHETHER IN AN ACTION
OF CONTRACT TORT OR OTHERWISE ARISING FROM OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

%%
If you use this code please cite: 
% @INPROCEEDINGS{cherian14 
% author={Cherian A. and Mairal J. and Alahari K. and Schmid C.} 
% booktitle={IEEE Conference on Computer Vision and Pattern Recognition} 
% title={Mixing Body-Part Sequences for Human Pose Estimation} 
% year={2014}
% }

% demo code main file to run.
for bugs contact anoop.cherian@inria.fr
%
warning ‘off‘;
startup(); % set some paths

% configure. See the function for details. You need to set the cache and
% the sequence paths in the config.
config = set_algo_parameters();     

% load the bodypart model learned using Yang and Ramanan framework.
load ./data/FLIC_model.mat;% the 13part FLIC human pose model.

get the dataset and gt annotations
piw_data = get_piw_data(‘piw‘ config.data_path);

% process each sequence here we show only for seq15 available in the
% dataset folder. 
detected_pose_type = struct(‘seq‘ {} ‘filename‘ {} ‘frame‘ {} ‘bestpose‘{});
detected_pose_seqs = repmat(detected_pose_type [111]);
seqs = dir(config.data_path); seqs = seqs(3:end);
all_detections = []; gt_all = []; mov = 1;

for every sequence in the selected_seqs folder (with the dataset)
for s=1:length(seqs)
    fprintf(‘working on sequence %s\n‘ seqs(s).name);

    % read the frames and store the respective groundtruth annotations.
    seq_dir = [config.data_path seqs(s).name ‘/‘];    
    frames = dir([seq_dir ‘/*.png‘]);    
    gt = get_groundtruth_for_seq(frames piw_data);% extract gt annotations for the frames in seq
    gt_all = [gt_all gt]; % used for full evaluation.

    % now we are ready to compute the part sequences and recombination!               
    try        
        load([config.data_store_path ‘detected_poses_‘ seqs(s).name] ‘detected_poses‘); 
    catch
        detected_poses = EstimatePosesInVideo(seq_dir model 1 config);   
        save([config.data

评论

共有 条评论