plateform
stringclasses
1 value
repo_name
stringlengths
13
113
name
stringlengths
3
74
ext
stringclasses
1 value
path
stringlengths
12
229
size
int64
23
843k
source_encoding
stringclasses
9 values
md5
stringlengths
32
32
text
stringlengths
23
843k
github
qxcv/comp2560-master
variational_descriptor_flow.m
.m
comp2560-master/project/matlab/flow/LDOF_src/src/variational_descriptor_flow.m
5,432
utf_8
30030984b4b67f377badcaa30f6ca526
function F = variational_descriptor_flow(im1,im2,... confidence,centroids1,centroids2,para,verbose) I1s=getImPyramid(im1,para.sigma,para.downsampling,para.level); I2s=getImPyramid(im2,para.sigma,para.downsampling,para.level); gamma = para.gamma; max_iter = para.out_iter; downsampling = para.downsampling; num_lev...
github
qxcv/comp2560-master
get_pair_dist_matrix.m
.m
comp2560-master/project/matlab/flow/LDOF_src/src/get_pair_dist_matrix.m
477
utf_8
c8d32760ba654393eaf46d5b217b54b6
function [dist]=get_pair_dist_matrix(E,U_p,V_p) %number of proposals L=length(U_p); e=length(E); dist=zeros(L,L*e); for i=1:L U_pc1=U_p{i}; V_pc1=V_p{i}; for j=i:L U_pc2=U_p{j}; V_pc2=V_p{j}; dist(i,[j:L:e*L])=penalize(U_pc1(E(:,1)),V_pc1(E(:,1)),... U_pc2(E(:,2)),V_pc2(...
github
qxcv/comp2560-master
get_psi_data_weighted.m
.m
comp2560-master/project/matlab/flow/LDOF_src/src/get_psi_data_weighted.m
269
utf_8
5810e51e5b883e63c1d99cee53745d49
function psi_data=get_psi_data_weighted(d1square,d2square,gamma,temperature) w1=1/(1+exp(temperature*(app_sqrt(d1square)-app_sqrt(d2square)))); w2=1-w1; psi_data=w1.*psiDeriv(d1square)+gamma*w2.*psiDeriv(d2square); end function res=app_sqrt(s2) res=sqrt(s2+eps^2); end
github
qxcv/comp2560-master
eval_pix_error.m
.m
comp2560-master/project/matlab/eval/eval_pix_error.m
2,484
utf_8
a378a10ee0f3f7a71449aecb0bf3346c
% % eval_pix_error: this function returns the average keypoint localization error for % a given error threshold. accuracy = eval_pix_error(det, gt, thresh) takes a % pose detection in det, the ground truth in gt, and an error threshold thresh, % and returns the average accuracy with this threshold for each keypoint....
github
qxcv/comp2560-master
evaluate_pose_seqs.m
.m
comp2560-master/project/matlab/eval/evaluate_pose_seqs.m
687
utf_8
cc9226d2596e9899e56c7f2535e8504f
% evaluation of the detected_poses against the ground truth. function pix_error = evaluate_pose_seqs(detected_pose, gt, pck_thresh) if nargin == 2 pck_thresh = 15; % default is 15 pix error end % first get the annotated poses from the gt corresponding to the images % used in the detection. detected_annotated_poses ...
github
qxcv/comp2560-master
get_framenum.m
.m
comp2560-master/project/matlab/utils/get_framenum.m
438
utf_8
41a07ea0692d5050e35703369e3b05d5
% some function to return a unique id for a frame. unique in the dataset. function frameid = get_framenum(imname) % this just extracts the number at the end of the filename (e.g. % 'file-042-00013.png' --> 13) frame_match = regexp(imname, '[^\d](?<frame_no>\d+)\.png$', 'names'); assert(numel(frame_match) == 1); str = f...
github
qxcv/comp2560-master
get_pts_along_limb.m
.m
comp2560-master/project/matlab/utils/get_pts_along_limb.m
2,702
utf_8
26e4258dbd759d59aafc0eeac3fc35fb
% takes the start and end of limb positions and makes a color histogram descriptor % for the entire limb rather than patches around the keypoint. numpts % specifies how many points to be taken from the limb (at equidistant % points). function pts = get_pts_along_limb(img, yst, xst, yen, xen, ps, szx, szy, numpts) regi...
github
qxcv/comp2560-master
colorhist.m
.m
comp2560-master/project/matlab/utils/colorhist.m
2,189
utf_8
c270c55404ccc1c2f10d624f7d9d70d2
% assumes the images is color. takes the image and the number of bins in % each axis. We assume the image is nx2 where the rows represent the pixels % and the cols are the color channels. function H = colorhist(img, nbins) persistent bins; if isempty(bins) if isa(img, 'double')% || max(img(:))>1 ...
github
qxcv/comp2560-master
get_rect_coordinates.m
.m
comp2560-master/project/matlab/utils/get_rect_coordinates.m
1,998
utf_8
f10636433c608749bb2445a7da23579b
% returns the coordinates of a rectangle with the main diagonal as the % coordinates given by start and end. function region = get_rect_coordinates(startcor, endcor, patch_size, szx, szy) x1 = startcor(:,2); y1=startcor(:,1); x2 = endcor(:,2); y2=endcor(:,1); tantheta = (y2-y1)./(x2-x1+eps); theta=atan(tantheta); w = p...
github
qxcv/comp2560-master
get_patch_descr_Ex.m
.m
comp2560-master/project/matlab/utils/get_patch_descr_Ex.m
1,352
utf_8
b442f55a20a43c4b229d7d86fa9b3fb7
function skelclr = get_patch_descr_Ex(skelpts, img, keyjoints, numpts_along_limb, displayposes) nbins=8; skelclr = cell(length(keyjoints), numpts_along_limb); persistent bins; if isempty(bins) if max(img(:))<=1 %isa(img, 'double')% || bins = linspace(1/nbins,1, nbins); else ...
github
qxcv/comp2560-master
get_recombination_tree.m
.m
comp2560-master/project/matlab/utils/get_recombination_tree.m
1,200
utf_8
0c81d1c85c3522ff04efc3da26c5847c
% returns the joint indices for the recombination tree. Here we combine % some of the nodes (such as the mid-limbs) returned by Y&R into a single % limb node when computing the shortest part sequence. function pose_joints = get_recombination_tree() neckjoint=1; sholjoint=2; elbowjoint=3; wristjoint=4; % pose tr...
github
qxcv/comp2560-master
get_motion_from_flow.m
.m
comp2560-master/project/matlab/utils/get_motion_from_flow.m
2,073
utf_8
e6337e841915d8566f540a18052d3338
function hf= get_motion_from_flow(pt, opticalflow, display_poses) ps = 15; u = opticalflow.u; v=opticalflow.v; n = size(pt,1); %hf = zeros(n, 2); str = max(1,pt(:,1)-ps)+1; enr = min(size(u,2), pt(:,1)+ps); stc = max(1,pt(:,2)-ps)+1; enc = min(size(u,1), pt(:,2)+ps); % patch_area=zeros(n,1); % for i=1:n % patch_ar...
github
qxcv/comp2560-master
interleave.m
.m
comp2560-master/project/matlab/utils/interleave.m
320
utf_8
da0160861ff958c027c7de8997823688
% function interleaves to mxn matrices column wise. the result is a % (mx(2n)) matrix z. function z = interleave(x,y) m=size(x,1); n = size(x,2); if size(x,1)~=size(y,1) || size(x,2)~=size(y,2) error('incompatible sizes'); end z = zeros(m,2*n); for i=1:n z(:,2*(i-1)+1) = x(:,i); z(:,2*i) = y(:,i); end end
github
qxcv/comp2560-master
prepare_dets_for_eval.m
.m
comp2560-master/project/matlab/utils/prepare_dets_for_eval.m
885
utf_8
d42717e20bc342790110df62c291a322
% prepare for evaluation function detected_pose_seqs = prepare_dets_for_eval(new_merged_poses, frames, seq) detected_pose_type = struct('seq', {}, 'filename', {}, 'bestpose',{}, 'all_clear', {}); detected_pose_seqs = repmat(detected_pose_type, [1,1,1]); mov = 3; d=3; % useful if working with multiple movies and multipl...
github
qxcv/comp2560-master
get_keypoints.m
.m
comp2560-master/project/matlab/utils/get_keypoints.m
184
utf_8
ba2ab059edd45a86e13e149cc5b23012
%% get keypoints function k = get_keypoints(b) x1 = b(:, 1:4:end); y1 = b(:, 2:4:end); x2 = b(:, 3:4:end); y2 = b(:, 4:4:end); x = (x1+x2)/2; y = (y1+y2)/2; k = interleave(x,y); end%%
github
qxcv/comp2560-master
box_normalize.m
.m
comp2560-master/project/matlab/utils/box_normalize.m
177
utf_8
26cf427d11c14b3948dd36b33a009258
% normalize the boxes using the image size. function box = box_normalize(box, imsize) box(:,1:2:end) = box(:, 1:2:end)/imsize(2); box(:,2:2:end) = box(:, 2:2:end)/imsize(1); end
github
qxcv/comp2560-master
get_patch_descr.m
.m
comp2560-master/project/matlab/utils/get_patch_descr.m
1,049
utf_8
58fc8ee160e16a569e52eb6501537db1
% get a patch of size pat_size from img1 around point x,y function colordesc = get_patch_descr(img, x,y, ps, szx, szy) N = size(y,1); %bins = 0:0.01:1; nbins = length(bins); nbins = 8; colordesc = zeros(512, N); for i=1:N try pat = img(x(i)-ps+1:x(i)+ps, y(i)-ps+1:y(i)+ps,:); catch ...
github
qxcv/comp2560-master
mypdist2.m
.m
comp2560-master/project/matlab/utils/mypdist2.m
5,491
utf_8
e54edb4752f416bacb6e521170186462
% This function belongs to Piotr Dollar's Toolbox % http://vision.ucsd.edu/~pdollar/toolbox/doc/index.html % Please refer to the above web page for definitions and clarifications % % Calculates the distance between sets of vectors. % % Let X be an m-by-p matrix representing m points in p-dimensional space % and Y be an...
github
qxcv/comp2560-master
visualizeskeleton.m
.m
comp2560-master/project/matlab/YR/visualization/visualizeskeleton.m
5,684
utf_8
39e2b8729720405dba8a58449462fea2
function visualizeskeleton(model) bs = 4; % assuming only one component c = model.components{1}; numparts = length(c); Nmix = zeros(1,numparts); for k = 1:numparts Nmix(k) = length(c(k).filterid); end ovec = [0 1 0 -1; 1 0 -1 0]; I = zeros(numparts,size(ovec,2)); for k = 2:numparts part = c(k); anchor = zer...
github
qxcv/comp2560-master
visualizeskeleton.m
.m
comp2560-master/project/matlab/YR/nbest_release/visualizeskeleton.m
9,373
utf_8
e982b2a074418fa08fb43c8fa17a2690
function visualizeskeleton(model) bs = 4; % assuming only one component c = model.components{1}; numparts = length(c); Nmix = zeros(1,numparts); for k = 1:numparts Nmix(k) = length(c(k).filterid); end ovec = [0 1 0 -1; 1 0 -1 0]; I = zeros(numparts,size(ovec,2)); for k = 2:numparts part = c(k); anchor =...
github
qxcv/comp2560-master
visualizemodel.m
.m
comp2560-master/project/matlab/YR/nbest_release/visualizemodel.m
3,139
utf_8
46088f0e24b8c6e3ef388c4251282ef8
function visualizemodel(model) pad = 2; bs = 20; % assuming only one component c = model.components{1}; numparts = length(c); Nmix = zeros(1,numparts); for k = 1:numparts Nmix(k) = length(c(k).filterid); end ovec = [0 1 0 -1; 1 0 -1 0]; I = zeros(numparts,size(ovec,2)); for k = 2:numparts part = c(k); a...
github
qxcv/comp2560-master
show_pose_sequence.m
.m
comp2560-master/project/matlab/visualization/show_pose_sequence.m
1,252
utf_8
a39b2a5aef79686019be9ad9803d4d4b
% display the detected pose sequence function show_pose_sequence(data_path, frames, detected_pose_seq, parent, dest_dir) if nargin < 5 should_save = false; else should_save = true; mkdir(dest_dir); end figno=1023; figure(figno); clf(figno); for n = 1:length(frames) video_showskeleton2([data_path fra...
github
qxcv/comp2560-master
showskeleton.m
.m
comp2560-master/project/matlab/visualization/showskeleton.m
2,158
utf_8
ff9eac60754b610da2907a623f9cc1b3
% displays a skeleton for the learned piw pose model. use the pts to % display the poses given keypoints, and use boxes if box coordinates are % available (e.g., pose boxes returned from loopy_detect_MM.m). np defines % the limbs to display and visiblility is the occlusion flag. function showskeleton(img, pts, boxes, ...
github
qxcv/comp2560-master
imhist_dist.m
.m
comp2560-master/project/matlab/jrcode/imhist_dist.m
573
utf_8
7500e2e74d77ade6182b5be90f66490f
function dist = imhist_dist(im1, im2, bins_per_channel) %IMHIST_DIST Compute the cosine similarity between the histograms %associated with two images. im1_hist = get_rgb_hist(im1, bins_per_channel); im2_hist = get_rgb_hist(im2, bins_per_channel); dist = acos(dot(im1_hist, im2_hist) / (norm(im1_hist) * norm(im2_hist)));...
github
qxcv/comp2560-master
pcp_new.m
.m
comp2560-master/project/matlab/jrcode/pcp_new.m
1,620
utf_8
65ebea6e76629df6b4fba5ed7a308242
function pcps = pcp(preds, gts, limbs) %PCP Compute Percentage Correct Parts (strict) on input sequences assert(iscell(preds) && iscell(gts)); assert(length(preds) >= 1); assert(length(preds) == length(gts)); assert(ismatrix(preds{1}) && size(preds{1}, 2) == 2); pred_mat = cat(3, preds{:}); gt_mat = cat(3, gts{:}); pc...
github
qxcv/comp2560-master
get_piw_full.m
.m
comp2560-master/project/matlab/jrcode/get_piw_full.m
4,582
utf_8
154b934c165fce5ded1a7a629c481077
function test_seqs = get_piw_full(cache_dir, trans_spec) %GET_PIW_FULL Get Poses in the Wild dataset % List of weird gotchas I've found in PIW: % - Joints which aren't visible (even if their location can be inferred % despite occlusion) are set to [-1, -1] % - Joint annotations drift over time, sometimes quite se...
github
qxcv/comp2560-master
parload.m
.m
comp2560-master/project/matlab/jrcode/parload.m
358
utf_8
c262af4992432d213bb70aa5012a7324
% par load function varargout = parload(fullpath, varargin) varargout = cell(length(varargin), 1); for ii=1:length(varargin) var_name = varargin{ii}; assert(isa(class(var_name), 'char'), 'only accept name'); load(fullpath, var_name); if exist(var_name, 'var') varargout{ii} = eval(var_name); else ...
github
qxcv/comp2560-master
get_mpii_cooking.m
.m
comp2560-master/project/matlab/jrcode/get_mpii_cooking.m
5,169
utf_8
395502f0ffa62792b7ae8ddc6fd27944
function test_seqs = get_mpii_cooking(dest_dir, cache_dir, trans_spec) %GET_MPII_COOKING Fetches continuous pose estimation data from MPII % train_dataset and val_dataset both come from MPII Cooking's continuous % pose dataset, with val_dataset scraped from a couple of scenes at the % end. test_dataset comes from the t...
github
qxcv/comp2560-master
Compute_SkelFlow.m
.m
comp2560-master/project/matlab/detect/Compute_SkelFlow.m
7,219
utf_8
dea52d3eec5c93995e73f05c59fb1920
% Perhaps the most important function in this package ! % given a frame-pair, corresponding candidate poses in each frame % and the optical flow between every consecutive frame pair, this function % computes the pair-wise cost between every pose pair. % It takes the the boxes (output of detect_MM) b1 and b2 correspond...
github
qxcv/comp2560-master
in_frame_detect.m
.m
comp2560-master/project/matlab/detect/in_frame_detect.m
3,451
utf_8
6043335cc45608efdfd3a8007c659a15
function boxes = in_frame_detect(count, pyra, unary_map, idpr_map, ... num_components, components, apps, nms_thresh, nms_parts) % Detect at most `count` poses in input using a given CNN-computed feature % pyramid and model. % % The function returns a matrix with one row per detected object. The % last column of ea...
github
qxcv/comp2560-master
Get_Distance_Weights.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/Get_Distance_Weights.m
1,725
utf_8
28a98251aadf1bae57947b3aed017b49
% this function specifies the parameters used in tracking and recombination % of poses. You might need to play around with these weights over the % training set to find good combinations. Here are some hints on selecting % them: % 1. if there is significant optical flow for a certain body part, then put % the first tw...
github
qxcv/comp2560-master
get_groundtruth_for_seq.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/get_groundtruth_for_seq.m
821
utf_8
595d862b7785b8d7b603155b023a0528
% extract the ground truth in posedata for the images in the sequence. % if you use another dataset, you need to change this function accordingly. function gt = get_groundtruth_for_seq(files, posedata) persistent gt_framenum; if isempty(gt_framenum) gt_framenum = arrayfun(@(x) get_framenum(x.imname), posedata); % eve...
github
qxcv/comp2560-master
demo.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/demo.m
4,900
utf_8
b7ef5392952e521cad185bad3646f730
pp% % 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, m...
github
qxcv/comp2560-master
EstimatePosesInVideo.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/EstimatePosesInVideo.m
9,197
utf_8
e43c364912f59303aa5a7dabe75d0856
function new_merged_poses = EstimatePosesInVideo(src_path, model, ~, config) global numpts_along_limb num_path_parts; global parent keyjoints_right keyjoints_left; global GetDistanceWeightsFn ComputePartPathCostsFn; %% set some parameters! flow_param = config.flow_param; PartIDs = config.PartID...
github
qxcv/comp2560-master
set_algo_parameters.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/set_algo_parameters.m
5,891
utf_8
22158733e12f74f06890958bcb744d8f
% set some configuration settings function config = set_algo_parameters() %% set the configuration parameters: You need to set this. % set the cache for storing optical flow and pose candidates. You need a % large disk space for this. config.cache_path = './cache/'; %config.cache_path = '/scratch2/bigimbaz/cherian/che...
github
qxcv/comp2560-master
get_piw_data.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/get_piw_data.m
6,260
utf_8
5d32c73fdd0f58edfa719d0546920a9d
% read the piw annotations. The annotation database file we use here is % different in format from the one supplied in the original dataset. This % code generates the mid-keypoints for the lower and upper-limbs. % function pos = get_piw_data(name, piw_seqs_path) cachedir = './cache/'; cls = [name '_data']; try lo...
github
qxcv/comp2560-master
demo_piw_full.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/demo_piw_full.m
5,199
utf_8
26f76e460e113507095bae4830daa8ab
% % 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, mer...
github
qxcv/comp2560-master
demo_mpii_cooking.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/demo_mpii_cooking.m
5,401
utf_8
c882ede432b01d007a8c146b9c1b9f06
% % 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, mer...
github
qxcv/comp2560-master
computeColor.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/flow/LDOF_src/third_party/flow-code-matlab/computeColor.m
3,142
utf_8
a36a650437bc93d4d8ffe079fe712901
function img = computeColor(u,v) % computeColor color codes flow field U, V % According to the c++ source code of Daniel Scharstein % Contact: schar@middlebury.edu % Author: Deqing Sun, Department of Computer Science, Brown University % Contact: dqsun@cs.brown.edu % $Date: 2007-10-31 21:20:30 (Wed, 31 O...
github
qxcv/comp2560-master
ann_compile_mex.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/flow/LDOF_src/third_party/ann_mwrapper/ann_compile_mex.m
1,684
utf_8
33dc804c66a9d68c02efa55511995e33
function ann_compile_mex() %ANN_COMPILE_MEX Compiles the core-mex files of the ANN Lib % % [ Syntax ] % - ann_compile_mex % % [ Description ] % - ann_compile_mex re-compiles the mex files. % % [ History ] % - Created by Dahua Lin, on Jul 06, 2007 % %% configurations % When you intend to ch...
github
qxcv/comp2560-master
ann_compile_mex_bak1.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/flow/LDOF_src/third_party/ann_mwrapper/ann_compile_mex_bak1.m
1,630
utf_8
9a3b317c5db70460d8ea44bd877246d5
function ann_compile_mex_bak1() %ANN_COMPILE_MEX Compiles the core-mex files of the ANN Lib % % [ Syntax ] % - ann_compile_mex % % [ Description ] % - ann_compile_mex re-compiles the mex files. % % [ History ] % - Created by Dahua Lin, on Jul 06, 2007 % %% configurations % When you intend to change the co...
github
qxcv/comp2560-master
annquery.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/flow/LDOF_src/third_party/ann_mwrapper/annquery.m
13,952
utf_8
9ca55bd21175f2b794f2087b4eda6727
function [nnidx, dists] = annquery(Xr, Xq, k, varargin) %ANNQUERY Performs Approximate K-Nearest-Neighbor query for a set of points % % [ Syntax ] % - nnidx = annquery(Xr, Xq, k) % - nnidx = annquery(Xr, Xq, k, ...) % - [nnidx, dists] = annquery(...) % - annquery -doc % % [ Arguments ] % - Xr: ...
github
qxcv/comp2560-master
setopts.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/flow/LDOF_src/third_party/ann_mwrapper/private/setopts.m
6,161
utf_8
e1da88dc99b232199d5082bf6df84068
function opts = setopts(opts0, varargin) %SETOPTS Sets the options and makes the option-struct % % [ Syntax ] % - opts = setopts([], name1, value1, name2, value2, ...) % - opts = setopts([], {name1, value1, name2, value2, ...}) % - opts = setopts([], newopts) % - opts = setopts(opts0, ...) % % [ Argume...
github
qxcv/comp2560-master
variational_descriptor_flow.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/flow/LDOF_src/src/variational_descriptor_flow.m
5,432
utf_8
30030984b4b67f377badcaa30f6ca526
function F = variational_descriptor_flow(im1,im2,... confidence,centroids1,centroids2,para,verbose) I1s=getImPyramid(im1,para.sigma,para.downsampling,para.level); I2s=getImPyramid(im2,para.sigma,para.downsampling,para.level); gamma = para.gamma; max_iter = para.out_iter; downsampling = para.downsampling; num_lev...
github
qxcv/comp2560-master
get_pair_dist_matrix.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/flow/LDOF_src/src/get_pair_dist_matrix.m
477
utf_8
c8d32760ba654393eaf46d5b217b54b6
function [dist]=get_pair_dist_matrix(E,U_p,V_p) %number of proposals L=length(U_p); e=length(E); dist=zeros(L,L*e); for i=1:L U_pc1=U_p{i}; V_pc1=V_p{i}; for j=i:L U_pc2=U_p{j}; V_pc2=V_p{j}; dist(i,[j:L:e*L])=penalize(U_pc1(E(:,1)),V_pc1(E(:,1)),... U_pc2(E(:,2)),V_pc2(...
github
qxcv/comp2560-master
eval_pix_error.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/eval/eval_pix_error.m
2,487
utf_8
d67966324a1f84c6214db69e5b5ba34e
% % eval_pix_error: this function returns the average keypoint localization error for % a given error threshold. accuracy = eval_pix_error(det, gt, thresh) takes a % pose detection in det, the ground truth in gt, and an error threshold thresh, % and returns the average accuracy with this threshold for each keypoint....
github
qxcv/comp2560-master
evaluate_pose_seqs.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/eval/evaluate_pose_seqs.m
1,262
utf_8
1913c43cfb4362a52deb5fbdeb35cb22
% evaluation of the detected_poses against the ground truth. function pix_error = evaluate_pose_seqs(detected_pose, gt, pck_thresh) if nargin == 2 pck_thresh = 15; % default is 15 pix error end % first get the annotated poses from the gt corresponding to the images % used in the detection. detected_annotated_poses =...
github
qxcv/comp2560-master
get_framenum.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/utils/get_framenum.m
218
utf_8
c3be1f6289ed8f89953d225b9b59c0e6
% some function to return a unique id for a frame. unique in the dataset. function frameid = get_framenum(imname) str = strtok(strrep(imname, '-', ''), '.'); str = str(str<'A'); frameid = str2double(str); end
github
qxcv/comp2560-master
get_pts_along_limb.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/utils/get_pts_along_limb.m
2,702
utf_8
26e4258dbd759d59aafc0eeac3fc35fb
% takes the start and end of limb positions and makes a color histogram descriptor % for the entire limb rather than patches around the keypoint. numpts % specifies how many points to be taken from the limb (at equidistant % points). function pts = get_pts_along_limb(img, yst, xst, yen, xen, ps, szx, szy, numpts) regi...
github
qxcv/comp2560-master
colorhist.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/utils/colorhist.m
2,189
utf_8
c270c55404ccc1c2f10d624f7d9d70d2
% assumes the images is color. takes the image and the number of bins in % each axis. We assume the image is nx2 where the rows represent the pixels % and the cols are the color channels. function H = colorhist(img, nbins) persistent bins; if isempty(bins) if isa(img, 'double')% || max(img(:))>1 ...
github
qxcv/comp2560-master
get_rect_coordinates.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/utils/get_rect_coordinates.m
1,998
utf_8
f10636433c608749bb2445a7da23579b
% returns the coordinates of a rectangle with the main diagonal as the % coordinates given by start and end. function region = get_rect_coordinates(startcor, endcor, patch_size, szx, szy) x1 = startcor(:,2); y1=startcor(:,1); x2 = endcor(:,2); y2=endcor(:,1); tantheta = (y2-y1)./(x2-x1+eps); theta=atan(tantheta); w = p...
github
qxcv/comp2560-master
get_patch_descr_Ex.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/utils/get_patch_descr_Ex.m
1,352
utf_8
b442f55a20a43c4b229d7d86fa9b3fb7
function skelclr = get_patch_descr_Ex(skelpts, img, keyjoints, numpts_along_limb, displayposes) nbins=8; skelclr = cell(length(keyjoints), numpts_along_limb); persistent bins; if isempty(bins) if max(img(:))<=1 %isa(img, 'double')% || bins = linspace(1/nbins,1, nbins); else ...
github
qxcv/comp2560-master
get_recombination_tree.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/utils/get_recombination_tree.m
1,171
utf_8
a913ae4f2f816146ea61a78a31989f6d
% returns the joint indices for the recombination tree. Here we combine % some of the nodes (such as the mid-limbs) returned by Y&R into a single % limb node when computing the shortest part sequence. function pose_joints = get_recombination_tree() neckjoint=1; sholjoint=2; elbowjoint=3; wristjoint=4; % pose tr...
github
qxcv/comp2560-master
get_motion_from_flow.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/utils/get_motion_from_flow.m
2,149
utf_8
fa4cf2c6de39afd8c81dc8c3770aab2f
function hf= get_motion_from_flow(pt, opticalflow, display_poses) addpath('/home/lear/cherian/projects/pose/MyCode/sequence/shortest-path/'); ps = 15; u = opticalflow.u; v=opticalflow.v; n = size(pt,1); %hf = zeros(n, 2); str = max(1,pt(:,1)-ps)+1; enr = min(size(u,2), pt(:,1)+ps); stc = max(1,pt(:,2)-ps)+1; enc = min...
github
qxcv/comp2560-master
interleave.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/utils/interleave.m
320
utf_8
da0160861ff958c027c7de8997823688
% function interleaves to mxn matrices column wise. the result is a % (mx(2n)) matrix z. function z = interleave(x,y) m=size(x,1); n = size(x,2); if size(x,1)~=size(y,1) || size(x,2)~=size(y,2) error('incompatible sizes'); end z = zeros(m,2*n); for i=1:n z(:,2*(i-1)+1) = x(:,i); z(:,2*i) = y(:,i); end end
github
qxcv/comp2560-master
prepare_dets_for_eval.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/utils/prepare_dets_for_eval.m
885
utf_8
d42717e20bc342790110df62c291a322
% prepare for evaluation function detected_pose_seqs = prepare_dets_for_eval(new_merged_poses, frames, seq) detected_pose_type = struct('seq', {}, 'filename', {}, 'bestpose',{}, 'all_clear', {}); detected_pose_seqs = repmat(detected_pose_type, [1,1,1]); mov = 3; d=3; % useful if working with multiple movies and multipl...
github
qxcv/comp2560-master
get_keypoints.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/utils/get_keypoints.m
184
utf_8
ba2ab059edd45a86e13e149cc5b23012
%% get keypoints function k = get_keypoints(b) x1 = b(:, 1:4:end); y1 = b(:, 2:4:end); x2 = b(:, 3:4:end); y2 = b(:, 4:4:end); x = (x1+x2)/2; y = (y1+y2)/2; k = interleave(x,y); end%%
github
qxcv/comp2560-master
box_normalize.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/utils/box_normalize.m
177
utf_8
26cf427d11c14b3948dd36b33a009258
% normalize the boxes using the image size. function box = box_normalize(box, imsize) box(:,1:2:end) = box(:, 1:2:end)/imsize(2); box(:,2:2:end) = box(:, 2:2:end)/imsize(1); end
github
qxcv/comp2560-master
get_patch_descr.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/utils/get_patch_descr.m
1,049
utf_8
58fc8ee160e16a569e52eb6501537db1
% get a patch of size pat_size from img1 around point x,y function colordesc = get_patch_descr(img, x,y, ps, szx, szy) N = size(y,1); %bins = 0:0.01:1; nbins = length(bins); nbins = 8; colordesc = zeros(512, N); for i=1:N try pat = img(x(i)-ps+1:x(i)+ps, y(i)-ps+1:y(i)+ps,:); catch ...
github
qxcv/comp2560-master
mypdist2.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/utils/mypdist2.m
5,491
utf_8
e54edb4752f416bacb6e521170186462
% This function belongs to Piotr Dollar's Toolbox % http://vision.ucsd.edu/~pdollar/toolbox/doc/index.html % Please refer to the above web page for definitions and clarifications % % Calculates the distance between sets of vectors. % % Let X be an m-by-p matrix representing m points in p-dimensional space % and Y be an...
github
qxcv/comp2560-master
visualizeskeleton.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/YR/visualization/visualizeskeleton.m
5,684
utf_8
39e2b8729720405dba8a58449462fea2
function visualizeskeleton(model) bs = 4; % assuming only one component c = model.components{1}; numparts = length(c); Nmix = zeros(1,numparts); for k = 1:numparts Nmix(k) = length(c(k).filterid); end ovec = [0 1 0 -1; 1 0 -1 0]; I = zeros(numparts,size(ovec,2)); for k = 2:numparts part = c(k); anchor = zer...
github
qxcv/comp2560-master
visualizeskeleton.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/YR/nbest_release/visualizeskeleton.m
9,373
utf_8
e982b2a074418fa08fb43c8fa17a2690
function visualizeskeleton(model) bs = 4; % assuming only one component c = model.components{1}; numparts = length(c); Nmix = zeros(1,numparts); for k = 1:numparts Nmix(k) = length(c(k).filterid); end ovec = [0 1 0 -1; 1 0 -1 0]; I = zeros(numparts,size(ovec,2)); for k = 2:numparts part = c(k); anchor =...
github
qxcv/comp2560-master
detect_MM.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/YR/nbest_release/detect_MM.m
7,903
utf_8
939c994f2fd0ec942c4c1f69d150d93f
function boxes = detect_MM(im, model,thresh,partIDs) % This algorithm approximates nbest maximal decoders introduced in the paper, % returning high-scoring and diverse poses. % Greedy NMS is applied to max-marginal score map for each part. % The poses are obtained by backtracking from the location returned by NMS. % ...
github
qxcv/comp2560-master
visualizemodel.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/YR/nbest_release/visualizemodel.m
3,139
utf_8
46088f0e24b8c6e3ef388c4251282ef8
function visualizemodel(model) pad = 2; bs = 20; % assuming only one component c = model.components{1}; numparts = length(c); Nmix = zeros(1,numparts); for k = 1:numparts Nmix(k) = length(c(k).filterid); end ovec = [0 1 0 -1; 1 0 -1 0]; I = zeros(numparts,size(ovec,2)); for k = 2:numparts part = c(k); a...
github
qxcv/comp2560-master
show_pose_sequence.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/visualization/show_pose_sequence.m
1,021
utf_8
cfb24a2877c9e81b910fb1a89729ebb3
% display the detected pose sequence function show_pose_sequence(data_path, frames, detected_pose_seq) figno=1023; figure(figno);clf(figno); for n = 1:length(frames) %video_showskeleton2(img{n}, detected_pose_seq(n,:));axis off; video_showskeleton2([data_path frames(n).name], detected_pose_seq(n,:));axis o...
github
qxcv/comp2560-master
showskeleton.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/visualization/showskeleton.m
2,158
utf_8
ff9eac60754b610da2907a623f9cc1b3
% displays a skeleton for the learned piw pose model. use the pts to % display the poses given keypoints, and use boxes if box coordinates are % available (e.g., pose boxes returned from loopy_detect_MM.m). np defines % the limbs to display and visiblility is the occlusion flag. function showskeleton(img, pts, boxes, ...
github
qxcv/comp2560-master
imhist_dist.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/jrcode/imhist_dist.m
573
utf_8
7500e2e74d77ade6182b5be90f66490f
function dist = imhist_dist(im1, im2, bins_per_channel) %IMHIST_DIST Compute the cosine similarity between the histograms %associated with two images. im1_hist = get_rgb_hist(im1, bins_per_channel); im2_hist = get_rgb_hist(im2, bins_per_channel); dist = acos(dot(im1_hist, im2_hist) / (norm(im1_hist) * norm(im2_hist)));...
github
qxcv/comp2560-master
get_piw_full.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/jrcode/get_piw_full.m
4,582
utf_8
154b934c165fce5ded1a7a629c481077
function test_seqs = get_piw_full(cache_dir, trans_spec) %GET_PIW_FULL Get Poses in the Wild dataset % List of weird gotchas I've found in PIW: % - Joints which aren't visible (even if their location can be inferred % despite occlusion) are set to [-1, -1] % - Joint annotations drift over time, sometimes quite se...
github
qxcv/comp2560-master
parload.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/jrcode/parload.m
358
utf_8
c262af4992432d213bb70aa5012a7324
% par load function varargout = parload(fullpath, varargin) varargout = cell(length(varargin), 1); for ii=1:length(varargin) var_name = varargin{ii}; assert(isa(class(var_name), 'char'), 'only accept name'); load(fullpath, var_name); if exist(var_name, 'var') varargout{ii} = eval(var_name); else ...
github
qxcv/comp2560-master
get_mpii_cooking.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/jrcode/get_mpii_cooking.m
5,169
utf_8
395502f0ffa62792b7ae8ddc6fd27944
function test_seqs = get_mpii_cooking(dest_dir, cache_dir, trans_spec) %GET_MPII_COOKING Fetches continuous pose estimation data from MPII % train_dataset and val_dataset both come from MPII Cooking's continuous % pose dataset, with val_dataset scraped from a couple of scenes at the % end. test_dataset comes from the t...
github
qxcv/comp2560-master
Compute_SkelFlow.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/detect/Compute_SkelFlow.m
6,990
utf_8
4555f8c3d917f003303ae6ca39eb6a4b
% Perhaps the most important function in this package ! % given a frame-pair, corresponding candidate poses in each frame % and the optical flow between every consecutive frame pair, this function % computes the pair-wise cost between every pose pair. % It takes the the boxes (output of detect_MM) b1 and b2 correspond...
github
qxcv/comp2560-master
flowpyramid.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/detect/flowpyramid.m
3,177
utf_8
57abbc1f2b62924c245cfec574dbd205
function flowpyra = flowpyramid(img1, img2, fim, model) % Compute flow pyramid. % % pyra.feat{i} is the i-th level of the feature pyramid. % pyra.scales{i} is the scaling factor used for the i-th level. % pyra.feat{i+interval} is computed at exactly half the resolution of feat{i}. % first octave halucinates higher reso...
github
qxcv/comp2560-master
loopy_detect_MM.m
.m
comp2560-master/thirdparty/cherian-et-al-cvpr-14/detect/loopy_detect_MM.m
17,067
utf_8
6c6fba12654f8a5ee2b54423ab604918
function boxes = loopy_detect_MM(im1, im2, fim, model, thresh, cycled_nodes, PartIDs, flow_param) % boxes = detect(im1, im2, fim, model, thresh) % also uses optical flow between im1 and im2 into the detection of poses in % consecutive frames simultaneously. % Detect objects in input using a model and a score threshold....
github
qxcv/comp2560-master
global_conf.m
.m
comp2560-master/thirdparty/chen-et-al-nips-14/global_conf.m
1,492
utf_8
c62ad7fbaabd3f8cd10a7d9358fb7bd0
function conf = global_conf() assert_not_in_parallel_worker(); % dataset conf.interval = 10; % 10 levels from 1 to 1/2 conf.memsize = 0.5; % 0.5 gb conf.NEG_N = 80; conf.device_id = 0; conf.caffe_root = './external/caffe'; % default configurations conf.mining_neg = true; conf.mining_pos = false; conf.K = 13; conf.test_...
github
qxcv/comp2560-master
imreadx.m
.m
comp2560-master/thirdparty/chen-et-al-nips-14/dataio/imreadx.m
402
utf_8
a7ae5a0fcb499f30e8f8fba7e9188a39
function im = imreadx(ex) im = make_color(imread(ex.im)); % !!! always flip first !!!! if ex.isflip im = im(:,end:-1:1,:); end % rotate and flip if ex.r_degree ~= 0 im = imrotate(im, ex.r_degree); end function im = make_color(input) % Convert input image to color. % im = color(input) if size(input, 3) == 1 im...
github
qxcv/comp2560-master
lookupPart.m
.m
comp2560-master/thirdparty/chen-et-al-nips-14/tools/lookupPart.m
2,630
utf_8
b2f0ea899418570ee5125f8eb57ff2a1
function [inds numParts] = lookupPart(varargin) % Returns the part # in the annotation for a string representation key = get_key(); invkey = fields(key); assert(key.(invkey{10})==10); if nargout==2 numParts = max(cellfun(@(x)key.(x), fieldnames(rmfield(key,'KEYPOINT_FLIPMAP')))); end if nargin == 0, inds =...
github
qxcv/comp2560-master
testoverlap.m
.m
comp2560-master/thirdparty/chen-et-al-nips-14/tools/testoverlap.m
1,101
utf_8
e8a8b1b4a54dbc39dbe95e6da7b21fa4
% Compute a mask of filter reponse locations (for a filter of size sizy,sizx) % that sufficiently overlap a ground-truth bounding box (bbox) % at a particular level in a feature pyramid function ov = testoverlap(sizx,sizy,ud1,ud2,pyra,bbox,overlap) scale = pyra.scale; % ---------- TODO ----------- padx = pyra.padx; pa...
github
qxcv/comp2560-master
parload.m
.m
comp2560-master/thirdparty/chen-et-al-nips-14/tools/parload.m
358
utf_8
c262af4992432d213bb70aa5012a7324
% par load function varargout = parload(fullpath, varargin) varargout = cell(length(varargin), 1); for ii=1:length(varargin) var_name = varargin{ii}; assert(isa(class(var_name), 'char'), 'only accept name'); load(fullpath, var_name); if exist(var_name, 'var') varargout{ii} = eval(var_name); else ...
github
qxcv/comp2560-master
parsave.m
.m
comp2560-master/thirdparty/chen-et-al-nips-14/tools/parsave.m
254
utf_8
8216068114fa720295fb4518b561ca44
% par save function parsave(fname,data, varargin) if ~isempty(varargin) var_name = varargin{1}; else var_name=genvarname(inputname(2)); end eval([var_name '=data;']); try save(fname,var_name,'-append') catch save(fname,var_name) end
github
qxcv/comp2560-master
crop_patch.m
.m
comp2560-master/thirdparty/chen-et-al-nips-14/tools/crop_patch.m
2,409
utf_8
52820e3eb681c58ec5f40dec5239f372
function cpatch = crop_patch(imdata, label, psize) persistent NEG_N; if isempty(NEG_N) conf = global_conf(); NEG_N = conf.NEG_N; end RNG_MAX = 1e9 - 1; is_negative = isempty(imdata.joints); if ~is_negative % negative images joints = imdata.joints; scale_x = imdata.scale_x; scale_y = imdata.scale_y; gla...
github
qxcv/comp2560-master
lookupPart.m
.m
comp2560-master/thirdparty/chen-et-al-nips-14/dataset/FLIC/lookupPart.m
2,630
utf_8
b2f0ea899418570ee5125f8eb57ff2a1
function [inds numParts] = lookupPart(varargin) % Returns the part # in the annotation for a string representation key = get_key(); invkey = fields(key); assert(key.(invkey{10})==10); if nargout==2 numParts = max(cellfun(@(x)key.(x), fieldnames(rmfield(key,'KEYPOINT_FLIPMAP')))); end if nargin == 0, inds =...
github
qxcv/comp2560-master
qp_write.m
.m
comp2560-master/thirdparty/chen-et-al-nips-14/external/qpsolver/qp_write.m
1,505
utf_8
229c74c3ca521f58c83a77c174e6d3f6
% qp_write(ex) % where ex.id = K X 1 % ex.blocks(j).i = starting index of j^th feature block % ex.blocks(j).x = feature block % final feature = [ex.blocks(:).x] % % Write ex to a QP of the form: % min_{w,e} ||(w-w0)*r||^2 + sum_i c_i e_i % s.t. w x_ij >= 1 - e_i % % We can write the above Q...
github
qxcv/comp2560-master
qp_opt.m
.m
comp2560-master/thirdparty/chen-et-al-nips-14/external/qpsolver/qp_opt.m
2,028
utf_8
02ab5a783b9007f2334c987d6458579b
function qp_opt(tol,iter) % qp_opt(tol,iter) % Optimize QP until relative difference between lower and upper bound is below 'tol' global qp; if nargin < 1, tol = .05; end if nargin < 2, iter = 3000; end % Recompute qp.w in case of numerical precision issues qp_refresh(); C = 1; I = 1:qp.n; [id,J] = sortrows(qp...
github
qxcv/comp2560-master
qp_prune.m
.m
comp2560-master/thirdparty/chen-et-al-nips-14/external/qpsolver/qp_prune.m
828
utf_8
1789b75e3aa75f855dffc94972d374c5
% Prunes qp to current active constraints (eg., support vectors) function n = qp_prune global qp % if cache is full of support vectors, only keep non-zero (and fixed) ones if all(qp.sv), qp.sv = qp.a > 0; qp.sv(qp.svfix) = 1; end I = find(qp.sv > 0); n = length(I); assert(n > 0); qp.l = 0; qp.w = zeros(size(qp.w...
github
qxcv/comp2560-master
qp_one.m
.m
comp2560-master/thirdparty/chen-et-al-nips-14/external/qpsolver/qp_one.m
4,224
utf_8
c0f146c59f6bbdbb3be16decf2ff57e0
% Perform one pass through current set of support vectors function qp_one global qp MEX = true; %MEX = false; % Random ordering of support vectors I = find(qp.sv); I = I(randperm(length(I))); assert(~isempty(I)); % Mex file is much faster if MEX, loss = qp_one_sparse(qp.x,qp.i,qp.b,qp.d,qp....
github
qxcv/comp2560-master
detect.m
.m
comp2560-master/thirdparty/chen-et-al-nips-14/src/detect.m
8,000
utf_8
33da8db79e0106ff09309d4d3b7f1aa7
function [boxes,model,ex] = detect(iminfo, model, thresh, bbox, overlap, id, label) % Detect objects in image using a model and a score threshold. % Higher threshold leads to fewer detections. % % The function returns a matrix with one row per detected object. The % last column of each row gives the score of the detec...
github
qxcv/comp2560-master
detect_fast.m
.m
comp2560-master/thirdparty/chen-et-al-nips-14/src/detect_fast.m
4,913
utf_8
308f6305f946a050cd5b8a5ca166e127
function boxes = detect_fast(iminfo, model, thresh, param) % boxes = detect(im, model, thresh) % Detect objects in input using a model and a score threshold. % Higher threshold leads to fewer detections. % % The function returns a matrix with one row per detected object. The % last column of each row gives the score o...
github
qxcv/comp2560-master
assign_label.m
.m
comp2560-master/thirdparty/chen-et-al-nips-14/src/assign_label.m
1,931
utf_8
00ee236c8016d93f03a808c47efd9fb0
function labels = assign_label(imdata, clusters, pa, tsize, K, is_check) if ~exist('is_check', 'var') is_check = false; end % add mix field to imgs p_no = numel(pa); labels = struct( 'mix_id', cell(numel(imdata), 1), ... 'global_id', cell(numel(imdata), 1), ... 'near', cell(numel(imdata), 1), ... 'invalid', cel...
github
qxcv/comp2560-master
train.m
.m
comp2560-master/thirdparty/chen-et-al-nips-14/src/train.m
6,264
utf_8
03456f1691ac1b66e99a8ffb3d1d6f0b
function model = train(name, model, pos, neg, iter, C, wpos, maxsize, overlap) % Train a structured SVM with latent assignement of positive variables % pos = list of positive images with part annotations % neg = list of negative images % iter is the number of training iterations % C = scale factor for slack loss %...
github
qxcv/comp2560-master
defvector.m
.m
comp2560-master/thirdparty/chen-et-al-nips-14/src/defvector.m
393
utf_8
613231d473f11ad8cd85fa2524f18600
% Compute the deformation feature given parent locations, % child locations, and the child part function res = defvector(part, x1, y1, x2, y2, m, id) probx = x1 - part.mean_x{id}(m); proby = y1 - part.mean_y{id}(m); var_x = part.var_x{id}(m); var_y = part.var_y{id}(m); dx = (probx - x2) / var_x; dy = (proby - y2) / v...
github
qxcv/comp2560-master
modelcomponents.m
.m
comp2560-master/thirdparty/chen-et-al-nips-14/src/modelcomponents.m
1,407
utf_8
0e43dd3ddd208b268362d16602cbd988
% Cache various statistics from the model data structure for later use function [components,apps] = modelcomponents(model) components = cell(length(model.components),1); for c = 1:length(model.components) for k = 1:length(model.components{c}) p = model.components{c}(k); % has nbh_IDs nbh_N = numel(p.nbh_IDs);...
github
qxcv/comp2560-master
detect_fast.m
.m
comp2560-master/thirdparty/yang-ramanan-2011/code-basic/detect_fast.m
6,012
utf_8
8a6fb2a4be5cce75d990142f69756aae
function boxes = detect_fast(im, model) % boxes = detect(im, model, thresh) % Detect objects in input using a model and a score threshold. % Higher threshold leads to fewer detections. % % The function returns a matrix with one row per detected object. The % last column of each row gives the score of the detection. T...
github
qxcv/comp2560-master
visualizeskeleton.m
.m
comp2560-master/thirdparty/yang-ramanan-2011/code-basic/visualization/visualizeskeleton.m
5,684
utf_8
39e2b8729720405dba8a58449462fea2
function visualizeskeleton(model) bs = 4; % assuming only one component c = model.components{1}; numparts = length(c); Nmix = zeros(1,numparts); for k = 1:numparts Nmix(k) = length(c(k).filterid); end ovec = [0 1 0 -1; 1 0 -1 0]; I = zeros(numparts,size(ovec,2)); for k = 2:numparts part = c(k); anchor = zer...
github
qxcv/comp2560-master
detect.m
.m
comp2560-master/thirdparty/yang-ramanan-2011/code-full/detection/detect.m
10,674
utf_8
3c4d0e6e81fe35cb91a852c0099ef710
function [boxes,model,ex] = detect(im, model, thresh, bbox, overlap, id, label) % [boxes,model,ex] = detect(im, model, thresh, bbox, overlap, id, label) % Detect objects in image using a model and a score threshold. % Higher threshold leads to fewer detections. % % The function returns a matrix with one row per ...
github
qxcv/comp2560-master
detect_fast.m
.m
comp2560-master/thirdparty/yang-ramanan-2011/code-full/detection/detect_fast.m
5,762
utf_8
5431046a2df998e60a41d767e1948be7
function boxes = detect_fast(im, model, thresh) % boxes = detect(im, model, thresh) % Detect objects in input using a model and a score threshold. % Higher threshold leads to fewer detections. % % The function returns a matrix with one row per detected object. The % last column of each row gives the score of the detec...
github
qxcv/comp2560-master
qp_write.m
.m
comp2560-master/thirdparty/yang-ramanan-2011/code-full/learning/qp_write.m
1,505
utf_8
229c74c3ca521f58c83a77c174e6d3f6
% qp_write(ex) % where ex.id = K X 1 % ex.blocks(j).i = starting index of j^th feature block % ex.blocks(j).x = feature block % final feature = [ex.blocks(:).x] % % Write ex to a QP of the form: % min_{w,e} ||(w-w0)*r||^2 + sum_i c_i e_i % s.t. w x_ij >= 1 - e_i % % We can write the above Q...
github
qxcv/comp2560-master
qp_opt.m
.m
comp2560-master/thirdparty/yang-ramanan-2011/code-full/learning/qp_opt.m
2,007
utf_8
cc1ea2033343139df2642d05930a57b7
function qp_opt(tol,iter) % qp_opt(tol,iter) % Optimize QP until relative difference between lower and upper bound is below 'tol' global qp; if nargin < 1, tol = .05; end if nargin < 2, iter = 1000; end % Recompute qp.w in case of numerical precision issues qp_refresh(); C = 1; I = 1:qp.n; [id,J] = sortrows(qp...
github
qxcv/comp2560-master
qp_prune.m
.m
comp2560-master/thirdparty/yang-ramanan-2011/code-full/learning/qp_prune.m
828
utf_8
1789b75e3aa75f855dffc94972d374c5
% Prunes qp to current active constraints (eg., support vectors) function n = qp_prune global qp % if cache is full of support vectors, only keep non-zero (and fixed) ones if all(qp.sv), qp.sv = qp.a > 0; qp.sv(qp.svfix) = 1; end I = find(qp.sv > 0); n = length(I); assert(n > 0); qp.l = 0; qp.w = zeros(size(qp.w...
github
qxcv/comp2560-master
qp_one.m
.m
comp2560-master/thirdparty/yang-ramanan-2011/code-full/learning/qp_one.m
4,224
utf_8
c0f146c59f6bbdbb3be16decf2ff57e0
% Perform one pass through current set of support vectors function qp_one global qp MEX = true; %MEX = false; % Random ordering of support vectors I = find(qp.sv); I = I(randperm(length(I))); assert(~isempty(I)); % Mex file is much faster if MEX, loss = qp_one_sparse(qp.x,qp.i,qp.b,qp.d,qp....
github
qxcv/comp2560-master
train.m
.m
comp2560-master/thirdparty/yang-ramanan-2011/code-full/learning/train.m
6,358
utf_8
c2623dfaa490856f108563245b71ebf1
function model = train(name, model, pos, neg, warp, iter, C, wpos, maxsize, overlap) % model = train(name, model, pos, neg, warp, iter, C, Jpos, maxsize, overlap) % 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 % Train a structured SVM with latent assignement of positive variables % pos = list...