Investigators developed and validated a masked autoencoder deep learning model using vision transformer technology to automate the detection and grading of nuclear cataracts from slit-lamp images.