Coder Social home page Coder Social logo

bakercp / ofxdlib Goto Github PK

View Code? Open in Web Editor NEW
52.0 11.0 15.0 472 KB

An openFrameworks wrapper for dlib. http://dlib.net/

License: MIT License

Makefile 1.40% Shell 5.49% C++ 93.12%
dlib machine-learning dnn deep-learning computer-vision openframeworks

ofxdlib's Introduction

This is under development currently so, your please post questions to the issues for now.

ofxDlib

Description

An openFrameworks wrapper for dlib.

Features

  • Toll-free openFrameworksdlib bridges using dlib dlib/generic_image.h interface.
  • openFrameworksdlib type conversions.
  • dlib helper functions.

Getting Started

TL;DR

  • From the scripts/ directory ...
    • ./bootstrap.sh
  • From the example_dlib_3d_point_cloud/ directory ...
    • make && make run

For more, see docs/GETTING_STARTED.md.

Troubleshooting

For more, see docs/TROUBLESHOOTING.md.

Documentation

API documentation can be found here.

Build Status

Linux, macOS Build Status

Visual Studio, MSYS Build status

Compatibility

Currently NOT Compatible with < 0.10.0, thus we have no stable branch as noted below. The stable branch of this repository is meant to be compatible with the openFrameworks stable branch, which corresponds to the latest official openFrameworks release.

The master branch of this repository is meant to be compatible with the openFrameworks master branch.

Some past openFrameworks releases are supported via tagged versions, but only stable and master branches are actively supported.

Versioning

This project uses Semantic Versioning, although strict adherence will only come into effect at version 1.0.0.

Licensing

See LICENSE.md.

Contributing

Check out the Help Wanted tag in the issues section for specific ideas or propose your own new ideas.

You can also take a look at the docs/TODO.md for more ideas.

