Diabetic retinopathy (DR) is a fast-spreading disease across the globe, which is caused by diabetes. The DR may lead the diabetic patients to complete vision loss. In this scenario, early identification of DR is more essential to recover the eyesight and provide help for timely treatment. The detection of DR can be manually performed by ophthalmologists and can also be done by an automated system. In the manual system, analysis and explanation of retinal fundus images need ophthalmologists, which is a timeconsuming and very expensive task, but in the automated system, artificial intelligence is used to perform an imperative role in the area of ophthalmology and specifically in the early detection of diabetic retinopathy over the traditional detection approaches. Recently, numerous advanced studies related to the identification of DR have been reported. This paper presents a detailed review of the detection of DR with three major aspects; retinal datasets, DR detection methods, and performance evaluation metrics. Furthermore, this study also covers the author's observations and provides future directions in the field of diabetic retinopathy to overcome the research challenges for the research community. INDEX TERMS Artificial intelligence, deep learning, diabetic retinopathy, fundus images, machine learning, ophthalmology.