- A bug fix in FeatureExtraction when video is shorter than 3 frames.
- A small fix in head pose experiment output
This commit is contained in:
parent
b2f5e6f6ea
commit
7b2bd15f2e
8 changed files with 10 additions and 6 deletions
|
@ -764,14 +764,16 @@ void FaceAnalyser::ExtractAllPredictionsOfflineReg(vector<std::pair<std::string,
|
||||||
// Perform a moving average of 3 frames
|
// Perform a moving average of 3 frames
|
||||||
int window_size = 3;
|
int window_size = 3;
|
||||||
vector<double> au_vals_tmp = au_iter->second;
|
vector<double> au_vals_tmp = au_iter->second;
|
||||||
for (size_t i = (window_size - 1) / 2; i < au_iter->second.size() - (window_size - 1) / 2; ++i)
|
for (int i = (window_size - 1) / 2; i < (int)au_iter->second.size() - (window_size - 1) / 2; ++i)
|
||||||
{
|
{
|
||||||
double sum = 0;
|
double sum = 0;
|
||||||
|
int count_over = 0;
|
||||||
for (int w = -(window_size - 1) / 2; w <= (window_size - 1) / 2; ++w)
|
for (int w = -(window_size - 1) / 2; w <= (window_size - 1) / 2; ++w)
|
||||||
{
|
{
|
||||||
sum += au_vals_tmp[i + w];
|
sum += au_vals_tmp[i + w];
|
||||||
|
count_over++;
|
||||||
}
|
}
|
||||||
sum = sum / window_size;
|
sum = sum / count_over;
|
||||||
|
|
||||||
au_iter->second[i] = sum;
|
au_iter->second[i] = sum;
|
||||||
}
|
}
|
||||||
|
@ -798,14 +800,16 @@ void FaceAnalyser::ExtractAllPredictionsOfflineClass(vector<std::pair<std::strin
|
||||||
// Perform a moving average of 7 frames on classifications
|
// Perform a moving average of 7 frames on classifications
|
||||||
int window_size = 7;
|
int window_size = 7;
|
||||||
vector<double> au_vals_tmp = au_vals;
|
vector<double> au_vals_tmp = au_vals;
|
||||||
for (size_t i = (window_size - 1)/2; i < au_vals.size() - (window_size - 1) / 2; ++i)
|
for (int i = (window_size - 1)/2; i < (int)au_vals.size() - (window_size - 1) / 2; ++i)
|
||||||
{
|
{
|
||||||
double sum = 0;
|
double sum = 0;
|
||||||
|
int count_over = 0;
|
||||||
for (int w = -(window_size - 1) / 2; w <= (window_size - 1) / 2; ++w)
|
for (int w = -(window_size - 1) / 2; w <= (window_size - 1) / 2; ++w)
|
||||||
{
|
{
|
||||||
sum += au_vals_tmp[i + w];
|
sum += au_vals_tmp[i + w];
|
||||||
|
count_over++;
|
||||||
}
|
}
|
||||||
sum = sum / window_size;
|
sum = sum / count_over;
|
||||||
if (sum < 0.5)
|
if (sum < 0.5)
|
||||||
sum = 0;
|
sum = 0;
|
||||||
else
|
else
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,4 +1,4 @@
|
||||||
Dataset and model, pitch, yaw, roll, mean, median
|
Dataset and model, pitch, yaw, roll, mean, median
|
||||||
biwi error: 7.955, 5.583, 4.402, 5.980, 2.624
|
biwi error: 7.955, 5.583, 4.402, 5.980, 2.624
|
||||||
bu error: 2.762, 4.103, 2.568, 3.145, 2.118
|
bu error: 2.762, 4.103, 2.568, 3.145, 2.118
|
||||||
ict error: 3.619, 3.606, 3.625, 3.617, 2.027
|
ict error: 3.620, 3.608, 3.626, 3.618, 2.028
|
||||||
|
|
|
@ -41,7 +41,7 @@ for i=3:numTogether:numel(dbSeqDir)
|
||||||
inputFile = [ictDir dbSeqDir(i+n).name '/colour undist.avi'];
|
inputFile = [ictDir dbSeqDir(i+n).name '/colour undist.avi'];
|
||||||
outputFile = [outputDir dbSeqDir(i+n).name '.txt'];
|
outputFile = [outputDir dbSeqDir(i+n).name '.txt'];
|
||||||
|
|
||||||
command = cat(2, command, [' -f "' inputFile '" -op "' outputFile '" ']);
|
command = cat(2, command, [' -f "' inputFile '" -of "' outputFile '" ']);
|
||||||
|
|
||||||
if(depth)
|
if(depth)
|
||||||
dDir = [ictDir dbSeqDir(i+n).name '/depthAligned/'];
|
dDir = [ictDir dbSeqDir(i+n).name '/depthAligned/'];
|
||||||
|
|
Loading…
Reference in a new issue