Vision loss happens due to diabetic retinopathy (DR) in severe stages. Thus, an automatic detection method applied to diagnose DR in an earlier phase may help medical doctors to make better decisions. DR is considered one of the main risks, leading to blindness. Computer-Aided Diagnosis (CAD) systems play an essential role in detecting features in fundus images. Fundus images may include blood vessel area, exudates, micro-aneurysm, hemorrhages, and neovascularization. In this paper, our model combines automatic detection for the diabetic retinopathy classification with localization methods depending on weakly-supervised learning. The model has four stages; in stage one, various preprocessing techniques are applied for smoothing the data set. In stage two, the network had gotten deeply to the optic disk segment for eliminating any exudate's false prediction because the exudates had the same color pixel as the optic disk. Stage three, the network is fed through training data to classify each class label. Finally, the layers of the convolution neural network are re-edited, and the layers are used to localize the impact of DR on the eye's patient. The framework tackled the matching technique between two essential concepts where the classification problem depends on the supervised learning method. In comparison, the localization problem was obtained by the weakly supervised method. An additional layer known as weakly supervised sensitive heat map (WSSH) was added to detect the ROI of the lesion at a test accuracy of 98.65%.