Git Product home page Git Product logo

dlibdotnet's Introduction

Who am I?

I am Japanese who works on IT company as System Engineer.
I can read and write in English, but I can't speak it very well.

I have these skills.

  • C#/VB.NET (.NET)
  • C/C++
  • Python
  • Development of Windows Application, especially WinForms/WPF/UWP
  • Development of Server Side Application, especially ASP.NET Core

I'm interesting to

  • Deep Learning
  • Image Processing
  • Development of Mobile Application

Anurag's GitHub stats

dlibdotnet's People

Contributors

ejoebstl avatar jose-namku avatar markwalter94 avatar takuya-takeuchi avatar turowicz avatar valerysntx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dlibdotnet's Issues

DlibDotNet.Tests not working

Hello,
i am interested in using DlibDotNet for face detection in C#.
When i try to start the tests from DlibDotNet.Tests, i get the following exception: System.BadImageFormatException

Environment

Win 10, VS 2017, Win64

Output:

[09.01.2018 16:32:01 Error] The operation failed as details for project Surf could not be loaded.
[09.01.2018 16:32:02 Informational] ------ Load Playlist started ------
[09.01.2018 16:32:02 Informational] ========== Load Playlist finished (0:00:00,0080008) ==========
[09.01.2018 16:32:11 Informational] ------ Discover test started ------
[09.01.2018 16:32:11 Warning] Test run will use DLL(s) built for framework Framework45 and platform X86. Following DLL(s) will not be part of run:
DlibDotNet.dll, DlibDotNet.Tests.dll are built for Framework Framework45 and Platform X64.
Go to http://go.microsoft.com/fwlink/?LinkID=236877&clcid=0x409 for more details on managing these settings.
[09.01.2018 16:32:14 Informational] Protokollierung initialisiert. Protokoll wird in "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\PROFESSIONAL\COMMON7\IDE\EXTENSIONS\5RESBQJP.LGW\BoostTestAdapter.dll.log" geschrieben.
[09.01.2018 16:32:15 Informational] ========== Discover test finished: 0 found (0:00:03,4913491) ==========
[09.01.2018 16:33:56 Informational] ------ Discover test started ------
[09.01.2018 16:33:56 Warning] Test run will use DLL(s) built for framework Framework45 and platform X86. Following DLL(s) will not be part of run:
DlibDotNet.dll is built for Framework Framework45 and Platform X64.
Go to http://go.microsoft.com/fwlink/?LinkID=236877&clcid=0x409 for more details on managing these settings.
[09.01.2018 16:33:57 Informational] Protokollierung initialisiert. Protokoll wird in "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\PROFESSIONAL\COMMON7\IDE\EXTENSIONS\5RESBQJP.LGW\BoostTestAdapter.dll.log" geschrieben.
[09.01.2018 16:33:57 Informational] ========== Discover test finished: 0 found (0:00:01,1779137) ==========
[09.01.2018 16:34:13 Informational] ------ Discover test started ------
[09.01.2018 16:34:13 Warning] Test run will use DLL(s) built for framework Framework45 and platform X86. Following DLL(s) will not be part of run:
DlibDotNet.Tests.dll is built for Framework Framework45 and Platform X64.
Go to http://go.microsoft.com/fwlink/?LinkID=236877&clcid=0x409 for more details on managing these settings.
[09.01.2018 16:34:15 Informational] Protokollierung initialisiert. Protokoll wird in "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\PROFESSIONAL\COMMON7\IDE\EXTENSIONS\5RESBQJP.LGW\BoostTestAdapter.dll.log" geschrieben.
[09.01.2018 16:34:15 Informational] ========== Discover test finished: 0 found (0:00:01,6671667) ==========
[09.01.2018 16:39:57 Informational] ------ Discover test started ------
[09.01.2018 16:39:57 Warning] Test run will use DLL(s) built for framework Framework45 and platform X86. Following DLL(s) will not be part of run:
DlibDotNet.dll is built for Framework Framework45 and Platform X64.
Go to http://go.microsoft.com/fwlink/?LinkID=236877&clcid=0x409 for more details on managing these settings.
[09.01.2018 16:39:58 Informational] Protokollierung initialisiert. Protokoll wird in "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\PROFESSIONAL\COMMON7\IDE\EXTENSIONS\5RESBQJP.LGW\BoostTestAdapter.dll.log" geschrieben.
[09.01.2018 16:39:58 Informational] ========== Discover test finished: 0 found (0:00:01,170117) ==========
[09.01.2018 16:41:53 Informational] ------ Discover test started ------
[09.01.2018 16:41:53 Warning] Test run will use DLL(s) built for framework Framework45 and platform X86. Following DLL(s) will not be part of run:
DlibDotNet.dll, DlibDotNet.Tests.dll are built for Framework Framework45 and Platform X64.
Go to http://go.microsoft.com/fwlink/?LinkID=236877&clcid=0x409 for more details on managing these settings.
[09.01.2018 16:41:54 Informational] Protokollierung initialisiert. Protokoll wird in "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\PROFESSIONAL\COMMON7\IDE\EXTENSIONS\5RESBQJP.LGW\BoostTestAdapter.dll.log" geschrieben.
[09.01.2018 16:41:55 Informational] ========== Discover test finished: 0 found (0:00:01,5171517) ==========
[09.01.2018 16:44:05 Informational] ------ Discover test started ------
[09.01.2018 16:44:05 Warning] Test run will use DLL(s) built for framework Framework45 and platform X86. Following DLL(s) will not be part of run:
DlibDotNet.dll, DlibDotNet.Tests.dll are built for Framework Framework45 and Platform X64.
Go to http://go.microsoft.com/fwlink/?LinkID=236877&clcid=0x409 for more details on managing these settings.
[09.01.2018 16:44:06 Informational] Protokollierung initialisiert. Protokoll wird in "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\PROFESSIONAL\COMMON7\IDE\EXTENSIONS\5RESBQJP.LGW\BoostTestAdapter.dll.log" geschrieben.
[09.01.2018 16:44:07 Informational] ========== Discover test finished: 0 found (0:00:01,5271527) ==========
[09.01.2018 16:45:10 Informational] ------ Discover test started ------
[09.01.2018 16:45:10 Warning] Test run will use DLL(s) built for framework Framework45 and platform X86. Following DLL(s) will not be part of run:
DlibDotNet.dll, DlibDotNet.Tests.dll are built for Framework Framework45 and Platform X64.
Go to http://go.microsoft.com/fwlink/?LinkID=236877&clcid=0x409 for more details on managing these settings.
[09.01.2018 16:45:11 Informational] Protokollierung initialisiert. Protokoll wird in "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\PROFESSIONAL\COMMON7\IDE\EXTENSIONS\5RESBQJP.LGW\BoostTestAdapter.dll.log" geschrieben.
[09.01.2018 16:45:12 Informational] ========== Discover test finished: 0 found (0:00:01,5921592) ==========
[09.01.2018 16:53:37 Informational] ------ Discover test started ------
[09.01.2018 16:53:37 Warning] Test run will use DLL(s) built for framework Framework45 and platform X86. Following DLL(s) will not be part of run:
DlibDotNet.dll, DlibDotNet.Tests.dll are built for Framework Framework45 and Platform X64.
Go to http://go.microsoft.com/fwlink/?LinkID=236877&clcid=0x409 for more details on managing these settings.
[09.01.2018 16:53:41 Informational] Protokollierung initialisiert. Protokoll wird in "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\PROFESSIONAL\COMMON7\IDE\EXTENSIONS\5RESBQJP.LGW\BoostTestAdapter.dll.log" geschrieben.
[09.01.2018 16:53:42 Informational] ========== Discover test finished: 0 found (0:00:05,40054) ==========
[09.01.2018 16:54:09 Informational] ------ Discover test started ------
[09.01.2018 16:54:12 Informational] Protokollierung initialisiert. Protokoll wird in "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\PROFESSIONAL\COMMON7\IDE\EXTENSIONS\5RESBQJP.LGW\BoostTestAdapter.dll.log" geschrieben.
[09.01.2018 16:54:14 Informational] ========== Discover test finished: 213 found (0:00:04,8224822) ==========
[09.01.2018 16:54:30 Informational] ------ Run test started ------
[09.01.2018 16:54:32 Informational] ========== Run test finished: 1 run (0:00:02,0762076) ==========
[09.01.2018 16:54:38 Informational] ------ Run test started ------
[09.01.2018 16:54:39 Informational] ========== Run test finished: 1 run (0:00:01,4471447) ==========
[09.01.2018 16:56:01 Informational] ------ Run test started ------
[09.01.2018 16:56:02 Informational] ========== Run test finished: 1 run (0:00:01,5261526) ==========
[09.01.2018 16:56:20 Informational] ------ Run test started ------
[09.01.2018 16:56:21 Informational] ========== Run test finished: 1 run (0:00:01,5011501)
(...)

