Environmental control based on growth stage is critical for enhancing the yield and quality of industrially cultivated Pleurotus pulmonarius. Challenges such as scene complexity and overlapping mushroom clusters can impact the accuracy of growth stage detection and target segmentation. This study introduces a lightweight method called the real-time detection model for the growth stages of P. pulmonarius (GSP-RTMDet). A spatial pyramid pooling fast network with simple parameter-free attention (SPPF-SAM) was proposed, which enhances the backbone’s capability to extract key feature information. Additionally, it features an interactive attention mechanism between spatial and channel dimensions to build a cross-stage partial spatial group-wise enhance network (CSP-SGE), improving the feature fusion capability of the neck. The class-aware adaptive feature enhancement (CARAFE) upsampling module is utilized to enhance instance segmentation performance. This study innovatively fusions the improved methods, enhancing the feature representation and the accuracy of masks. By lightweight model design, it achieves real-time growth stage detection of P. pulmonarius and accurate instance segmentation, forming the foundation of an environmental control strategy. Model evaluations reveal that GSP-RTMDet-S achieves an optimal balance between accuracy and speed, with a bounding box mean average precision (bbox mAP) and a segmentation mAP (segm mAP) of 96.40% and 93.70% on the test set, marking improvements of 2.20% and 1.70% over the baseline. Moreover, it boosts inference speed to 39.58 images per second. This method enhances detection and segmentation outcomes in real-world environments of P. pulmonarius houses, offering a more accurate and efficient growth stage perception solution for environmental control.