To improve agricultural production, this study develops an advanced instance segmentation system for aeroponic tissue culture-based potato seedlings. We present an IoT system that integrates multiple sensors for humidity, temperature, pH, and turbidity to enable real-time monitoring. Additionally, we adapt the YOLOv8l-small computer vision model, an optimized version of YOLOv8, designed explicitly for efficient potato leaf disease detection and segmentation, even in resource-constrained IoT environments. YOLOv8 is a significant advancement in the YOLO series, for instance, segmentation, combining better accuracy, efficiency, and flexibility. YOLOv8 outperforms previous methods in generating precise segmentation masks while maintaining real-time performance. These innovations make YOLOv8 a robust choice for a variety of computer vision tasks, including instance segmentation, in both research and practical applications. When tested on a custom dataset of potato leaf pictures, the suggested model produced mask mAP50 of 0.842 and mAP50-95 of 0.566, with a model size of 36.1 MB and an inference duration of 9.3 ms. These outcomes are similar to those of the original YOLOv8l model, which had a slower inference time of 11.0 ms and a much larger model size of 92.3 MB, albeit at the expense of a somewhat higher mAP50 of 0.843. The study concludes that the proposed model provides similar accuracy with greater computational efficiency, making it ideal for IoT-based agricultural systems. Future research will explore additional aspects, while practical experiments aim to reduce labor costs.