I was victim of a cannon rusher once but he failed at it, so my solution is untested:
I think the best way is to just ignore the cannons and get at least one - if possible more - workers out of the base, if necessary by using an overlord or nydus tunnel (or use your scouting probe, whatever gets you out). The creep will keep the cannons out of range of your hatchery so you can build a few spine crawlers to defend if he tries to attack with zealots or similar. Try to keep the enemy busy in the main base, distract him and let him think it's all you have. Suiciding a few Zerglings, Hydralisks or Banelings should be enough, just don't let him think his main base is in danger by getting too much through the cannons (unless you can kill all of his cannons in which case you've won anyways).
As soon as your worker managed to escape, build a full base at any expansion (if possible one only reachable by air) and go straight to broodlords with mutalisk support. If your main base requires defense (and is still worth defending) you can send in support via a nydus tunnel but usually it's better to just build up, the enemy will propably spend a lot of resources sieging your main base.
As soon as you have a few broodlords and some mutalisks you have the choice of freeing your main base or going straight to his (probably undefended) bases and expansions. I think killing his unit production centers is the best choice.