The only way to check is by having a quick taste - Its unusual for it still to that much yeast activity on the top after 12 days. But just looking at it from a photo would be hard to say.
I'm assuming everything was sterilised properly.
To me it looks like it is still fermenting (high krausen), but you say airlock activity has finished?
It could be an infection - the only real way to tell is to taste, but remember it will still taste odd if it hasn't finished fermenting and is not conditioned. If it tastes like vinegar then you almost certainly have an infection (but all is not lost - just make vinegar instead, admittedly you'll probably have enough for a lifetime).
A lot depends on the strength of the beer you are brewing, the strain of yeast and the temperature you are fermenting at.
I would check the seals on the airlock, and around the lid and also if you remove the lid often to look at it it will take a little while to build up gas again.
Have you tried a hydrometer reading? somewhere between 1.012 and 1.010 would indicate that it has finished - but again make sure the reading stays stable for a few days.
The other thing you could do is rack it off using a syphon in to another bucket leaving behind all the **** and seeing what happens then after a few days (obv still need an airlock etc).
Hope that helps