Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/ubuntu/face-detection-demo

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/ubuntu/face-detection-demo

  • v0.0.0-20170327135812-1174e2ed2849
  • Source
  • Go
  • Socket score

Version published
Created
Source

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.

FAQs

Package last updated on 27 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc