Merge branch 'feature-travis' into develop

This commit is contained in:
Tadas Baltrusaitis 2016-07-31 12:11:35 -04:00
commit 0445a97b0c
10 changed files with 60 additions and 13 deletions

View File

@ -64,4 +64,7 @@ script:
- cd build
- cmake -D CMAKE_BUILD_TYPE=RELEASE ..
- make -j2
- ./bin/FaceLandmarkImg -fdir "../videos/" -ofdir "./demo_img/" -oidir "./demo_img/" -wild -q
- ../build/bin/FaceLandmarkImg -fdir "../videos/" -ofdir "./demo_img/" -oidir "./demo_img/" -wild -q
- ../build/bin/FaceLandmarkVidMulti -f ../videos/multi_face.avi -q
- ../build/bin/FeatureExtraction -rigid -verbose -f "../videos/1815_01_008_tony_blair.avi" -of "output_features/1815_01_008_tony_blair.txt" -simalign output_features/aligned -q
- ../build/bin/FaceLandmarkVid -f "../videos/1815_01_008_tony_blair.avi" -f "../videos/0188_03_021_al_pacino.avi" -f "../videos/0217_03_006_alanis_morissette.avi" -f "../videos/0244_03_004_anderson_cooper.avi" -q

View File

@ -1,5 +1,10 @@
# OpenFace: an open source facial behavior analysis toolkit
Travis
[![Build Status](https://travis-ci.org/TadasBaltrusaitis/OpenFace.svg?branch=master)](https://travis-ci.org/TadasBaltrusaitis/OpenFace)
AppVeyor
[![Build status](https://ci.appveyor.com/api/projects/status/8msiklxfbhlnsmxp/branch/master?svg=true)](https://ci.appveyor.com/project/TadasBaltrusaitis/openface/branch/master)
Over the past few years, there has been an increased interest in automatic facial behavior analysis and understanding. We present OpenFace an open source tool intended for computer vision and machine learning researchers, affective computing community and people interested in building interactive applications based on facial behavior analysis. OpenFace is the first open source tool capable of facial landmark detection, head pose estimation, facial action unit recognition, and eye-gaze estimation. The computer vision algorithms which represent the core of OpenFace demonstrate state-of-the-art results in all of the above mentioned tasks. Furthermore, our tool is capable of real-time performance and is able to run from a simple webcam without any specialist hardware.
The code was written mainly by Tadas Baltrusaitis during his time at the Language Technologies Institute at the Carnegie Mellon University; Computer Laboratory, University of Cambridge; and Institute for Creative Technologies, University of Southern California.
@ -73,3 +78,4 @@ I did my best to make sure that the code runs out of the box but there are alway
Copyright can be found in the Copyright.txt
You have to respect boost, TBB, dlib, and OpenCV licenses.

26
appveyor.yml Normal file
View File

@ -0,0 +1,26 @@
version: 1.0.{build}
branches:
only:
- develop
- master
- feature-travis
configuration:
- Debug
- Release
platform:
- x64
- Win32
build:
project: OpenFace.sln
verbosity: minimal
test_script:
# C++
- cmd: dir
- cmd: if exist x64 (cd x64)
- cmd: if exist Debug (cd Debug)
- cmd: if exist Release (cd Release)
- cmd: dir
- cmd: if exist "../videos" (FaceLandmarkImg.exe -fdir "../videos/" -ofdir "./demo_img/" -oidir "./demo_img/" -wild -q) else (FaceLandmarkImg.exe -fdir "../../videos/" -ofdir "./demo_img/" -oidir "./demo_img/" -wild -q)
- cmd: if exist "../videos" (FaceLandmarkVidMulti.exe -f ../videos/multi_face.avi -q) else (FaceLandmarkVidMulti.exe -f ../../videos/multi_face.avi -q)
- cmd: if exist "../videos" (FeatureExtraction.exe -rigid -verbose -f "../videos/1815_01_008_tony_blair.avi" -of "output_features/1815_01_008_tony_blair.txt" -simalign output_features/aligned -q) else (FeatureExtraction.exe -rigid -verbose -f "../../videos/1815_01_008_tony_blair.avi" -of "output_features/1815_01_008_tony_blair.txt" -simalign output_features/aligned -q)
- cmd: if exist "../videos" (FaceLandmarkVid.exe -f "../videos/1815_01_008_tony_blair.avi" -q) else (FaceLandmarkVid.exe -f "../../videos/1815_01_008_tony_blair.avi" -q)

View File

@ -367,7 +367,7 @@ int main (int argc, char **argv)
else
{
cout << "Can't find AU prediction files, exiting" << endl;
return 0;
return 1;
}
}
@ -386,7 +386,7 @@ int main (int argc, char **argv)
if (!exists(loc))
{
cout << "Can't find triangulation files, exiting" << endl;
return 0;
return 1;
}
}

View File

@ -247,6 +247,7 @@ int main (int argc, char **argv)
if (!boost::filesystem::exists(current_file))
{
FATAL_STREAM("File does not exist");
return 1;
}
current_file = boost::filesystem::path(current_file).generic_string();
@ -264,7 +265,11 @@ int main (int argc, char **argv)
video_capture >> captured_image;
}
if( !video_capture.isOpened() ) FATAL_STREAM( "Failed to open video source" );
if (!video_capture.isOpened())
{
FATAL_STREAM("Failed to open video source");
return 1;
}
else INFO_STREAM( "Device or file opened");
cv::Mat captured_image;

View File

@ -86,7 +86,7 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<TargetName>FaceTrackingVid</TargetName>
<TargetName>FaceLandmarkVid</TargetName>
<IntDir>$(ProjectDir)$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@ -95,7 +95,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>FaceTrackingVid</TargetName>
<TargetName>FaceLandmarkVid</TargetName>
<IntDir>$(ProjectDir)$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">

View File

@ -219,7 +219,11 @@ int main (int argc, char **argv)
video_capture >> captured_image;
}
if( !video_capture.isOpened() ) FATAL_STREAM( "Failed to open video source" );
if (!video_capture.isOpened())
{
FATAL_STREAM("Failed to open video source");
return 1;
}
else INFO_STREAM( "Device or file opened");
cv::Mat captured_image;

