Due to the integration of artificial intelligence with sensors and devices utilized by Internet of Things technology, the interest in automation systems has increased. One of the common features of both agriculture and artificial intelligence is recommendation systems that increase yield by identifying nutrient deficiencies in plants, consuming resources correctly, reducing damage to the environment and preventing economic losses. The biggest shortcomings in these studies are the scarcity of data and the lack of diversity. This experiment aimed to identify nutrient deficiencies in basil plants cultivated in a hydroponic system. Basil plants were grown by applying a complete nutrient solution as control and non-added nitrogen (N), phosphorous (P) and potassium (K). Then, photos were taken to determine N, P and K deficiencies in basil and control plants. After a new dataset was created for the basil plant, pretrained convolutional neural network (CNN) models were used for the classification problem. DenseNet201, ResNet101V2, MobileNet and VGG16 pretrained models were used to classify N, P and K deficiencies; then, accuracy values were examined. Additionally, heat maps of images that were obtained using the Grad-CAM were analyzed in the study. The highest accuracy was achieved with the VGG16 model, and it was observed in the heat map that VGG16 focuses on the symptoms.