Giter Club home page Giter Club logo

face-detection-demo's Introduction

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.

face-detection-demo's People

Contributors

didrocks avatar

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.