Purple sweet potato is a very important plant in many parts of the world and a major crop in tropical and subtropical climates. Its cultivation can significantly increase production and consumption, and it is beneficial for the nutritional status of people in both rural and urban areas. However, purple sweet potatoes are susceptible to disease outbreaks, which can cause substantial losses to the agricultural industry. To prevent the spread of these diseases and minimize financial losses, it is crucial for farmers to identify purple sweet potato diseases as early as possible. Utilizing deep learning technology to separate areas of purple sweet potatoes marked with disease can effectively address this problem. In this study, researchers employed a segmentation method using the YOLOv7 algorithm. The study's results demonstrated a mean Average Precision (mAP) value of 98.6% from a dataset of 1500 images, divided into two classes: healthy sweet potatoes and diseased sweet potatoes with tuber rot. The mAP value for healthy sweet potatoes was 96.1%, while the mAP for diseased sweet potatoes with tuber rot was 98.6%. The YOLOv7 method, therefore, produces high accuracy values for the segmentation of purple sweet potato diseases. This research significantly contributes to agriculture by enhancing the productivity and quality of sweet potato harvests and can assist farmers in improving the efficiency and sustainability of purple sweet potato production.