近年來,半監督影像分類(semi-supervised image classification, SSIC)因其廣泛的實用性,已成為一項重要的研究主題。然而,在分布異質性與標籤稀缺的情況下,現有方法仍面臨若干具挑戰性的問題,這些問題可能導致訓練不穩定以及不合格的分類效能。在本研究中,我們提出一種新穎的半監督對比式分類框架 MDGCL,其採用基於中心樣本(medoid)的最佳化策略,並透過雙閘門過濾機制有效提升分類效能。我們提出一個新的 medotype 概念,即基於中心樣本的原型,用以提供穩定的先驗資訊,以引導模型學習。此外,我們引入一種標籤感知加權策略,以降低雜訊偽標籤在學習過程中的干擾。在數個真實資料集上的實驗結果顯示,所提出的方法能夠達到穩定的效能,並持續提升半監督影像分類任務的分類準確率與訓練穩定性。;Recently, semi-supervised image classification (SSIC) has become an important research topic due to its widespread practicability. However, existing methods still suffer several challenging issues that may lead to training instability and unqualified classification. In this study, we propose a novel semi-supervised contrastive classification framework, MDGCL, which employs a medoid-based optimization strategy to effectively enhance the classification with a dual-gate filtering mechanism. A new medotype (a medoid-based prototype) concept is introduced to provide a stable prior to guide the model learning. In addition, we introduce a label-aware weighted strategy to reduce the interference of noisy pseudo-labels in learning process. Experimental results on several real datasets demonstrate that the proposed method achieves stable performance and consistently improves both accuracy and training stability for SSIC task.