To address the issues of Contrastive Learning (CL) methods struggling to distinguish similar chest X-ray samples and detect tiny lesions in medical images, a dual-branch distribution consistency contrastive learning model (TCL) was proposed. Firstly, inpainting and outpainting data augmentation strategies were employed to strengthen the model’s focus on lung textures, thereby improving the model’s ability to recognize complex structures. Secondly, a collaborative learning approach was used to further enhance the model’s sensitivity to tiny lesions in lungs, thereby capturing lesion information from different perspectives. Finally, the heavy-tailed characteristic of Student-t distribution was utilized to differentiate hard negative samples, so as to constrain the consistency of distributions among different augmented views and samples, thereby reinforcing the learning of feature relationships among hard negatives and other samples, and reducing the influence of hard negatives on the model. Experimental results on four chest X-ray datasets, including pneumoconiosis, NIH (National Institutes of Health), Chest X-Ray Images (Pneumonia), and COVID-19 (Corona Virus Disease 2019), demonstrate that compared to MoCo v2 (Momentum Contrastive Learning) model, TCL model improves the accuracy by 6.14%, 3.08%, 0.65%, and 4.67%, respectively, and in terms of transfer performance on COVID-19 dataset, TCL model achieves improvements of 4.10%, 0.61%, and 8.41%, respectively, at label rate of 5%, 20%, and 50%. Furthermore, CAM (Class Activation Mapping) visualization verifies that TCL model focuses on critical pathological regions effectively, confirming the model’s effectiveness.