2\. Methods 2.1 Study Design and Subjects This is a multicenter, phased model development and validation study conducted from May 15, 2025 to December 31, 2026 (corrected from the original typo "2006"). The study is implemented in 4 phases. This study was approved by the Institutional Review Board for Human Research, the Second Affiliated Hospital, Zhejiang University School of Medicine (Approval No.: (2026) Lun Shen Yan No. 0789). Informed consent was obtained from all patients in accordance with the Declaration of Helsinki.
2.2 Datasets
1. Retrospective Dataset (Phases 1-2) Images were obtained from three sources: ① Public databases (https://www.inaturalist.org/home) and snake field guides; ② Photographs of offending snakes provided by patients or witnesses and collected by attending physicians in the Emergency Departments of 42 hospitals in Zhejiang Province from January 2021 to June 2026.
After strict screening, a total of 15,680 images were finally included. The dataset was divided into three independent subsets (training set, validation set, and test set) at a ratio of 7:2:1 using stratified random sampling.
Image Inclusion and Exclusion Criteria Inclusion criteria: Images clearly showing at least one key identifying feature of the snake body (head shape, scale texture, body color and pattern, tail characteristics, etc.); covering common clinical scenarios (grassland, rocks, farmland, indoor, clinical settings), shooting conditions (natural light, night lighting, low light on rainy days), shooting angles (front, side, back, close-up), and snake states (stationary, slight motion blur, partial occlusion); image resolution ≥ 1080×1920 pixels with no obvious post-processing traces.
Exclusion criteria: ① Severely blurred images with completely obscured key identifying features; ② Duplicate images (same snake, same shooting scene); ③ Images with distorted features due to excessive post-processing (e.g., color adjustment, compositing); ④ Images with unidentifiable snake species.
2. Prospective Dataset (Phases 3-4) From May 1 to December 31, 2026, photographs of snakes provided by snakebite patients at 10 cooperative hospitals were prospectively collected, and 400 images were selected for the multi-reader multi-case study in Phase 3. Concurrently, patients who could provide snake photographs at the above 10 hospitals were continuously enrolled, and clinical data were collected for the clinical validation in Phase 4.
Inclusion criteria: Images clearly showing at least one key identifying feature of the snake body; covering common clinical shooting scenarios, lighting conditions, shooting angles, and snake states; identified snake species specimens.Exclusion criteria: Severely blurred images with completely obscured key identifying features; images with distorted features due to post-processing; unidentifiable snake species.
3. Gold Standard Determination and Data Annotation A professional annotation team consisting of 2 senior emergency physicians with more than 10 years of experience in snakebite treatment and 1 herpetology researcher was established. A three-level annotation process of "double independent annotation - cross-checking - expert arbitration" was adopted to ensure annotation accuracy. When the two experts disagreed, a consensus meeting was held to resolve the differences, and the final label was jointly determined by both parties with detailed records.
2.3 Image Classification and Preprocessing
1. Snake Classification Details
Non-venomous snakes (44 species): Indotyphlops braminus, Xenopeltis hainanensis, Achalinus rufescens, Achalinus spinalis, Achalinus huangjietangi, Achalinus dehuaensis, Pareas chinensis, Pareas formosensis, Pareas fujianensis, Oligodon chinensis, Oligodon formosanus, Oligodon ornatus, Ptyas major, Ptyas dhumnades, Ptyas korros, Ptyas mucosa, Gonyosoma frenatum, Lycodon flavozonatus, Lycodon futsingensis, Lycodon liuchengchaoi, Lycodon ruhstrati, Lycodon rufozonatus, Euprepiophis mandarinus, Oreocryptophis porphyraceus, Elaphe bimaculata, Elaphe carinata, Elaphe taeniura, Dinodon rufozonatum, Calamaria septentrionalis, Calamaria pavimentata, Amphiesma stolatum, Amphiesma craspedogaster, Macropisthodon rudis, Xenochrophis flavipunctatus, Opisthotropis kuatunensis, Opisthotropis latouchii, Sinonatrix aequifasciata, Sinonatrix annularis, Sinonatrix percarinata, Plagiopholis styani, Pseudoxenodon macrops, Pseudoxenodon stejnegeri, Sibynophis chinensis.
Venomous snakes (20 species):
Highly venomous snakes (16 species): Azemiops feae, Protobothrops cornutus, Protobothrops mucrosquamatus, Deinagkistrodon acutus, Ovophis makazayazaya, Trimeresurus stejnegeri, Gloydius brevicaudus, Bungarus multicinctus, Naja atra, Ophiophagus hannah, Sinomicrurus kelloggi, Sinomicrurus annularis, Hydrophis cyanocinctus, Hydrophis melanocephalus, Pelamis platurus, Rhabdophis tigrinus (highly venomous but rarely envenomates humans); Mildly venomous snakes (4 species): Enhydris chinensis, Enhydris plumbea, Boiga kraepelini, Boiga multomaculata.
2. Image Preprocessing
The open-source computer vision library OpenCV 4.8.0 was used to perform standardized preprocessing of images adapted to actual clinical shooting scenarios:
Images were uniformly resized to 640×640 pixels for size standardization, balancing model recognition accuracy and mobile deployment efficiency; 3×3 kernel Gaussian filtering was applied for denoising to remove image noise while preserving key snake identification features; Adaptive histogram equalization was used for illumination normalization to correct brightness differences under different shooting conditions; Data augmentation strategies including random rotation (±30°) and horizontal flipping were applied to the training set, combined with Mixup technology and GAN-synthesized images of rare snake species, to effectively improve the model's generalization ability.
2.4 AI Model Construction
Image segmentation and feature extraction: The SAM3 model was used to accurately segment the snake contour and blank the background to eliminate complex environmental interference; the lightweight and efficient ConvNeXt network was then used to extract fine-grained visual features.
Figure 1 Model architecture diagram: Shows the entire inference process. During the training phase, investigators froze the weight parameters of SAM3, and the Bayesian inference process did not participate in training, because the shooting locations of the images were difficult to obtain during dataset construction.
Cost-sensitive ensemble learning: A Stacking ensemble framework was constructed with SVM, Random Forest, Gradient Boosting, and XGBoost as base learners, and unbiased meta-features were generated through K-fold cross-validation; logistic regression was used as the meta-learner for nonlinear weighted fusion. Toxicity grading weights were introduced into the loss function to implement cost-sensitive learning, forcing the model to prioritize reducing the risk of missed diagnosis of venomous snakes.
Bayesian inference: Shooting location information was integrated during the inference phase. The training set class prior \\(F\_{\\text{train}}(y)\\) and geographic location prior \\(F\_{\\text{loc}}(y)\\) were combined through the Bayesian framework to correct the visual likelihood \\(P\_{\\text{model}}(y\|x)\\), obtaining posterior classification probabilities more consistent with regional distribution characteristics and improving clinical robustness.
2.5 AI Model Evaluation Phase 1: Internal Validation Multi-dimensional evaluation of the Snake Species Recognition and Treatment Assistance System (SSRS) was performed on the test set, including 64-class snake species identification and binary classification of venomous/non-venomous snakes.
Phase 2: Cross-model Comparison Mainstream deep learning models and large language models (LLMs) were selected for cross-performance comparison on the internal test set of Phase 1 (ResNet50, MobileNetV3, YOLOv8, Doubao, Qwen, ChatGPT, Gemini, and Afu). The evaluation included 64-class snake species identification and binary classification of venomous/non-venomous snakes.
Phase 3: Multi-Reader Multi-Case (MRMC) Study To evaluate the improvement effect of SSRS on clinical snake species recognition ability, a fully cross-designed prospective MRMC study was conducted using 400 clinical snake photographs collected from June to December 2026. The study enrolled 4 senior experts in snakebite treatment and 16 emergency physicians from multiple primary hospitals.
The study was divided into two rounds:
Round 1: The SSRS system and 20 physicians independently completed the diagnosis of all images; a 4-week washout period was set to reduce recall bias.
Round 2: The 400 snake photographs were randomly sorted in the electronic reading system, and the 20 physicians re-interpreted the images based on the SSRS output results. The evaluation included 64-class snake species identification and binary classification of venomous/non-venomous snakes.
Readers were required to complete the diagnosis of a single image within 120 seconds. The 20 physicians were from different regions of Zhejiang Province, covering more than 80% of the primary snakebite treatment institutions in the province, including tertiary hospitals, county-level secondary hospitals, and township health centers; all held valid medical practitioner licenses, had ≥1 year of emergency department experience, and voluntarily signed informed consent and participated in the entire study.
Phase 4: Clinical Validation To evaluate the efficacy of SSRS in clinical scenarios, a prospective observational cohort study was adopted in this phase. A total of 400 snakebite patients collected from June to December 2026 were enrolled, and patient and physician information was recorded. Without interfering with clinical treatment, the identification results of both attending physicians and the SSRS system were recorded synchronously. The evaluation included 64-class snake species identification and binary classification of venomous/non-venomous snakes.
All data were collected using a standardized electronic case report form (eCRF):
Module Collected Fields
1. Basic patient information Study ID (name), gender, age
2. Attending physician information Hospital level, specialty, education background, years of work experience
3. Snakebite event characteristics Original snake image; Bite location; Time since bite (minutes); Bite mark characteristics (number of bite marks, spacing in mm, standardized wound photographs)
4. Identification and diagnosis Snake species/toxicity judged by attending physician; SSRS system output (snake species, venomous/non-venomous); Clinical symptoms
5. Management and follow-up 2.6 Sample Size Calculation In the fully cross-designed MRMC study, based on the observed variance and effect size from the pilot study, with 20 readers preset (α=0.025, β=0.20, effect size=0.10), the minimum required sample size was calculated to be 116 cases. This study plans to enroll 400 cases.
2.7 Statistical Analysis Continuous variables are presented as mean ± standard deviation, and categorical variables are presented as numbers and percentages. The study constructed a "multi-class + binary" evaluation system: 64-class fine-grained snake classification was comprehensively evaluated using overall Accuracy, Macro-Precision, Macro-Recall, and Macro-F1; binary classification of venomous snakes was evaluated using Accuracy, Precision, Recall, and F1. The distribution characteristics of missed diagnosis of venomous snakes and misdiagnosis of non-venomous snakes were intuitively quantified using confusion matrices (P\<0.05 was considered statistically significant).