ImageNet with dlib

A very simple example ImageNet with dlib and openframeworks.

source:

Hi,
Thanks for sharing. I started to explore dlib few days ago also.
Why don’t you use this addon https://github.com/roymacdonald/ofxDLib and have all libs in one place?
Are there any advantages of your approach?

Hi seb,

the examples I have shared are extrapolated from a project of Robotics,
where I decided not to use openFrameworks as a basic environment.

then I found two different addons to dlib I don’t know who to support! There are still a lot of examples that I want to share and some data trained by me.

of course it is comfortable to have everything in one place, I’m always willing to cooperate.

good day

Hey @kashim I know that there is my addon and @bakercp one. Both are quite similar in the sense that what these mostly do is to is to transform data back and forth from OF and dlib.
Just start using any of these addons, the one that suits you best. I’d like to have both addons merged in the near future.

Best!

Hey @roymacdonald I started with your addon but I had some issues with compiling it and this was very helpful:

On Windows there was an error during compilation:
Error C3861 'CreateSemaphore': identifier not found (compiling source file src\main.cpp) example-FaceTracker c:\users\user\documents\of\of_v0.9.3_vs_release\addons\ofxdlib\libs\dlib\threads\threads_kernel_1.h 80
And there is a solution in ofxFaceTracker2 for it.
It would be nice to merge all them together. Also I like the idea that the model is in one folder which is located in addon place and there is no need to copy it to project’s folder but I haven’t checked it yet.

BR
Seba

HEy, thanks for the tip. I will check and apply that fix.
Yeah it is a good idea to have the models just once. I will add that too.
best!

Hi @SebastianSobotka, did you solve ‘CreateSemaphore’ issue or did you use ofxFaceTracker2 without any issues?

I tried ofxFaceTracker2 and I had that issue. Couldn’t find a solution to it, though.

Hey @SebastianSobotka where is the following solution

I’m on osx now and that CreateSemaphore’ issues is windows related.
I remember seeing this in the past and if I’m not wrong the fix was just to add some includes.
I’ll let you know if I find a solution.

best

Here in this file:

These lines are crucial.

#ifndef CreateSemaphore
#ifdef UNICODE
#define CreateSemaphore CreateSemaphoreW
#endif
#endif

@roymacdonald , I also needed to remove HOGtrainer.h and HOGtrainer.cpp files beceuse I had some issues with them and for my purpose I didn’t need them. Finally, I was able to compile the example-FaceTracker .

great. Thanks. I’ll update my files asap.
Best.