Automation of medical image analysis helps medical practitioners to ensure early detection of certain diseases. Diabetic Retinopathy (DR) is a widespread condition of diabetes mellitus and a main global cause of vision impairment. The manual diagnosis of diabetic retinopathy by ophthalmologists requires a significant amount of time, causing inconvenience and discomfort for patients. However, the use of automated technology makes it possible to quickly identify diabetic retinopathy, permitting the continuation of therapy without interruption and averting future ocular damage. This paper presents a comprehensive comparative analysis of six Convolutional Neural Networks and Deep Neural Networks based machine learning models, including simple CNN, VGG16, DenseNet121, ResNet50, InceptionV3, and EfficientNetB3, for the recognition of diabetic retinopathy using fundus photographs. The accuracy of various models is evaluated using the Cohen Kappa metric. The results of this study add a contribution to the research on the application of machine learning models for diagnosing diabetic retinopathy.