Crop loss due to illness is the main issue that farmers deal with. The second issue is the delay in identifying which disorders to treat. Thus, the purpose of this study is to use the image classification technique to determine if the crop is healthy or sick. R software was used to implement picture categorization and machine learning techniques. The diseased leaf has been identified by the process of picture classification. In order to accomplish this, images of both healthy and diseased cotton crops were gathered from the fields. According to the study, the support vector machine algorithm is more accurate than other machine learning algorithms, which makes it suitable for real-time disease diagnosis and categorization.