Giter VIP home page Giter VIP logo

smstudy's Introduction

Build a simple face detection web app leveraging AlchemyAPI on Bluemix

Summary: Recently, IBM acquires the startup AlchemyAPI to bring deep learning to Watson and make it public on Bluemix. Among AlchemyAPI service, there is an interesting feature called face detection (from its name, we can guess what it is). We build up a simple and interesting web app leveraging this feature, called "Who Are You", which helps you guess who you are from an image. It runs in PHP and employs the powerful face detection API from AlchemyAPI service on Bluemix.

We choose PHP as runtime because PHP is very lightweight and efficient, and it is widely accepted by the open source world. Besides, Bluemix can support PHP runtime very well. In our app, the app uses only 128MB memory and runs fast.

Good news is that AlchemyAPI provides an API SDK for PHP environment, while bad news is that it does not support the face detection API. To overcome this issue, we make the following two updates: (1) Read AlchemyAPI apikey from VCAP_SERVICES variables instead of reading it from a file. (2) Extend the AlchemyAPI PHP SDK to support face detection API.

From this app, you can see how easy to leverage AlchemyAPI service with only a few source code lines in PHP.

Outline: I. Introduction a. App URL: http://whoru.mybluemix.net/ b. Code URL: https://hub.jazz.net/project/chunbintang/whoru/overview II. Before getting started a. Bluemix Account b. AlchemyAPI trial key c. PHP language skill III. How to create the app on Bluemix a. PHP Runtime 1. Open the Catalog menu. 2. From the Runtimes section, click PHP. 3. In the App field, specify the name of your app, in this case, it is set to whoru. 4. Click Create.Wait for your application to provision. ใ€€ใ€€b. AlchemyAPI Service 1. Click the App created in the Dashboard. Open the Catalog menu. 2. Click Add A Service. 3. Choose AlchemyAPI under Watson. 4. Input the AlchemyAPI trial key. If you do not have one, please register it at http://www.alchemyapi.com/api/register.html. 5. Click Create. Click OK if it is prompted to restart the application. IV. Build the app 1. Clone the source code into a directory. 2. Modify manifest.yml for <your_app_name>, in my case, it is whoru. 3. Use cf tools to deploy app. cf push V. Run the app 1. Go to web app, in my case, it is http://whoru.mybluemix.net/. 2. Click Guess Who Are You from Image URL, input a image url, for example, https://lh3.googleusercontent.com/-B8jO7AKe1Fw/UOxJEuRSV3I/AAAAAAAAAGA/28e6_kjzmVc/s512-no/Profil%2B7.png, click Submit to check whether the app can recognize this person. 3. Click Guess Who Are You by Uploading an Image, upload an image (you may find andy.jpg under the Source Code), and check whether the app can guess who he/she is.

smstudy's People

Contributors

tmfdk333 avatar

Watchers

 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.