The semantic segmentation method based on high-resolution RGB images obtained by unmanned aerial vehicle (UAV) provides a cost-effective way to improve the accuracy of detection and classification in forestry. Few studies have explored the impact of sample distribution patterns on deep learning model detection accuracy. The study was carried out using the data from the 4.78 km2 RGB image of a chestnut (Castanea mollissima Blume) plantation obtained by the DJI Phantom 4-RTK, and the model training was conducted with 18,144 samples of manually delineated chestnut tree clusters. The performance of four semantic segmentation models (U-Net, DeepLab V3, PSPNet, and DeepLab V3+) paired with backbones (ResNet-34, ResNet-50) was evaluated. Then, the influence of chestnut data from different planting patterns on the accuracy and generalization performance of deep learning models was examined. The results showed that the combination of DeepLab V3 with ResNet-34 backbone gives the best performance (F1 score = 86.41%), while the combination of DeepLab V3+ with ResNet-50 backbone performed the worst. The influence of different backbone networks on the detection performance of semantic segmentation models did not show a clear pattern. Additionally, different spatial distribution patterns of chestnut planting affected the classification accuracy. The model MIX, trained on comprehensive training data, achieves higher classification accuracies (F1 score = 86.13%) compared to the model trained on single training data (F1 score (DP) = 82.46%; F1 score (SP) = 83.81%). The model performance in complex scenario data training is superior to that of the model in simple scene data training. In conclusion, comprehensive training databases can improve the generalization performance of chestnut classification with different spatial distribution patterns. This study provides an effective method for detecting chestnut cover area based on semantic segmentation, allowing for better quantitative evaluation of its resource utilization and further development of inventories for other tree species.