This paper proposes two modifications to the geometrically deformable template model. First, the optimization stage originally based on simulated annealing is replaced with a meta-heuristic called Variable Neighborhood Search that treats simulated annealing as a local search tool. Second, an affine deformation energy is introduced to improve the quality of the search. An example of optic disc segmentation in an ophthalmic image is given.