Pull Requests are always welcome, so if you make any improvements please feel free to float them back upstream :)

  1. Fork this repository.
  2. Create your feature branch (git checkout -b my-new-feature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to the branch (git push origin my-new-feature).
  5. Create new Pull Request.

ofxdlib's People

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ofxdlib's Issues

cblas problem?

On Ubuntu 16.04 64 bits :

When running build.sh i get
-- C++11 activated.
-- Searching for BLAS and LAPACK
-- Checking for module 'cblas'
-- No package 'cblas' found
-- Found OpenBLAS library
-- Looking for sgetrf_single
-- Looking for sgetrf_single - not found
-- Found LAPACK library
-- Configuring done
-- Generating done

then when trying to compile an example i get many undefined references
to cblas_sgemm', dgesvd_'

How to convert track.second.alignedFace() to matrix<rgb_pixel> ?

I am trying to combine the example_dlib_dnn_face_recognition and example_face_tracking. But both use different ways to get faces.
In order to get a tracked face in to the vector that contains all faces std::vector<matrix<rgb_pixel>> faces I need to create a faceChip.

track.second.alignedFace() returns ofPixels but ofxDlib::toDlib(my_of_pixels) does not work.

also tried this

                        ofPixels pix = track.second.alignedFace();
                        matrix<rgb_pixel> face_chip;
                        face_chip = ofxDlib::to_rowm(pix);
                        all_faces.push_back(move(face_chip));

I should mention I am using the develop branch.

I thought this should work:
https://github.com/bakercp/ofxDlib/blob/develop/libs/ofxDlib/include/ofx/Dlib/Utils.h#L314

duplicate symbol _jpeg_natural_order (conflict between dlib internal jpeg and freeimage)

Hi, I am trying to compile my oF project with VS Code on Mac using an extension below.
https://github.com/hiroMTB/vscode_oF

When I try compile a project with ofxDlib I get the error

duplicate symbol _jpeg_natural_order in:
/mypath/of_v0.10.0RC4_osx_release/addons/ofxDlib/libs/dlib/lib/osx/libdlib.a(jutils.cpp.o)
/mypath/of_v0.10.0RC4_osx_release/libs/FreeImage/lib/osx/freeimage.a(jutils.o-x86_64)
ld: 1 duplicate symbol for architecture x86_64

It seems that a jpeg library included in libdlib.a conflicts with freeimage in oF.
As Xcode projects generated by ProjectGenerator don't show this error, I think I am missing some configuration.
Do you have any idea for this?

Another idea is re-compile libdlib.a without JPEG support. I also tried re-compile dlib-19.10 with CMake but got the other error,

"USER_ERROR__missing_dlib_all_source_cpp_file__OR__inconsistent_use_of_DEBUG_or_ENABLE_ASSERTS_preprocessor_directives"

Enabling "DLIB_ENABLE_ASSERTS" seems not solving this problem.

dlib::image_load_error: Error, unable to allocate png structure while opening file

I'm on macOS 10.12.6 with Xcode 9.2 and OF 0.10.1 (stable) and the ofxDlib develop branch.

running in to this problem when trying to run face regoncitnion example:

libc++abi.dylib: terminating with uncaught exception of type dlib::image_load_error: Error, unable to allocate png structure while opening file /Applications/of_v0.10.1_osx_release/addons/ofxDlib/example_dlib_dnn_face_recognition/bin/data/bald_guys.png
This is happening because you compiled against one version of libpng, but then linked to another.
Compiled against libpng version: 1.4.12
Linking to this version of libpng: 1.6.16

Add Android Support

  • Create / Update Apothecary Script (Version from ofxFaceTracker2 is currently used).
  • Add Travis Test.
  • Add Simple Android Example.

'gif_lib.h' file not found

I'm on macOS 10.12.6 with Xcode 9.2 and OF 0.10.1 (stable) and the ofxDlib master branch.

bootstrap.sh installed everything without error message.
But when I am trying to compile the face regoncitnion example I get this error message:

/Applications/of_v0.10.1_osx_release/addons/ofxDlib/libs/dlib/include/dlib/image_loader/load_image.h:14:10: 'gif_lib.h' file not found

'class dlib::random_cropper’ has no member named ‘set_max_object_height’

This is for /example_dnn_face_recognition

home/nanu/visuals/openFrameworks/addons/ofxDlib/example_dnn_face_recognition/src/ofApp.cpp: In function ‘std::vector<dlib::matrix<dlib::rgb_pixel> > jitter_image(const dlib::matrix<dlib::rgb_pixel>&)’:
/home/nanu/visuals/openFrameworks/addons/ofxDlib/example_dnn_face_recognition/src/ofApp.cpp:20:20: error: ‘class dlib::random_cropper’ has no member named ‘set_max_object_height’; did you mean ‘set_max_object_size’?
     cropper.data().set_max_object_height(0.99999);
                    ^~~~~~~~~~~~~~~~~~~~~
                    set_max_object_size
/home/nanu/visuals/openFrameworks/addons/ofxDlib/example_dnn_face_recognition/src/ofApp.cpp:22:20: error: ‘class dlib::random_cropper’ has no member named ‘set_min_object_height’; did you mean ‘set_min_object_size’?
     cropper.data().set_min_object_height(0.97);
                    ^~~~~~~~~~~~~~~~~~~~~
                    set_min_object_size
In file included from /home/nanu/visuals/openFrameworks/addons/ofxDlib/libs/dlib/include/dlib/dnn/../image_processing/../image_transforms.h:28:0,
                 from /home/nanu/visuals/openFrameworks/addons/ofxDlib/libs/dlib/include/dlib/dnn/../image_processing/scan_image_boxes.h:12,
                 from /home/nanu/visuals/openFrameworks/addons/ofxDlib/libs/dlib/include/dlib/dnn/../image_processing/setup_hashed_features.h:8,
                 from /home/nanu/visuals/openFrameworks/addons/ofxDlib/libs/dlib/include/dlib/dnn/../image_processing.h:17,
                 from /home/nanu/visuals/openFrameworks/addons/ofxDlib/libs/dlib/include/dlib/dnn/input.h:10,
                 from /home/nanu/visuals/openFrameworks/addons/ofxDlib/libs/dlib/include/dlib/dnn.h:13,
                 from /home/nanu/visuals/openFrameworks/addons/ofxDlib/src/ofxDlib.h:16,
                 from /home/nanu/visuals/openFrameworks/addons/ofxDlib/example_dnn_face_recognition/src/ofApp.h:35,
                 from /home/nanu/visuals/openFrameworks/addons/ofxDlib/example_dnn_face_recognition/src/ofApp.cpp:8:
/home/nanu/visuals/openFrameworks/addons/ofxDlib/libs/dlib/include/dlib/dnn/../image_processing/../image_transforms/random_cropper.h: In instantiation of ‘void dlib::random_cropper::operator()(const image_type1&, const std::vector<dlib::mmod_rect>&, image_type2&, std::vector<dlib::mmod_rect>&) [with image_type1 = dlib::matrix<dlib::rgb_pixel>; image_type2 = dlib::matrix<dlib::rgb_pixel>]’:
/home/nanu/visuals/openFrameworks/addons/ofxDlib/example_dnn_face_recognition/src/ofApp.cpp:33:64:   required from here

OSX: Needs homebrew include path in order to find `gif_lib.h`

Hi

Needed to apply the following patch in order for Xcode to find my Homebrew-installed giflib. Not filing a PR because I'm not sure it's a good fix to add it in the common: section.

diff --git a/addon_config.mk b/addon_config.mk
index cc2ffc2..5d9429a 100644
--- a/addon_config.mk
+++ b/addon_config.mk
@@ -16,6 +16,7 @@ common:
        # Manually add the includes and source.
        ADDON_INCLUDES = libs/dlib/include
        ADDON_INCLUDES += libs/ofxDlib/include
+       ADDON_INCLUDES += /opt/homebrew/include
        ADDON_INCLUDES += src
 
 osx:

errors when compiling in ubuntu

i got these errors when i try to compile an example in linux

/OF/addons/ofxDlib/libs/ofxDlib/include/ofx/Dlib/Utils.h:29:14: error: ‘glm’ does not name a type
 inline const glm::tvec4<T>& toOf(const dlib::vector<T, 4>& v)
              ^
/OF/addons/ofxDlib/libs/ofxDlib/include/ofx/Dlib/Utils.h:39:14: error: ‘glm’ does not name a type
 inline const glm::tvec3<T>& toOf(const dlib::vector<T, 3>& v)
              ^
/OF/addons/ofxDlib/libs/ofxDlib/include/ofx/Dlib/Utils.h:49:14: error: ‘glm’ does not name a type
 inline const glm::tvec2<T>& toOf(const dlib::vector<T, 2>& v)
              ^
/OF/addons/ofxDlib/libs/ofxDlib/include/ofx/Dlib/Utils.h:59:14: error: ‘glm’ does not name a type
 inline const glm::tvec1<T>& toOf(const dlib::vector<T, 1>& v)
              ^
/OF/addons/ofxDlib/example_3d_point_cloud/src/ofApp.cpp: In member function ‘virtual void ofApp::setup()’:
/OF/addons/ofxDlib/example_3d_point_cloud/src/ofApp.cpp:36:42: error: no matching function for call to ‘ofMesh::addVertex(ofPixels_<float>)’
         mesh.addVertex(ofxDlib::toOf(val));
                                          ^

run examples without cuda and cudnn

Hello
could i run those examples without cuda and cudnn installed ,?
i use ubuntu 16.04 in vmware , so i think cuda may not be installed ...

integrate various dlib-based addons to use a common library wrapper.

Hey chris, hope you are doing well.
I also have an addon for dlib. mine is ofxDLib and your´s ofxDlib.
I think that we could integrate both and have just one addon for dlib.
let me check the differences and I'll come back with an idea of an approach for such.
what do you think?

best

Use of undeclared identifier 'faceRects' in hipster dog example

In the hipster dog example, using of0.10.0 on OSXRC3 I'm getting 2 errors...

Invalid range expression of type 'auto'; no viable 'begin' function available

and

Use of undeclared identifier 'faceRects'; did you mean 'faceRect'?

on this line:

for (auto& faceRect: faceRects)

because ofApp.h is missing:

// Our face detection bounding boxes.
    std::vector<dlib::rectangle> faceRects;

bootstrap.sh not working on Raspberry Pi

Hi,

I ran bootstrap.sh with OF from github. First error I got was that it couldn't find multistrap so I had to add /usr/sbin to the path. Next there was a permission error...

chroot: cannot change root directory to '/home/pi/openFrameworks/scripts/apothecary/scripts/linuxarmv6l/raspbian/': Operation not permitted

...so I sudo'ed it. Now up to this error...

chfn: PAM: Authentication failure
adduser: `/usr/bin/chfn -f systemd Time Synchronization systemd-timesync' returned error code 1. Exiting.
dpkg: error processing package systemd (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up libatk-bridge2.0-0:armhf (2.22.0-2) ...
Setting up sysv-rc (2.88dsf-59.9) ...
Setting up initscripts (2.88dsf-59.9) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: WARNING: No init system and policy-rc.d missing! Defaulting to block.
Setting up libharfbuzz-dev:armhf (1.4.2-1) ...
Setting up libavformat57:armhf (7:3.2.12-1deb9u1) ...
Setting up dconf-gsettings-backend:armhf (0.26.0-2) ...
Setting up gir1.2-gstreamer-1.0 (1.10.4-1) ...
Setting up libgstreamer-plugins-base1.0-0:armhf (1.10.4-1+deb9u1) ...
Setting up gstreamer1.0-plugins-base:armhf (1.10.4-1+deb9u1) ...
Setting up libpulse-dev:armhf (10.0-1+deb9u1) ...
Setting up gsettings-desktop-schemas (3.22.0-1) ...
Setting up libcairo2-dev (1.14.8-1) ...
Setting up gstreamer1.0-pulseaudio:armhf (1.10.4-1) ...
Setting up libxmu-dev:armhf (2:1.1.2-2) ...
Setting up libgtk-3-common (3.22.11-1+rpi1) ...
Setting up initramfs-tools-core (0.130) ...
Setting up libavfilter6:armhf (7:3.2.12-1
deb9u1) ...
Setting up libpangoxft-1.0-0:armhf (1.40.5-1) ...
Setting up gir1.2-gst-plugins-base-1.0 (1.10.4-1+deb9u1) ...
Setting up libatk1.0-dev:armhf (2.22.0-1) ...
Setting up initramfs-tools (0.130) ...
update-initramfs: deferring update (trigger activated)
Setting up libpangocairo-1.0-0:armhf (1.40.5-1) ...
Setting up gir1.2-pango-1.0:armhf (1.40.5-1) ...
dpkg: dependency problems prevent configuration of plymouth:
plymouth depends on systemd (>= 232-8~); however:
Package systemd is not configured yet.

dpkg: error processing package plymouth (--configure):
dependency problems - leaving unconfigured
Setting up libgstreamer-plugins-bad1.0-0:armhf (1.10.4-1) ...
Setting up dropbear-initramfs (2016.74-5+deb9u1) ...
Generating Dropbear DSS host key. Please wait.
Generating key, this may take a while...
Public key portion is:
ssh-dss AAAAB3NzaC1kc3MAAACBAPK1krExkD2IfGWkDhqu5gcmrAUeRyhFr3PDgVuww8n0IFdDu4yUn9xK8tK0FADRigk2pxTjzozmJUBUpnONfPGIVVX90DsOrwCs2vyYSM4EpVf5A6wugA6w1j/kj3EoGiVRR8BfC+FvQI3vuE6oZv9WbMH2wIZkmijZKm/rCnk/AAAAFQC9y4874GnU4KniKg08KkiYcAKNIQAAAIEA5DP2L3MOtzjN8s5/9FBvU8HZ5fMmwhm6k4HUXMbvxVBSyqQSN9ub321vuyosIrgbSxDdQVGB5g/UlHByDHCJW4GhDaNzhcZeD1atLCW56yEQ9rSfanJOYvnGRblPIGKoSq0WkFAbFxF9cLmo3v16/8snpQwoV95D/cusAE0VzbQAAACAQYysfp/FzNXclfvzF0pl7h3Aao5aR20czlPxtEKyEOs95SSyUx9znb01UmawbVSPwbXlzGUc/KaU4U2RoVl7IGYQpnAdfjo0Aesa7ING3ryBeQpJ4tWbmeK8xP1w1UOvxb2014PwITQfvPAz2r5+Q/YbGvoef/KagzdBlrVajk8= root@raspberrypi
Fingerprint: md5 5c:ad:12:b6:ea:1d:c0:54:84:f4:8e:ce:36:16:b9:a9
Generating Dropbear RSA host key. Please wait.
Generating key, this may take a while...
Public key portion is:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4mOl1Xc2nDtxvuDrEldgtZeJMX8fjmzU1VSCJYpzaIzNcpxioVhwzUg0juGLqu+P96GlAW3jkJpVP+tS98SE0tmT0sDP+WsjqXY7Tuwb1mVxkv7BthBB2no/TY4IbKt2owCfHan9WgibJ5Bb4vmD1drllzMOXZndI6LHcNGRIrz6VOOxWBh40uA13WOzYDpzcLYvcirg7olTE9adh1JfjqkspsEaSPpP1TAkLleWxplzObLB/iqmX7WQ+XZ8LO8fWj9QXw0RNm8NmLG2EzAZz5DxY8iufHV7n781gtQVI9LdGdo/St+4zpbvhl2ITsUfCzFPUXc5SH1JXAAOUSFgz root@raspberrypi
Fingerprint: md5 21:f8:46:74:99:26:13:41:67:9d:77:1e:94:58:60:28
Generating Dropbear ECDSA host key. Please wait.
Generating key, this may take a while...
Public key portion is:
ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAAVrPKBOA2/s7MYAp2w+XeggnkZhmKUab2Fg/JYy1CcKdEGhsTfBGG+UviC+lRZ9SaKlidYWqaiUZmIfdHRgkpz6wAhOKOnbv2PXi30Q6LaIN7Qwb06pYMLspc/9pE6TS1eGsMFwVjEY0fiBlGHR46HzV0OE2Lq4OeI4oAavZ6LmKL8XQ== root@raspberrypi
Fingerprint: md5 e8:00:a6:23:fc:29:6b:55:e4:37:4f:7f:18:46:fe:e4
Setting up glib-networking:armhf (2.50.0-1) ...
Setting up libavformat-dev:armhf (7:3.2.12-1deb9u1) ...
Setting up libpango1.0-dev (1.40.5-1) ...
Setting up librtaudio-dev:armhf (4.1.2
ds0-4) ...
Setting up gstreamer1.0-x:armhf (1.10.4-1+deb9u1) ...
Setting up libgstreamer1.0-dev (1.10.4-1) ...
Setting up gstreamer1.0-alsa:armhf (1.10.4-1+deb9u1) ...
dpkg: dependency problems prevent configuration of mountall:
mountall depends on plymouth; however:
Package plymouth is not configured yet.

dpkg: error processing package mountall (--configure):
dependency problems - leaving unconfigured
Setting up dropbear (2016.74-5+deb9u1) ...
Setting up gstreamer1.0-libav:armhf (1.10.4-1) ...
Setting up librsvg2-2:armhf (2.40.16-1) ...
Setting up libsoup2.4-1:armhf (2.56.0-2+deb9u2) ...
Setting up libsoup-gnome2.4-1:armhf (2.56.0-2+deb9u2) ...
Setting up librsvg2-common:armhf (2.40.16-1) ...
Setting up libgstreamer-plugins-base1.0-dev (1.10.4-1+deb9u1) ...
Setting up librest-0.7-0:armhf (0.8.0-2) ...
Setting up gstreamer1.0-plugins-good:armhf (1.10.4-1) ...
Setting up adwaita-icon-theme (3.22.0-1+deb9u1) ...
update-alternatives: using /usr/share/icons/Adwaita/cursor.theme to provide /usr/share/icons/default/index.theme (x-cursor-theme) in auto mode
Setting up libgtk2.0-0:armhf (2.24.31-2) ...
Setting up libgtk-3-0:armhf (3.22.11-1+rpi1) ...
Setting up libopencv-highgui2.4-deb0:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-objdetect2.4v5:armhf (2.4.9.1+dfsg1-2) ...
Setting up gir1.2-gtk-2.0 (2.24.31-2) ...
Setting up libgtk2.0-dev (2.24.31-2) ...
Setting up libopencv-features2d2.4v5:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-highgui-dev:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-features2d-dev:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-calib3d2.4v5:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-calib3d-dev:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-legacy2.4v5:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-ts2.4v5:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-contrib2.4v5:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-legacy-dev:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-gpu2.4v5:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-objdetect-dev:armhf (2.4.9.1+dfsg1-2) ...
Setting up gstreamer1.0-plugins-bad:armhf (1.10.4-1) ...
Setting up libhighgui-dev:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv2.4-jni (2.4.9.1+dfsg1-2) ...
Setting up libcv-dev:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-contrib-dev:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-ocl2.4v5:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-stitching2.4v5:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-gpu-dev:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-ts-dev:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv2.4-java (2.4.9.1+dfsg1-2) ...
Setting up libopencv-videostab2.4v5:armhf (2.4.9.1+dfsg1-2) ...
Setting up libcvaux-dev:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-superres2.4v5:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-videostab-dev:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-ocl-dev:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-stitching-dev:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-superres-dev:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-dev (2.4.9.1+dfsg1-2) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Processing triggers for initramfs-tools (0.130) ...
Processing triggers for libgdk-pixbuf2.0-0:armhf (2.36.5-2+deb9u2) ...
Errors were encountered while processing:
raspbian-archive-keyring
systemd
plymouth
mountall
ERR: dpkg configure reported an error.
Native mode configuration reported an error!
I: Tidying up apt cache and list data.
I: Tidying up apt cache and list data.

Multistrap system reported 1 error in /home/pi/openFrameworks/scripts/apothecary/scripts/linuxarmv6l/raspbian/.

deprecating my addon (ofxDLib)

Hi Chris!
I'm going to deprecate my addon. I think that the only valuable thing in there are the examples. Do you think that it is worth adding these examples to your addon? These are:

  • FaceTracker
  • HOGLabeler
  • HOGTrainer
  • ObjectTracker

If you think so please let me know and I'll adapt these to use your addon and make a PR.

Take care.

cheers!

question pull request

Hi @bakercp

I hope all is well.
I'm adding some examples to my fork, can it make sense to do a pull request?

for the moment only:
semantic segmentation and find cars.

https://github.com/kashimAstro/ofxDlib/tree/master/example_dlib_dnn_semantic_segmentation
https://github.com/kashimAstro/ofxDlib/tree/master/example_dlib_dnn_cars
https://github.com/kashimAstro/ofxDlib/tree/master/example_dlib_dnn_cars2

I'm working on an example for android and
the transport of an example for speech recognition,
but for the latter it will take a bit.

Ciao!

/linux64/install.sh fails on Ubuntu 16.04 LTS

Issue

libblas-dev and liblapack does not meet dependencies on Ubuntu 16.04 LTS.

Here is the dependency tree.

  • libblas-dev

    • gfortran
      • gfortran-5 (>= 5.3.1-3~)
        • gcc-5-base (= 5.3.1-14ubuntu2) but 5.4.0-6ubuntu1~16.04.11 is to be installed
        • gcc-5 (= 5.3.1-14ubuntu2) but 5.4.0-6ubuntu1~16.04.11 is to be installed
        • libgfortran-5-dev (= 5.3.1-14ubuntu2) but it is not going to be installed
  • liblapack-dev

    • liblapack3 (= 3.6.0-2ubuntu2) but it is not going to be installed
      • libgfortran3 (>= 4.6) but it is not going to be installed
    • libblas-dev but it is not going to be installed or libblas.so

My trial

So I tired to install older version of gcc with following command.
sudo apt-get install gcc-5-base=5.3.1-14ubuntu2

It gives me more than 20 dependencies mismatch lie below.

The following packages have unmet dependencies:
 colord : Depends: libsqlite3-0 (>= 3.5.9) but it is not going to be installed
 gkbd-capplet : Depends: libgnomekbd8 (>= 3.6.0) but it is not going to be installed
                Depends: libxklavier16 (>= 5.0) but it is not going to be installed
 ibus : Depends: gir1.2-gtk-3.0 (>= 3.8.5) but it is not going to be installed
        Depends: adwaita-icon-theme but it is not going to be installed
        Recommends: im-config but it is not going to be installed

 ....

Temporal solution

comment out ADDON_PKG_CONFIG_LIBRARIES += blas lapack in addon_config.mk
Then I can compile my project with ofxDlib.

Test environment

  • Ubuntu 16.04
  • Latest oF master
  • ofxDlib master and develope
  • No Cuda, MKL installed
  • dlib itself was successfully compiled with Apothecary

install / build scripts failing

I tried building with make on OS X El Capitan 10.11.2.

I ran the build.sh , but it had some issues in using ostype.sh (it asked me for permissions even after chmodding it 777 and using sudo , so I ended up inserting osx manually in the build.sh file).

Here's a screen after my build.sh:

screen shot 2017-05-13 at 12 32 06

For some reasons also the script wasn't able to pickup my env var $OF_ROOT, so I had to insert it manually in the script.
Also I don't know if the install.sh in line 66 should actually be the install.sh of this addon.
I'm quite new to all of this build thing so forgive me for any error!

Thanks! 😁

error:functions that differ only in their return type cannot be overloaded

I am still trying to compile my oF project with VS Code on Mac, and getting titled errors that I don't get while building with Xcode.

In file included from /my_project_path/src/ofApp.cpp:1:
In file included from /my_project_path/src/ofApp.h:4:
In file included from /my_oF_path/addons/ofxDlib/src/ofxDlib.h:12:
In file included from /my_oF_path/addons/ofxDlib/libs/ofxDlib/include/dlib/of_image.h:15:
In file included from /my_oF_path/addons/ofxDlib/libs/dlib/include/dlib/matrix/../optimization/../matrix.h:11:
In file included from /my_oF_path/addons/ofxDlib/libs/dlib/include/dlib/matrix/matrix_la.h:13:
In file included from /my_oF_path/addons/ofxDlib/libs/dlib/include/dlib/matrix/matrix_lu.h:15:
/my_oF_path/addons/ofxDlib/libs/dlib/include/dlib/matrix/lapack/getrf.h:17:22: error:
functions that differ only in their return type cannot be overloaded
void DLIB_FORTRAN_ID(dgetrf) (integer* m, integer *n, double *a,
~~~~ ^
/my_oF_path/addons/ofxDlib/libs/dlib/include/dlib/matrix/lapack/fortran_id.h:36:31: note:
expanded from macro 'DLIB_FORTRAN_ID'
#define DLIB_FORTRAN_ID( id ) id##_
^
:63:1: note: expanded from here
dgetrf_
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/clapack.h:2731:5: note:
previous declaration is here
int dgetrf_(__CLPK_integer *__m, __CLPK_integer *__n, __CLPK_doublereal *__a,

Compiling on VS Code is done with make and Makefile loads "compile.project.mk" inside $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/

Do you have any idea to make this work?

Compile error on Mac OSX 10.2 (Sierra)

Hi, @bakercp

Compile Error on Mac OSX 10.2 (Sierra)
like this

In file included from /Users/dti/Documents/of_v0.9.8_osx_release/addons/ofxDlib/src/ofxDlib.h:12:
/Users/dti/Documents/of_v0.9.8_osx_release/addons/ofxDlib/libs/ofxDlib/include/ofx/Dlib/Utils.h:12:10: fatal error:
'dlib/geometry.h' file not found
#include <dlib/geometry.h>
^
1 error generated.
make[1]: *** [obj/osx/Release/src/main.o] Error 1
make: *** [Release] Error 2
kraken:example_dnn_face_recognition dti$

What's wrong ?

compiling on osx 10.10.5 with OF 0.9.8

hi
i was hoping to try your landmark detection.
i get this compile error:

/Applications/of_v0.9.8_osx_release/addons/ofxDlib/libs/ofxDlib/include/ofx/Dlib/Utils.h:12:10: 'dlib/geometry.h' file not found

i am noticing that the lib folder is pretty empty, compared to ofxFaceTracker2 for example.

i tried to follow some of your Getting Started steps but ...

when running the install.sh i get:

/Applications/of_v0.9.8_osx_release/addons/ofxDlib/scripts/install.sh: line 7: build.sh: command not found

when running the build.sh by hand i get:

kinder:~ stephan$ /Applications/of_v0.9.8_osx_release/addons/ofxDlib/scripts/build.sh 
Calling /Applications/of_v0.9.8_osx_release/addons/ofxDlib/scripts/build.sh from /Users/stephan
Setting OF_ROOT to: /Applications/of_v0.9.8_osx_release
openFrameworks Config
=====================
           OF_ROOT: /Applications/of_v0.9.8_osx_release
    OF_ADDONS_PATH: /Applications/of_v0.9.8_osx_release/addons
   OF_SCRIPTS_PATH: /Applications/of_v0.9.8_osx_release/scripts
OF_APOTHECARY_PATH: /Applications/of_v0.9.8_osx_release/scripts/apothecary

MACHINE CONFIG
==============
           TARGET: osx

ADDON CONFIG
============
        ADDON_NAME: ofxDlib
        ADDON_PATH: /Applications/of_v0.9.8_osx_release/addons/ofxDlib
ADDON_SCRIPTS_PATH: /Applications/of_v0.9.8_osx_release/addons/ofxDlib/scripts

Building for osx ...
No special ofxDlib dependencies required for osx.
Installing apothecary ...
Calling /Applications/of_v0.9.8_osx_release/addons/ofxDlib/scripts/apothecary/install.sh from /Users/stephan
Setting OF_ROOT to: /Applications/of_v0.9.8_osx_release
/Applications/of_v0.9.8_osx_release/addons/ofxDlib/scripts/apothecary/install.sh: line 27: /Applications/of_v0.9.8_osx_release/addons/scripts/scripts/shared/ostype.sh: No such file or directory
openFrameworks Config
=====================
           OF_ROOT: /Applications/of_v0.9.8_osx_release
    OF_ADDONS_PATH: /Applications/of_v0.9.8_osx_release/addons
   OF_SCRIPTS_PATH: /Applications/of_v0.9.8_osx_release/scripts
OF_APOTHECARY_PATH: /Applications/of_v0.9.8_osx_release/scripts/apothecary

MACHINE CONFIG
==============
           TARGET: 

ADDON CONFIG
============
        ADDON_NAME: scripts
        ADDON_PATH: /Applications/of_v0.9.8_osx_release/addons/scripts
ADDON_SCRIPTS_PATH: /Applications/of_v0.9.8_osx_release/addons/scripts/scripts

Apothecary not installed, installing latest version.
fatal: destination path '/Applications/of_v0.9.8_osx_release/scripts/apothecary' already exists and is not an empty directory.
No additional apothecary dependencies to install.
Done installing apothecary.
Building ofxDlib libraries for osx ...
/Applications/of_v0.9.8_osx_release/addons/ofxDlib/scripts/build.sh: line 68: /Applications/of_v0.9.8_osx_release/scripts/apothecary/apothecary/apothecary: Not a directory

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.