You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Ruben van de Ven 964101d000 Update module ref 2 years ago
sdk-samples@1be1031eb2 Update module ref 2 years ago
www Final design toches 2 years ago
.gitignore Use upload key 2 years ago
.gitmodules Update module ref 2 years ago
README.md Speed up image compositing by resizing 2 years ago
echoserver.py Speed up image compositing by resizing 2 years ago
portrait_compositor.py send as jpeg to save data 2 years ago
requirements.txt Use upload key 2 years ago
supervisord.conf Rudimentary face compositing 3 years ago

README.md

Specimens of Discriminatory Composite Portraiture - Gender Differentiation

hostname: specimensofgender

Uses a modified version of Affectivas cpp-sdk-samples.

Install

Install dependencies:

sudo apt libopencv-dev install libboost-system-dev libboost-filesystem-dev libboost-date-time-dev libboost-regex-dev libboost-thread-dev libboost-timer-dev libboost-chrono-dev libboost-serialization-dev libboost-log-dev libboost-program-options-dev
sudo apt install cmake build-essential git gzip

#rpi is ARM:
wget http://download.affectiva.com/linux/arm/affdex-cpp-sdk-3.1-40-linux-arm7.tar.gz
mkdir affdex-sdk
tar -xzvf affdex-cpp-sdk-*.tar.gz -C affdex-sdk
rm affdex-cpp-sdk-*.tar.gz

Build:

mkdir build && cd build
cmake -DOpenCV_DIR=/usr/ -DBOOST_ROOT=/usr/ -DAFFDEX_DIR=~/gender_detection/affdex-sdk ~/gender_detection/sdk-samples
make

To avoid ruining the SD-card too soon, mount /tmp as tmpfs. This folder will also be used to store camera frames for analysis. So to /etc/fstab add:

# tmpfs for /tmp, so we save the sd-card a bit
tmpfs           /tmp            tmpfs   defaults,noatime,nosuid   0       0
tmpfs           /var/log        tmpfs   defaults,noatime,mode=1777,size=64m 0      0

sudo ln -s supervisord.conf /etc/supervisor/conf.d/specimens.conf

Install fonts:  cp fonts/*/*.ttf ~/.fonts/

Test

Some quirks in either Rasbian or the video demo require two variables to be set before running. Not doing so results in a segfault.

export LC_ALL=$LANG
export LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libopencv_core.so.2.4
~/gender_detection/build/video-demo/video-demo --input ~/gender_detection/image_test.jpg --data ~/gender_detection/affdex-sdk/data --draw=0 --numFaces=20