One of the complications of diabetes disease is diabetic retinopathy (DR). Diabetic patients may suffer from total loss of sight. That's if it is not detected and medicated early enough. The early detection of DR is very important during funds screening on a regular basis. Detection and grading of DR are difficult because most fundus images suffer from undersaturation and noise. This paper proposes a new enhancement process as a solution to the poor quality of fundus images. It also proposes two architectures for convolutional neural network (CNN) models. The first one is the binary classifier of DR images into normal and abnormal. The second CNN architecture to classify the severity grades of DR. In this study, we also utilized different pre-trained convolutional neural network models to show the impact on the performance of the use of transfer learning from pre-trained CNN models vs newly defined architectures. The pre-trained CNN models and the two new proposed CNN models are tested using Messidor1, Messidor2, and Kaggle EyePACS datasets. The proposed binary classifier model results in F1-scores of 0.9387, 0.9629, and 0.9430 on the Messidor-1, Messidor-2, and EyePACS datasets, respectively. The proposed second model classifies the five grades with an F1-score of 0.9133, 0.9226, and 0.9393 on the Messidor1, Messidor2, and Kaggle EyePACS datasets, respectively. The new proposed CNN model proved its reliability and efficiency in detecting DR and classifying severity grades of DR in fundus images. Preprocessing techniques enhanced the performance by 10.83% of accuracy and 0.13037 in AUC using the binary model.