Extracting Thin Film Structures of Energy Materials Using Transformers