项目作者: cyk

项目描述 :
:pushpin: Pin with face sentiments! (Angular 2, Material, RxJS 5, Google Vision API)
高级语言: TypeScript
项目地址: git://github.com/cyk/pin-head.git
创建时间: 2016-05-11T03:39:50Z
项目社区:https://github.com/cyk/pin-head

开源协议:MIT License

下载



PinHead


PinHead




Repin based on your face’s emotion captured by webcam


Angular 2 Style Guide
Build Status
MIT license
Dependency Status
devDependency Status

Introduction

PinHead is an Angular2 app based on mgechev’s seed project that repins based on your face’s emotion captured by webcam and analyzed by Google’s Vision API. This project is my active exploration of AngularJS and RxJS.

A little while ago I set out on a journey learning about this extremely sweet and clever kitten that is Angular 2. Not too long ago Google released its Vision API sentiment analysis. I wanted to focus on Angular 2 with RxJS, so a server-less backend was a convenient way to avoid scope creep. I took a brief detour to set up a rudimentary server-less API endpoint that analyzes an image for facial sentiment. For more details on this, check out the gist on Face Sentiments with Google Vision API via AWS API Gateway and Lambda.

:warning: Work in progress Though the basic functionality is implemented, there is still much to do (and for me to learn). Pull requests are welcome and appreciated!

You can check out the latest version by visiting pin-head.cyk.im — it requires camera access and a Pinterest account with boards (owned and followed).

How does it work?

After choosing a board to pin from and a board to pin to, a pin will be presented every few seconds. Then, behind the scenes…

  1. A snapshot from your browser camera is taken
  2. The snapshot is encoded and sent off to a sentiment endpoint
  3. The Google Vision API then analyzes the image for faces and their sentiments
  4. If the likeliest sentiment is JOY then the related pin in pinned to you board.

Obviously, it works best with kittens and puppies. :wink:

Screenshot


Demo

How to Contribute

Prerequisites

You’ll need a Pinterest App and the Google Vision API via AWS API Gateway and Lambda. Once you have a Pinterest app id and a sentiments endpoint, update the project.config.ts file.

Install dependencies

  1. $ npm install

Run app

  1. $ npm start

Please refer to the mgechev/angular2-seed documentation for additional setup and usage instructions.

Technologies

Frameworks, libraries, and web APIs used:

Pinhead icon by Icons8

License

MIT