Top K Mean Average Precision

How to calculate this for image classification? I am getting a bit lost with all the explanations available on net. An example will help.