2017-05-08 13:09:29 -04:00
function [ patches ] = Load_CECLM _Patch _Experts ( col_patch _dir , col_patch _file )
2016-10-03 16:46:39 -04:00
% LOAD_PATCH _EXPERTS Summary of this function goes here
% Detailed explanation goes here
colourPatchFiles = dir ( [ col_patch _dir col_patch _file ] ) ;
2018-05-04 09:13:50 +01:00
patches = [ ] ;
2016-10-03 16:46:39 -04:00
% load all of the pathes
for i = 1 : numel ( colourPatchFiles )
load ( [ col_patch _dir , colourPatchFiles ( i ) . name ] ) ;
patch = struct ;
patch . centers = centers ;
patch . trainingScale = trainingScale ;
patch . visibilities = visiIndex ;
patch . patch_experts = patch_experts . patch_experts ;
patch . correlations = patch_experts . correlations ;
patch . rms_errors = patch_experts . rms_errors ;
patch . modalities = patch_experts . types ;
patch . multi_modal _types = patch_experts . types ;
2017-05-08 13:09:29 -04:00
patch . type = ' CEN ' ;
2016-10-03 16:46:39 -04:00
% Knowing what normalisation was performed during training is
% important for fitting
patch . normalisationOptionsCol = normalisationOptions ;
if ( i = = 1 )
patches = patch ;
else
patches = [ patches ; patch ] ;
end
end
2018-05-04 09:13:50 +01:00
if ( isempty ( patches ) )
fprintf ( "Could not find CEN patch experts, for instructions of how to download them, please visit - https://github.com/TadasBaltrusaitis/OpenFace/wiki/Model-download\n" ) ;
ME = MException ( ' cenExperts : modelError ' , ' Could not find CEN model at location % s , see - https : // github . com / TadasBaltrusaitis / OpenFace / wiki / Model - download ' , [ col_patch _dir col_patch _file ] ) ;
throw ( ME ) ;
end
2016-10-03 16:46:39 -04:00
end