Image processing for SEM using machine learning. Adapted from https://github.com/bnsreenu/python_for_microscopists