Skip to content

Commit

Permalink
Feature/code cleanup (#580)
Browse files Browse the repository at this point in the history
- name of revision
- better scripts for model download (not only in Dropbox also OneDrive)
  • Loading branch information
TadasBaltrusaitis authored Oct 3, 2018
1 parent a2d0fee commit aa6af6f
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 29 deletions.
12 changes: 2 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,8 @@ before_install:

script:
- $CXX --version
- cd lib/local/LandmarkDetector/model/patch_experts
- wget https://www.dropbox.com/s/7na5qsjzz8yfoer/cen_patches_0.25_of.dat?dl=1
- wget https://www.dropbox.com/s/k7bj804cyiu474t/cen_patches_0.35_of.dat?dl=1
- wget https://www.dropbox.com/s/ixt4vkbmxgab1iu/cen_patches_0.50_of.dat?dl=1
- wget https://www.dropbox.com/s/2t5t1sdpshzfhpj/cen_patches_1.00_of.dat?dl=1
- mv cen_patches_0.25_of.dat?dl=1 cen_patches_0.25_of.dat
- mv cen_patches_0.35_of.dat?dl=1 cen_patches_0.35_of.dat
- mv cen_patches_0.50_of.dat?dl=1 cen_patches_0.50_of.dat
- mv cen_patches_1.00_of.dat?dl=1 cen_patches_1.00_of.dat
- cd ../../../../../
- chmod 777 ./download_models.sh
- ./download_models.sh
- mkdir build
- cd build
- cmake -D CMAKE_BUILD_TYPE=RELEASE CMAKE_CXX_FLAGS="-std=c++11" -D CMAKE_EXE_LINKER_FLAGS="-std=c++11" ..
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OpenFace 2.0.4: an open source facial behavior analysis toolkit
# OpenFace 2.0.6: an open source facial behavior analysis toolkit

[![Build Status](https://travis-ci.org/TadasBaltrusaitis/OpenFace.svg?branch=master)](https://travis-ci.org/TadasBaltrusaitis/OpenFace)
[![Build status](https://ci.appveyor.com/api/projects/status/8msiklxfbhlnsmxp/branch/master?svg=true)](https://ci.appveyor.com/project/TadasBaltrusaitis/openface/branch/master)
Expand Down
67 changes: 59 additions & 8 deletions download_models.ps1
Original file line number Diff line number Diff line change
@@ -1,12 +1,63 @@
$source = "https://www.dropbox.com/s/7na5qsjzz8yfoer/cen_patches_0.25_of.dat?dl=1"
# Download the models from the cloud (stored in Dropbox, OneDrive, and Google Drive

# Start with 0.25 scale models
$destination = "lib/local/LandmarkDetector/model/patch_experts/cen_patches_0.25_of.dat"
Invoke-WebRequest $source -OutFile $destination
$source = "https://www.dropbox.com/s/k7bj804cyiu474t/cen_patches_0.35_of.dat?dl=1"

if(!([System.IO.File]::Exists($destination)))
{
$source = "https://www.dropbox.com/s/7na5qsjzz8yfoer/cen_patches_0.25_of.dat?dl=1"
Invoke-WebRequest $source -OutFile $destination
}

if(!([System.IO.File]::Exists($destination)))
{
$source = "https://onedrive.live.com/download?cid=2E2ADA578BFF6E6E&resid=2E2ADA578BFF6E6E%2153072&authkey=AKqoZtcN0PSIZH4"
Invoke-WebRequest $source -OutFile $destination
}

# 0.35 scale models
$destination = "lib/local/LandmarkDetector/model/patch_experts/cen_patches_0.35_of.dat"
Invoke-WebRequest $source -OutFile $destination
$source = "https://www.dropbox.com/s/ixt4vkbmxgab1iu/cen_patches_0.50_of.dat?dl=1"

if(!([System.IO.File]::Exists($destination)))
{
$source = "https://www.dropbox.com/s/k7bj804cyiu474t/cen_patches_0.35_of.dat?dl=1"
Invoke-WebRequest $source -OutFile $destination
}

if(!([System.IO.File]::Exists($destination)))
{
$source = "https://onedrive.live.com/download?cid=2E2ADA578BFF6E6E&resid=2E2ADA578BFF6E6E%2153079&authkey=ANpDR1n3ckL_0gs"
Invoke-WebRequest $source -OutFile $destination
}


# 0.5 scale models
$destination = "lib/local/LandmarkDetector/model/patch_experts/cen_patches_0.50_of.dat"
Invoke-WebRequest $source -OutFile $destination
$source = "https://www.dropbox.com/s/2t5t1sdpshzfhpj/cen_patches_1.00_of.dat?dl=1"

if(!([System.IO.File]::Exists($destination)))
{
$source = "https://www.dropbox.com/s/ixt4vkbmxgab1iu/cen_patches_0.50_of.dat?dl=1"
Invoke-WebRequest $source -OutFile $destination
}

if(!([System.IO.File]::Exists($destination)))
{
$source = "https://onedrive.live.com/download?cid=2E2ADA578BFF6E6E&resid=2E2ADA578BFF6E6E%2153074&authkey=AGi-e30AfRc_zvs"
Invoke-WebRequest $source -OutFile $destination
}

# 1.0 scale models
$destination = "lib/local/LandmarkDetector/model/patch_experts/cen_patches_1.00_of.dat"
Invoke-WebRequest $source -OutFile $destination

if(!([System.IO.File]::Exists($destination)))
{
$source = "https://www.dropbox.com/s/2t5t1sdpshzfhpj/cen_patches_1.00_of.dat?dl=1"
Invoke-WebRequest $source -OutFile $destination
}

if(!([System.IO.File]::Exists($destination)))
{
$source = "https://onedrive.live.com/download?cid=2E2ADA578BFF6E6E&resid=2E2ADA578BFF6E6E%2153070&authkey=AD6KjtYipphwBPc"
Invoke-WebRequest $source -OutFile $destination
}

34 changes: 25 additions & 9 deletions download_models.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
cd lib/local/LandmarkDetector/model/patch_experts
wget https://www.dropbox.com/s/7na5qsjzz8yfoer/cen_patches_0.25_of.dat?dl=1
wget https://www.dropbox.com/s/k7bj804cyiu474t/cen_patches_0.35_of.dat?dl=1
wget https://www.dropbox.com/s/ixt4vkbmxgab1iu/cen_patches_0.50_of.dat?dl=1
wget https://www.dropbox.com/s/2t5t1sdpshzfhpj/cen_patches_1.00_of.dat?dl=1
mv cen_patches_0.25_of.dat?dl=1 cen_patches_0.25_of.dat
mv cen_patches_0.35_of.dat?dl=1 cen_patches_0.35_of.dat
mv cen_patches_0.50_of.dat?dl=1 cen_patches_0.50_of.dat
mv cen_patches_1.00_of.dat?dl=1 cen_patches_1.00_of.dat
ls

wget https://www.dropbox.com/s/7na5qsjzz8yfoer/cen_patches_0.25_of.dat
if [ $? -ne 0 ]
then
wget https://onedrive.live.com/download?cid=2E2ADA578BFF6E6E&resid=2E2ADA578BFF6E6E%2153072&authkey=AKqoZtcN0PSIZH4
fi

wget https://www.dropbox.com/s/k7bj804cyiu474t/cen_patches_0.35_of.dat
if [ $? -ne 0 ]
then
wget https://onedrive.live.com/download?cid=2E2ADA578BFF6E6E&resid=2E2ADA578BFF6E6E%2153079&authkey=ANpDR1n3ckL_0gs
fi

wget https://www.dropbox.com/s/ixt4vkbmxgab1iu/cen_patches_0.50_of.dat
if [ $? -ne 0 ]
then
wget https://onedrive.live.com/download?cid=2E2ADA578BFF6E6E&resid=2E2ADA578BFF6E6E%2153074&authkey=AGi-e30AfRc_zvs
fi

wget https://www.dropbox.com/s/2t5t1sdpshzfhpj/cen_patches_1.00_of.dat
if [ $? -ne 0 ]
then
wget https://onedrive.live.com/download?cid=2E2ADA578BFF6E6E&resid=2E2ADA578BFF6E6E%2153070&authkey=AD6KjtYipphwBPc
fi

cd ../../../../../
2 changes: 1 addition & 1 deletion exe/releases/package_windows_executables.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
clear;
version = '2.0.4';
version = '2.0.6';

out_x86 = sprintf('OpenFace_%s_win_x86', version);
out_x64 = sprintf('OpenFace_%s_win_x64', version);
Expand Down

0 comments on commit aa6af6f

Please sign in to comment.