Do you have an idea why it doesn't work?

sincerely
Niko

Possibility to train with DlibDotNet?

I'm looking for a way to train models with DlibDotNet because working in VS and WinForms is extremely convinient. Working with C++ is cumbersome and development time is long.
DlibDotNet is wonderful, very convinient and easy to operate.

Windows 10, VS 2017

I was looking for some example on how to improve an existing model (as requested here: davisking/dlib#63) or train a new model using DlibDotNet but I didn't find any.

It would be great if this could be added, perhaps with conversion of imglab tool to .NET.
I know it's a big wish, but I wanted to mention it anyway, I think it would be amazing for a lot of people.

Support utf-8 file path

Summary of your issue

Can not load file which contains character which are not able to represent by char*.

Environment

All environment

What did you do when you faced the problem?

When load a certain file

Example code:

var path = "images\ShinzōAbe.bmp";
var img = Dlib.LoadBmp<byte>(path);

Output:

Throw exception

What did you intend to be?

load image

--- Resolved

Please remove, my mistake. DlibDotNet.Native.dll must not be added.

Build

Summary of your issue

CMake Dlibdotnet.native Build Error

Environment

Windows 10, CMake 3.12

What did you do when you faced the problem?

Example code:

cmake -G "Visual Studio 14 2015 Win64" -DDLIB_PATH=D:\Project\AIProject\FaceRecognitionDotNet\FaceRecognitionDotNet-master\DlibDotNet\src\DlibDotNet.Native

Output:

-- The C compiler identification is MSVC 19.0.24210.0
-- The CXX compiler identification is MSVC 19.0.24210.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at CMakeLists.txt:7 (if):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "MSVC" will no longer be dereferenced when the policy
  is set to NEW.  Since the policy is not set the OLD behavior will be used.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at CMakeLists.txt:16 (add_subdirectory):
  The source directory

    D:/Project/AIProject/FaceRecognitionDotNet/FaceRecognitionDotNet-master/DlibDotNet/src/DlibDotNet.Native/dlib

  does not contain a CMakeLists.txt file.


-- Configuring incomplete, errors occurred!
See also "D:/Project/AIProject/FaceRecognitionDotNet/FaceRecognitionDotNet-master/DlibDotNet/src/DlibDotNet.Native/CMakeFiles/CMakeOutput.log".

What did you intend to be?

BitmapExtensions.ToArray2D throws always not supported exception

I read a bitmap (by opencv capture device)

capture.Read(frame);
var bmp = BitmapConverter.ToBitmap(frame);

But BitmapExtensions throws always not supported exception on:
var img = BitmapExtensions.ToArray2D<Byte>(bmp)

I use code from stackoverflow now:

   public static Array2D<Byte> ToArray2D(this Bitmap bitmap)
        {
            Int32 stride;
            Byte[] data;
            // Removes unnecessary getter calls.
            Int32 width = bitmap.Width;
            Int32 height = bitmap.Height;
            // 'using' block to properly dispose temp image.
            using (Bitmap grayImage = MakeGrayscale3(bitmap))
            {
                BitmapData bits = grayImage.LockBits(new System.Drawing.Rectangle(0, 0, width, height), ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppPArgb);
                stride = bits.Stride;
                Int32 length = stride * height;
                data = new Byte[length];
                System.Runtime.InteropServices.Marshal.Copy(bits.Scan0, data, 0, length);
                grayImage.UnlockBits(bits);
            }
            // Constructor is (rows, columns), so (height, width)
            Array2D<Byte> array = new Array2D<Byte>(height, width);
            Int32 offset = 0;
            for (Int32 y = 0; y < height; y++)
            {
                // Offset variable for processing one line
                Int32 curOffset = offset;
                // Get row in advance
                Array2D<Byte>.Row<Byte> curRow = array[y];
                for (Int32 x = 0; x < width; x++)
                {
                    curRow[x] = data[curOffset]; // Should be the Blue component.
                    curOffset += 4;
                }
                // Stride is the actual data length of one line. No need to calculate that;
                // not only is it already given by the BitmapData object, but in some situations
                // it may differ from the actual data length. This also saves processing time
                // by avoiding multiplications inside each loop.
                offset += stride;
            }
            return array;
        }


     public static Bitmap MakeGrayscale3(Bitmap original)
        {
            //create a blank bitmap the same size as original
            Bitmap newBitmap = new Bitmap(original.Width, original.Height);

            //get a graphics object from the new image
            Graphics g = Graphics.FromImage(newBitmap);

            //create the grayscale ColorMatrix
            ColorMatrix colorMatrix = new ColorMatrix(
               new float[][]
               {
         new float[] {.3f, .3f, .3f, 0, 0},
         new float[] {.59f, .59f, .59f, 0, 0},
         new float[] {.11f, .11f, .11f, 0, 0},
         new float[] {0, 0, 0, 1, 0},
         new float[] {0, 0, 0, 0, 1}
               });

            //create some image attributes
            ImageAttributes attributes = new ImageAttributes();

            //set the color matrix attribute
            attributes.SetColorMatrix(colorMatrix);

            //draw the original image on the new image
            //using the grayscale color matrix
            g.DrawImage(original, new System.Drawing.Rectangle(0, 0, original.Width, original.Height),
               0, 0, original.Width, original.Height, GraphicsUnit.Pixel, attributes);

            //dispose the Graphics object
            g.Dispose();
            return newBitmap;
        }

Compiling errors

Summary of your issue

I get compiling errors. Any ideas how to solve?

Environment

Win 10, VS 2017, Win32/Win64

\DlibDotNet-master\src\dlib-19.4\dlib/geometry/point_transforms.h(211): error C2143: syntax error: missing ';' before '('
\DlibDotNet-master\src\dlib-19.4\dlib/geometry/point_transforms.h(211): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
etc...

How to call extract_image_4points functions in DlibDotNet

Summary of your issue

Hi, takuya,

  I am wondering if I could call the dlib function extract_image_4points  from DlibDotNet.
  It seemed that I could not find the function in the object browser of DlibDotNet, could 

you give me some hint on how to achieve this goal?

    Thanks! 

Environment

Write your environment.

What did you do when you faced the problem?

//write here

Example code:

paste your core code

Output:

paste your output

What did you intend to be?

Compilation issue using visual studio 2017

hi All
could anyone tell me why can't compile dlibdotnet.native ?
......
2>source.cpp
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\shared\ws2def.h(103): warning C4005: 'AF_IPX' : redéfinition de macro
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(457): note: voir la définition précédente de 'AF_IPX'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\shared\ws2def.h(128): warning C4005: 'AF_MAX' : redéfinition de macro
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(476): note: voir la définition précédente de 'AF_MAX'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\shared\ws2def.h(185): warning C4005: 'SO_DONTLINGER' : redéfinition de macro
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(399): note: voir la définition précédente de 'SO_DONTLINGER'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\shared\ws2def.h(235): error C2011: 'sockaddr' : redéfinition du type 'struct'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(1007): note: voir la déclaration de 'sockaddr'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\shared\ws2def.h(437): error C2059: erreur de syntaxe : 'constante'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\shared\ws2def.h(491): error C2143: erreur de syntaxe : absence de ';' avant '}'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\shared\ws2def.h(491): error C4430: spécificateur de type manquant - int est pris en compte par défaut. Remarque : C++ ne prend pas en charge int par défaut
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\shared\ws2def.h(572): warning C4005: 'IN_CLASSA' : redéfinition de macro
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(284): note: voir la définition précédente de 'IN_CLASSA'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\shared\ws2def.h(578): warning C4005: 'IN_CLASSB' : redéfinition de macro
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(290): note: voir la définition précédente de 'IN_CLASSB'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\shared\ws2def.h(584): warning C4005: 'IN_CLASSC' : redéfinition de macro
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(296): note: voir la définition précédente de 'IN_CLASSC'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\shared\ws2def.h(595): warning C4005: 'INADDR_ANY' : redéfinition de macro
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(301): note: voir la définition précédente de 'INADDR_ANY'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\shared\ws2def.h(597): warning C4005: 'INADDR_BROADCAST' : redéfinition de macro
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(303): note: voir la définition précédente de 'INADDR_BROADCAST'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\shared\ws2def.h(633): error C2011: 'sockaddr_in' : redéfinition du type 'struct'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(1011): note: voir la déclaration de 'sockaddr_in'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(136): error C2011: 'fd_set' : redéfinition du type 'struct'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(1019): note: voir la déclaration de 'fd_set'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(156): warning C4005: 'FD_CLR' : redéfinition de macro
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(94): note: voir la définition précédente de 'FD_CLR'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(171): warning C4005: 'FD_SET' : redéfinition de macro
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(99): note: voir la définition précédente de 'FD_SET'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(180): error C2011: 'timeval' : redéfinition du type 'struct'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(1035): note: voir la déclaration de 'timeval'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(236): error C2011: 'hostent' : redéfinition du type 'struct'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(1023): note: voir la déclaration de 'hostent'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(249): error C2011: 'netent' : redéfinition du type 'struct'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(177): note: voir la déclaration de 'netent'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(256): error C2011: 'servent' : redéfinition du type 'struct'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(1027): note: voir la déclaration de 'servent'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(268): error C2011: 'protoent' : redéfinition du type 'struct'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(1031): note: voir la déclaration de 'protoent'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(364): error C2011: 'WSAData' : redéfinition du type 'struct'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(319): note: voir la déclaration de 'WSAData'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(462): error C2011: 'sockproto' : redéfinition du type 'struct'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(491): note: voir la déclaration de 'sockproto'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(504): error C2011: 'linger' : redéfinition du type 'struct'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(1015): note: voir la déclaration de 'linger'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(517): warning C4005: 'SOMAXCONN' : redéfinition de macro
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(541): note: voir la définition précédente de 'SOMAXCONN'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(551): warning C4005: 'FD_READ' : redéfinition de macro
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(559): note: voir la définition précédente de 'FD_READ'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(554): warning C4005: 'FD_WRITE' : redéfinition de macro
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(560): note: voir la définition précédente de 'FD_WRITE'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(557): warning C4005: 'FD_OOB' : redéfinition de macro
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(561): note: voir la définition précédente de 'FD_OOB'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(560): warning C4005: 'FD_ACCEPT' : redéfinition de macro
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(562): note: voir la définition précédente de 'FD_ACCEPT'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(563): warning C4005: 'FD_CONNECT' : redéfinition de macro
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(563): note: voir la définition précédente de 'FD_CONNECT'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(566): warning C4005: 'FD_CLOSE' : redéfinition de macro
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(564): note: voir la définition précédente de 'FD_CLOSE'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(1624): error C2375: 'accept' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(739): note: voir la déclaration de 'accept'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(1646): error C2375: 'bind' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(744): note: voir la déclaration de 'bind'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(1667): error C2375: 'closesocket' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(749): note: voir la déclaration de 'closesocket'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(1684): error C2375: 'connect' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(751): note: voir la déclaration de 'connect'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(1705): error C2375: 'ioctlsocket' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(756): note: voir la déclaration de 'ioctlsocket'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(1728): error C2375: 'getpeername' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(761): note: voir la déclaration de 'getpeername'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(1749): error C2375: 'getsockname' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(766): note: voir la déclaration de 'getsockname'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(1770): error C2375: 'getsockopt' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(771): note: voir la déclaration de 'getsockopt'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(1795): error C2375: 'htonl' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(778): note: voir la déclaration de 'htonl'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(1812): error C2375: 'htons' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(780): note: voir la déclaration de 'htons'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(1830): error C2375: 'inet_addr' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(782): note: voir la déclaration de 'inet_addr'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(1848): error C2375: 'inet_ntoa' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(784): note: voir la déclaration de 'inet_ntoa'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(1948): error C2375: 'listen' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(786): note: voir la déclaration de 'listen'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(1967): error C2375: 'ntohl' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(790): note: voir la déclaration de 'ntohl'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(1984): error C2375: 'ntohs' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(792): note: voir la déclaration de 'ntohs'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2001): error C2375: 'recv' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(794): note: voir la déclaration de 'recv'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2024): error C2375: 'recvfrom' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(800): note: voir la déclaration de 'recvfrom'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2051): error C2375: 'select' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(808): note: voir la déclaration de 'select'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2076): error C2375: 'send' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(815): note: voir la déclaration de 'send'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2099): error C2375: 'sendto' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(821): note: voir la déclaration de 'sendto'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2126): error C2375: 'setsockopt' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(829): note: voir la déclaration de 'setsockopt'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2151): error C2375: 'shutdown' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(836): note: voir la déclaration de 'shutdown'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2171): error C2375: 'socket' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(840): note: voir la déclaration de 'socket'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2196): error C2375: 'gethostbyaddr' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(847): note: voir la déclaration de 'gethostbyaddr'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2218): error C2375: 'gethostbyname' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(852): note: voir la déclaration de 'gethostbyname'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2235): error C2375: 'gethostname' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(854): note: voir la déclaration de 'gethostname'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2275): error C2375: 'getservbyport' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(858): note: voir la déclaration de 'getservbyport'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2294): error C2375: 'getservbyname' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(862): note: voir la déclaration de 'getservbyname'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2313): error C2375: 'getprotobynumber' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(866): note: voir la déclaration de 'getprotobynumber'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2330): error C2375: 'getprotobyname' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(868): note: voir la déclaration de 'getprotobyname'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2350): error C2375: 'WSAStartup' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(872): note: voir la déclaration de 'WSAStartup'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2370): error C2375: 'WSACleanup' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(876): note: voir la déclaration de 'WSACleanup'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2387): error C2375: 'WSASetLastError' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(878): note: voir la déclaration de 'WSASetLastError'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2404): error C2375: 'WSAGetLastError' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(880): note: voir la déclaration de 'WSAGetLastError'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2425): error C2375: 'WSAIsBlocking' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(882): note: voir la déclaration de 'WSAIsBlocking'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2443): error C2375: 'WSAUnhookBlockingHook' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(884): note: voir la déclaration de 'WSAUnhookBlockingHook'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2461): error C2375: 'WSASetBlockingHook' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(886): note: voir la déclaration de 'WSASetBlockingHook'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2479): error C2375: 'WSACancelBlockingCall' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(888): note: voir la déclaration de 'WSACancelBlockingCall'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2497): error C2375: 'WSAAsyncGetServByName' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(890): note: voir la déclaration de 'WSAAsyncGetServByName'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2525): error C2375: 'WSAAsyncGetServByPort' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(898): note: voir la déclaration de 'WSAAsyncGetServByPort'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2553): error C2375: 'WSAAsyncGetProtoByName' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(906): note: voir la déclaration de 'WSAAsyncGetProtoByName'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2579): error C2375: 'WSAAsyncGetProtoByNumber' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(913): note: voir la déclaration de 'WSAAsyncGetProtoByNumber'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2605): error C2375: 'WSAAsyncGetHostByName' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(920): note: voir la déclaration de 'WSAAsyncGetHostByName'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2631): error C2375: 'WSAAsyncGetHostByAddr' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(927): note: voir la déclaration de 'WSAAsyncGetHostByAddr'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2661): error C2375: 'WSACancelAsyncRequest' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(936): note: voir la déclaration de 'WSACancelAsyncRequest'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(2679): error C2375: 'WSAAsyncSelect' : redéfinition ; liaison différente
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock.h(938): note: voir la déclaration de 'WSAAsyncSelect'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(4205): error C2059: erreur de syntaxe : '}'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(4205): error C2143: erreur de syntaxe : absence de ';' avant '}'
2>c:\dlib-19.9\dlib\sockets\sockets_kernel_1.h(21): error C2143: erreur de syntaxe : absence de ';' avant '{'
2>c:\dlib-19.9\dlib\sockets\sockets_kernel_1.h(21): error C2447: '{' : en-tête de fonction manquant (liste formelle à l'ancien format ?)
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(81): error C2079: 'wsaData' utilise une struct de 'WSAData' non défini
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(110): error C2446: '==' : pas de conversion de 'int' en 'int (__cdecl *)(char *,int)'
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(110): note: La conversion d'un type intégral en type pointeur nécessite reinterpret_cast, un cast de style C ou un cast de style fonction
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(148): error C2568: '=' : impossible de résoudre la surcharge de fonction
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(148): note: est peut-être 'hostent *gethostbyname(const char *)'
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(156): error C2027: utilisation du type non défini 'hostent'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(4152): note: voir la déclaration de 'hostent'
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(156): error C2227: la partie gauche de '->h_addr_list' doit pointer vers un type class/struct/union/générique
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(159): error C2027: utilisation du type non défini 'hostent'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(4152): note: voir la déclaration de 'hostent'
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(159): error C2227: la partie gauche de '->h_addr_list' doit pointer vers un type class/struct/union/générique
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(166): error C2440: 'initialisation' : impossible de convertir de 'char *(__cdecl *)(in_addr)' en 'char *'
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(166): note: Aucun contexte dans lequel cette conversion est possible
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(207): error C2440: 'initialisation' : impossible de convertir de 'unsigned long (__cdecl *)(const char *)' en 'unsigned long'
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(207): note: Aucun contexte dans lequel cette conversion est possible
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(214): error C2568: '=' : impossible de résoudre la surcharge de fonction
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(214): note: est peut-être 'hostent *gethostbyaddr(const char *,int,int)'
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(221): error C2027: utilisation du type non défini 'hostent'
2>C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winsock2.h(4152): note: voir la déclaration de 'hostent'
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(221): error C2227: la partie gauche de '->h_name' doit pointer vers un type class/struct/union/générique
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(239): error C2653: 'connection' : n'est pas un nom de classe ni d'espace de noms
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(245): error C4430: spécificateur de type manquant - int est pris en compte par défaut. Remarque : C++ ne prend pas en charge int par défaut
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(255): error C2550: 'dlib::connection' : les listes d'initialiseurs de constructeur ne sont autorisées que dans la définition d'un constructeur
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(256): error C2065: 'connection_socket' : identificateur non déclaré
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(257): warning C4508: 'dlib::connection' : la fonction doit retourner une valeur ; type de retour 'void' pris par défaut
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(262): error C2653: 'connection' : n'est pas un nom de classe ni d'espace de noms
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(264): error C4430: spécificateur de type manquant - int est pris en compte par défaut. Remarque : C++ ne prend pas en charge int par défaut
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(265): error C2065: 'connection_socket' : identificateur non déclaré
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(266): error C2065: 'connection_socket' : identificateur non déclaré
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(267): error C2065: 'connection_socket' : identificateur non déclaré
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(267): error C2541: 'delete' : impossible de détruire des objets qui ne sont pas des pointeurs
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(268): warning C4508: 'dlib::connection' : la fonction doit retourner une valeur ; type de retour 'void' pris par défaut
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(273): error C2653: 'connection' : n'est pas un nom de classe ni d'espace de noms
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(276): error C2065: 'connection_socket' : identificateur non déclaré
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(276): error C2440: 'initialisation' : impossible de convertir de 'int (__cdecl *)(SOCKET,int,int,const char *,int)' en 'int'
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(276): note: Aucun contexte dans lequel cette conversion est possible
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(287): error C2653: 'connection' : n'est pas un nom de classe ni d'espace de noms
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(301): error C2065: 'connection_socket' : identificateur non déclaré
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(301): error C2568: '=' : impossible de résoudre la surcharge de fonction
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(301): note: est peut-être 'int send(SOCKET,const char *,int,int)'
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(303): error C3861: 'sdo_called' : identificateur introuvable
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(317): error C2653: 'connection' : n'est pas un nom de classe ni d'espace de noms
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(327): error C2065: 'connection_socket' : identificateur non déclaré
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(327): error C2440: 'initialisation' : impossible de convertir de 'int (__cdecl *)(SOCKET,char *,int,int)' en 'long'
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(327): note: Aucun contexte dans lequel cette conversion est possible
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(331): error C3861: 'sd_called' : identificateur introuvable
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(336): error C3861: 'sd_called' : identificateur introuvable
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(346): error C2653: 'connection' : n'est pas un nom de classe ni d'espace de noms
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(352): error C3861: 'readable' : identificateur introuvable
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(360): error C2065: 'connection_socket' : identificateur non déclaré
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(360): error C2440: 'initialisation' : impossible de convertir de 'int (__cdecl *)(SOCKET,char *,int,int)' en 'long'
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(360): note: Aucun contexte dans lequel cette conversion est possible
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(364): error C3861: 'sd_called' : identificateur introuvable
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(369): error C3861: 'sd_called' : identificateur introuvable
2>c:\dlib-19.9\dlib\all../sockets/sockets_kernel_1.cpp(369): fatal error C1003: le nombre d'erreurs est supérieur à 100 ; arrêt de la compilation
2>jcapimin.cpp
2>jcapistd.cpp

Help using dlib with unity3d

Summary of your issue

I've compiled dlib as stated in the wiki but adding the dlls to the Assets/Plugins folder "doesn't work". I've tried DLLs with a simple C# program and works fine.

Environment

Windows 10 Anniversary
Unity 2017.4.1f1 64 bit, Microsoft Visual Studio Community 2017

Example code:

...
using DlibDotNet; // error
...

Output:

The type or namespace name 'DlibDotNet' could not be found (are you missing a using directive or an assembly reference?)

What did you intend to be?

How can I use your library with Unity3D? Probably it's my fault,

Memory Leak using ExtractImageChips<T>(Array2DBase, IEnumerable<ChipDetails>)

ExtractImageChips(Array2DBase, IEnumerable) leaks unmanaged memory. I use it in a realtime application every frame and end up with huge amounts of used memory that I verified to be unmanaged.

Looking at the code, I can see that Array<> does not clean up the elements (it just calls delete on the pointer). As Array<Array2D> has objects as content, I suspect this is where the memory gets leaked.

Any suggestions on how I can fix this?

Func loss_metric_operator_matrixs() used too much time

Summary of your issue

Environment

Win 10 64bit, .Net 4.7

What did you do when you faced the problem?

Face compare too slow,after testing, the reason was that loss_metric_operator_matrixs() use a lot of time in DlibDotNet.Native.Dnn.

What did you intend to be?

Is there any way to improve execution speed?

Build guide or nuget?

Do you have a short build guide?

I have a few problems with building it:

  • class "dlib::random_cropper" has no member "get_min_object_size" [...]\DlibDotNet\src\DlibDotNet.Native\dlib\image_transforms\random_cropper.h 85
  • 'dlib::random_cropper::set_min_object_size': function does not take 1 arguments[...]\dlibdotnet\src\dlibdotnet.native\dlib\image_transforms\random_cropper.h 119
  • it also took me a while to figure out where to place the built dlib library
  • against which version of dlib did you write your wrapper?

Another, even cooler option would be having a Nuget package.


That said/asked, it looks really well-done and I would love to use it and maybe even contribute.

CMake buil Error

Summary of your issue

Hi,
First of all thanks for you guys massive Effort.

am facing some problem when i build dlibdotnet.native. Please help me to Soleve this issue.

CMake Warning (dev) at CMakeLists.txt:7 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

variables like "MSVC" will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at CMakeLists.txt:16 (add_subdirectory):
add_subdirectory given source "/dlib" which is not an existing directory.

Environment

windows 10
cmake 3.12.0

Error while building DlibDotNet.Native

Any idea anout these errors

Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol DGifOpenFileName referenced in function "void __cdecl dlib::load_image<class dlib::matrix<signed char,0,0,class dlib::memory_manager_stateless_kernel_1,struct dlib::row_major_layout> >(class dlib::matrix<signed char,0,0,class dlib::memory_manager_stateless_kernel_1,struct dlib::row_major_layout> &,class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (??$load_image@V?$matrix@C$0A@$0A@V?$memory_manager_stateless_kernel_1@D@dlib@@Urow_major_layout@2@@dlib@@@dlib@@YAXAEAV?$matrix@C$0A@$0A@V?$memory_manager_stateless_kernel_1@D@dlib@@Urow_major_layout@2@@0@AEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z) DlibDotNet.Native C:\git\DlibDotNet\src\DlibDotNet.Native\build\load_image_dataset.obj 1
Error LNK2001 unresolved external symbol DGifOpenFileName DlibDotNet.Native

C:\git\DlibDotNet\src\DlibDotNet.Native\build\load_image.obj 1
Error LNK2019 unresolved external symbol DGifSlurp referenced in function "void __cdecl dlib::load_image<class dlib::matrix<signed char,0,0,class dlib::memory_manager_stateless_kernel_1,struct dlib::row_major_layout> >(class dlib::matrix<signed char,0,0,class dlib::memory_manager_stateless_kernel_1,struct dlib::row_major_layout> &,class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (??$load_image@V?$matrix@C$0A@$0A@V?$memory_manager_stateless_kernel_1@D@dlib@@Urow_major_layout@2@@dlib@@@dlib@@YAXAEAV?$matrix@C$0A@$0A@V?$memory_manager_stateless_kernel_1@D@dlib@@Urow_major_layout@2@@0@AEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z) DlibDotNet.Native

C:\git\DlibDotNet\src\DlibDotNet.Native\build\load_image_dataset.obj 1
Error LNK2001 unresolved external symbol DGifSlurp DlibDotNet.Native C:\git\DlibDotNet\src\DlibDotNet.Native\build\load_image.obj 1
Error LNK2019 unresolved external symbol DGifCloseFile referenced in function "void __cdecl dlib::load_image<class dlib::matrix<signed char,0,0,class dlib::memory_manager_stateless_kernel_1,struct dlib::row_major_layout> >(class dlib::matrix<signed char,0,0,class dlib::memory_manager_stateless_kernel_1,struct dlib::row_major_layout> &,class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (??$load_image@V?$matrix@C$0A@$0A@V?$memory_manager_stateless_kernel_1@D@dlib@@Urow_major_layout@2@@dlib@@@dlib@@YAXAEAV?$matrix@C$0A@$0A@V?$memory_manager_stateless_kernel_1@D@dlib@@Urow_major_layout@2@@0@AEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z) DlibDotNet.Native

C:\git\DlibDotNet\src\DlibDotNet.Native\build\load_image_dataset.obj	1	

Error LNK2001 unresolved external symbol DGifCloseFile DlibDotNet.Native

C:\git\DlibDotNet\src\DlibDotNet.Native\build\load_image.obj 1
Error LNK1120 3 unresolved externals DlibDotNet.Native

C:\git\DlibDotNet\src\DlibDotNet.Native\build\Debug\DlibDotNet.Native.dll 1

Trying to use DlibDotNet in x86

Hello!

I'm trying to use Dlib in a project with x86 Target.
I already build DlibDotNet.dll and DlibDotNet.Native.dll , but i couldn't build the DlibDotNet.Native.Dnn.dll :(

Do you have any ideia do help me?

Suggestion: Public interface to quickly convert a byte array to Array2D

I saw that you are using a method in BitmapExtensions to convert from Bitmaps to Array2D. This is a bit limiting and the methods you are set to be private or internal.
So I opened up the interface by adding a public method to DlibDotNet that just does this.
public static void rawToArray2D(IntPtr src, ImageTypes dstType, IntPtr dst, bool rgbReverse, uint height, uint width, uint stride, uint channels) { Dlib.Native.extensions_convert_managed_image_to_array(src, dstType.ToNativeArray2DType(), dst, rgbReverse, height, width, stride, channels); }

I think it would be nice to have this in by default as it opens a lot of possibilities to use data from many kinds of sensor and cameras easily. I'm using this with Unity3D and a Realsense D400 and it's much quicker to convert a textures and sensor data that way than with doing it manually with the external interfaces.

Error Loading Projects

Summary of your issue

When loading the solution to VS 2015 it doesnt load all projects and some are unavailable
all dlibdotnet.dll references are yellow marked creating errors in code lines

Environment

Windows 10 64

What did you do when you faced the problem?

I redo everything all over again walkingthrough the wiki steps , same thing

Cannot set the contents of an "Array2D" directly

Summary of your issue

There does not appear to be a method to set the contents of an Array2D directly (either on a per-element basis or on a bulk-basis via a byte array).

Example code:

Examples use Dlib.LoadImage<byte>() to populate Array2D objects (which loads an image from a file). There does not appear to be a safe way to set them to arbitrary byte[] arrays...

What did you intend to be?

Ideally, there would be a Dlib.LoadImageData<byte>() function which takes a byte[] as input and fills the Array2D with data.

Implement function to convert Array2D<T> and Matrix<T> to .NET image classes

Summary of your issue

There is no function to convert DlibDotNet.Array2D to System.Windows.Media.Imaging.BitmapSource and System.Drawing.Bitmap.

Environment

Windows

What did you do when you faced the problem?

Almost developer want to treat image data in WinForms and WPF. But they can not image data from DlibDotNet.

Example code:

var array = DlibDotNet.Dlib.LoadImage<RgbPixel>("test.bmp");
var bitmap = array.ToBitmapSource();

Output:

N/A

What did you intend to be?

N/A

SEHException in DnnMmodFaceDetection example

Summary of your issue

Hello again!
I compiled the libraries for CUDA support, and was able to run the DnnFaceRecognition fine. Using the same libraries with DnnMmodFaceDetection however, I run into an SEHException (see output below). I think I'm not the only one, since in #26, another user (postacik) mentions getting an error at this line:
var ret = Native.loss_mmod_deserialize(str, networkType);

It appears that when they got things working, they were using DnnFaceRecognition, but perhaps DnnMmodFaceDetection still had some problem?

I came upon this issue because I was using the built-in face detection/alignment through FaceRecognitionDotNet.

Environment

VS2017 (15.7.4)
CMake 3.12.3
DlibDotNet 19.15.0
Tried building CUDA libs with Dlib 19.8, 19.15, and 19.16 + CUDA 9.2.
Also tried Dlib 19.8 + CUDA 9.0.
XPS15 laptop with GTX1050

What did you do when you faced the problem?

I just tried to run the DnnFaceRecognition, DnnMmodFaceDetection, and DnnInception examples, with different combinations of CUDA/Dlib versions. Only the DnnMmodFaceDetection example kept failing.

Example code:

dotnet run --configuration Release mmod_human_face_detector.dat 2007_007763.jpg

Output:

Unhandled Exception: System.Runtime.InteropServices.SEHException: External component has thrown an exception.
   at DlibDotNet.Dnn.LossMmod.Native.loss_mmod_operator_matrixs(IntPtr obj, Int32 type, MatrixElementType element_type, IntPtr matrixs, Int32 templateRows, Int32 templateColumns, UInt64 batchSize, IntPtr& ret)
   at DlibDotNet.Dnn.LossMmod.Operator[T](IEnumerable`1 images, UInt64 batchSize) in C:\Users\edwin\Desktop\cuda test\DlibDotNet-master\src\DlibDotNet\Dnn\LossMmod.cs:line 139
   at DnnMmodFaceDetection.Program.Main(String[] args) in C:\Users\edwin\Desktop\cuda test\DlibDotNet-master\examples\DnnMmodFaceDetection\Program.cs:line 36

What did you intend to be?

Probably some detected faces (I'm guessing). Thanks for your time!

Help for using with Unity 3D

I'm actually developing with Unity3D on Win 64. I wanna use DlibDotNet with Unity. So the idea is that I call WebcamTexture class inside of Unity for capturing image from webcam. Then, this class can return to me a Color32 Array ( a Color32 type contains 4 bytes of rgba, just like RGBAlphaPixel ). Next, i convert this color32 array into byte array by;

byte[] bytes = new byte[colors.Length * 4];
for (int i = 0; i < bytes.Length/4; i += 4)
{
bytes[i]= colors[i].r;
bytes[i+1] = colors[i].g;
bytes[i+2] = colors[i].b;
bytes[i+3] = colors[i].a;

        }

Finally, i apply this into LoadImageData function in order to recognize the number of face. (like Face Detection example) But the result is always 0.

Can you give me an idea ?

Thanks

Dlib object detection and tracking

Hi,

I trained a object detector in python using Dlib. It detects and tracks the object successfully.
Now I would like to do the same in C#. I know that I can call the correlation tracker in C#. However, it seems that I can't call the dlib.simple_object_detector() function which accepts the trained model. Is there any alternative to this?
Also is there any implementation of the dlib fast multiclass object detection method?http://blog.dlib.net/2017/09/fast-multiclass-object-detection-in.html
More information here: http://dlib.net/train_object_detector.py.html

Thanks,

Vinícius

dlls dependencies

I try to transfer my app (facelandmark) to run on another pc than my dev machine.

Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'DlibDotNet.Native.dll': Modul was not found. (Exception from HRESULT: 0x8007007E)
   at DlibDotNet.ImageWindow.Native.image_window_new()

the dlls are there? Do I need dlib dlls? or additional .NET installs?

It doesn't seem to be compatible with OpenCVSharp's face detection module.

Summary of your issue

It doesn't seem to be compatible with OpenCVSharp's face detection module.

Environment

Win10x64,OpenCVSharp 3.4.1,DlibDotNet19.15.0.20181008

What did you do when you faced the problem?

just init OpenCVSharp CascadeClassifier and init ShapePredictor(when start to load shape_predictor_68_face_landmarks.dat)

Example code:

    frontalface_cascade = new CascadeClassifier(Application.streamingAssetsPath + @"/haarcascades/haarcascade_frontalface_alt.xml");
    eye_cascade = new CascadeClassifier(Application.streamingAssetsPath + @"/haarcascades/haarcascade_eye_tree_eyeglasses.xml");//haarcascade_eye

_ShapePredictor = ShapePredictor.Deserialize(@"E:\U3Dproject\OpenCVSharp\Assets\StreamingAssets" + @"\shape_predictor_68_face_landmarks.dat");

Build error: Windows: Severity Code Description Project File Line Suppression State Error C2039 'get_min_object_size': is not a member of 'dlib::random_cropper'

Getting the following error while doing the build:

Severity Code Description Project File Line Suppression State
Error C2039 'get_min_object_size': is not a member of 'dlib::random_cropper' DlibDotNet.Native c:\git\dlibdotnet\src\dlibdotnet.native\dlib\image_transforms\random_cropper.h 85

Error C2660 'dlib::random_cropper::set_min_object_size': function does not take 1 arguments DlibDotNet.Native c:\git\dlibdotnet\src\dlibdotnet.native\dlib\image_transforms\random_cropper.h 119

Any idea how to solve this issue?

Using DlibDotNet.Extensions with .NET Standard 2.0

I try using DlibDotNet.Extensions under .NET Standard 2.0 for BitmapExtensions, however the project doesn't build because WriteableBitmap is not available when running .NET Standard 2.0. Does anyone know any workarounds for this issue?
Thanks for DlibDotNet, it's a great piece of software 👍

Abolition of MatrixOp

The following code are equivalent.

dlib::matrix<double, 0, 0> m;
dlib::matrix_op<op_heatmap<dlib::matrix<double, 0, 0>>> heat = dlib::heatmap(m);
dlib::matrix<double, 0, 0> m;
dlib::matrix<double, 0, 0> heat = dlib::heatmap(m);

Therefore, MatrixOp Dlib.Heatmap(MatrixBase image) should be equivalent to Matrix Dlib.Heatmap(Matrix image)

Using other library as base types

Hey guys, how's doing?

Well, I'm wondering if is possible to use other libraries to deal with math instead of DlibDotNet related.

E.g: can I use Matrix from MathDotNet library instead of using DlibDotNet's Matrix<TElement>

Any direction on how to do it?

Thanks!

VS 2015 build failed

When trying to build dlibdotnet on VS 2015 i got many errors (both cmd and vs).
Any suggestions on how I can fix this?
( Win10 / VS2015 / DLIB-19.13 / CUDA9.2 + CUDNN )


DlibDotNet.Native.dir\Release/dlib/vector.cpp.obj
CMakeCXXCompilerId.cpp.obj : error LNK2005: main already defined in CMakeCXXCompilerId.cpp.obj [C:\DlibDotNet\src\DlibD
otNet.Native\build\DlibDotNet.Native.vcxproj]
CMakeCXXCompilerId.cpp.obj : error LNK2005: "char const * const info_compiler" (?info_compiler@@3PEBDEB) already define
d in CMakeCXXCompilerId.cpp.obj [C:\DlibDotNet\src\DlibDotNet.Native\build\DlibDotNet.Native.vcxproj]
CMakeCXXCompilerId.cpp.obj : error LNK2005: "char const * const info_platform" (?info_platform@@3PEBDEB) already define
d in CMakeCXXCompilerId.cpp.obj [C:\DlibDotNet\src\DlibDotNet.Native\build\DlibDotNet.Native.vcxproj]
CMakeCXXCompilerId.cpp.obj : error LNK2005: "char const * const info_arch" (?info_arch@@3PEBDEB) already defined in CMa
keCXXCompilerId.cpp.obj [C:\DlibDotNet\src\DlibDotNet.Native\build\DlibDotNet.Native.vcxproj]
CMakeCXXCompilerId.cpp.obj : error LNK2005: "char const * const info_language_dialect_default" (?info_language_dialect_
default@@3PEBDEB) already defined in CMakeCXXCompilerId.cpp.obj [C:\DlibDotNet\src\DlibDotNet.Native\build\DlibDotNet.N
ative.vcxproj]
Creating library C:/DlibDotNet/src/DlibDotNet.Native/build/Release/DlibDotNet.Native.lib and object C:/DlibDotNet/
src/DlibDotNet.Native/build/Release/DlibDotNet.Native.exp
C:\DlibDotNet\src\DlibDotNet.Native\build\Release\DlibDotNet.Native.dll : fatal error LNK1169: one or more multiply def
ined symbols found [C:\DlibDotNet\src\DlibDotNet.Native\build\DlibDotNet.Native.vcxproj]
Done Building Project "C:\DlibDotNet\src\DlibDotNet.Native\build\DlibDotNet.Native.vcxproj" (default targets) -- FAILED
.

Done Building Project "C:\DlibDotNet\src\DlibDotNet.Native\build\ALL_BUILD.vcxproj" (default targets) -- FAILED.

Build FAILED.

"C:\DlibDotNet\src\DlibDotNet.Native\build\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\DlibDotNet\src\DlibDotNet.Native\build\DlibDotNet.Native.vcxproj" (default target) (3) ->
(ClCompile target) ->
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ppltaskscheduler.h(52): warning C4355: 'this': used in
base member initializer list [C:\DlibDotNet\src\DlibDotNet.Native\build\DlibDotNet.Native.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\pplwin.h(60): warning C4355: 'this': used in base memb
er initializer list [C:\DlibDotNet\src\DlibDotNet.Native\build\DlibDotNet.Native.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ppltasks.h(1467): warning C4355: 'this': used in base
member initializer list [C:\DlibDotNet\src\DlibDotNet.Native\build\DlibDotNet.Native.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ppltaskscheduler.h(52): warning C4355: 'this': used in
base member initializer list [C:\DlibDotNet\src\DlibDotNet.Native\build\DlibDotNet.Native.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\pplwin.h(60): warning C4355: 'this': used in base memb
er initializer list [C:\DlibDotNet\src\DlibDotNet.Native\build\DlibDotNet.Native.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ppltasks.h(1467): warning C4355: 'this': used in base
member initializer list [C:\DlibDotNet\src\DlibDotNet.Native\build\DlibDotNet.Native.vcxproj]

"C:\DlibDotNet\src\DlibDotNet.Native\build\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\DlibDotNet\src\DlibDotNet.Native\build\DlibDotNet.Native.vcxproj" (default target) (3) ->
(Link target) ->
CMakeCXXCompilerId.cpp.obj : error LNK2005: main already defined in CMakeCXXCompilerId.cpp.obj [C:\DlibDotNet\src\Dli
bDotNet.Native\build\DlibDotNet.Native.vcxproj]
CMakeCXXCompilerId.cpp.obj : error LNK2005: "char const * const info_compiler" (?info_compiler@@3PEBDEB) already defi
ned in CMakeCXXCompilerId.cpp.obj [C:\DlibDotNet\src\DlibDotNet.Native\build\DlibDotNet.Native.vcxproj]
CMakeCXXCompilerId.cpp.obj : error LNK2005: "char const * const info_platform" (?info_platform@@3PEBDEB) already defi
ned in CMakeCXXCompilerId.cpp.obj [C:\DlibDotNet\src\DlibDotNet.Native\build\DlibDotNet.Native.vcxproj]
CMakeCXXCompilerId.cpp.obj : error LNK2005: "char const * const info_arch" (?info_arch@@3PEBDEB) already defined in C
MakeCXXCompilerId.cpp.obj [C:\DlibDotNet\src\DlibDotNet.Native\build\DlibDotNet.Native.vcxproj]
CMakeCXXCompilerId.cpp.obj : error LNK2005: "char const * const info_language_dialect_default" (?info_language_dialec
t_default@@3PEBDEB) already defined in CMakeCXXCompilerId.cpp.obj [C:\DlibDotNet\src\DlibDotNet.Native\build\DlibDotNet
.Native.vcxproj]
C:\DlibDotNet\src\DlibDotNet.Native\build\Release\DlibDotNet.Native.dll : fatal error LNK1169: one or more multiply d
efined symbols found [C:\DlibDotNet\src\DlibDotNet.Native\build\DlibDotNet.Native.vcxproj]

6 Warning(s)
6 Error(s)

CUDA compile error

I downloaded the latest master branch and tried to generate build files with CUDA support.

Below you can find the output of the cmake command:

https://pastebin.com/ifjik7wX

Can you please tell me what the problem may be?

I can successfully generate build files without CUDA support.

Build Errors

Hi,

After following your instructions on how to build the DlibDotNet.Native, I have encountered the following error:

"C:\Users\User_Lab\Desktop\HFACE\DlibDotNet-master\src\DlibDotNet.Native\build\ALL_BUILD.vcxproj" (default target) (1) -> "C:\Users\User_Lab\Desktop\HFACE\DlibDotNet-master\src\DlibDotNet.Native\build\DlibDotNet.Native.vcxproj" (default targ et) (3) -> (Link target) -> LINK : fatal error LNK1104: cannot open file 'C:\Users\User_Lab\Desktop\HFACE\dlib-19.7\examples\build\dlib_build\Rel ease\dlib.lib' [C:\Users\User_Lab\Desktop\HFACE\DlibDotNet-master\src\DlibDotNet.Native\build\DlibDotNet.Native.vcxproj ]
I'm using Visual Studio 2017, DLIB 19.7, giflib-5.1.4, cmake 3.11 on windows 10.

Any help?
Thanks

Face Recognition with DlibDotNet

Hi,
I could not find face recognition related functions in the library. Can you explain how these can be included in DlibDotNet.Native.dll?

Thanks :)

Trying to build on MacOS

When trying to build DlibDotNetNative on MacOS, I get the following:

[thomas:~/Downloads/DlibDotNet-master/src/DlibDotNet.Native/build] $ cmake --build . --config Release
[ 1%] Building CXX object CMakeFiles/DlibDotNet.Native.dir/dlib/array/array.cpp.o
In file included from /Users/thomas/Downloads/DlibDotNet-master/src/DlibDotNet.Native/dlib/array/array.cpp:1:
In file included from /Users/thomas/Downloads/DlibDotNet-master/src/DlibDotNet.Native/dlib/array/array.h:5:
In file included from /usr/local/include/dlib/array.h:6:
In file included from /usr/local/include/dlib/array/array_kernel.h:7:
/usr/local/include/dlib/array/../interfaces/enumerable.h:107:17: error: unknown type name 'size_t'
virtual size_t size (
^
In file included from /Users/thomas/Downloads/DlibDotNet-master/src/DlibDotNet.Native/dlib/array/array.cpp:1:
/Users/thomas/Downloads/DlibDotNet-master/src/DlibDotNet.Native/dlib/array/array.h:190:5: warning: cannot delete expression with
pointer-to-'void' type 'void *' [-Wdelete-incomplete]
delete obj;
^ ~~~
1 warning and 1 error generated.
make[2]: *** [CMakeFiles/DlibDotNet.Native.dir/dlib/array/array.cpp.o] Error 1
make[1]: *** [CMakeFiles/DlibDotNet.Native.dir/all] Error 2
make: *** [all] Error 2

How to Load Image From Stream Or SoftwareBitmap ?

It seems that DlibDotNet could only load image from file ? However I want to know that if we could load image from Stream Or SoftwareBitmap ? Sometimes I need to process the camera frame in realtime.
Thanks a lot.

Questions

Hi,

Is the lib compatible with WPF applications?

Can I use it with image classes of WPF?

TODO

  • Remove delete void pointer
  • Point, DPoint, DRectangle and Rectangle converted to struct type
  • Compile on Linux
  • Change Pass-by-value to Pass-by-reference for copy object in native #lib
  • Run on Linux
  • Run on Mac
  • Support GIF (After mod CMakeLists.txt, giflib is not available)
  • Clean Native source code

Compiling error for DlibDotNet.Native.Dnn

I encountered a problem while compile DlibDotNet.Native.Dnn, it turned out that the heap space reached os's limit while compiling the code loss_multiclass_log_per_pixel.cpp

Environment

Windows 10, 16G memory, Cmake 3.12.2 and Visual Studio 2017 Community Edition

execute the command cmake --build . --config Release under DlibDot.Native.Dnn\build directory

CustomBuild:
Building Custom Rule C:/code/DlibDotNet/src/DlibDotNet.Native.Dnn/CMakeLists.txt
CMake does not need to re-run because C:/code/DlibDotNet/src/DlibDotNet.Native.Dnn/build/CMakeFiles/generate.stamp is
up-to-date.
ClCompile:
D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\CL.exe /c /I"
C:\code\dlib-19.16\dlib.." /nologo /W3 /WX- /diagnostics:classic /O2 /Ob2 /D WIN32 /D _WINDOWS /D NDEBUG /D DLIB_HAV
E_SSE2 /D DLIB_JPEG_SUPPORT /D DLIB_PNG_SUPPORT /D "CMAKE_INTDIR="Release"" /D DlibDotNet_Native_Dnn_EXPORTS /D _WI
NDLL /D _MBCS /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"DlibDotNet.Native.Dnn.dir\Re
lease\" /Fd"DlibDotNet.Native.Dnn.dir\Release\vc141.pdb" /Gd /TP /wd4819 /errorReport:queue /bigobj C:\code\DlibDot
Net\src\DlibDotNet.Native.Dnn\dlib\dnn\input.cpp C:\code\DlibDotNet\src\DlibDotNet.Native.Dnn\dlib\dnn\loss\loss_metr
ic.cpp C:\code\DlibDotNet\src\DlibDotNet.Native.Dnn\dlib\dnn\loss\loss_mmod.cpp C:\code\DlibDotNet\src\DlibDotNet.Nat
ive.Dnn\dlib\dnn\loss\loss_multiclass_log.cpp C:\code\DlibDotNet\src\DlibDotNet.Native.Dnn\dlib\dnn\loss\loss_multicl
ass_log_per_pixel.cpp C:\code\DlibDotNet\src\DlibDotNet.Native.Dnn\dlib\dnn\output.cpp C:\code\DlibDotNet\src\DlibDot
Net.Native.Dnn\dlib\dnn\tensor.cpp C:\code\DlibDotNet\src\DlibDotNet.Native.Dnn\dlib\dnn\trainer.cpp
input.cpp
loss_metric.cpp
loss_mmod.cpp
loss_multiclass_log.cpp
loss_multiclass_log_per_pixel.cpp
c:\code\dlib-19.16\dlib\dnn\core.h(912): fatal error C1060: Compiler is out of heap space [C:\code\DlibDotNet\src\DlibDotNet.Native.Dnn\bui
ld\DlibDotNet.Native.Dnn.vcxproj]
output.cpp
tensor.cpp
trainer.cpp

Comparing matrices returns ArgumentException

Summary of your issue

When I create a matrix manually using new Matrix(row, col), the TemplateColumn is 0, and there is no way to change it. When I try to compare this matrix with one generated from the FaceEncodings() method of FaceRecognitionDotNet, I get an ArgumentException. The second matrix from FaceEncodings() has TemplateColumn = 1.

I posted this in DlibDotNet instead of FaceRecognitionDotNet, since I think this has to do with the matrices themselves, and not specifically face recognition.

Environment

FaceRecognitionDotNet
DlibDotNet nuget (version 19.15.0.20180808-pre)
UWP app

What did you do when you faced the problem?

Just calculate the euclidean distance from the double[] arrays of the matrices, instead of using the subtraction operator for the matrices in the FaceDistance() method.

Example code:

        // create encoding A from saved feature vector
        public FaceEncoding(double[] array)
        {
            this._Encoding = new Matrix<double>(128, 1);
            this._Encoding.Assign(array);
        }

        // get encoding B from FaceRecognitionDotNet's FaceEncodings() method

        // try to compare the two encodings
        double faceDiff = FaceRecognition.FaceDistance(A, B);

Output:

System.ArgumentException: Value does not fall within the expected range. at DlibDotNet.Matrix`1.op_Subtraction(Matrix`1 lhs, Matrix`1 rhs)

Fails at this line: using (var diff = faceEncoding.Encoding - faceToCompare.Encoding)

I looked at the two FaceEncoding's matrices, the only difference is the TemplateColumns property. I can't set this property manually when constructing a matrix with new Matrix(row, col), but I see that Dlib might be checking this field.

matrix

            if (templateRows != matrix2.TemplateRows)
                throw new ArgumentException();
            if (templateColumns != matrix2.TemplateColumns)
                throw new ArgumentException();

What did you intend to be?

Return diff score between the two FaceEncodings.

p.s. Thanks for all your work on both DlibDotNet and FaceRecognitionDotNet!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.