Software and thoughts by Emmanuel Goossaert

Facial transformation framework on the iPhone

More than a year ago, I was playing with some Computer Vision algorithms, and I posted this: Active Appearance Models in C++ (Paamela). The framework I built back then was a bit more complete than a simple AAM implementation, and actually I went up to the point where I was able to transform the sex, age and ethnicity of a person in a picture. The code was basically sitting there, taking dust in my hard drive. I had been willing to try some Objective-C and mobile development for some time. With the use of some magic (and good cross-compiling skills), I have been able to port the code from Linux to the iPhone. I now have a fully functioning facial transformation framework running on the iPhone!

Out of this weekend project, I have created apps that allow for various facial transformations. RaceBooth to change ethnicity, TimeBooth to change age, and SexBooth to change gender. As of today, RaceBooth has not been accepted by Apple yet, but TimeBooth and SexBooth are out in the App Store. The apps are just 11 Mb, which is quite an achievement considering that these little beasts are embedding a full facial transformation algorithm along with its trained model. And on top of that, they have to carry all the fluffy graphics needed for the user interface! The only issues I have with the iPhone and iPod Touch now come from the built-in cameras. Indeed, the quality of the pictures taken with those cameras is not great, and this impacts on the quality of the resulting transformations. Best results are still obtained with pictures taken with regular digital cameras. But well, it’s running, so I won’t complain! Below are some screenshots of the results (click to enlarge).