A lightweight deep learning model for automatic segmentation and analysis of ophthalmic images