Monday, May 12, 2014

Binary classification performance

It is a frequent task to decide if specific object belongs to one of two classes. This task is called binary classification.

For example if we want to implement face detection (FD) algorithm we will first split image into number of fragments. After that we perform binary classification for each of them. Such classification will decide to which class (face / non-face) each fragment belongs to.

It seems to be a trivial task for humans, but for computer it's not so easy. So, if we want to achieve good results - it is very important to measure performance of our classification algorithm.

Let's agree that our binary classifier gives positive result if it believes that given fragment is a face and negative, if given fragment is not a face.

From the performance point of view, every classification attempt can produce one of four outcomes:
  • true positive - fragment is a face and classification result is positive
  • false positive  (or Type I error) - fragment is not a face but classification result is positive. 
  • true negative - fragment is not a face and classification result is negative
  • false negative (or Type II error) - fragment is a face and classification result is negative
Visually it can be represented as a confusion matrix:




Let's define TP, FP, TN and FN as a total number of true positive, false positive, true negative and false negative classification outcomes, correspondingly.

Having this 4 variables we can define following equations:

True positive rate (Recall):
    TPR = TP / (TP + FN)

True negative rate (Specificity):
    TNR = TN / (TN / FP)

Concept behind them is very simple - TPR tells how well our classification algorithm can pick real human faces and TNR says how resistant is our algorithm to fragments which are not faces.

In the next blog entry I will write about ROC curve, and how it can be used to tune binary classification algorithm performance.

Wednesday, April 30, 2014

FaceStorm Announcement

After almost two years of joint work SUPREMATIC and Smilart are proud to announce FaceStorm.

FaceStorm is platform, which uses facial recognition algorithms to reliably identify humans in cooperative and non-cooperative real-time scenarios.

With FaceStorm we able to match single face against gallery of 10,000 faces in about 80ms, using single, consumer grade, GPU accelerator.

Behind the scenes FaceStorm uses OSGi as a modularization technology, AMQP (RabbitMQ) for messaging, ZooKeeper for cluster coordination and MongoDB as a database. We also use CUDA for parallel computations.

FaceStorm uses our internally developed algorithms, which are able to robustly identify faces and be tolerant to natural and artificial distortions.

Images below are examples of faces acquired from the camera (left) which has been properly matched against gallery portraits (right).









Monday, March 3, 2014

New version of Chrome DevTools REPL 1.5.1

Chrome DevTools REPL for ClojureScript version 1.5.1 is now released to Chrome Store.  It's biggest new feature is ability to inject  cljs.core into pages not containing it.  It means that it is possible to use REPL against pages which were not developed in ClojureScript.

PS
  it may take up to 60 minutes for the update to become available


Wednesday, February 26, 2014

Chrome DevTools REPL for ClojureScript source code is out.

After major refactoring and clean-up source code for the REPL extension is pushed to GitHub repository.

For UI rendering it uses reagent - a very simple ClojureScript interface to Facebook's react framework. Also, it heavily relies on core.async - it plays very well with asynchronous nature of Chrome DevTools API.

If you want to do some hacking with the code - simply run 'lein cljsbuild auto'  to get everything compiled. After that open extension/repl.html file in your browser - it should work as a usual web page as well, and evaluation will target the page itself.

Alternatively, you can add extension/ directory as "unpacked extension" from the chrome://extensions/ page. Don't forget to enable developer mode, with the check box in the upper right part.

If you want extension to work with local files (URLs starting with file://) - you should also enable "Allow access to file URLs option".

If you make any changes - don't forget to reload the extension (under chrome://extensions/) page and close and re-open Chrome DevTools.

Server side code will follow very soon.

Monday, February 24, 2014

Chrome DevTools REPL for ClojureScript

Initial version for Chrome DevTools (CDT) REPL for ClojureScript is now available at the Chrome Web Store. You can now freely install it into your Chrome browser.

Right now it uses ClojureScript to JavaScript compiler, hosted at Heroku. In the upcoming versions it will be possible to change it, and, of course, run compiler locally.

Out of obvious reasons REPL will only work on pages which contain un-optimized JavaScript code.

Extension source code and it's server counterpart will be placed on GitHub in the next days, once they will become more mature.

Future plans and ideas:
  • improved error reporting
  • completion and syntax highlighting
  • possibility to inject cljs.core into inspected page, which does not contain it
  • deeper integration with Chrome DevTools code editor

All  feedback and comments are welcome and highly appreciated.