It is easy to pontificate on how images from people in developing countries could be sent by phone and aggregated into meaningful information to fix aid projects or democracy. What’s harder is actually implementing such concepts.
Today’s “aid for AID” is one attempt to solve this problem using SMS and twitter. The limitation is that only 140 characters can be used to encode the whole image. Conventional schemes for storing images would take thousands of characters. Here is what some people have tried as part of a StackOverFlow bounty (contest for 500 points of reputation):
Note that all of these solutions employ a UNICODE character set (thousands of unique symbols, including all chinese characters) instead of an ASCII set (256 letters numbers and symbols).
This next solution was written in python.
This next example is what you get with conventional image compression methods (536 byte Mona Lisa). This poor quality image would still require 4 tweets to send, whereas the python abstract art approach requires only one and gets at the “essence” of Mona:
And here is the original solution that people tried to beat. It uses vectors to geometically map her face :
My favorite approach: The Genetic Algorithm
This genetic algorithm that Roger Alsing wrote has a good compression ratio, at the expense of long compression times. (takes hours instead of seconds) The resulting vector of vertices could be further compressed using a lossy or lossless algorithm, but what you see is an actual “code” for the information in the image itself, and not just a trick to approximate pixels in the image. This means that the content of this image (output from the genetic algorithm) can be used in many other ways, such as recreating the object with a 3D printer or being analyzed and aggregated with other objects encoded in this “DNA” style. It is like DNA in the sense that DNA encodes 3-dimensional proteins; and these vectors encode the edges in 2-dimensional images.
The image starts out random…
But each attempt is scored against the real image…
The iterative process yields incremental improvements, but sometimes great leaps in progress also appear…
…and viola! Evolution yields the Mona Lisa “code”.
This one clearly produces the best result, and copies the way nature solves problems. Too bad nobody is teaching this in science class yet. You should hire me to teach this at your university. 🙂
This related to Evolution.
7 thoughts on “An aid to AID: SMS image xfer service”
I’m busy applying a genetic algorithm to the London King’s Cross Western Concourse structure. Quite a jump in the deep end, having not much programming experience before (working with MATLAB) but it’s coming on. I will soon have some results. Maybe I could show you once I’ve got a result? I would have liked to apply more complex GAs to the structure (for instance NSGA-II, have you come across that?) but I’ve run out of time.
It’s amazing to see the clarity of the Genetic Algorithm result!
Great Cheesy Deano – please contact me when you make progress on it. I love GA!
Is there a blog post you can refer me to that describes how genetic algorithms are written in MATLAB? I use python, which is compatible and MATLAB via scipy/numpy
Here is a similar contest – how to write an algorithm that will create an image that contains every color exactly once.
Because color is just another unique dimension like height and width, this tends to yield photos that have geometric qualities to them.