The ability to identify pets via smart home technology is crucial for managing pet health. However, the present popular object detection method model is too large, support for edge devices is insufficient, and performance is subpar for small object identification in the traditional algorithm, such as SSD. In this study, we propose an improved SSD object detection network algorithm based on a GhostNet network with a dual attention mechanism. A ghost module is introduced to create a lightweight ghost network based on the SSD network. The ghost module is combined with the ECA attention mechanism to dynamically allocate parameters to the target and alter the detection region weights to enhance the model performance. In order to reinforce the model and increase the precision of the small target, the CBAM module was also introduced. It assigns major weights to the output target regions of the large-scale feature layer. According to the experimental findings, the CBAM-GhostNet-SSD network significantly reduces the number of backbone parameters and the calculation amount is reduced by 98.23% when compared to the classic SSD. This lays the groundwork for the self-developed algorithm's successful deployment of edge devices. The predicted rate synchronization increased by 3.1 times, also mAP was 14.5% higher than SSD. The lightweight model quantitative transformation utilized in edge equipment can accurately evaluate the target region and realize dynamic detection. This has a certain guiding significance for the subsequent detection of household pet targets.INDEX TERMS deep learning, object detection, ghostnet, attention modules, edge devices.