In the last few decades, glaucoma became the second biggest leading cause of irreversible vision loss. Because of its asymptotic growth, it is not properly diagnosed until the relatively late stage. To stop the severe damage by glaucoma it is needed to detect glaucoma in its early stages. Surprisingly diabetes also be the greatest cause of glaucoma. In the modern era, artificial intelligence makes great progress in the medical image processing field. Image analysis based on machine learning gives a huge success in diagnosis glaucoma without any misdiagnosis. The aim of this proposed paper is to create an automated process that can detect glaucoma and diabetic retinopathy. Here various Machine Learning models are used and results of these methods are presented.