View File

@ -84,14 +84,14 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<TargetName>FaceTrackingVidMulti</TargetName>
<TargetName>FaceLandmarkVidMulti</TargetName>
<IntDir>$(ProjectDir)$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<TargetName>FaceLandmarkVidMulti</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<TargetName>FaceTrackingVidMulti</TargetName>
<TargetName>FaceLandmarkVidMulti</TargetName>
<IntDir>$(ProjectDir)$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">

View File

@ -337,7 +337,7 @@ int main (int argc, char **argv)
if(!exists(loc))
{
cout << "Can't find triangulation files, exiting" << endl;
return 0;
return 1;
}
}
@ -378,7 +378,7 @@ int main (int argc, char **argv)
else
{
cout << "Can't find AU prediction files, exiting" << endl;
return 0;
return 1;
}
}
@ -615,7 +615,7 @@ int main (int argc, char **argv)
char name[100];
// output the frame number
std::sprintf(name, "frame_det_%06d.png", frame_count);
std::sprintf(name, "frame_det_%06d.bmp", frame_count);
// Construct the output filename
boost::filesystem::path slash("/");

View File

@ -168,7 +168,10 @@ int main (int argc, char **argv)
INFO_STREAM( "Attempting to capture from device: " << device );
vCap = cv::VideoCapture( device );
if( !vCap.isOpened() ) FATAL_STREAM( "Failed to open video source" );
if (!vCap.isOpened()) {
FATAL_STREAM("Failed to open video source");
return 1;
}
cv::Mat img;
vCap >> img;