Here, this study aimed to develop an automated system for detecting and diagnosing lesion DRGs in PHN patients based on deep learning. This study retrospectively analyzed the DRG images of all patients with postherpetic neuralgia who underwent magnetic resonance neuroimaging examinations in our radiology department from January 2021 to February 2022. After image post-processing, the You Only Look Once (YOLO) version 8 was selected as the target algorithm model. Model performance was evaluated using metrics such as precision, recall, Average Precision, mean average precision and F1 score.