Objective To propose a novel algorithm model based on YOLOv7 for detecting small lesions in ultrasound images of hepatic cystic echinococcosis.Methods The original feature extraction backbone was replaced with a lightweight feature extraction backbone network GhostNet for reducing the quantity of model parameters.To address the problem of low detection accuracy when the evaluation index CIoU of YOLOv7 was used as a loss function,ECIoU was substituting for CIoU,which further improved the model detection accuracy.Results The model was trained on a self-built dataset of small lesion ultrasound images of hepatic cystic echinococcosis.The results showed that the improved model had a size of 59.4 G and a detection accuracy of 88.1%for mAP@0.5,outperforming the original model and surpassing other mainstream detection methods.Conclusion The proposed model can detect and classify the location and category of lesions in ultrasound images of hepatic cystic echinococcosis more efficiently.