Page 225 - Read Online
P. 225
Yuan et al. J. Mater. Inf. 2026, 6, 17 Page 3 of 13
Figure 1. Workflow of the computer vision program for molecular image analysis.
augmentations [Supplementary Section 1] preserve the intrinsic physical and structural characteristics of the
molecular features while improving the robustness of model training. This dataset was then used for object
detection labeling, with molecular positions annotated using bounding boxes to form the complete training
and validation sets.
Model selection and architecture
Our program is built on YOLOv9, the latest iteration of the YOLO family, which is known for efficient object
detection and segmentation capabilities. Two model configurations were implemented: (1) Object detection,
which identifies molecular species using bounding boxes; (2) Instance segmentation, which provides
pixel-wise segmentation for precise molecular boundary identification.
Model training and evaluation
The YOLOv9 model was trained using a stochastic gradient descent (SGD) optimizer with momentum, and
weight decay was applied for regularization. Training was performed for 100 epochs with an adaptive
learning rate schedule. The following performance metrics were used for evaluation: F1 Score, which
balances precision and recall for classification accuracy; mAP@0.95, which assesses detection accuracy across
different confidence thresholds;forgetting rate, which measures the model’s ability to retain knowledge of
previously learned molecular categories. The incremental learning strategy was validated by training the
model in multiple stages and monitoring performance degradation across molecular categories.
The implementation was developed in Python, using PyTorch as the deep learning framework. Training was
conducted on an NVIDIA 3070Ti GPU with 8 GB VRAM, with a training time of approximately 20 min per
full training cycle.
RESULTS AND DISCUSSION
Our framework consists of four main components: data labeling, dataset generation, model
training/prediction, and data processing. In the training section, users can choose between two models:
object detection or instance segmentation, both of which are based on the YOLOv9 model [Supplementary
Section 2]. The overall framework architecture is illustrated in Figure 1.
The process begins with the “Data Labeling” stage, where the data are annotated to provide ground truth for
model training. Following this, the system checks whether the labeled data correspond to a new category. If a
new category is detected, the system performs the “Load Class ID from Index Table” step to assign a unique

