diff --git a/DlibDotNet.sln b/DlibDotNet.sln index ea773eca..e957d763 100644 --- a/DlibDotNet.sln +++ b/DlibDotNet.sln @@ -39,7 +39,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "3DPointCloud", "examples\3D EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Surf", "examples\Surf\Surf.csproj", "{6E027771-5500-4555-822C-C7FE6AC8709D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DlibDotNet.Extensions", "src\DlibDotNet.Extensions\DlibDotNet.Extensions.csproj", "{D3BFF103-53CB-46DC-A0E8-05A01E11099B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DlibDotNet.Extensions", "src\DlibDotNet.Extensions\DlibDotNet.Extensions.csproj", "{D3BFF103-53CB-46DC-A0E8-05A01E11099B}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WinForms", "WinForms", "{4082257D-FC8E-4D37-8489-89AAFC9D4A38}" EndProject @@ -53,7 +53,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FaceLandmarkDetection", "ex EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FaceLandmarkDetection", "examples\WPF\FaceLandmarkDetection\FaceLandmarkDetection.csproj", "{9575AC94-3760-483F-9403-A77E7CFE8F47}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DlibDotNet.Extensions.Tests", "test\DlibDotNet.Extensions.Tests\DlibDotNet.Extensions.Tests.csproj", "{2A75C8B3-5122-4E7E-A0CF-A0AD5FFA60B2}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DlibDotNet.Extensions.Tests", "test\DlibDotNet.Extensions.Tests\DlibDotNet.Extensions.Tests.csproj", "{2A75C8B3-5122-4E7E-A0CF-A0AD5FFA60B2}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DnnFaceRecognition", "examples\DnnFaceRecognition\DnnFaceRecognition.csproj", "{C6EFE2AC-63BD-4574-B4A1-9AC80CA5AD2E}" EndProject @@ -141,6 +141,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Svm", "examples\Svm\Svm.csp EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SvmPegasos", "examples\SvmPegasos\SvmPegasos.csproj", "{BF95F4C0-67F0-426A-945C-DD38348F4A4C}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ASP.NET", "ASP.NET", "{D2D6D0D7-7544-4730-A34E-DAE2588B55D8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FaceDetection.Client", "examples\ASP.NET\FaceDetection.Client\FaceDetection.Client.csproj", "{EBACC7C9-4376-4D04-BFBB-12D5E7ABCD37}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FaceDetection.Server", "examples\ASP.NET\FaceDetection.Server\FaceDetection.Server.csproj", "{DCD4F84F-91D6-4936-AD45-890127D9EF54}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1085,6 +1091,38 @@ Global {BF95F4C0-67F0-426A-945C-DD38348F4A4C}.Release|x64.Build.0 = Release|Any CPU {BF95F4C0-67F0-426A-945C-DD38348F4A4C}.Release|x86.ActiveCfg = Release|Any CPU {BF95F4C0-67F0-426A-945C-DD38348F4A4C}.Release|x86.Build.0 = Release|Any CPU + {EBACC7C9-4376-4D04-BFBB-12D5E7ABCD37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EBACC7C9-4376-4D04-BFBB-12D5E7ABCD37}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EBACC7C9-4376-4D04-BFBB-12D5E7ABCD37}.Debug|ARM.ActiveCfg = Debug|Any CPU + {EBACC7C9-4376-4D04-BFBB-12D5E7ABCD37}.Debug|ARM.Build.0 = Debug|Any CPU + {EBACC7C9-4376-4D04-BFBB-12D5E7ABCD37}.Debug|x64.ActiveCfg = Debug|Any CPU + {EBACC7C9-4376-4D04-BFBB-12D5E7ABCD37}.Debug|x64.Build.0 = Debug|Any CPU + {EBACC7C9-4376-4D04-BFBB-12D5E7ABCD37}.Debug|x86.ActiveCfg = Debug|Any CPU + {EBACC7C9-4376-4D04-BFBB-12D5E7ABCD37}.Debug|x86.Build.0 = Debug|Any CPU + {EBACC7C9-4376-4D04-BFBB-12D5E7ABCD37}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EBACC7C9-4376-4D04-BFBB-12D5E7ABCD37}.Release|Any CPU.Build.0 = Release|Any CPU + {EBACC7C9-4376-4D04-BFBB-12D5E7ABCD37}.Release|ARM.ActiveCfg = Release|Any CPU + {EBACC7C9-4376-4D04-BFBB-12D5E7ABCD37}.Release|ARM.Build.0 = Release|Any CPU + {EBACC7C9-4376-4D04-BFBB-12D5E7ABCD37}.Release|x64.ActiveCfg = Release|Any CPU + {EBACC7C9-4376-4D04-BFBB-12D5E7ABCD37}.Release|x64.Build.0 = Release|Any CPU + {EBACC7C9-4376-4D04-BFBB-12D5E7ABCD37}.Release|x86.ActiveCfg = Release|Any CPU + {EBACC7C9-4376-4D04-BFBB-12D5E7ABCD37}.Release|x86.Build.0 = Release|Any CPU + {DCD4F84F-91D6-4936-AD45-890127D9EF54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DCD4F84F-91D6-4936-AD45-890127D9EF54}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DCD4F84F-91D6-4936-AD45-890127D9EF54}.Debug|ARM.ActiveCfg = Debug|Any CPU + {DCD4F84F-91D6-4936-AD45-890127D9EF54}.Debug|ARM.Build.0 = Debug|Any CPU + {DCD4F84F-91D6-4936-AD45-890127D9EF54}.Debug|x64.ActiveCfg = Debug|x64 + {DCD4F84F-91D6-4936-AD45-890127D9EF54}.Debug|x64.Build.0 = Debug|x64 + {DCD4F84F-91D6-4936-AD45-890127D9EF54}.Debug|x86.ActiveCfg = Debug|Any CPU + {DCD4F84F-91D6-4936-AD45-890127D9EF54}.Debug|x86.Build.0 = Debug|Any CPU + {DCD4F84F-91D6-4936-AD45-890127D9EF54}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DCD4F84F-91D6-4936-AD45-890127D9EF54}.Release|Any CPU.Build.0 = Release|Any CPU + {DCD4F84F-91D6-4936-AD45-890127D9EF54}.Release|ARM.ActiveCfg = Release|Any CPU + {DCD4F84F-91D6-4936-AD45-890127D9EF54}.Release|ARM.Build.0 = Release|Any CPU + {DCD4F84F-91D6-4936-AD45-890127D9EF54}.Release|x64.ActiveCfg = Release|x64 + {DCD4F84F-91D6-4936-AD45-890127D9EF54}.Release|x64.Build.0 = Release|x64 + {DCD4F84F-91D6-4936-AD45-890127D9EF54}.Release|x86.ActiveCfg = Release|Any CPU + {DCD4F84F-91D6-4936-AD45-890127D9EF54}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1154,6 +1192,9 @@ Global {F5C085BB-3525-40B5-B619-74BC2C229104} = {19C83FDC-2BC9-42D6-9F51-3A0B822FABAD} {2CD4DF53-113C-4859-82BE-E0173A12B3D4} = {19C83FDC-2BC9-42D6-9F51-3A0B822FABAD} {BF95F4C0-67F0-426A-945C-DD38348F4A4C} = {19C83FDC-2BC9-42D6-9F51-3A0B822FABAD} + {D2D6D0D7-7544-4730-A34E-DAE2588B55D8} = {19C83FDC-2BC9-42D6-9F51-3A0B822FABAD} + {EBACC7C9-4376-4D04-BFBB-12D5E7ABCD37} = {D2D6D0D7-7544-4730-A34E-DAE2588B55D8} + {DCD4F84F-91D6-4936-AD45-890127D9EF54} = {D2D6D0D7-7544-4730-A34E-DAE2588B55D8} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9D3A508A-1F0B-4364-9FEC-16AF376DA11D} diff --git a/docker/base/centos/7/cuda/10.0/Dockerfile b/docker/base/centos/7/cuda/10.0/Dockerfile index 045283ae..155e86bf 100644 --- a/docker/base/centos/7/cuda/10.0/Dockerfile +++ b/docker/base/centos/7/cuda/10.0/Dockerfile @@ -2,10 +2,10 @@ FROM nvidia/cuda:10.0-cudnn7-devel-centos7 LABEL maintainer "Takuya Takeuchi " # install package to build -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ ca-certificates RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ libX11-devel \ lapack-devel \ openblas-devel \ diff --git a/docker/base/centos/7/cuda/10.1/Dockerfile b/docker/base/centos/7/cuda/10.1/Dockerfile index 7e8ec29c..00aad887 100644 --- a/docker/base/centos/7/cuda/10.1/Dockerfile +++ b/docker/base/centos/7/cuda/10.1/Dockerfile @@ -2,10 +2,10 @@ FROM nvidia/cuda:10.1-cudnn7-devel-centos7 LABEL maintainer "Takuya Takeuchi " # install package to build -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ ca-certificates RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ libX11-devel \ lapack-devel \ openblas-devel \ diff --git a/docker/base/centos/7/cuda/10.2/Dockerfile b/docker/base/centos/7/cuda/10.2/Dockerfile index 916787d4..9aa6661e 100644 --- a/docker/base/centos/7/cuda/10.2/Dockerfile +++ b/docker/base/centos/7/cuda/10.2/Dockerfile @@ -2,10 +2,10 @@ FROM nvidia/cuda:10.2-cudnn7-devel-centos7 LABEL maintainer "Takuya Takeuchi " # install package to build -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ ca-certificates RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ libX11-devel \ lapack-devel \ openblas-devel \ diff --git a/docker/base/centos/7/cuda/11.0/Dockerfile b/docker/base/centos/7/cuda/11.0/Dockerfile index 40595c3b..1351b75c 100644 --- a/docker/base/centos/7/cuda/11.0/Dockerfile +++ b/docker/base/centos/7/cuda/11.0/Dockerfile @@ -1,11 +1,11 @@ -FROM nvidia/cuda:11.0-cudnn8-devel-centos7 +FROM nvidia/cuda:11.0.3-cudnn8-devel-centos7 LABEL maintainer "Takuya Takeuchi " # install package to build -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ ca-certificates RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ libX11-devel \ lapack-devel \ openblas-devel \ diff --git a/docker/base/centos/7/cuda/11.1/Dockerfile b/docker/base/centos/7/cuda/11.1/Dockerfile index 06a2e64c..8ca4adc3 100644 --- a/docker/base/centos/7/cuda/11.1/Dockerfile +++ b/docker/base/centos/7/cuda/11.1/Dockerfile @@ -1,11 +1,11 @@ -FROM nvidia/cuda:11.1-cudnn8-devel-centos7 +FROM nvidia/cuda:11.1.1-cudnn8-devel-centos7 LABEL maintainer "Takuya Takeuchi " # install package to build -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ ca-certificates RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ libX11-devel \ lapack-devel \ openblas-devel \ diff --git a/docker/base/centos/7/cuda/9.2/Dockerfile b/docker/base/centos/7/cuda/9.2/Dockerfile index 1d3ace1a..c3657b54 100644 --- a/docker/base/centos/7/cuda/9.2/Dockerfile +++ b/docker/base/centos/7/cuda/9.2/Dockerfile @@ -2,10 +2,10 @@ FROM nvidia/cuda:9.2-cudnn7-devel-centos7 LABEL maintainer "Takuya Takeuchi " # install package to build -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ ca-certificates RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ libX11-devel \ lapack-devel \ openblas-devel \ diff --git a/docker/devel/centos/7/cuda/10.0/Dockerfile b/docker/devel/centos/7/cuda/10.0/Dockerfile index 250c8883..231cdc3f 100644 --- a/docker/devel/centos/7/cuda/10.0/Dockerfile +++ b/docker/devel/centos/7/cuda/10.0/Dockerfile @@ -2,10 +2,10 @@ FROM nvidia/cuda:10.0-cudnn7-devel-centos7 LABEL maintainer "Takuya Takeuchi " # install package to build -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ ca-certificates RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ libX11-devel \ lapack-devel \ openblas-devel \ @@ -27,10 +27,10 @@ ENV LD_LIBRARY_PATH $NCCL_ROOT/lib/:$LD_LIBRARY_PATH ENV LIBRARY_PATH $NCCL_ROOT/lib/:$LIBRARY_PATH # Register Microsoft key and feed -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ curl RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/microsoft.repo -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ powershell \ && yum clean all diff --git a/docker/devel/centos/7/cuda/10.1/Dockerfile b/docker/devel/centos/7/cuda/10.1/Dockerfile index 32b35c9f..862c285b 100644 --- a/docker/devel/centos/7/cuda/10.1/Dockerfile +++ b/docker/devel/centos/7/cuda/10.1/Dockerfile @@ -2,10 +2,10 @@ FROM nvidia/cuda:10.1-cudnn7-devel-centos7 LABEL maintainer "Takuya Takeuchi " # install package to build -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ ca-certificates RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ libX11-devel \ lapack-devel \ openblas-devel \ @@ -27,10 +27,10 @@ ENV LD_LIBRARY_PATH $NCCL_ROOT/lib/:$LD_LIBRARY_PATH ENV LIBRARY_PATH $NCCL_ROOT/lib/:$LIBRARY_PATH # Register Microsoft key and feed -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ curl RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/microsoft.repo -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ powershell \ && yum clean all diff --git a/docker/devel/centos/7/cuda/10.2/Dockerfile b/docker/devel/centos/7/cuda/10.2/Dockerfile index 47f68182..37f6fe54 100644 --- a/docker/devel/centos/7/cuda/10.2/Dockerfile +++ b/docker/devel/centos/7/cuda/10.2/Dockerfile @@ -2,10 +2,10 @@ FROM nvidia/cuda:10.2-cudnn7-devel-centos7 LABEL maintainer "Takuya Takeuchi " # install package to build -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ ca-certificates RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ libX11-devel \ lapack-devel \ openblas-devel \ @@ -27,10 +27,10 @@ ENV LD_LIBRARY_PATH $NCCL_ROOT/lib/:$LD_LIBRARY_PATH ENV LIBRARY_PATH $NCCL_ROOT/lib/:$LIBRARY_PATH # Register Microsoft key and feed -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ curl RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/microsoft.repo -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ powershell \ && yum clean all diff --git a/docker/devel/centos/7/cuda/11.0/Dockerfile b/docker/devel/centos/7/cuda/11.0/Dockerfile index 69d6de0d..43dad143 100644 --- a/docker/devel/centos/7/cuda/11.0/Dockerfile +++ b/docker/devel/centos/7/cuda/11.0/Dockerfile @@ -1,11 +1,11 @@ -FROM nvidia/cuda:11.0-cudnn8-devel-centos7 +FROM nvidia/cuda:11.0.3-cudnn8-devel-centos7 LABEL maintainer "Takuya Takeuchi " # install package to build -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ ca-certificates RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ libX11-devel \ lapack-devel \ openblas-devel \ @@ -27,10 +27,10 @@ ENV LD_LIBRARY_PATH $NCCL_ROOT/lib/:$LD_LIBRARY_PATH ENV LIBRARY_PATH $NCCL_ROOT/lib/:$LIBRARY_PATH # Register Microsoft key and feed -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ curl RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/microsoft.repo -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ powershell \ && yum clean all diff --git a/docker/devel/centos/7/cuda/11.1/Dockerfile b/docker/devel/centos/7/cuda/11.1/Dockerfile index 70526a8b..788bffde 100644 --- a/docker/devel/centos/7/cuda/11.1/Dockerfile +++ b/docker/devel/centos/7/cuda/11.1/Dockerfile @@ -1,11 +1,11 @@ -FROM nvidia/cuda:11.1-cudnn8-devel-centos7 +FROM nvidia/cuda:11.1.1-cudnn8-devel-centos7 LABEL maintainer "Takuya Takeuchi " # install package to build -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ ca-certificates RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ libX11-devel \ lapack-devel \ openblas-devel \ @@ -27,10 +27,10 @@ ENV LD_LIBRARY_PATH $NCCL_ROOT/lib/:$LD_LIBRARY_PATH ENV LIBRARY_PATH $NCCL_ROOT/lib/:$LIBRARY_PATH # Register Microsoft key and feed -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ curl RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/microsoft.repo -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ powershell \ && yum clean all diff --git a/docker/devel/centos/7/cuda/9.2/Dockerfile b/docker/devel/centos/7/cuda/9.2/Dockerfile index dd94dfe2..b1c6e1b2 100644 --- a/docker/devel/centos/7/cuda/9.2/Dockerfile +++ b/docker/devel/centos/7/cuda/9.2/Dockerfile @@ -2,10 +2,10 @@ FROM nvidia/cuda:9.2-cudnn7-devel-centos7 LABEL maintainer "Takuya Takeuchi " # install package to build -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ ca-certificates RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ libX11-devel \ lapack-devel \ openblas-devel \ @@ -27,10 +27,10 @@ ENV LD_LIBRARY_PATH $NCCL_ROOT/lib/:$LD_LIBRARY_PATH ENV LIBRARY_PATH $NCCL_ROOT/lib/:$LIBRARY_PATH # Register Microsoft key and feed -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ curl RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/microsoft.repo -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ powershell \ && yum clean all diff --git a/docker/runtime/centos/7/Dockerfile b/docker/runtime/centos/7/Dockerfile index 41a83557..501fd7e8 100644 --- a/docker/runtime/centos/7/Dockerfile +++ b/docker/runtime/centos/7/Dockerfile @@ -10,9 +10,14 @@ RUN rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-p # Install the .NET SDK ENV DOTNET_SDK_VERSION 2.1.802 -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ dotnet-sdk-2.1 \ && yum clean all +# Install gdi++ +RUN yum install -y \ + libgdiplus \ + && yum clean all + # Trigger first run experience by running arbitrary cmd to populate local package cache RUN dotnet help diff --git a/examples/ASP.NET/FaceDetection.Client/.gitignore b/examples/ASP.NET/FaceDetection.Client/.gitignore new file mode 100644 index 00000000..e811ebc6 --- /dev/null +++ b/examples/ASP.NET/FaceDetection.Client/.gitignore @@ -0,0 +1,3 @@ +Server +*.jar +result.jpg \ No newline at end of file diff --git a/examples/ASP.NET/FaceDetection.Client/FaceDetection.Client.csproj b/examples/ASP.NET/FaceDetection.Client/FaceDetection.Client.csproj new file mode 100644 index 00000000..87beb0ba --- /dev/null +++ b/examples/ASP.NET/FaceDetection.Client/FaceDetection.Client.csproj @@ -0,0 +1,23 @@ + + + + Exe + netcoreapp3.1 + FaceDetection.Client + FaceDetection.Client + + + + Server/src/FaceDetection.Server.Test/*/*.cs;$(DefaultItemExcludes) + + + + + + + + + + + + diff --git a/examples/ASP.NET/FaceDetection.Client/Program.cs b/examples/ASP.NET/FaceDetection.Client/Program.cs new file mode 100644 index 00000000..adbece3c --- /dev/null +++ b/examples/ASP.NET/FaceDetection.Client/Program.cs @@ -0,0 +1,71 @@ +using System; +using System.Drawing; +using System.IO; +using FaceDetection.Server.Api; +using Image = FaceDetection.Server; + +namespace FaceDetection.Client +{ + + internal class Program + { + + #region Methods + + private static void Main(string[] args) + { + if (args.Length != 2) + { + Console.WriteLine("[Error] FaceDetectionClient "); + return; + } + + var url = args[0]; + var file = args[1]; + if (!File.Exists(file)) + { + Console.WriteLine($"[Error] '{file}' does not exist"); + return; + } + + var api = new FaceDetectionApi(url); + try + { + var image = new Server.Model.Image(File.ReadAllBytes(file)); + var result = api.ApiFaceDetectionLocationsPostWithHttpInfo(image); + if (result.StatusCode != System.Net.HttpStatusCode.OK) + { + Console.WriteLine($"[Error] API returns {result.StatusCode}"); + return; + } + + Console.WriteLine($"[Info] Find {result.Data.Count} faces"); + + using (var ms = new MemoryStream(image.Data)) + using (var bitmap = (Bitmap)System.Drawing.Image.FromStream(ms)) + using(var g = Graphics.FromImage(bitmap)) + using (var pen = new Pen(Color.Red, 2)) + { + foreach (var area in result.Data) + { + var x = area.Left; + var y = area.Top; + var w = area.Right - x; + var h = area.Bottom - y; + g.DrawRectangle(pen, x, y, w, h); + } + + bitmap.Save("result.jpg"); + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + #endregion + + } + +} diff --git a/examples/ASP.NET/FaceDetection.Client/UpdateApiDefinition.ps1 b/examples/ASP.NET/FaceDetection.Client/UpdateApiDefinition.ps1 new file mode 100644 index 00000000..8d84b754 --- /dev/null +++ b/examples/ASP.NET/FaceDetection.Client/UpdateApiDefinition.ps1 @@ -0,0 +1,68 @@ +if (!(Test-Path ${env:JAVA_HOME})) +{ + Write-Host "[Error] env JAVA_HOME is empty or does not exist" -Foreground Red + return +} + +$java = Join-Path ${env:JAVA_HOME} "bin" | ` + Join-Path -Child "java" +if ($global:IsWindows) +{ + $java = $java + ".exe" +} + +if (!(Test-Path ${java})) +{ + Write-Host "[Error] ${java} does not exist" -Foreground Red + return +} + +if ((Test-Path swagger.json)) +{ + Write-Host "[Info] delete existing swagger.json" -Foreground Yellow + Remove-Item swagger.json +} + +# $openapiUrl = "https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.0.0-SNAPSHOT/openapi-generator-cli-5.0.0-20201128.073749-892.jar" +$openapiUrl = "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.0.0-beta3/openapi-generator-cli-5.0.0-beta3.jar" +if (!(Test-Path "openapi-generator-cli.jar")) +{ + Write-Host "[Info] Download openapi-generator-cli.jar" -Foreground Yellow + Invoke-WebRequest -Uri "${openapiUrl}" ` + -outfile openapi-generator-cli.jar +} + +Invoke-WebRequest -Uri "http://localhost:5000/swagger/v1/swagger.json" ` + -outfile swagger.json + +if (!(Test-Path swagger.json)) +{ + Write-Host "[Error] swagger.json does not exist" -Foreground Red + return +} + +Write-Host "[Info] Succeed to get swagger.json" -Foreground Green + +$current = Get-Location +$executable = Join-Path $current "openapi-generator-cli.jar" +$arguments = "generate " + + "-i swagger.json " + + "-g csharp-netcore " + + "-o Server " + + "--additional-properties=netCoreProjectFile=true," + + "targetFramework=netstandard2.0," + + "packageName=FaceDetection.Server" +Invoke-Expression "& '${java}' -jar ${executable} ${arguments}" +Remove-Item swagger.json + +# $source = Join-Path "Server" "src" | ` +# Join-Path -Child "IO.Swagger" + +# if (!(Test-Path $source)) +# { +# Write-Host "[Error] Failed to generate client lib" -Foreground Red +# return +# } + +# Set-Location $source +# Invoke-Expression "& dotnet build -c Release" \ No newline at end of file diff --git a/examples/ASP.NET/FaceDetection.Server/.config/dotnet-tools.json b/examples/ASP.NET/FaceDetection.Server/.config/dotnet-tools.json new file mode 100644 index 00000000..dbc4a5f2 --- /dev/null +++ b/examples/ASP.NET/FaceDetection.Server/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-ef": { + "version": "5.0.0", + "commands": [ + "dotnet-ef" + ] + } + } +} \ No newline at end of file diff --git a/examples/ASP.NET/FaceDetection.Server/Controllers/FaceDetectionController.cs b/examples/ASP.NET/FaceDetection.Server/Controllers/FaceDetectionController.cs new file mode 100644 index 00000000..88a5a6ff --- /dev/null +++ b/examples/ASP.NET/FaceDetection.Server/Controllers/FaceDetectionController.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Imaging; +using System.IO; +using DlibDotNet; +using FaceDetection.Models; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; +using Image = FaceDetection.Models.Image; + +namespace FaceDetection.Controllers +{ + + /// + /// Get rectangles of face area from specified image + /// + [ApiController] + [Route("api/[controller]")] + public class FaceDetectionController : ControllerBase + { + + #region Fields + + private readonly ILogger _Logger; + + #endregion + + #region Constructors + + public FaceDetectionController(ILogger logger) + { + this._Logger = logger; + } + + #endregion + + #region Properties + #endregion + + #region Methods + + /// + /// Returns an enumerable collection of face location correspond to all faces in specified image. + /// + [Route("~/api/[controller]/Locations")] + [HttpPost] + [ProducesResponseType(StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status400BadRequest)] + [ProducesResponseType(StatusCodes.Status500InternalServerError)] + public ActionResult> Locations([FromBody] Image image) + { + try + { + var areas = new List(); + + using (var ms = new MemoryStream(image.Data)) + using (var bitmap = (Bitmap)System.Drawing.Image.FromStream(ms)) + using (var png = new MemoryStream()) + { + bitmap.Save(png, ImageFormat.Png); + using (var matrix = Dlib.LoadPng(png.ToArray())) + using (var faceDetector = Dlib.GetFrontalFaceDetector()) + { + var dets = faceDetector.Operator(matrix); + foreach (var r in dets) + areas.Add(new FaceArea { Left = r.Left, Top = r.Top, Right = r.Right, Bottom = r.Bottom }); + } + } + + return Ok(areas.ToArray()); + } + catch (Exception e) + { + this._Logger.LogError($"[{nameof(this.Locations)}] {e.Message}"); + return new StatusCodeResult(StatusCodes.Status500InternalServerError); + } + } + + #endregion + + } + +} diff --git a/examples/ASP.NET/FaceDetection.Server/FaceDetection.Server.csproj b/examples/ASP.NET/FaceDetection.Server/FaceDetection.Server.csproj new file mode 100644 index 00000000..2bed9031 --- /dev/null +++ b/examples/ASP.NET/FaceDetection.Server/FaceDetection.Server.csproj @@ -0,0 +1,27 @@ + + + + netcoreapp3.1 + 03874267-b444-4eea-8dbd-f82ab63ec9f4 + AnyCPU;x64 + + + + FaceDetection.Server.xml + bin\x64\Debug + + + + FaceDetection.Server.xml + bin\x64\Release + + + + + + + + + + + diff --git a/examples/ASP.NET/FaceDetection.Server/FaceDetection.Server.xml b/examples/ASP.NET/FaceDetection.Server/FaceDetection.Server.xml new file mode 100644 index 00000000..fde165b0 --- /dev/null +++ b/examples/ASP.NET/FaceDetection.Server/FaceDetection.Server.xml @@ -0,0 +1,53 @@ + + + + FaceDetection.Server + + + + + Get rectangles of face area from specified image + + + + + Returns an enumerable collection of face location correspond to all faces in specified image. + + + + + Describes the left, top, right and bottom location of a face. + + + + + The y-axis value of the bottom of the rectangle of face. + + + + + The x-axis value of the left side of the rectangle of face. + + + + + The x-axis value of the right side of the rectangle of face. + + + + + The y-axis value of the top of the rectangle of face. + + + + + Represents a image data. + + + + + The image data. + + + + diff --git a/examples/ASP.NET/FaceDetection.Server/Models/FaceArea.cs b/examples/ASP.NET/FaceDetection.Server/Models/FaceArea.cs new file mode 100644 index 00000000..9558cd44 --- /dev/null +++ b/examples/ASP.NET/FaceDetection.Server/Models/FaceArea.cs @@ -0,0 +1,52 @@ +namespace FaceDetection.Models +{ + + /// + /// Describes the left, top, right and bottom location of a face. + /// + public class FaceArea + { + + #region Properties + + /// + /// The y-axis value of the bottom of the rectangle of face. + /// + public int Bottom + { + get; + set; + } + + /// + /// The x-axis value of the left side of the rectangle of face. + /// + public int Left + { + get; + set; + } + + /// + /// The x-axis value of the right side of the rectangle of face. + /// + public int Right + { + get; + set; + } + + /// + /// The y-axis value of the top of the rectangle of face. + /// + public int Top + { + get; + set; + } + + #endregion + + } + +} diff --git a/examples/ASP.NET/FaceDetection.Server/Models/Image.cs b/examples/ASP.NET/FaceDetection.Server/Models/Image.cs new file mode 100644 index 00000000..54ff1aa3 --- /dev/null +++ b/examples/ASP.NET/FaceDetection.Server/Models/Image.cs @@ -0,0 +1,28 @@ +using System.ComponentModel.DataAnnotations; + +namespace FaceDetection.Models +{ + + /// + /// Represents a image data. + /// + public class Image + { + + #region Properties + + /// + /// The image data. + /// + [Required] + public byte[] Data + { + get; + set; + } + + #endregion + + } + +} diff --git a/examples/ASP.NET/FaceDetection.Server/Program.cs b/examples/ASP.NET/FaceDetection.Server/Program.cs new file mode 100644 index 00000000..504cfb3d --- /dev/null +++ b/examples/ASP.NET/FaceDetection.Server/Program.cs @@ -0,0 +1,34 @@ +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Hosting; + +namespace FaceDetection +{ + + public class Program + { + + #region Methods + + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) + { + var urls = args.Length == 0 ? new []{ "http://localhost:5000", "https://localhost:5001" } : args; + + return Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup() + .UseUrls(urls) + .UseKestrel(); + }); + } + + #endregion + + } + +} diff --git a/examples/ASP.NET/FaceDetection.Server/Startup.cs b/examples/ASP.NET/FaceDetection.Server/Startup.cs new file mode 100644 index 00000000..5ec2a0ed --- /dev/null +++ b/examples/ASP.NET/FaceDetection.Server/Startup.cs @@ -0,0 +1,75 @@ +using System; +using System.IO; +using System.Reflection; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.OpenApi.Models; + +namespace FaceDetection +{ + + public class Startup + { + + #region Constructors + + public Startup(IConfiguration configuration) + { + Configuration = configuration; + } + + #endregion + + #region Properties + + public IConfiguration Configuration { get; } + + #endregion + + #region Methods + + // This method gets called by the runtime. Use this method to add services to the container. + public void ConfigureServices(IServiceCollection services) + { + services.AddControllers(); + services.AddSwaggerGen(c => + { + c.SwaggerDoc("v1", new OpenApiInfo { Title = "FaceDetection", Version = "v1" }); + + var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml"; + var filePath = Path.Combine(AppContext.BaseDirectory, xmlFile); + c.IncludeXmlComments(filePath); + }); + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + app.UseSwagger(); + app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "FaceDetection v1")); + } + + //app.UseHttpsRedirection(); + app.UseStaticFiles(); + + app.UseRouting(); + + app.UseAuthorization(); + + app.UseEndpoints(endpoints => + { + endpoints.MapControllers(); + }); + } + + #endregion + + } + +} \ No newline at end of file diff --git a/examples/ASP.NET/FaceDetection.Server/appsettings.Development.json b/examples/ASP.NET/FaceDetection.Server/appsettings.Development.json new file mode 100644 index 00000000..dba68eb1 --- /dev/null +++ b/examples/ASP.NET/FaceDetection.Server/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + } +} diff --git a/examples/ASP.NET/FaceDetection.Server/appsettings.json b/examples/ASP.NET/FaceDetection.Server/appsettings.json new file mode 100644 index 00000000..81ff8777 --- /dev/null +++ b/examples/ASP.NET/FaceDetection.Server/appsettings.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*" +} diff --git a/examples/ASP.NET/FaceDetection.Server/images/swagger.png b/examples/ASP.NET/FaceDetection.Server/images/swagger.png new file mode 100644 index 00000000..d884deb8 Binary files /dev/null and b/examples/ASP.NET/FaceDetection.Server/images/swagger.png differ diff --git a/examples/ASP.NET/README.md b/examples/ASP.NET/README.md new file mode 100644 index 00000000..05d83451 --- /dev/null +++ b/examples/ASP.NET/README.md @@ -0,0 +1,48 @@ +# FaceDetection for ASP.NET + +This program is sample face detection app for ASP.NET client and server. + +## How to run + +### Server + +```` +$ cd FaceDetection.Server +$ dotnet run -c Release -r win-x64 + +info: Microsoft.Hosting.Lifetime[0] + Now listening on: http://localhost:5000 +info: Microsoft.Hosting.Lifetime[0] + Now listening on: https://localhost:5001 +info: Microsoft.Hosting.Lifetime[0] + Application started. Press Ctrl+C to shut down. +info: Microsoft.Hosting.Lifetime[0] + Hosting environment: Development +info: Microsoft.Hosting.Lifetime[0] + Content root path: D:\Works\OpenSource\DlibDotNet\examples\ASP.NET\FaceDetection.Server +```` + +You can see **Swagger** by web browser. + +![Swagger](FaceDetection.Server/images/swagger.png "Swagger") + +### Client + +At first, you must download api definitions and generate proxy classes. +After running FaceDetection.Server, type the following commands. + +```` +$ cd FaceDetection.Client +$ pwsh UpdateApiDefinition.ps1 +```` + +Then, you can see Server directory. + +```` +$ pwsh UpdateApiDefinition.ps1 +$ dotnet run -c Release -- http://localhost:5000 "2009_004587.jpg" + +[Info] Find 2 faces +```` + +After this, you can see **result.jpg** in current directory. \ No newline at end of file diff --git a/examples/FHogObjectDetector/Program.cs b/examples/FHogObjectDetector/Program.cs index 4f2a7aa4..d004af70 100644 --- a/examples/FHogObjectDetector/Program.cs +++ b/examples/FHogObjectDetector/Program.cs @@ -156,7 +156,7 @@ private static void Main(string[] args) for (var i = 0; i < imageTest.Count; ++i) { // Run the detector and get the face detections. - var dets = detector.Operator(imageTest[i]); + detector.Operator(imageTest[i], out IEnumerable dets); win.ClearOverlay(); win.SetImage(imageTest[i]); win.AddOverlay(dets, new RgbPixel(255, 0, 0)); diff --git a/nuget/docker/build/centos/7/Dockerfile b/nuget/docker/build/centos/7/Dockerfile index eddae22c..bab19c7f 100644 --- a/nuget/docker/build/centos/7/Dockerfile +++ b/nuget/docker/build/centos/7/Dockerfile @@ -14,7 +14,7 @@ RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364 # Verify that the binary works && gosu nobody true -RUN yum update -y && yum install -y \ +RUN yum update -y --disablerepo=cuda,nvidia-ml && yum install -y \ git \ && yum clean all diff --git a/nuget/nuspec/DlibDotNet.CPU.nuspec b/nuget/nuspec/DlibDotNet.CPU.nuspec index cb23ba7f..f0befdc8 100644 --- a/nuget/nuspec/DlibDotNet.CPU.nuspec +++ b/nuget/nuspec/DlibDotNet.CPU.nuspec @@ -2,7 +2,7 @@ DlibDotNet - 19.21.0.20201122 + 19.21.0.20210129 DlibDotNet Takuya Takeuchi Takuya Takeuchi diff --git a/nuget/nuspec/DlibDotNet.CUDA-100.nuspec b/nuget/nuspec/DlibDotNet.CUDA-100.nuspec index 9c8eeefb..bf9e11ec 100644 --- a/nuget/nuspec/DlibDotNet.CUDA-100.nuspec +++ b/nuget/nuspec/DlibDotNet.CUDA-100.nuspec @@ -2,7 +2,7 @@ DlibDotNet.CUDA100 - 19.21.0.20201122 + 19.21.0.20210129 DlibDotNet for CUDA 10.0 Takuya Takeuchi Takuya Takeuchi diff --git a/nuget/nuspec/DlibDotNet.CUDA-101.nuspec b/nuget/nuspec/DlibDotNet.CUDA-101.nuspec index dab97f7b..f747cbab 100644 --- a/nuget/nuspec/DlibDotNet.CUDA-101.nuspec +++ b/nuget/nuspec/DlibDotNet.CUDA-101.nuspec @@ -2,7 +2,7 @@ DlibDotNet.CUDA101 - 19.21.0.20201122 + 19.21.0.20210129 DlibDotNet for CUDA 10.1 Takuya Takeuchi Takuya Takeuchi diff --git a/nuget/nuspec/DlibDotNet.CUDA-102.nuspec b/nuget/nuspec/DlibDotNet.CUDA-102.nuspec index 3363aa61..bb7fd8ea 100644 --- a/nuget/nuspec/DlibDotNet.CUDA-102.nuspec +++ b/nuget/nuspec/DlibDotNet.CUDA-102.nuspec @@ -2,7 +2,7 @@ DlibDotNet.CUDA102 - 19.21.0.20201122 + 19.21.0.20210129 DlibDotNet for CUDA 10.2 Takuya Takeuchi Takuya Takeuchi diff --git a/nuget/nuspec/DlibDotNet.CUDA-110.nuspec b/nuget/nuspec/DlibDotNet.CUDA-110.nuspec index a5fce010..ebb16097 100644 --- a/nuget/nuspec/DlibDotNet.CUDA-110.nuspec +++ b/nuget/nuspec/DlibDotNet.CUDA-110.nuspec @@ -2,7 +2,7 @@ DlibDotNet.CUDA110 - 19.21.0.20201122 + 19.21.0.20210129 DlibDotNet for CUDA 11.0 Takuya Takeuchi Takuya Takeuchi diff --git a/nuget/nuspec/DlibDotNet.CUDA-111.nuspec b/nuget/nuspec/DlibDotNet.CUDA-111.nuspec index 35123eb0..2143a999 100644 --- a/nuget/nuspec/DlibDotNet.CUDA-111.nuspec +++ b/nuget/nuspec/DlibDotNet.CUDA-111.nuspec @@ -2,7 +2,7 @@ DlibDotNet.CUDA111 - 19.21.0.20201122 + 19.21.0.20210129 DlibDotNet for CUDA 11.1 Takuya Takeuchi Takuya Takeuchi diff --git a/nuget/nuspec/DlibDotNet.CUDA-92.nuspec b/nuget/nuspec/DlibDotNet.CUDA-92.nuspec index 73c80b9f..78a17875 100644 --- a/nuget/nuspec/DlibDotNet.CUDA-92.nuspec +++ b/nuget/nuspec/DlibDotNet.CUDA-92.nuspec @@ -2,7 +2,7 @@ DlibDotNet.CUDA92 - 19.21.0.20201122 + 19.21.0.20210129 DlibDotNet for CUDA 9.2 Takuya Takeuchi Takuya Takeuchi diff --git a/nuget/nuspec/DlibDotNet.MKL.nuspec b/nuget/nuspec/DlibDotNet.MKL.nuspec index 960a5c25..25bc9c12 100644 --- a/nuget/nuspec/DlibDotNet.MKL.nuspec +++ b/nuget/nuspec/DlibDotNet.MKL.nuspec @@ -2,7 +2,7 @@ DlibDotNet.MKL - 19.21.0.20201122 + 19.21.0.20210129 DlibDotNet for MKL Takuya Takeuchi Takuya Takeuchi diff --git a/nuget/nuspec/DlibDotNet.UWP.nuspec b/nuget/nuspec/DlibDotNet.UWP.nuspec index bf9aa8f1..9061f092 100644 --- a/nuget/nuspec/DlibDotNet.UWP.nuspec +++ b/nuget/nuspec/DlibDotNet.UWP.nuspec @@ -2,7 +2,7 @@ DlibDotNet.UWP - 19.21.0.20201122 + 19.21.0.20210129 DlibDotNet for UWP Takuya Takeuchi Takuya Takeuchi diff --git a/src/DlibDotNet.Native.Dnn/CMakeLists.txt b/src/DlibDotNet.Native.Dnn/CMakeLists.txt index 394c3432..9aab69c4 100644 --- a/src/DlibDotNet.Native.Dnn/CMakeLists.txt +++ b/src/DlibDotNet.Native.Dnn/CMakeLists.txt @@ -25,7 +25,7 @@ message("-------------------------------------------------------") set(VERSION_MAJOR 19) set(VERSION_MINOR 21) set(VERSION_PATCH 0) -set(VERSION_DATE 20201122) +set(VERSION_DATE 20210129) # Only GCC requires -fPIC if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") diff --git a/src/DlibDotNet.Native.Dnn/version-cuda.rc.in b/src/DlibDotNet.Native.Dnn/version-cuda.rc.in index b2e6f8d3..5e655623 100644 --- a/src/DlibDotNet.Native.Dnn/version-cuda.rc.in +++ b/src/DlibDotNet.Native.Dnn/version-cuda.rc.in @@ -72,7 +72,7 @@ BEGIN VALUE "FileDescription", "Dlib wrapper library (deep neural network) with CUDA" VALUE "FileVersion", VER_FILEVERSION_STR VALUE "InternalName", "DlibDotNet.Native.Dnn" - VALUE "LegalCopyright", "Copyright (c) 2017-2020 Takuya Takeuchi." + VALUE "LegalCopyright", "Copyright (c) 2017-2021 Takuya Takeuchi." VALUE "OriginalFilename", "DlibDotNet.Native.Dnn.dll" VALUE "ProductName", "Dlib.Net" VALUE "ProductVersion", VER_PRODUCTVERSION_STR diff --git a/src/DlibDotNet.Native.Dnn/version.rc.in b/src/DlibDotNet.Native.Dnn/version.rc.in index d904618b..72ab646c 100644 --- a/src/DlibDotNet.Native.Dnn/version.rc.in +++ b/src/DlibDotNet.Native.Dnn/version.rc.in @@ -72,7 +72,7 @@ BEGIN VALUE "FileDescription", "Dlib wrapper library (deep neural network)" VALUE "FileVersion", VER_FILEVERSION_STR VALUE "InternalName", "DlibDotNet.Native.Dnn" - VALUE "LegalCopyright", "Copyright (c) 2017-2020 Takuya Takeuchi." + VALUE "LegalCopyright", "Copyright (c) 2017-2021 Takuya Takeuchi." VALUE "OriginalFilename", "DlibDotNet.Native.Dnn.dll" VALUE "ProductName", "Dlib.Net" VALUE "ProductVersion", VER_PRODUCTVERSION_STR diff --git a/src/DlibDotNet.Native/CMakeLists.txt b/src/DlibDotNet.Native/CMakeLists.txt index ab66843c..13e46c8a 100644 --- a/src/DlibDotNet.Native/CMakeLists.txt +++ b/src/DlibDotNet.Native/CMakeLists.txt @@ -25,7 +25,7 @@ message("-------------------------------------------------------") set(VERSION_MAJOR 19) set(VERSION_MINOR 21) set(VERSION_PATCH 0) -set(VERSION_DATE 20201122) +set(VERSION_DATE 20210129) # libjpeg-dev, libpng-dev set(DLIB_JPEG_SUPPORT True) diff --git a/src/DlibDotNet.Native/dlib/image_processing/object_detector/scan_fhog_pyramid.h b/src/DlibDotNet.Native/dlib/image_processing/object_detector/scan_fhog_pyramid.h index 2a96d032..66695b2b 100644 --- a/src/DlibDotNet.Native/dlib/image_processing/object_detector/scan_fhog_pyramid.h +++ b/src/DlibDotNet.Native/dlib/image_processing/object_detector/scan_fhog_pyramid.h @@ -212,6 +212,58 @@ do { \ *ret = tmp;\ } while (0) +#define object_detector_scan_fhog_pyramid_operator_with_confidences_template(__TYPE__, error, __ELEMENT_TYPE__, __ROWS__, __COLUMNS__, ...) \ +do { \ + auto& in_image = *(static_cast*>(image));\ +\ + std::vector> dets;\ + switch(pyramid_rate)\ + {\ + case 1:\ + {\ + auto& detector = *(static_cast, EXTRACTOR_TYPE>>*>(obj));\ + detector(in_image, dets);\ + }\ + break;\ + case 2:\ + {\ + auto& detector = *(static_cast, EXTRACTOR_TYPE>>*>(obj));\ + detector(in_image, dets);\ + }\ + break;\ + case 3:\ + {\ + auto& detector = *(static_cast, EXTRACTOR_TYPE>>*>(obj));\ + detector(in_image, dets);\ + }\ + break;\ + case 4:\ + {\ + auto& detector = *(static_cast, EXTRACTOR_TYPE>>*>(obj));\ + detector(in_image, dets);\ + }\ + break;\ + case 6:\ + {\ + auto& detector = *(static_cast, EXTRACTOR_TYPE>>*>(obj));\ + detector(in_image, dets);\ + }\ + break;\ + default:\ + error = ERR_PYRAMID_NOT_SUPPORT_RATE;\ + break;\ + }\ + auto tmp1 = new std::vector();\ + auto tmp2 = new std::vector();\ + for (auto i = 0; i < dets.size(); i++)\ + {\ + tmp1->push_back(new rectangle(dets[i].second));\ + tmp2->push_back(dets[i].first);\ + }\ + *ret_rects = tmp1;\ + *ret_confidences = tmp2;\ +} while (0) + #pragma endregion template DLLEXPORT int object_detector_scan_fhog_pyramid_new(const pyramid_type pyramid_type, @@ -400,6 +452,59 @@ DLLEXPORT int object_detector_scan_fhog_pyramid_operator(const pyramid_type pyra return error; } +DLLEXPORT int object_detector_scan_fhog_pyramid_operator_with_confidence(const pyramid_type pyramid_type, + const unsigned int pyramid_rate, + const fhog_feature_extractor_type extractor_type, + void* obj, + const matrix_element_type type, + void* image, + void** ret_rects, + void** ret_confidences) +{ + int error = ERR_OK; + + #define ELEMENT_OUT dlib::rectangle + + switch(pyramid_type) + { + case ::pyramid_type::Down: + { + #define PYRAMID_TYPE pyramid_down + switch(extractor_type) + { + case fhog_feature_extractor_type::Default: + #define EXTRACTOR_TYPE default_fhog_feature_extractor + { + matrix_nonalpha_template(type, + error, + matrix_template_size_template, + object_detector_scan_fhog_pyramid_operator_with_confidences_template, + 0, + 0, + pyramid_rate, + obj, + image, + ret_rects, + ret_confidences); + } + #undef EXTRACTOR_TYPE + break; + default: + error = ERR_FHOG_NOT_SUPPORT_EXTRACTOR; + break; + } + #undef PYRAMID_TYPE + } + break; + default: + error = ERR_PYRAMID_NOT_SUPPORT_TYPE; + break; + } + + #undef ELEMENT_OUT + + return error; +} #pragma endregion operator diff --git a/src/DlibDotNet.Native/version-cuda.rc.in b/src/DlibDotNet.Native/version-cuda.rc.in index d172d226..5b64b6d0 100644 --- a/src/DlibDotNet.Native/version-cuda.rc.in +++ b/src/DlibDotNet.Native/version-cuda.rc.in @@ -72,7 +72,7 @@ BEGIN VALUE "FileDescription", "Dlib wrapper library (kernel) with CUDA" VALUE "FileVersion", VER_FILEVERSION_STR VALUE "InternalName", "DlibDotNet.Native" - VALUE "LegalCopyright", "Copyright (c) 2017-2020 Takuya Takeuchi." + VALUE "LegalCopyright", "Copyright (c) 2017-2021 Takuya Takeuchi." VALUE "OriginalFilename", "DlibDotNet.Native.dll" VALUE "ProductName", "Dlib.Net" VALUE "ProductVersion", VER_PRODUCTVERSION_STR diff --git a/src/DlibDotNet.Native/version.rc.in b/src/DlibDotNet.Native/version.rc.in index e4cf924f..4617a8ce 100644 --- a/src/DlibDotNet.Native/version.rc.in +++ b/src/DlibDotNet.Native/version.rc.in @@ -72,7 +72,7 @@ BEGIN VALUE "FileDescription", "Dlib wrapper library (kernel)" VALUE "FileVersion", VER_FILEVERSION_STR VALUE "InternalName", "DlibDotNet.Native" - VALUE "LegalCopyright", "Copyright (c) 2017-2020 Takuya Takeuchi." + VALUE "LegalCopyright", "Copyright (c) 2017-2021 Takuya Takeuchi." VALUE "OriginalFilename", "DlibDotNet.Native.dll" VALUE "ProductName", "Dlib.Net" VALUE "ProductVersion", VER_PRODUCTVERSION_STR diff --git a/src/DlibDotNet/DlibDotNet.csproj b/src/DlibDotNet/DlibDotNet.csproj index 4324d9e2..63d5156c 100644 --- a/src/DlibDotNet/DlibDotNet.csproj +++ b/src/DlibDotNet/DlibDotNet.csproj @@ -5,9 +5,9 @@ Takuya Takeuchi .NET wrapper for DLib written in C# - © Takuya Takeuchi 2018-2020 + © Takuya Takeuchi 2018-2021 Debug;Release - 19.20.0 + 19.21.0 https://github.com/takuya-takeuchi/DlibDotNet dlib .net machinelearning diff --git a/src/DlibDotNet/ImageProcessing/ObjectDetector.cs b/src/DlibDotNet/ImageProcessing/ObjectDetector.cs index 1877747c..e2c00894 100644 --- a/src/DlibDotNet/ImageProcessing/ObjectDetector.cs +++ b/src/DlibDotNet/ImageProcessing/ObjectDetector.cs @@ -56,9 +56,6 @@ internal ObjectDetector(IntPtr ptr, ImageScanner.FHogPyramidParameter parameter) #endregion - #region Properties - #endregion - #region Methods public void Deserialize(string path) @@ -81,7 +78,7 @@ internal Matrix DrawFHog(uint weightIndex = 0, int cellDrawSize = 15) return this._Imp.DrawFHog(weightIndex, cellDrawSize); } - public IEnumerable Operator(Matrix image) + public void Operator(Matrix image, out IEnumerable rectangles) where U : struct { if (image == null) @@ -90,7 +87,19 @@ public IEnumerable Operator(Matrix image) image.ThrowIfDisposed(); this.ThrowIfDisposed(); - return this._Imp.Operator(image); + rectangles = this._Imp.Operator(image); + } + + public void Operator(Matrix image, out IEnumerable> tuples) + where U : struct + { + if (image == null) + throw new ArgumentNullException(nameof(image)); + + image.ThrowIfDisposed(); + this.ThrowIfDisposed(); + + tuples = this._Imp.OperatorWithConfidence(image); } public void Serialize(string path) @@ -166,6 +175,9 @@ protected DetectorImp(IntPtr detector) public abstract IEnumerable Operator(Matrix image) where U : struct; + public abstract IEnumerable> OperatorWithConfidence(Matrix image) + where U : struct; + public abstract void Serialize(byte[] filepath, int filepathLength); public abstract Matrix TestObjectDetectionFunction(IEnumerable> images, IEnumerable> objects) @@ -283,17 +295,50 @@ public override IEnumerable Operator(Matrix image) this.NativePtr, type, image.NativePtr, - out var matrix); + out var rects); switch (ret) { case NativeMethods.ErrorType.MatrixElementTypeNotSupport: throw new ArgumentException($"{type} is not supported."); } - using (var tmp = new StdVector(matrix)) + using (var tmp = new StdVector(rects)) return tmp.ToArray(); } + public override IEnumerable> OperatorWithConfidence(Matrix image) + { + if (image == null) + throw new ArgumentNullException(nameof(image)); + + image.ThrowIfDisposed(); + + var type = image.MatrixElementType.ToNativeMatrixElementType(); + var ret = NativeMethods.object_detector_scan_fhog_pyramid_operator_with_confidence(this._PyramidType, + this._PyramidRate, + this._FeatureExtractorType, + this.NativePtr, + type, + image.NativePtr, + out var rects, + out var confidences); + switch (ret) + { + case NativeMethods.ErrorType.MatrixElementTypeNotSupport: + throw new ArgumentException($"{type} is not supported."); + } + + using (var rectsVector = new StdVector(rects)) + using (var tconfidencesVector = new StdVector(confidences)) + { + var rectsArray = rectsVector.ToArray(); + var confidencesArray = tconfidencesVector.ToArray(); + var count = rectsArray.Length; + for (var index = 0; index < count; index++) + yield return new Tuple(confidencesArray[index], rectsArray[index]); + }; + } + public override void Serialize(byte[] filepath, int filepathLength) { var ret = NativeMethods.object_detector_scan_fhog_pyramid_serialize(filepath, diff --git a/src/DlibDotNet/PInvoke/Dlib.cs b/src/DlibDotNet/PInvoke/Dlib.cs index ef7bde23..7a75d4a8 100644 --- a/src/DlibDotNet/PInvoke/Dlib.cs +++ b/src/DlibDotNet/PInvoke/Dlib.cs @@ -421,7 +421,7 @@ internal enum ErrorType [return: MarshalAs(UnmanagedType.U1)] public static extern bool is_support_cuda(); - #region assign_pixel + #region assign_pixel [DllImport(NativeLibrary, CallingConvention = CallingConvention)] public static extern void assign_pixel_rgb_rgbalpha(ref RgbPixel dest, ref RgbAlphaPixel src); @@ -441,18 +441,18 @@ internal enum ErrorType [DllImport(NativeLibrary, CallingConvention = CallingConvention)] public static extern void assign_pixel_rgbalpha_lab(ref RgbAlphaPixel dest, ref LabPixel src); - #endregion + #endregion - #region shape_predictor + #region shape_predictor [DllImport(NativeLibrary, CallingConvention = CallingConvention)] public static extern IntPtr normalizing_tform(IntPtr rect); - #endregion + #endregion - #region object_detector + #region object_detector - #region scan_fhog_pyramid + #region scan_fhog_pyramid [DllImport(NativeLibrary, CallingConvention = CallingConvention)] public static extern ErrorType object_detector_scan_fhog_pyramid_new(PyramidType pyramidType, @@ -484,6 +484,16 @@ public static extern ErrorType object_detector_scan_fhog_pyramid_operator(Pyrami IntPtr matrix, out IntPtr dets); + [DllImport(NativeLibrary, CallingConvention = CallingConvention)] + public static extern ErrorType object_detector_scan_fhog_pyramid_operator_with_confidence(PyramidType pyramidType, + uint pyramidRate, + FHogFeatureExtractorType featureExtractorType, + IntPtr detector, + MatrixElementType elementType, + IntPtr matrix, + out IntPtr rects, + out IntPtr confidences); + [DllImport(NativeLibrary, CallingConvention = CallingConvention)] public static extern ErrorType object_detector_scan_fhog_pyramid_serialize(byte[] fileName, int filepathLength, @@ -493,9 +503,9 @@ public static extern ErrorType object_detector_scan_fhog_pyramid_serialize(byte[ IntPtr obj, out IntPtr errorMessage); - #endregion + #endregion - #endregion + #endregion #region matrix_range_exp @@ -582,7 +592,7 @@ public static extern ErrorType object_detector_scan_fhog_pyramid_serialize(byte[ [return: MarshalAs(UnmanagedType.U1)] public static extern bool matrix_range_exp_nr(MatrixElementType matrixElementType, IntPtr matrix, out int ret); - #endregion + #endregion [DllImport(NativeLibrary, CallingConvention = CallingConvention)] public static extern IntPtr find_similarity_transform_dpoint(IntPtr from_points, IntPtr to_points); @@ -593,12 +603,12 @@ public static extern ErrorType object_detector_scan_fhog_pyramid_serialize(byte[ [DllImport(NativeLibrary, CallingConvention = CallingConvention)] public static extern IntPtr rotation_matrix(double angle); - #region extensions + #region extensions #region extensions_load_image_data [DllImport(NativeLibrary, CallingConvention = CallingConvention)] - public static extern IntPtr extensions_load_image_data(Array2DType dst_type, Array2DType src_type, IntPtr data, uint rows, uint columns, uint steps); + public static extern IntPtr extensions_load_image_data(Array2DType dst_type, Array2DType src_type, IntPtr data, uint rows, uint columns, uint steps); [DllImport(NativeLibrary, CallingConvention = CallingConvention)] public static extern IntPtr extensions_load_image_data(Array2DType dst_type, Array2DType src_type, byte[] data, uint rows, uint columns, uint steps); @@ -642,7 +652,7 @@ public static extern ErrorType object_detector_scan_fhog_pyramid_serialize(byte[ [DllImport(NativeLibrary, CallingConvention = CallingConvention)] public static extern IntPtr extensions_load_image_data(Array2DType dst_type, Array2DType src_type, LabPixel[] data, uint rows, uint columns, uint steps); - #endregion + #endregion [DllImport(NativeLibrary, CallingConvention = CallingConvention)] public static extern ErrorType extensions_matrix_to_array(IntPtr src, MatrixElementType type, int templateRows, int templateColumns, IntPtr dst); diff --git a/test/DlibDotNet.Tests/DlibDotNet.Tests.csproj b/test/DlibDotNet.Tests/DlibDotNet.Tests.csproj index 12bd2477..34414994 100644 --- a/test/DlibDotNet.Tests/DlibDotNet.Tests.csproj +++ b/test/DlibDotNet.Tests/DlibDotNet.Tests.csproj @@ -28,9 +28,510 @@ + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + PreserveNewest + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + diff --git a/test/DlibDotNet.Tests/ImageProcessing/ObjectDetectorTest.cs b/test/DlibDotNet.Tests/ImageProcessing/ObjectDetectorTest.cs new file mode 100644 index 00000000..30e8299e --- /dev/null +++ b/test/DlibDotNet.Tests/ImageProcessing/ObjectDetectorTest.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Xunit; + +namespace DlibDotNet.Tests.ImageProcessing +{ + + public class ObjectDetectorTest : TestBase + { + + private ScanFHogPyramid _Scanner; + + private ObjectDetector> _ObjectDetector; + + public ObjectDetectorTest() + { + var path = this.GetDataFile("face_detector.svm"); + this._Scanner = new ScanFHogPyramid(6); + this._ObjectDetector = new ObjectDetector>(this._Scanner); + this._ObjectDetector.Deserialize(path.FullName); + } + + [Fact] + public void DetectFace() + { + if (this._ObjectDetector == null) + Assert.True(false, "ObjectDetector is not initialized!!"); + + var path = this.GetDataFile("Lenna.jpg"); + var image = Dlib.LoadImageAsMatrix(path.FullName); + + this._ObjectDetector.Operator(image, out IEnumerable rects); + Assert.Equal(rects.Count(), 1); + + foreach (var r in rects) + Dlib.DrawRectangle(image, r, new RgbPixel { Green = 255 }); + + Dlib.SaveBmp(image, Path.Combine(this.GetOutDir(this.GetType().Name), "DetectFace.bmp")); + + this.DisposeAndCheckDisposedState(image); + } + + [Fact] + public void DetectFaceWithConfidence() + { + if (this._ObjectDetector == null) + Assert.True(false, "ObjectDetector is not initialized!!"); + + var path = this.GetDataFile("Lenna.jpg"); + var image = Dlib.LoadImageAsMatrix(path.FullName); + + this._ObjectDetector.Operator(image, out IEnumerable> tuples); + var array = tuples.ToArray(); + Assert.Equal(array.Length, 1); + + foreach (var tuple in tuples) + Dlib.DrawRectangle(image, tuple.Item2, new RgbPixel { Green = 255 }); + Assert.True(array[0].Item1 - 0.3173714 < 0.01); + + Dlib.SaveBmp(image, Path.Combine(this.GetOutDir(this.GetType().Name), "DetectFaceWithConfidence.bmp")); + + this.DisposeAndCheckDisposedState(image); + } + + } + +} diff --git a/test/DlibDotNet.Tests/data/face_detector.svm b/test/DlibDotNet.Tests/data/face_detector.svm new file mode 100644 index 00000000..6dc3445c Binary files /dev/null and b/test/DlibDotNet.Tests/data/face_detector.svm differ