No description
Find a file
Didier Roche 1174e2ed28 Don't reload the cascade anymore at each detection
The segfault has been fixed in go-opencv itself. Only defer its removal once.
2017-03-27 15:58:12 +02:00
.vscode Ensure build tasks prints out once done 2016-10-24 14:08:31 +02:00
appstate Detect root and data path from appstate 2016-10-17 15:08:25 +02:00
comm Some messaging cleanups 2016-10-24 14:09:48 +02:00
datastore Move initialization in init() calls 2016-10-17 15:15:26 +02:00
detection Don't reload the cascade anymore at each detection 2017-03-27 15:58:12 +02:00
face-detection-cli Move initialization in init() calls 2016-10-17 15:15:26 +02:00
face-detection-service Detect camera at startup from package init phase 2016-10-24 14:12:06 +02:00
images Add a smiley asset 2016-09-07 18:14:11 +02:00
messages Send list of available cameras to websocket clients 2016-09-09 08:52:09 +02:00
parts/plugins snapcraft support organize globbing now. 2016-10-04 14:18:17 +02:00
setup/gui Add snap icon 2016-09-08 11:28:52 +02:00
.gitignore Add gitignore for snap 2016-08-17 12:58:57 +02:00
booth-demo-manager.def Add booth demo manager definition 2017-02-15 10:05:13 +01:00
frontfacedetection.xml Use new asset path, report rootdir 2016-08-11 09:54:21 +02:00
LICENSE License project 2016-08-16 06:56:47 +02:00
README.md Add Readme 2016-08-16 06:56:40 +02:00
snapcraft.yaml Add booth demo manager definition 2017-02-15 10:05:13 +01:00

Code and main assets for our face detection demo snap

The face detection demo snap enables people to show multiple faces of snaps. It comprehends:

  • a face-detection-service, which can:
    • toggle on/off face detection (a webcam is required)
    • collect stats over time and store it in a sqlite database
    • serve via a webserver (on http://IP:8080) those results in a single page app, with graph history, last webcam screenshot, last image with detected faces circled (note that the html/css/javascript code is in another repo)
    • use websocket to connect multiple clients, and refresh data to each web page without needing to reload it
    • enable "fun" mode where detected faces circle are replaced by distribution logo attributed randomly
  • a face-detection-cli tool, which can:
    • enable/disable face detection webcam (the webserver will still be served though). No new data is collected when face detection is disabled
    • toggle between normal/fun rendering mode
    • quit the service

Update and revert

The application is buggy on purpose with version 2.0. The data from previous run will be destroyed (and the web page data refresh to reflects this) and it instructs the web page to turn RED. This enables to illustrate the snap revert functionality where the previous version will be restored (service restarted) as well as previous data which will be repopulated on the web page.

Technical details

snapcraft.yaml

A snapcraft.yaml is provided which demonstrates multiple features!

  • building a golang app
  • shipping a service and a cli tool
  • copying local assets
  • referencing other repository (the web code)
  • give some network-related security permission
  • have different security configuration per application

generated files

This service generates some files available in $SNAP_DATA (root project directory if ran from master without this variable set):

  • configuration (saved by the service for persistency over restart) in settings
  • sqlite database contentstorage main data in storage.db
  • screencapture.png and screendetected.png for latest captured images.