Archive for April, 2007

Note on privacy

Monday, April 23rd, 2007

Some people may aware of privacy, because you have to turn on your camera and facekit.net will capture your face and do some processing. Here we try to explain the possible privacy threats occurred by using facekit.net.

How facekit.net works

Facekit.net consists of a web interface used to customize your face recognizer and some flash programs to run your live recognizer.
The live face recognizer runs on your browser completely locally, and it does not send any information to our server (only the exception is, if you press the feedback button, it will send information containing your IP address, url, and some text variables to our server). The recognizer directly sends a recognition result by calling a javascript function defined at the user’s web page, so those information are also handled locally on your browser (but on this part there is a possible threat *see next section*).

Possible privacy threat

On using flash executable (when you browse a web page which embeds facekit.net)

As explained in the previous section, the flash executable runs completely locally on your browser, and the face information of the user will not sent to our server. But by writing a specific javascript code, it is possible for the web developer to collect face information of the user. Note that we do not provide any interface to let web developer to access actual face image, but the recognition result will be sent to the javascript function and it can be logged.

On using web interface (when you customize your own face recognizer)

On customizing your own face recognizer, you have to upload images you have prepared to our server. We do our best to protect your images, but there is still a possible threat on network attacks. We ask you to keep this risk in mind when you upload your picture to our server. When you turn your project to public, please be sure that your project does not contain any private information.

How to embed face recognition feature to your web page

Thursday, April 12th, 2007

Here we explains how to embed face recognition feature to your web page. Face recognition program generated by facekit.net runs on Flash execution environment on your web browser. You can embed face recognition program to your own web page by following simple procedures. 1. Import Javascript file Import Javascript file “swfobject.js”, by inserting following code on the head part of your HTML.

  1. <script src="http://facekit.net/javascripts/swfobject.js" type="text/javascript"></script>

2. Decide where to place face recognition program Insert following code to the place where you want to put the face recognition program.

  1. <div id="flashcontent">This page requires flash9.
  2.  Please install or upgrade flash player if you see this message.
  3.  <a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="" /></a></div>

3. Insert Javascript code By inserting following Javascript code, the face recognizer will show up on the place you have defined in step 2.

  1.  
  2. var so = new SWFObject("http://facekit.net/flash/facekit_1", "facekit_1", "320", "263", "9", "#869ca7");
  3. so.addVariable("url", location.href);
  4. so.write("flashcontent");

(4). Use face recognition result to control your web page To use face recognition result, modify the Javascript code written in step 3 as follows.

  1.  
  2. var so = new SWFObject("http://facekit.net/flash/facekit_1", "facekit_1", "320", "263", "9", "#869ca7");
  3. so.addVariable("url", location.href);
  4. so.addVariable("callback", "getResult");
  5. so.addParam("allowScriptAccess", "always");
  6. so.write("flashcontent");

By this modification, the face recognition program will call the function “getResult” for each time of the recognition loops. Recognition result is given as following JSON format on calling the function “getResult”.

  1.  
  2. {
  3.   state: "detected",  // Detection result "detected" or "none"
  4.   label: "front",  // Recognition result
  5.   x:40, y:50,  // Detected position
  6.   width:20, height:20,  // Size of the detected face
  7.   time:100.0  // Timestamp (only when the input type is flv)
  8. }

By creating a function like below, you can now create a dynamic web page which changes it’s behavior depending on the recognition results.

  1.  
  2. function getResult(value) {
  3.     var data = eval("("+value+")");
  4.     if (data.label == "left") {
  5.         do_something…
  6.     } else if (data.label == "right") {
  7.         do_something_else…
  8.     }
  9. }

You can see a concrete example of above features from this page.