GNNs Python script for TCM fingerprints

Published: 11 June 2024| Version 1 | DOI: 10.17632/7b6rvrmcy6.1
Liangliang He,


We employed deep residual networks, specifically ResNet-18, ResNet-34, and ResNet-50 architectures, to analyze and categorize chromatographic fingerprints of traditional Chinese medicines (TCM). 1. Model Architecture: ResNet Variants: Implemented ResNet-18, ResNet-34, and ResNet-50 to manage different complexities in image data. Pre-trained Weights: Initialized with weights from the ImageNet dataset to improve generalization across medical images. Custom Top Layer: Included a 50% dropout rate and a fully connected output layer tailored for classifying chromatographic fingerprints. 2. Data Preprocessing and Augmentation: Standardization: Resized all images to 384x384 pixels and normalized using standard values. Augmentation: Applied random flips, rotations, color jittering, and affine transformations to increase model robustness. 3. Training Setup: Loss Function: Utilized cross-entropy loss for effective training. Optimizer: Used Adam optimizer with initial learning rate of 0.0001 and weight decay. Early Stopping: Implemented to halt training when no improvement in validation loss is observed, preventing overfitting. 4. Validation and Performance Metrics: Dataset Split: Data divided into training (70%), validation (15%), and testing (15%) sets. Metrics: Monitored accuracy, recall, F1 score, and precision to evaluate model performance. 5. Practical Application: Image Prediction Workflow: Developed a workflow for loading trained models, preprocessing input images, and classifying new images, facilitating practical use in diagnostics.



Zhejiang University, Jinan University


Scripting Language


National Natural Science Foundation of China


Basic and Applied Basic Research Foundation of Guangdong Province


Guangzhou Basic and Applied Basic Research Foundation


Innovation Team and Talents Cultivation Program of National Administration of Traditional Chinese Medicine