Nextcloud app that implement a basic facial recognition system.
Branch: master
Clone or download
Latest commit ddab4c5 Feb 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
appinfo Remove postmigration step as not needed, closes #12 Feb 7, 2019
css Clean css and uses better class names Dec 7, 2018
doc Add app screenshot to readme.. Aug 2, 2018
img Finally it will be a complete application. Doing it on files is impos… Jul 12, 2018
js Add icon to files tab plugin Feb 13, 2019
l10n Some improvements to the makefile. Feb 18, 2019
lib Some improvements to the makefile. Feb 18, 2019
templates Some improvements to the makefile. Feb 18, 2019
tests Adding support to cleanup stuff from tests Jan 26, 2019
translationfiles Some improvements to the makefile. Feb 18, 2019
vendor/models Some improvements to the makefile. Feb 18, 2019
.gitignore Also ignore vendor/models/1 folder Feb 18, 2019
.scrutinizer.yml Let's try this Nov 21, 2018
.travis.yml Install npm and handlebars on travis. Feb 18, 2019
CHANGELOG.md Initial release Oct 4, 2017
LICENSE Initial release Oct 4, 2017
Makefile Some improvements to the makefile. Feb 18, 2019
README.md Add command for reset Jan 20, 2019
TESTING.md Fixes from codacy Nov 24, 2018
composer.json Fixing and updating tests Feb 17, 2019
composer.lock Fixing and updating tests Feb 17, 2019
phpunit.xml

README.md

Face Recognition

Build Status Scrutinizer Code Quality Code Coverage Codacy Badge License

Nextcloud app that implement a basic facial recognition system.

FaceRecognition is a Nextcloud application with a goal of recognizing, analyzing and aggregating face data in users images, and providing additional functionalities on top of these information, all with built-in privacy of Nextcloud. Imagine Google Photos, but only for faces (not detecting objects…) and in such way that your images never leave your Nextcloud instance. 😃

The application listens to the creation of new image files, and queues them for later analysis. A scheduled task (Or admin on demand) take this queue, and analyze the images for looking faces and if possible identify them by comparing them with previous images assigned by the user.

App screenshots

How to use it?

First of all, the administrator must configure and execute the analysis. Once finished:

  1. In the user settings there is a 'Face Recognition' panel where the user can see and rename all the faces of their friends.
  2. In the file application the user can search by typing your friend's name, and it will show all the photos.
  3. In the side panel of the file application, a 'Persons' tab is added where you can see a list of your friends in the photo, and rename them.

Installation

Requirements

Everything is AGPL or Creative Commons. 😉

Manual installation on Ubuntu

sudo apt-get update
sudo apt-get install git-core composer
cd nextcloud/apps/   # or whatever is your path to nextcloud
git clone https://github.com/matiasdelellis/facerecognition.git
cd facerecognition/
make

If you have it manually installed and want to update to latest from master:

cd nextcloud/apps/facerecognition/
git pull
make

Commands

Face analysis

occ face:background_job [-u user-id] [-t timeout]

This command will do all the work. It is responsible for searching the images, analyzing them and clustering faces found in them in groups of similar people.

Beware that this command can take a lot of CPU and memory! Before you put it to cron job, it is advised to try it out manually first, just to be sure you have all requirements and you have enough resources on your machine.

Command is designed to be run continuously, so you will want to schedule it with cron to be executed every once in a while, together with a specified timeout. It can be run every 15 minutes with timeout of -t 900 (so, it will stop itself automatically after 15 minutes and cron will start it again), or once a day with timeout of 2 hours, like -t 7200.

If user-id is supplied, it will just loop over files of a given user.

If timeout is supplied it will stop after the indicated seconds, and continue in the next execution. Use this value in conjunction with the times of the scheduled task to distribute the system load during the day.

Resetting faces

occ face:reset_all [-u user-id]

This command will completely wipe out all images, faces and cluster of persons. It is ideal if you want to start from scratch for any reason. Beware that all images will have to be analyzed again!

If user-id is supplied, it will just loop over files of a given user.