Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

handle basis detections

  • Loading branch information...
commit 3d80948a0b64e8afa671fdc95a8173bb4cbcd08f 1 parent d087642
@quantombone authored
Showing with 12 additions and 2 deletions.
  1. +12 −2 internal/esvm_detect.m
View
14 internal/esvm_detect.m
@@ -50,6 +50,9 @@
end
if isstruct(models) && isfield(models,'models')
+ if isfield(models,'basis')
+ params.basis = models.basis;
+ end
[resstruct,feat_pyramid] = esvm_detect(I,models.models,params);
return;
end
@@ -426,8 +429,15 @@
elseif isempty(params.nnmode)
%nnmode 0: Apply linear classifiers by performing one large matrix
%multiplication and subtract bias
- r = exemplar_matrix' * X;
- r = bsxfun(@minus, r, bs);
+
+ if ~isfield(params,'basis')
+ r = exemplar_matrix' * X;
+ r = bsxfun(@minus, r, bs);
+ else
+ v = cellfun2(@(x)x.v,models);
+ v = cat(2,v{:});
+ r = bsxfun(@plus,(v(1:end-1,:)'*(params.basis'*X)),v(end,:)');
+ end
elseif strcmp(params.nnmode,'normalizedhog') == 1
r = exemplar_matrix' * X;
elseif strcmp(params.nnmode,'nndfun') == 1
Please sign in to comment.
Something went wrong with that request. Please try again.