Deep learning is a transformative force in the medical field and it has made significant progress as a pivotal alternative to conventional manual testing methods. Detection of Tubercle Bacilli in sputum samples is faced with the problems of complex backgrounds, tiny and numerous objects, and human observation over a long time not only causes eye fatigue, but also greatly increases the error rate of subjective judgement. To solve these problems, we optimize YOLOv8s model and propose a new detection algorithm, Lite-YOLOv8. Firstly, the Lite-C2f module is used to ensure accuracy by significantly reducing the number of parameters. Secondly, a lightweight down-sampling module is introduced to reduce the common feature information loss. Finally, the NWD loss is utilized to mitigate the impact of small object positional bias on the IoU. On the public Tubercle Bacilli datasets, the mean average precision of 86.3% was achieved, with an improvement of 2.2%, 1.5%, and 2.8% over the baseline model (YOLOv8s) in terms of mAP0.5, precision, and recall, respectively. In addition, the parameters reduced from 11.2 to 5.1 M, and the number of GFLOPs from 28.8 to 13.8. Our model is not only more lightweight, but also more accurate, thus it can be easily deployed on computing-poor medical devices to provide greater convenience to doctors.