Dealing better with online mode in feature extraction.
This commit is contained in:
parent
77cf256dc3
commit
c5749cc3ba
2 changed files with 8 additions and 11 deletions
|
@ -134,6 +134,8 @@ int main (int argc, char **argv)
|
|||
if (sequence_reader.IsWebcam())
|
||||
{
|
||||
INFO_STREAM("WARNING: using a webcam in feature extraction, Action Unit predictions will not be as accurate in real-time webcam mode");
|
||||
INFO_STREAM("WARNING: using a webcam in feature extraction, forcing visualization of tracking to allow quitting the application (press q)");
|
||||
visualizer.vis_track = true;
|
||||
}
|
||||
|
||||
cv::Mat captured_image;
|
||||
|
|
|
@ -478,21 +478,16 @@ void FaceAnalyser::AddNextFrame(const cv::Mat& frame, const cv::Mat_<float>& det
|
|||
if (online)
|
||||
{
|
||||
AU_predictions_reg_corrected = CorrectOnlineAUs(AU_predictions_reg, orientation_to_use, true, false, success, true);
|
||||
}
|
||||
|
||||
if(online)
|
||||
{
|
||||
AU_predictions_reg = AU_predictions_reg_corrected;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
// Useful for prediction corrections (calibration after the whole video is processed)
|
||||
if (success && frames_tracking_succ - 1 < max_init_frames)
|
||||
{
|
||||
hog_desc_frames_init.push_back(hog_descriptor);
|
||||
geom_descriptor_frames_init.push_back(geom_descriptor_frame);
|
||||
views.push_back(orientation_to_use);
|
||||
}
|
||||
}
|
||||
|
||||
this->current_time_seconds = timestamp_seconds;
|
||||
|
||||
|
|
Loading…
Reference in a new issue