Automating Scanning Tunnelling Microscopy: A Comparative Study of Machine Learning and Deterministic Methods