This study aims to use a machine learning (ML) model to accurately classify four datasets of cotton crop leaves as either infected or healthy. Bacterial blight, Curly virus, Fussarium Wilt, and healthy leaves were used as the datasets for the study. ML is a useful tool in detecting cotton leaf diseases and can minimize the rate of disease. The problem is that without machine learning technique it is very difficult and time consuming to detect the diseases then to sort out this problem a machine learning model is proposed and to test the accuracy of the proposed model, the confusion matrix concept was used. The researchers have done their research works to diagnose the diseases by using (ML) model but the drawback of their research was that the results which were given by the different (ML) models were not accurate. The target of the study was to identify diseases affecting the cotton plant in the early stages using traditional techniques. However, utilizing various image processing techniques and machine learning algorithms, including a convolutional neural network, proved to be helpful in diagnosing the diseases. This technological approach can simplify the detection of damaged leaves and minimize the efforts of farmers in detecting those diseases. Cotton is a natural fiber produced on a large scale, and it is grown on 2.5% of overall agronomic land. The detection of cotton leaf diseases is crucial to maintain the crop's productivity and provide reliable earnings to farmers. A confusion matrix is N X N matrix used for evaluating the performance of a classification model, where N is the number of target classes. The matrix compares the actual target values with those predicted by machine learning model. This technique has four parameters to test the accuracy of the results which is given in my research work.