Abstract:objective A method based on YOLOv7 is proposed to detect small lesions in liver cystic echinococcosis ultrasound images, which are difficult to detect and affect the timely diagnosis and treatment of the disease.method Firstly, replace the original feature extraction backbone with a hardware aware neural network EfficientRep to improve the adaptability to hardware devices while ensuring accuracy and speed are not affected; Secondly, replacing CIOU with a better WIOU (Wise IOU) improves the evaluation index CIOU (Complete Intersection over Union) of YOLOv7 network, which has poor gradient calculation performance as a loss function and leads to a decrease in detection accuracy; Finally, adding CBAM attention to the final fourth layer of the backbone further improves the model detection accuracy.result This experiment was trained on a self built dataset of small lesion ultrasound images of hepatic cystic echinococcosis. The results show that the improved model mAP @ 0.50 has a detection accuracy of 88.1%, which improves the performance compared to the original model and surpasses other mainstream detection methods compared.conclusion The experiment shows that the model can more efficiently detect and classify the location and category of lesions in ultrasound images of hepatic cystic echinococcosis, meeting clinical real-time requirements, and providing new ideas for future research.