Abstract:
Safflower is an annual herbaceous flowering plant in the world. The safflowers are often knotted with the multiple small, numerous, compact and dense filaments. The small target filaments of safflower have also posed a great challenge on the robotic picking in recent years, particularly with a few pixels in the whole recognition image. Effective feature information cannot be extracted from the targeted images, due to the small scale. Furthermore, it is highly susceptible to interference from the complex environments, such as weather, light, branch, and leaf occlusion. The safflower filaments can be difficult to detect, even in the case of errors and missed detections. In this study, the detection system was proposed to quickly and accurately identify the safflower filaments under the complex environments using an improved YOLOv3 (GSC-YOLOv3). Firstly, the redundant information was fully considered to determine the influencing factors on the detection accuracy during feature extraction of safflower filaments. The lightweight network GhostNet structure was utilized in the GSC-YOLOv3, and then the operation of a few Cheap Operations was used to generate the feature maps of safflower redundancy. After that, the lightweight network GhostNet of GSC-YOLOv3 was used to replace the backbone network of feature extraction, including the redundant information under the premise of better detection accuracy. Meanwhile, some parameters were compressed to maximize the speed of the model for the better effective features of safflower filaments using a small number of parameters. Secondly, Spatial Pyramid Pooling (SPP) structure was selected in the GSC-YOLOv3 at the end of effective feature extraction. In contrast to the YOLO series, the feature enhancement was achieved for the information loss in the process of extracting features. The foundation was also established for the subsequent feature pyramid structures to focus more on the targets during detection. Finally, the Convolutional Block Attention Module (CBAM) was incorporated into the feature pyramid structures. The CBAM convolutional attention mechanism module was also added after the extraction of three effective features, in order to reuse the useful channel and spatial information in the three times. Thus, the interference was efficiently avoided in the feature fusion process for the higher detection speed and accuracy of the improved model. The field test was conducted with the safflower filaments as an example. The test results show that the mean average precision value of the GSC-YOLOv3 reached 91.89% under the test set in the performance and confidence tests. Specifically, the GSC-YOLOv3 increased by 12.76, 2.89, 6.35, 3.96, 1.87, and 0.61 percentage points, respectively, compared with the Faster R-CNN, YOLOv3, YOLOv4, YOLOv5, YOLOv6, and YOLOv7. Then, the average detection speed under GPU reached 51.1 frames/s, which was higher than the rest. Meanwhile, the confidence level of the target safflower filaments was mostly above 0.9, indicating the smaller number of errored and missed safflower filaments. Moreover, an ablation test was used to verify the effectiveness of the improved model. The experimental results showed that the network structure and training strategy of the safflower filaments detection was significantly improved to fuse the GhostNet, SPP structure, and the CBAM module. Therefore, a series of comparative experiments were also conducted to verify the adaptability and effectiveness of the GSC-YOLOv3 in complex scenes with different weather, lighting conditions, and shading levels. The GSC-YOLOv3 also presented the high detection accuracy and robustness, as well as the real-time performance. The finding can provide a strong reference to accurately detect the safflower filaments in the complex environments.