Added updated python code for template image search