-
Notifications
You must be signed in to change notification settings - Fork 291
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
291 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule DlibDotNet
updated
151 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
git submodule update --init --recursive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
git submodule update --init --recursive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nuget pack FaceRecognitionDotNet.ARM.nuspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nuget pack FaceRecognitionDotNet.CPU.nuspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@set target=101 100 92 | ||
|
||
for %%t in (%target%) do ( | ||
nuget pack FaceRecognitionDotNet.CUDA%%t.nuspec | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nuget pack FaceRecognitionDotNet.MKL.nuspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dotnet restore ..\src\FaceRecognitionDotNet | ||
dotnet build -c Release ..\src\FaceRecognitionDotNet |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0"?> | ||
<package > | ||
<metadata> | ||
<id>FaceRecognitionDotNet.CUDA101</id> | ||
<version>1.2.3.13</version> | ||
<title>FaceRecognitionDotNet for CUDA 10.1</title> | ||
<authors>Takuya Takeuchi</authors> | ||
<owners>Takuya Takeuchi</owners> | ||
<requireLicenseAcceptance>true</requireLicenseAcceptance> | ||
<license type="file">LICENSE.txt</license> | ||
<projectUrl>https://github.com/takuya-takeuchi/FaceRecognitionDotNet</projectUrl> | ||
<iconUrl>https://github.com/takuya-takeuchi/FaceRecognitionDotNet/blob/master/nuget/face128.png?raw=true</iconUrl> | ||
<description>The world's simplest facial recognition api for .NET | ||
|
||
This library is ported from https://github.com/ageitgey/face_recognition by C#.</description> | ||
<releaseNotes></releaseNotes> | ||
<copyright>© Takuya Takeuchi 2018-2019</copyright> | ||
<tags>.net machinelearning face-recognition</tags> | ||
<serviceable>true</serviceable> | ||
<dependencies> | ||
<group targetFramework="netstandard2.0"> | ||
<dependency id="DlibDotNet.CUDA101" version="19.17.0.20190623" /> | ||
</group> | ||
</dependencies> | ||
</metadata> | ||
<files> | ||
<file src="..\src\FaceRecognitionDotNet\bin\Release\netstandard2.0\FaceRecognitionDotNet.dll" target="lib\netstandard2.0" /> | ||
<file src="..\src\FaceRecognitionDotNet\bin\Release\netstandard2.0\FaceRecognitionDotNet.xml" target="lib\netstandard2.0" /> | ||
<file src="..\src\FaceRecognitionDotNet\docs\ja\*.xml" target="lib\netstandard2.0\ja" /> | ||
|
||
<!-- license --> | ||
<file src="..\LICENSE.txt" target="" /> | ||
</files> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0"?> | ||
<package > | ||
<metadata> | ||
<id>FaceRecognitionDotNet.MKL</id> | ||
<version>1.2.3.13</version> | ||
<title>FaceRecognitionDotNet for MKL</title> | ||
<authors>Takuya Takeuchi</authors> | ||
<owners>Takuya Takeuchi</owners> | ||
<requireLicenseAcceptance>true</requireLicenseAcceptance> | ||
<license type="file">LICENSE.txt</license> | ||
<projectUrl>https://github.com/takuya-takeuchi/FaceRecognitionDotNet</projectUrl> | ||
<iconUrl>https://github.com/takuya-takeuchi/FaceRecognitionDotNet/blob/master/nuget/face128.png?raw=true</iconUrl> | ||
<description>The world's simplest facial recognition api for .NET | ||
|
||
This library is ported from https://github.com/ageitgey/face_recognition by C#.</description> | ||
<releaseNotes></releaseNotes> | ||
<copyright>© Takuya Takeuchi 2018-2019</copyright> | ||
<tags>.net machinelearning face-recognition</tags> | ||
<serviceable>true</serviceable> | ||
<dependencies> | ||
<group targetFramework="netstandard2.0"> | ||
<dependency id="DlibDotNet.MKL" version="19.17.0.20190623" /> | ||
</group> | ||
</dependencies> | ||
</metadata> | ||
<files> | ||
<file src="..\src\FaceRecognitionDotNet\bin\Release\netstandard2.0\FaceRecognitionDotNet.dll" target="lib\netstandard2.0" /> | ||
<file src="..\src\FaceRecognitionDotNet\bin\Release\netstandard2.0\FaceRecognitionDotNet.xml" target="lib\netstandard2.0" /> | ||
<file src="..\src\FaceRecognitionDotNet\docs\ja\*.xml" target="lib\netstandard2.0\ja" /> | ||
|
||
<!-- license --> | ||
<file src="..\LICENSE.txt" target="" /> | ||
</files> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash | ||
|
||
VERSION=$1 | ||
OS='osx' | ||
OSVERSION=$4 | ||
|
||
CURDIR=${pwd} | ||
FRDNROOT=`dirname $(pwd)` | ||
WORK=${FRDNROOT}/work | ||
|
||
packages=( | ||
"FaceRecognitionDotNet" | ||
"FaceRecognitionDotNet.MKL" | ||
#"cuda" | ||
) | ||
|
||
for package in "${packages[@]}" ; do | ||
PACKAGE=$package | ||
TESTDIR=${FRDNROOT}/nuget/artifacts/test/${PACKAGE}.${VERSION}/${OS} | ||
|
||
mkdir -p ${WORK} | ||
mkdir -p ${TESTDIR} | ||
|
||
cp -Rf ${FRDNROOT}/test/FaceRecognitionDotNet.Tests ${WORK} | ||
cd ${WORK}/FaceRecognitionDotNet.Tests | ||
|
||
# delete local project reference | ||
dotnet remove reference ../../DlibDotNet/src/DlibDotNet\DlibDotNet.csproj > /dev/null 2>&1 | ||
dotnet remove reference ../../src/FaceRecognitionDotNet/FaceRecognitionDotNet.csproj > /dev/null 2>&1 | ||
|
||
# restore package from local nuget pacakge | ||
# And drop stdout message | ||
dotnet add package $PACKAGE -v $VERSION --source ${FRDNROOT}/nuget/ > /dev/null 2>&1 | ||
|
||
dotnet test -c Release -r ${TESTDIR} --logger trx | ||
|
||
if [ $? -eq 0 ]; then | ||
echo "Test Successful" | ||
else | ||
echo "Test Fail for $package" | ||
cd $CURDIR | ||
exit -1 | ||
fi | ||
|
||
# move to current | ||
cd $CURDIR | ||
|
||
# to make sure, delete | ||
if [ -e ${WORK} ]; then | ||
rm -Rf ${WORK} | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
#*************************************** | ||
#Arguments | ||
#%1: Version of Release (1.2.3.0) | ||
#*************************************** | ||
Param([Parameter( | ||
Mandatory=$True, | ||
Position = 1 | ||
)][string] | ||
$Version | ||
) | ||
|
||
$OperatingSystem="windows" | ||
$Distribution="windows" | ||
$DistributionVersion="16" | ||
|
||
# Store current directory | ||
$Current = Get-Location | ||
$FaceRecognitionDotNetRoot = (Split-Path (Get-Location) -Parent) | ||
|
||
$ArchitectureHash = @{32 = "x86"; 64 = "x64"} | ||
|
||
$BuildTargets = @() | ||
$BuildTargets += New-Object PSObject -Property @{Target = "cpu"; Architecture = 64; CUDA = 0; Package = "FaceRecognitionDotNet" } | ||
$BuildTargets += New-Object PSObject -Property @{Target = "cuda"; Architecture = 64; CUDA = 92; Package = "FaceRecognitionDotNet.CUDA92" } | ||
$BuildTargets += New-Object PSObject -Property @{Target = "cuda"; Architecture = 64; CUDA = 100; Package = "FaceRecognitionDotNet.CUDA100" } | ||
$BuildTargets += New-Object PSObject -Property @{Target = "cuda"; Architecture = 64; CUDA = 101; Package = "FaceRecognitionDotNet.CUDA101" } | ||
$BuildTargets += New-Object PSObject -Property @{Target = "mkl"; Architecture = 64; CUDA = 0; Package = "FaceRecognitionDotNet.MKL" } | ||
|
||
|
||
# For FaceRecognitionDotNet.CUDA92 | ||
$tmp92 = New-Object 'System.Collections.Generic.List[string]' | ||
$tmp92.Add("$env:CUDA_PATH_V9_2\bin\cublas64_92.dll") | ||
$tmp92.Add("$env:CUDA_PATH_V9_2\bin\cudnn64_7.dll") | ||
$tmp92.Add("$env:CUDA_PATH_V9_2\bin\curand64_92.dll") | ||
$tmp92.Add("$env:CUDA_PATH_V9_2\bin\cusolver64_92.dll") | ||
|
||
# For FaceRecognitionDotNet.CUDA100 | ||
$tmp100 = New-Object 'System.Collections.Generic.List[string]' | ||
$tmp100.Add("$env:CUDA_PATH_V10_0\bin\cublas64_100.dll") | ||
$tmp100.Add("$env:CUDA_PATH_V10_0\bin\cudnn64_7.dll") | ||
$tmp100.Add("$env:CUDA_PATH_V10_0\bin\curand64_100.dll") | ||
$tmp100.Add("$env:CUDA_PATH_V10_0\bin\cusolver64_100.dll") | ||
|
||
# For FaceRecognitionDotNet.CUDA101 | ||
$tmp101 = New-Object 'System.Collections.Generic.List[string]' | ||
$tmp101.Add("$env:CUDA_PATH_V10_1\bin\cublas64_10.dll") | ||
$tmp101.Add("$env:CUDA_PATH_V10_1\bin\cudnn64_7.dll") | ||
$tmp101.Add("$env:CUDA_PATH_V10_1\bin\curand64_10.dll") | ||
$tmp101.Add("$env:CUDA_PATH_V10_1\bin\cusolver64_10.dll") | ||
|
||
# For mkl | ||
$tmpmkl = New-Object 'System.Collections.Generic.List[string]' | ||
$tmpmkl.Add("$env:MKL_WIN\redist\intel64_win\mkl\mkl_core.dll") | ||
$tmpmkl.Add("$env:MKL_WIN\redist\intel64_win\mkl\mkl_intel_thread.dll") | ||
$tmpmkl.Add("$env:MKL_WIN\redist\intel64_win\mkl\mkl_avx2.dll") | ||
$tmpmkl.Add("$env:MKL_WIN\redist\intel64_win\compiler\libiomp5md.dll") | ||
|
||
$DependencyHash = @{"FaceRecognitionDotNet.CUDA92" = $tmp92; | ||
"FaceRecognitionDotNet.CUDA100" = $tmp100; | ||
"FaceRecognitionDotNet.CUDA101" = $tmp101; | ||
"FaceRecognitionDotNet.MKL" = $tmpmkl} | ||
|
||
foreach($BuildTarget in $BuildTargets) | ||
{ | ||
$target = $BuildTarget.Target | ||
$architecture = $BuildTarget.Architecture | ||
$package = $BuildTarget.Package | ||
|
||
|
||
# Test | ||
$WorkDir = Join-Path $FaceRecognitionDotNetRoot work | ||
$NugetDir = Join-Path $FaceRecognitionDotNetRoot nuget | ||
$TestDir = Join-Path $NugetDir artifacts | ` | ||
Join-Path -ChildPath test | ` | ||
Join-Path -ChildPath $package | ` | ||
Join-Path -ChildPath $Version | ` | ||
Join-Path -ChildPath $OperatingSystem | ||
|
||
if (!(Test-Path "$WorkDir")) { | ||
New-Item "$WorkDir" -ItemType Directory > $null | ||
} | ||
if (!(Test-Path "$TestDir")) { | ||
New-Item "$TestDir" -ItemType Directory > $null | ||
} | ||
|
||
$NativeTestDir = Join-Path $FaceRecognitionDotNetRoot test | ` | ||
Join-Path -ChildPath FaceRecognitionDotNet.Tests | ||
|
||
$TargetDir = Join-Path $WorkDir FaceRecognitionDotNet.Tests | ||
if (Test-Path "$TargetDir") { | ||
Remove-Item -Path "$TargetDir" -Recurse -Force | ||
} | ||
|
||
Copy-Item "$NativeTestDir" "$WorkDir" -Recurse | ||
|
||
Set-Location -Path "$TargetDir" | ||
|
||
# delete local project reference | ||
dotnet remove reference ..\..\DlibDotNet\src\DlibDotNet\DlibDotNet.csproj > $null | ||
dotnet remove reference ..\..\src\FaceRecognitionDotNet\FaceRecognitionDotNet.csproj > $null | ||
|
||
# restore package from local nuget pacakge | ||
# And drop stdout message | ||
dotnet add package $package -v $VERSION --source "$NugetDir" > $null | ||
|
||
# Copy Dependencies | ||
$OutDir = Join-Path $TargetDir bin | ` | ||
Join-Path -ChildPath Release | ` | ||
Join-Path -ChildPath netcoreapp2.0 | ||
New-Item "$OutDir" -ItemType Directory > $null | ||
|
||
if ($DependencyHash.Contains($package)) | ||
{ | ||
foreach($Dependency in $DependencyHash[$package]) | ||
{ | ||
Copy-Item "$Dependency" "$OutDir" | ||
} | ||
} | ||
|
||
$ErrorActionPreference = "silentlycontinue" | ||
dotnet test -c Release -r "$TestDir" --logger trx | ||
|
||
if ($lastexitcode -eq 0) { | ||
Write-Host "Test Successful" -ForegroundColor Green | ||
} else { | ||
Write-Host "Test Fail for $package" -ForegroundColor Red | ||
Set-Location -Path $Current | ||
exit -1 | ||
} | ||
|
||
$ErrorActionPreference = "continue" | ||
|
||
# move to current | ||
Set-Location -Path "$Current" | ||
|
||
# to make sure, delete | ||
if (Test-Path "$WorkDir") { | ||
Remove-Item -Path "$WorkDir" -Recurse -Force | ||
} | ||
} | ||
|
||
# Move to Root directory | ||
Set-Location -Path $Current |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.trx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters