Next Article in Journal
Cement Industry Pollution and Its Impact on the Environment and Population Health: A Review
Previous Article in Journal
Perfluorononanoic Acid (PFNA) Exacerbates Atopic Dermatitis by Inducing Inflammation in Mice
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

MWB_Analyzer: An Automated Embedded System for Real-Time Quantitative Analysis of Morphine Withdrawal Behaviors in Rodents

1
Department of Biomedical Engineering, Southern University of Science and Technology, Shenzhen 518055, China
2
National Center for Safety Evaluation of Drugs (NCSED), National Institutes for Food and Drug Control, Beijing 102629, China
3
Shenzhen Giant (Ju’An) Technologies Co., Ltd., Shenzhen 518000, China
4
Guangdong Provincial Key Laboratory of Advanced Biomaterials, Southern University of Science and Technology, Shenzhen 518055, China
*
Authors to whom correspondence should be addressed.
These authors contributed equally to this work.
Toxics 2025, 13(7), 586; https://doi.org/10.3390/toxics13070586
Submission received: 15 May 2025 / Revised: 26 June 2025 / Accepted: 3 July 2025 / Published: 14 July 2025
(This article belongs to the Section Drugs Toxicity)

Abstract

Background/Objectives: Substance use disorders, particularly opioid addiction, continue to pose a major global health and toxicological challenge. Morphine dependence represents a significant problem in both clinical practice and preclinical research, particularly in modeling the pharmacodynamics of withdrawal. Rodent models remain indispensable for investigating the neurotoxicological effects of chronic opioid exposure and withdrawal. However, conventional behavioral assessments rely on manual observation, limiting objectivity, reproducibility, and scalability—critical constraints in modern drug toxicity evaluation. This study introduces MWB_Analyzer, an automated and high-throughput system designed to quantitatively and objectively assess morphine withdrawal behaviors in rats. The goal is to enhance toxicological assessments of CNS-active substances through robust, scalable behavioral phenotyping. Methods: MWB_Analyzer integrates optimized multi-angle video capture, real-time signal processing, and machine learning-driven behavioral classification. An improved YOLO-based architecture was developed for the accurate detection and categorization of withdrawal-associated behaviors in video frames, while a parallel pipeline processed audio signals. The system incorporates behavior-specific duration thresholds to isolate pharmacologically and toxicologically relevant behavioral events. Experimental animals were assigned to high-dose, low-dose, and control groups. Withdrawal was induced and monitored under standardized toxicological protocols. Results: MWB_Analyzer achieved over 95% reduction in redundant frame processing, markedly improving computational efficiency. It demonstrated high classification accuracy: >94% for video-based behaviors (93% on edge devices) and >92% for audio-based events. The use of behavioral thresholds enabled sensitive differentiation between dosage groups, revealing clear dose–response relationships and supporting its application in neuropharmacological and neurotoxicological profiling. Conclusions: MWB_Analyzer offers a robust, reproducible, and objective platform for the automated evaluation of opioid withdrawal syndromes in rodent models. It enhances throughput, precision, and standardization in addiction research. Importantly, this tool supports toxicological investigations of CNS drug effects, preclinical pharmacokinetic and pharmacodynamic evaluations, drug safety profiling, and regulatory assessment of novel opioid and CNS-active therapeutics.

Graphical Abstract

1. Introduction

Opioids remain the most effective pharmacological agents for managing acute and chronic pain, and they continue to dominate the analgesic market [1]. Nevertheless, their widespread use is marred by serious side effects including sedation, respiratory depression, nausea, addiction, and constipation [2]. Globally, more than 26 million individuals suffer from opioid use disorder (OUD) [3], and in the United States alone, over 80,000 deaths from an opioid overdose were reported in 2021 [4]. A hallmark of opioid dependence is the emergence of withdrawal symptoms upon drug cessation [5,6,7,8]. Among opioids, morphine—extensively used in pain management across diverse patient populations [9,10,11]—remains a core model for studying opioid dependence and withdrawal, providing valuable insight into the neurobiological and behavioral dimensions of addiction.
Investigating withdrawal behavior not only provides insights into the neurophysiological changes underlying drug-induced adaptations but also clarifies how disruptions in positive reinforcement contribute to emotional alterations such as anxiety, irritability, and depression [12,13]. Indeed, studies have linked neural adaptations in key brain regions to drug-seeking behaviors during withdrawal [14] and delineated signaling pathways critical for the extinction of drug-associated memories [15,16]. Behavioral models of addiction are critical not only for understanding drug–receptor interactions and pharmacodynamic mechanisms but also for evaluating emerging treatments such as anti-drug vaccines and targeted delivery systems [17,18]. Additionally, pharmaceutical companies are increasingly assessing the abuse liability of candidate drugs early to optimize their risk/benefit profiles and reduce development costs in drug development [19]. Nonclinical studies on drug dependence, including withdrawal studies, provide critical information on the potential for drug dependence in clinical settings. The data obtained from these nonclinical trials can guide clinical research, inform rational drug use, and raise awareness of abuse potential [20].
Drug dependence and withdrawal behaviors impose a significant social and economic burden [21]. The assessment of abuse and dependence liability has been the subject of numerous regulatory documents issued by agencies such as the U.S. Food and Drug Administration (FDA), the China National Medical Products Administration (NMPA), the European Medicines Agency (EMA), and the International Council for Harmonisation (ICH) [19,22]. Assessing potential dependence through withdrawal behavior helps identify the withdrawal symptoms and dependence characteristics of different drugs, guiding regulatory agencies in drug oversight [23]. Research on withdrawal behavior is essential for developing more evidence-based public health policies [24]. By identifying effective interventions, such research can lead to reduced healthcare costs, decreased incidence of substance use disorders, and lower crime rates [25], thereby yielding significant social and economic benefits.
Preclinical rodent models play a foundational role in investigating the biopharmaceutical properties of opioids, including their absorption, distribution, metabolism [26], and excretion (ADME) profiles [27], as well as drug–receptor interactions and neurobehavioral outcomes [28,29]. These models also support the exploration of pharmacogenetic variability and the validation of emerging neuropharmacological targets [17,18,30]. Both the ICH M3 document and the EMA’s 2006 guideline indicate that rodents are the preferred species for assessing abuse liability unless there is a specific reason to use primates [19]. Experimental methods to assess the physical dependence induced by test substances mainly include spontaneous withdrawal, precipitated withdrawal, and substitution experiments. Whether during spontaneous or precipitated withdrawal, animals exhibit a range of symptoms, although not all withdrawal symptoms manifest in every individual, indicating significant inter-animal variability [20]. Additionally, withdrawal studies in preclinical animal models often lead to animal mortality, necessitating the use of large numbers of experimental animals. Research has shown that for the same batch of rat behavioral images, inter-observer agreement on behavior classification is only 0.65 [31].
Historically, early methods for assessing morphine dependence in rats relied on a single behavioral indicator (e.g., jump frequency) [32,33,34,35]. However, single measures fall short of capturing the full spectrum of withdrawal symptoms, often leading to biased assessments [36]. As the field evolved, comprehensive scoring systems such as the Gellert–Holtzman and Maldonado Scales were developed [37,38]. Although these scales have been adapted in various studies [39,40,41,42], manual evaluation remains labor-intensive, subjective, and prone to inter-observer variability [31]. These limitations hinder the scalability, reproducibility, and translational relevance of behavioral data, especially in high-throughput screening or drug formulation optimization contexts.
In recent years, the field of pharmaceutics has witnessed an increasing integration of automation, engineering innovation, and data-driven methodologies to improve the precision and throughput of drug evaluation processes [43,44,45]. This paradigm shift is especially evident in areas such as controlled-release systems, pharmacokinetic and pharmacodynamic modeling, and biomedical device-assisted drug delivery [46,47,48]. However, the behavioral dimension of drug efficacy and safety assessment—particularly in the context of central nervous system (CNS)-acting drugs—remains relatively underserved by such technologies. There is an urgent need for robust, automated platforms that can quantify complex behavioral phenotypes with high fidelity and consistency.
Recent advancements in automated behavior recognition have enabled the detection of specific rat behaviors including wet-dog shakes, scratching, and rearing [49,50,51,52,53]. Yet, systems capable of simultaneously identifying multiple behaviors in a single animal remain limited, often suffering from reduced accuracy when the behavior categories exceed four [31]. In addition to recognition systems based on object detection and tracking, pose estimation-based universal behavior recognition methods have also been widely explored [54], with the rapid development of pose estimation technology [55,56]. Specifically, these approaches involve first performing pose estimation on model organisms (e.g., mice, fruit flies) using deep learning, followed by downstream tasks of behavior recognition [54]. Moreover, the complexity of deep learning-based pose estimation presents disadvantages in terms of throughput and speed [57,58]. Furthermore, Hu et al. proposed a learning-based approach for comprehensive evaluation and quantification of user-defined animal behaviors [59]. This method not only identifies behavior types but also quantifies them. It integrates multi-animal tracking, pattern recognition, and customizable deep learning to comprehensively evaluate behaviors, making the analysis both efficient and accurate. However, the performance of this system in recognizing stationary behaviors in rats has been unsatisfactory. In summary, although multiple devices can be used to recognize different behaviors associated with morphine withdrawal, they are limited by their inability to simultaneously identify multiple behaviors in the same rat. This makes experimental setups with multiple devices highly vulnerable to the effects of individual variability among animals. While universal behavior recognition systems can identify a broader range of behaviors, they often suffer from inadequate accuracy for certain behaviors, as well as issues with low throughput and slow processing speeds. As a result, not all behavioral recognition needs can be fully met by these systems.
To address the challenges of objective, efficient, and scalable analysis of morphine withdrawal behaviors, we developed a novel behavioral recording and analysis system, MWB_Analyzer, with five key innovations:
(1)
Multi-angle video and full-scene audio capture via an edge computing platform for comprehensive data acquisition;
(2)
Real-time data reduction algorithms that significantly lower processing loads while preserving critical information;
(3)
Created and published a dataset of morphine withdrawal behavior video clips in rats for future research;
(4)
Enhanced behavioral recognition accuracy and objectivity through an improved YOLO-based framework and signal processing methods;
(5)
A more objective scoring protocol was used to score morphine withdrawal behavior to assess the degree of morphine addiction.
Consequently, MWB_Analyzer offers a robust alternative to traditional manual observation methods, enabling more efficient, objective, and scalable assessments of morphine withdrawal behaviors in preclinical models. By delivering real-time, high-resolution analysis of behavioral phenotypes, the system enhances the sensitivity, reproducibility, and translational value of experimental data—factors critical for investigating the neuropharmacological and toxicological effects of opioids and their antagonists. Its integration into addiction research workflows can accelerate the identification of therapeutic targets, support the screening and optimization of neuroactive compounds, and enable precise dose–response modeling essential for evaluating CNS drug safety and efficacy. Furthermore, MWB_Analyzer aligns with the increasing demand for automated, data-driven platforms in toxicology and behavioral neuroscience, where reproducible endpoints are vital for assessing drug-induced neuroadaptations, withdrawal severity, and CNS toxicity profiles. The system also has translational value in pharmacogenetic and pharmacokinetic research, offering a standardized approach to comparing treatment responses across diverse genetic or biological backgrounds. Ultimately, by bridging engineering innovation with neurotoxicological and behavioral pharmacology, MWB_Analyzer supports interdisciplinary research aimed at advancing opioid safety assessments, guiding rational therapeutic use, and addressing the escalating global burden of opioid dependence and withdrawal.

2. Materials and Methods

2.1. Animals and Drugs

This study utilized male Sprague-Dawley rats (weighing 250 g–300 g, 8 weeks of age), which were purchased from certified suppliers and housed at the Animal Experiment Center of the Institute of Safety Evaluation, National Institutes for Food and Drug Control (National Center for Drug Safety Evaluation and Research), China. Prior to the experiments, all rats were quarantined for 7 days in a controlled environment to ensure their stable health condition. The experiments were conducted under controlled conditions with a temperature of 22 °C ± 1 °C, humidity of 55% ± 5%, and a 12 h light/dark cycle. The rats were provided with free access to standard laboratory chow and water.
A total of 60 rats were used in this study, divided across three experimental stages. In the first stage, 24 rats were used to construct a behavioral dataset under a high-dose morphine administration protocol. All animals in this stage received subcutaneous injections of high-dose morphine sulfate once daily for 7 consecutive days at escalating doses (10, 20, 30, 40, 50, 60, and 70 mg/kg). The dosage and method of drug administration were based on established protocols for morphine dependence and withdrawal models reported in previous studies [60]. In our earlier work, we further refined these methods to successfully establish a morphine dependence and withdrawal model. These data were used to train and validate the behavioral analysis system. In the second stage, 15 rats were used to explore behavioral assessment schemes for morphine addiction. The animals were randomly assigned to two groups: a treatment group (n = 12) receiving the same escalating high-dose morphine regimen as above, and a control group (n = 3) receiving an equivalent volume of saline. Due to morphine toxicity, 4 rats in the treatment group died during the experiment, resulting in valid behavioral data from 11 treated rats and 3 control rats. These animals were monitored using the custom-built hardware platform, which operated stably during the entire data collection period. Audio and video data were recorded continuously by a single operator. In the third stage, an independent cohort of 21 rats was used to evaluate the performance and sensitivity of the proposed experimental apparatus (MWB_Analyzer) and behavioral assessment protocol. The animals were divided into three groups: a high-dose group (n = 7), receiving the escalating morphine regimen as above; a low-dose group (n = 10), receiving half the dose of the high-dose group each day (5, 10, 15, 20, 25, 30, and 35 mg/kg); and a control group (n = 4), receiving saline injections. Behavioral withdrawal scores were recorded daily and statistically analyzed using one-way ANOVA followed by Tukey’s multiple comparisons test.
Animals were administered twice daily, with a 6 h interval between each injection. After the completion of the injections on day 7, the proposed system was employed to collect behavioral data from the rats as withdrawal symptoms commenced. The designed algorithm was utilized for the automatic recognition and statistical analysis of various behavioral occurrences. Given that the withdrawal responses of the rats would gradually diminish, the first three days were marked as the most pronounced period [60], thus focusing on behavioral data collected at 12 h (day 1), 36 h (day 2), and 60 h (day 3) post-withdrawal. Here, day 1, day 2, and day 3 refer to the first, second, and third days after the completion of drug administration for model induction.
All studies were carried out in accordance with Good Laboratory Practice (GLP) (National Medical Products Administration [NMPA], 2017) and the Preclinical Safety Evaluation of Biotechnology-Derived Pharmaceuticals (ICH S6, 2011). All animal procedures were approved by the Institutional Animal Care and Use Committee (IACUC) of the National Center for the Safety Evaluation of Drugs (NCSED) (No. IACUC-2024-K001).

2.2. Hardware Design and System Integration

The MWB_Analyzer is designed as a practical, easy-to-integrate tool for preclinical researchers. It uses small, cost-effective Orange Pi devices (Chengzi Cloud Computing (Shenzhen) Co., Ltd., Shenzhen, China) to simultaneously record video and audio from multiple angles. The system automatically processes this information in real time, requiring no manual setup of hardware or programming by the user. Once installed, the system runs autonomously and fits seamlessly into standard experimental workflows.
The design of an acquisition device is illustrated in Figure 1. The structure of the rat cage measures approximately 45 cm × 45 cm × 55 cm, providing enough space for adult rats to move freely and stand upright. Each cage housed a single rat during behavioral recording to avoid social interaction effects. Since rats are unable to perceive infrared light, the system employs infrared light sources, arranged in the form of perforated light panels mounted at the top of the enclosure. This approach not only prevents the potential behavioral impact caused by excessive light intensity but also facilitates the acquisition of high-quality video data. To avoid missing behavioral information due to blind spots in the field of view, the system utilizes a multi-angle design, with USB cameras installed on all four sides and the top of the single-channel enclosure. The cameras used in the system offer excellent data transmission rates and easy control. Additionally, two MEMS digital microphones ensure the high-quality collection of ultrasonic vocalizations.
Integrated via an Ethernet switch (TP-Link Technologies Co., Ltd., Shenzhen, China) and Orange Pi devices, the system synchronizes video and audio capture using an edge-computing platform (three Orange Pi devices) that processes multi-view data in real time. Examples of behaviors measurable by MWB_Analyzer are illustrated in Figure 2.

2.3. Video Capture and External Trigger Synchronization

A multi-threaded video acquisition system built on the Orange Pi device employs five USB cameras and the FFmpeg framework to decode MJPEG streams. Each camera is registered and dynamically configured to ensure proper synchronization through timestamping relative to a common reference. An integrated hardware–software trigger—initiated by a rapid brightness change—minimizes delays and achieves microsecond-level synchronization, which is vital for accurate spatial-temporal analysis.

2.4. Motion Segment Filtering and Camera Angle Selection

Using temporal data generated from video frame differencing, we constructed a complete dynamic signal sequence, laying the foundation for subsequent behavioral analysis. In this work, we propose an integrated signal processing pipeline that enhances measurement quality by fusing multi-frame data with adaptive smoothing to amplify motion features and by extracting robust signal segments through envelope detection and baseline correction. This approach reduces data dimensionality and suppresses noise, thereby supporting more accurate behavior analysis. This straightforward process not only significantly reduces the redundancy of raw video data but also ensures the scientific rigor and reliability of behavioral analysis by preserving the key dynamic features. Based on this estimated motion, the system further filters out over 80% of redundant frames, which typically display the rat in a stationary state.
Analyze only the first frame of the video segments filtered from the top view to further reduce the performance overhead. Erosion and dilation processes are applied to remove irrelevant areas such as the tail and other noise. Finally, an elliptical fitting method is used to obtain the rat’s position and orientation. This paper proposes selection criteria based on the rat’s orientation and position to automatically choose the optimal angle from multi-angle videos, improving processing efficiency. This method effectively reduces computational load while ensuring accurate behavior capture and recognition.
We package the camera IDs (corresponding to the best angles), the first frame timestamp, and the last frame timestamp of the remaining 20% of the segments together, and transmit them via TCP to the two side Orange Pi devices. The side Orange Pi devices determine which of the four side video streams should be processed by identifying the camera ID. This means that the side devices only need to process 25% of the video data. Furthermore, the side Orange Pi devices crop the video segments containing motion information based on the first and last frame timestamps, which helps filter out most of the video segments without motion information.
In total, through frame differencing processing, the system efficiently identifies relevant behavioral data, reducing redundant information by over 80%. Multi-angle video recordings enhance the capture of comprehensive behavioral patterns, with specialized top-view camera analysis reducing subsequent processing by 75%. Extensive experiments have shown that only about 5% of the remaining video frames need to be used for recognition, significantly reducing the computational load and improving video processing efficiency.

2.5. Wet-Dog Shakes and Scratching Behavior Recognition

Frame-difference analysis calculates the grayscale differences between consecutive frames and applies threshold filtering, retaining only pixels with significant movement, which significantly reduces the amount of data to be processed. This method operates efficiently without requiring high computational power and can accelerate subsequent analyses through parallel processing. Wet-dog shakes and scratching behaviors exhibit distinct short-term rhythmic motions when observed from a top-down perspective using image signals. This characteristic is reflected in the periodic waveform of the signal reconstructed from frame-difference pixel changes. By processing this signal, we can accurately and quickly recognize these behaviors.
To enhance recognition efficiency, we designed a fast identification method based on one-dimensional signal processing, consisting of two steps: an initial screening to eliminate irrelevant signal segments and a fine-tuned process to confirm the final result. The initial screening uses smoothing and peak detection techniques to locate candidate signal segments, while the secondary screening applies stricter multi-peak characteristics to determine the accuracy of the shake signal. This method effectively improves the speed and precision of wet-dog shake behavior identification in video data.
For scratching behavior recognition, the repeated motion of the rat’s paws causes the frame-difference image to show regular and sharp or smooth variations, with the signal manifesting as continuous peaks of a similar height. By extracting multiple time-domain and frequency-domain features and designing appropriate thresholds, scratching behavior can be effectively identified.

2.6. Lateral Behavior Recognition

After dimensionality reduction and processing of the data from the top camera, we successfully extracted video segments containing motion information. Through efficient communication between development boards, this information was transmitted to the side board, enabling rapid processing of the corresponding video segments. YOLO (You Only Look Once), an advanced deep learning method for object detection, has achieved significant results across various fields, including industry, medicine, and agriculture.
Behavioral video clips are typically composed of a series of consecutive frames. Even for the same behavior category, frame-to-frame differences can be significant. If the video clips are directly decoded for training and classification, the resulting model may become highly unstable, leading to a decrease in classification performance. In fact, certain prior knowledge can be of considerable help. Specifically, the behaviors of interest often exhibit characteristic events, which correspond to key frames in the video (i.e., frames that capture significant moments). Key frames are typically associated with stable events. Therefore, we can perform classification tasks based on the key frames of behavioral video clips.
Specifically, MWB_Analyzer first classifies key frames of the video using the improved YOLO network. Here, we leverage the CBAM module (Figure 3a) from existing research and the self-developed CSPM module (Figure 3b) to enhance the performance of the base YOLO model, as illustrated in Figure 3c. In the task of classifying rat behavior images, the integration of attention mechanisms is particularly crucial. Discriminating rat behavior often relies on subtle movements or morphological changes, which can be obscured by background noise or interference from irrelevant regions. These two modules aim to optimize the feature extraction process from different dimensions to improve classification performance.
The channel attention mechanism focuses on the channel dimension of the feature maps. It utilizes global pooling operations (such as average or max pooling) to extract global context information for each channel. Then, a lightweight perception module assigns weights to each channel, highlighting the contribution of the key channels. On the other hand, the spatial attention mechanism concentrates on the spatial dimension of the feature maps. By merging information across the channel dimension (such as taking the average or maximum value), it generates a 2D feature map and calculates a spatial attention map through small convolutional layers, emphasizing the significant areas in the image. Channel attention helps the model focus on high-level semantic features related to behavioral patterns, while spatial attention can automatically locate the key areas in the image, such as the rat’s paws, head, or prominent parts of the body. The combination of CBAM and CSPM modules, which employ different designs of channel and spatial attention, allows the network to enhance feature representation at both the channel and spatial levels. These attention mechanisms enable the YOLO model to capture global context while precisely locating the local regions where the behavior occurs, significantly improving classification accuracy and robustness. Thus, this design is better suited to extract discriminative features from rat behavior images, effectively enhancing the classification capability for complex behavioral patterns. Finally, the classification results of each video frame are statistically analyzed (Figure 3d), and the most frequently occurring category is chosen as the classification result for the entire video clip. This approach enables more robust video classification, reducing the impact of single-frame classification errors on the overall classification of the video clip.

2.7. Audio Recognition of Teeth Chattering Based on Mel Spectrogram and ResNet-SE

Teeth chattering exhibits acoustic characteristics that are closely aligned with environmental sounds, such as background noise, and typically has a brief duration. In this study, inspired by the environmental audio dataset ESC-50 [61], we segment continuous recordings into 5 s clips for processing (Figure 4a). The original audio signal clips contain substantial background noise, necessitating the application of median filtering and bandpass filtering to suppress unwanted noise components (Figure 4b). Subsequently, we compute the upper envelope of the filtered signal and set all data points below the mean of this envelope to zero. This step effectively filters out the majority of signal segments with minimal acoustic activity. Given that teeth chattering consists of short, intermittent sounds, densely packed segments of the signal can interfere with the identification of continuous vocalization points. To mitigate this, we downsample the signal and compute the absolute value of the signal gradient to eliminate excessively dense segments. Following these steps, the algorithm normalizes the signal and utilizes a threshold to remove inconspicuous sounds, resulting in a preprocessed audio signal. Experimental results indicate that teeth chattering produces distinct, crisp sounds that appear intermittently over short periods as illustrated in Figure 4c. In the time-domain signal, this corresponds to a characteristic short-term multi-peak waveform. Therefore, if the preprocessed signal contains three or more closely spaced peaks, the system records the corresponding time intervals to facilitate subsequent feature extraction and audio classification, as illustrated in Figure 4d.
ResNet-SE is effective in learning hierarchical representations of audio from features like Mel spectrograms (Figure 5), which can be further utilized for the classification of teeth chattering audio. The residual structure (ResNet) allows the network to learn the residual mappings between the input and output, thereby simplifying the training of deeper networks. The Squeeze-and-Excitation (SE) module explicitly models the inter-channel relationships, enhancing the network’s selective attention to audio features. This design maintains high performance while also ensuring computational efficiency. The complete processing workflow for chatter audio is illustrated in the Figure 6.

3. Results

We summarize the main outcomes of applying MWB_Analyzer, an automated system for detecting morphine withdrawal behaviors in rats. The system combines multi-angle video and audio analysis to provide objective, real-time assessments without manual scoring. Our results show that MWB_Analyzer can accurately identify key withdrawal behaviors, such as wet-dog shakes and scratching (both with over 95% accuracy), and effectively classify more complex behavioral patterns using a deep learning model with over 94% accuracy. Importantly, the system operates smoothly on edge devices, enabling practical use in routine preclinical studies. By applying clear time thresholds and a new scoring scheme, the system helps quantify dose-dependent and time-limited withdrawal symptoms, supporting more reliable and standardized behavioral evaluation.

3.1. Analysis of Withdrawal Behavior Recognition Metrics

The behavior recognition algorithm based on one-dimensional difference frame signals converts the inter-frame differences in the original video into a simplified one-dimensional signal, significantly reducing data volume while retaining key behavioral information. This method combines basic signal processing with manual feature extraction to efficiently and rapidly identify wet-dog shakes and scratching behaviors. Experiments show that the recognition accuracy for wet-dog shakes is 95.5% while scratching achieves an accuracy of 95.8%.
In deep learning models, Grad-CAM (Gradient-weighted Class Activation Mapping) is commonly used to generate class-specific heatmaps to explain the model’s prediction decisions [53]. When selecting the application point for Grad-CAM, we apply it to the last convolutional layer near the classification layer. This choice is made because the feature maps of convolutional layers combine spatial and semantic information, while fully connected or flattened layers in the classification head lose spatial information, rendering Grad-CAM visualizations meaningless. Specifically, the last convolutional layer can be considered a “bottleneck” layer whose output feature maps possess not only high-level semantic abstractions but also provide class-relevant importance information through backpropagated gradients. This enables Grad-CAM to generate class-specific heatmaps with spatial resolution, highlighting the model’s attention regions in the input data, as shown in Figure 7. Through the analysis of Grad-CAM heatmaps, we observed that the “Baseline + CSPM (Kernel = 3)” model demonstrated significant advantages. Its heatmaps accurately focused on the critical regions of the target behavior, such as the head or other key parts of the experimental rats, while maintaining high temporal consistency. This ensures the stable detection of target behaviors across the time dimension. Moreover, the model excelled in handling small-scale movements, further showcasing its robustness and precision in behavioral analysis. A more detailed analysis can be found in Supplementary Materials S3.2.
We constructed a dataset of 10,588 video key frames for YOLO image classification, with the training, validation, and test sets split in a 6:2:2 ratio. We selected the basic YOLOv5 classification model as the baseline model. We trained and tested the baseline model along with five other modified models. The training details can be found in Supplementary Materials S2. The detailed test results are provided in Supplementary Materials S3. In practice, behavioral classification is equivalent to classifying video clips. We built a dataset of 2647 behavioral video clips, with the training, validation, and test sets split in a 6:2:2 ratio. Again, we chose the basic YOLOv5 classification model as the baseline model. We trained and tested the baseline model and five modified models for video classification. The specific test results are shown in Table 1. In conjunction with the heatmap in Figure 7, we observed that the “Baseline + CSPM (Kernel = 3)” model performed best on both key frame and video clip tasks, achieving a 94.2% top-1 classification accuracy. Therefore, we selected this model as the application model and deployed it on the edge computing platform (Orange Pi devices) for testing. Despite the deployment model being reduced to FP16 (half-precision floating point), the classification accuracy on the test set only decreased from 94.2% to 93.6%, still successfully completing the behavior classification task. The model deployed on the RK3588 platform (Orange Pi device) achieved over 40 FPS in video classification tasks, demonstrating sufficient performance for real-time processing.
In this system, we collected 87 segments of teeth chattering audio and 173 segments of other audio sounds, converting them into Mel spectrograms for classification training with the ResNet-SE model. Audio data collected using a dual-microphone setup were processed using logical concatenation methods to ensure the completeness of the recognition results. On a test set of 10 groups, the algorithm achieved an accuracy rate of 92.7%, meeting the experimental requirements. We tested the filtering performance of this method using 20 audio segments, each approximately 30 min long. On average, it successfully filtered out 86.4% redundant data, leaving audio segments that all contained short intermittent sounds. The complete recognition process for a 5 s audio segment took approximately 0.5 s, while the average processing time for 30 min of audio was about 49 s, balancing recognition accuracy and efficiency.

3.2. Exploring Behavioral Assessment Schemes for Morphine Addiction

Due to drug stimulation, four rats in the treatment group died, resulting in a final dataset of 11 treated rats and 3 control rats. The hardware system operated stably throughout the data collection process, requiring only one operator to efficiently gather audio and video data from the 15 rats.
Stereotypic behaviors are defined as repetitive, monotonous, and abnormal actions performed by an animal over a certain period. In rodents, these behaviors include repetitive grooming, sniffing, head bobbing, and circling movements [54]. We selected more objective and visually quantifiable metrics from previous studies, which are easier to analyze using visual methods. Therefore, we selected eight behaviors as the evaluation criteria, including wet-dog shakes, scratching, rearing, face washing, grooming, head-raising, genital licking, and teeth chattering. The term “repetition” in the context of stereotypic behavior lacks a quantifiable definition. The question of how long a behavior must persist to be included in statistical counts is worth considering. As noted in the scoring criteria outlined in the introduction, manual counts often overlook this detail. This system incorporates a time threshold to filter automatic recognition results. By experimenting with different thresholds, a more distinct and objective definition of behavior can be established.
A significant advantage of MWB_Analyzer compared to human statistics is its ability to quantify behaviors that exceed a specific time threshold. We have statistically analyzed the results of various behaviors under different time thresholds. The experimental results in Supplementary Materials S4.1 seem to indicate that rat withdrawal behavior appears to last longer compared to normal behavior.
Wet-dog shakes, rearing, and stereotypic behaviors serve as the counting metrics. In contrast, teeth chattering is treated as a non-counting metric, requiring assessment every 5 min to determine its occurrence and score accordingly. When calculating scores for a specific behavior, the occurrences for each animal are first tallied, and the average for each experimental group is computed as the final score. To provide a clearer distinction for teeth chattering, the occurrences of this behavior are also recorded. At this point, a new comprehensive scoring method has been established, as shown in Table 2 below.

3.3. Comprehensive Scoring Results Based on Our Proposed Evaluation Scheme

Following the criteria outlined in Table 2, comprehensive scores were assigned to several distinguishing behaviors. Figure 8 illustrates the comprehensive scores of the experimental group and the control group for the first three days of rat withdrawal under different time thresholds. Figure 8d demonstrates differences between the experimental group and the control group on day 1 to day 3. This seems to indicate that the rat withdrawal behavior appears to last longer compared to normal behavior. These results indicate that the chosen metrics can effectively reflect the distinctions between the treatment and control groups in the morphine spontaneous withdrawal model in rats, further validating the efficacy of the proposed system.

3.4. Experimental Study on Withdrawal Behaviors at Different Morphine Doses

We further conducted experiments to evaluate the sensitivity of our newly developed experimental apparatus (MWB_Analyzer) and the proposed assessment protocol. Rats were divided into three groups: a high-dose group (n = 7), a low-dose group (n = 10), and a control group (n = 4). Behavioral withdrawal scores were recorded daily and analyzed using one-way ANOVA followed by Tukey’s multiple comparisons test.
As illustrated in Figure 9, on day 1, the high-dose group exhibited a significant increase in withdrawal behavior scores compared to both the low-dose and control groups (** p < 0.001 vs. both groups). The low-dose group also showed significantly higher scores than the control group (* p < 0.01), indicating a dose-dependent withdrawal effect immediately following cessation. By day 2, this trend persisted: the high-dose group continued to show significantly elevated scores compared to both other groups (** p < 0.001), while the low-dose group again differed significantly from the controls (* p < 0.01). These findings suggest sustained withdrawal symptoms at higher dosages. However, from day 3 onward, no statistically significant differences were observed among the three groups (all comparisons marked as “ns”), suggesting a resolution or normalization of behavioral withdrawal symptoms within 72 h post-discontinuation.
These results collectively demonstrate that the severity of withdrawal behaviors is dose-dependent and time-limited, with prominent symptoms occurring during the first two days of withdrawal, particularly in the high-dose group. The resolution of symptoms by day 3 may reflect a rapid adaptation or recovery in the rodent model.

3.5. Summary and Implications

Overall, MWB_Analyzer successfully delivers accurate, objective, and efficient assessments of morphine withdrawal behaviors. The system demonstrates clear advantages over manual observation by automating data collection and analysis, reducing subjective bias, and supporting dose–response evaluation. These results highlight its potential as a valuable tool for standardizing preclinical studies of drug dependence and improving the reliability of behavioral pharmacology research.

4. Discussion

This study presents a significant advancement in the objective, automated, and user-friendly assessment of morphine withdrawal behaviors in rodent models. The MWB_Analyzer system addresses the key limitations of traditional manual observation—such as subjectivity, labor intensity, and variability between scorers—and provides a practical solution tailored for experimental pharmacologists and toxicologists.
From the user’s perspective, the system offers several clear advantages:
(1)
Easy Integration into Standard Workflows: MWB_Analyzer combines multi-angle video and full-scene audio capture in a fully automated manner. Its decentralized design (based on three compact Orange Pi units) requires no technical expertise for setup or operation. Once installed, the system runs autonomously, providing synchronized behavioral recordings without disrupting normal experimental procedures.
(2)
Substantial Reduction in Manual Workload Through Automation: The system leverages automatic data filtering and prioritization of key views (e.g., top view for locomotion, side view for postural signs) to reduce redundant data by over 95%. This optimization significantly lowers the computational load, allowing real-time behavior recording and analysis to be performed efficiently on compact edge devices. By automating both data acquisition and analysis, MWB_Analyzer minimizes the need for manual scoring and video review, enabling researchers to obtain objective results with minimal hands-on effort.
(3)
Enhanced Objectivity and Reproducibility: MWB_Analyzer achieves high classification accuracy (over 94% for video-based and 92% for audio-based detection of withdrawal behaviors) using a refined machine learning model. Unlike traditional scales such as Gellert and Holtzman [37], the system eliminates subjective judgment, ensuring consistent and unbiased assessments across experiments and operators. This is especially valuable for detecting subtle dose–response differences that might be missed in manual scoring. The system’s real-time analysis and precise behavior recognition facilitate more reliable dose–response evaluations, improved standardization across studies, and higher throughput for preclinical drug screening. By reducing human variability, MWB_Analyzer strengthens the statistical power of pharmacodynamic assessments and enhances confidence in drug efficacy and safety evaluations.
(4)
Broad Applicability and Flexibility: While optimized for morphine withdrawal, the system’s modular design allows easy adaptation to other models of dependence (e.g., fentanyl, alcohol). Its architecture also supports studies on drug delivery methods, pharmacokinetics, and systemic effects, making it a versatile tool for a wide range of preclinical research applications.
In summary, MWB_Analyzer not only represents a technical innovation but also provides practical, tangible benefits for researchers, saving time, improving data quality, and facilitating more robust conclusions in addiction pharmacology and beyond.

5. Conclusions

In this study, we developed MWB_Analyzer, an innovative and practical system for the automated detection of morphine withdrawal behaviors in rats. The system overcomes the key limitations of traditional manual observation by providing objective, consistent, and high-throughput behavioral assessments. By integrating real-time multi-angle video and audio analysis on compact edge devices, MWB_Analyzer enables efficient data capture and analysis without the need for specialized technical expertise or high-end hardware. Through intelligent data reduction—processing only the most behaviorally relevant 5% of frames—the system ensures smooth real-time operation while maintaining high accuracy (over 94% for video-based behaviors, and over 92% for audio-based signals). This automation minimizes manual workload, eliminates subjective bias, and allows experimental pharmacologists and toxicologists to obtain reproducible dose–response data with greater confidence. Importantly, MWB_Analyzer’s modular and flexible design makes it easy to adapt to other models of dependence (e.g., fentanyl, alcohol) and broader preclinical applications, supporting more reliable drug screening, neuropharmacological research, and evidence-based regulatory evaluations. By replacing manual scoring with a user-friendly, high-fidelity platform, this work provides a valuable tool that enhances both scientific rigor and operational efficiency in addiction research and related fields.

Supplementary Materials

The following supporting information can be downloaded at https://www.mdpi.com/article/10.3390/toxics13070586/s1. Text S1: Details on Synchronous Video Stream Acquisition and Real-time Video Segment Filtering; Text S2: Details in Model Training; Text S3: Details in Results of Image Classification; Text S4: Details in behavior statistics; Table S1: Test results of different improved YOLO models on the image test set. Figure S1: Visualization analysis based on Grad-CAM for the last convolutional layer is used to interpret the model’s prediction decisions. Figure S2: Results of grooming behavior under different time durations. A. Results of behavior lasting > 1 s. B. Results of behavior lasting > 4 s. C. Results of behavior lasting > 7 s. D. Results of behavior lasting > 10 s. E. Results of behavior lasting > 13 s. Figure S3: Results of head-raising behavior under different time durations. A. Results of behavior lasting >1 s. B. Results of behavior lasting > 4 s. C. Results of behavior lasting > 7 s. D. Results of behavior lasting > 10 s. E. Results of behavior lasting > 13 s. Figure S4: Results of rearing behavior under different time durations. A. Results of behavior lasting > 1 s. B. Results of behavior lasting > 4 s. C. Results of behavior lasting > 7 s. D. Results of behavior lasting >10 s. Figure S5: Results of genital licking behavior under different time durations. A. Results of behavior lasting > 1 s. B. Results of behavior lasting > 4 s. C. Results of behavior lasting > 7 s. D. Results of behavior lasting > 10 s. E. Results of behavior lasting >13 s. Figure S6: Results of wall-supported rearing behavior under different time durations. A. Results of behavior lasting > 1 s. B. Results of behavior lasting > 4 s. C. Results of behavior lasting > 7 s. D. Results of behavior lasting > 10 s. Figure S7: Results of face-washing behavior under different time durations. A. Results of behavior lasting > 1 s. B. Results of behavior lasting > 4 s. C. Results of behavior lasting > 7 s. D. Results of behavior lasting > 10 s. E. Results of behavior lasting > 13 s. Figure S8: A. results of scratching behavior. B. Results of wet-dog shaking behavior. Figure S9: Results of teeth chattering behavior.

Author Contributions

Conceptualization, X.G. and F.C.; methodology, F.C., M.Z. and S.L.; software, M.Z., S.L. and B.S.; hardware, B.S. and J.L.; validation, M.Z., S.L. and Q.L.; formal analysis, F.C.; investigation, X.G., Z.W. and F.C.; resources, F.C. and X.G.; data curation, Q.L. and B.S.; writing—original draft preparation, M.Z.; writing—review and editing, M.Z., S.L., Q.L., F.C. and X.G.; supervision, F.C.; project administration, F.C.; funding acquisition, F.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded in part by the National Key R&D Program of China (grant numbers 2023YFF1203505 and 2024YFC2417900), the Shenzhen Science and Technology Program (grant number KJZD20230923114909019), the Shenzhen Municipal Science and Technology Innovation Council (grant number 202110293000007) and the Guangdong Provincial Key Laboratory of Advanced Biomaterials (2022B1212010003).

Institutional Review Board Statement

All studies were carried out in accordance with Good Laboratory Practice (GLP) (National Medical Products Administration [NMPA], 2017) and the Preclinical Safety Evaluation of Biotechnology-Derived Pharmaceuticals (ICH S6, 2011). All animal procedures were approved by the Institutional Animal Care and Use Committee (IACUC) of the National Center for the Safety Evaluation of Drugs (NCSED) (No. IACUC-2024-K001).

Informed Consent Statement

Not applicable.

Data Availability Statement

The code and datasets used and analyzed during the current study are available in the GitHub repository at https://github.com/Zhang-Moran/MWB_Analyzer (accessed on 2 July 2025).

Acknowledgments

During the preparation of this manuscript, the authors used DeepSeek R1 for the purpose of English language editing. The authors have reviewed and edited the output and take full responsibility for the content of this publication.

Conflicts of Interest

Author Jinxuan Liu was employed by the company Shenzhen Giant (Ju’An) Technologies Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

  1. Zhuang, Y.W.; Wang, Y.; He, B.Q.; He, X.H.; Zhou, X.E.; Guo, S.M.; Rao, Q.D.; Yang, J.Q.; Liu, J.Y.; Zhou, Q.T.; et al. Molecular recognition of morphine and fentanyl by the human μ-opioid receptor. Cell 2022, 185, 4361–4375.E19. [Google Scholar] [CrossRef] [PubMed]
  2. Del Vecchio, G.; Spahn, V.; Stein, C. Novel Opioid Analgesics and Side Effects. ACS Chem. Neurosci. 2017, 8, 1638–1640. [Google Scholar] [CrossRef] [PubMed]
  3. American Psychiatric Association (Ed.) Diagnostic and Statistical Manual of Mental Disorders; American Psychiatric Association Publishing: Washington, DC, USA, 2013; Volume 21, pp. 591–643. [Google Scholar]
  4. Centers for Disease Control and Prevention. U.S. overdose deaths in 2021 increased half as much as in 2020—But are still up 15%. Natl. Cent. Health Stat. 2022, 16, 2022. [Google Scholar]
  5. Koob, G.F.; Maldonado, R.; Stinus, L. Neural Substrates of Opiate Withdrawal. Trends Neurosci. 1992, 15, 186–191. [Google Scholar] [CrossRef] [PubMed]
  6. Monroe, S.C.; Radke, A.K. Opioid withdrawal: Role in addiction and neural mechanisms. Psychopharmacology 2023, 240, 1417–1433. [Google Scholar] [CrossRef]
  7. Koob, G.F.; Volkow, N.D. Neurocircuitry of addiction. Neuropsychopharmacology 2010, 35, 217–238. [Google Scholar] [CrossRef]
  8. Baker, T.B.; Japuntich, S.J.; Hogle, J.M.; McCarthy, D.E.; Curtin, J.J. Pharmacologic and behavioral withdrawal from addictive drugs. Curr. Dir. Psychol. Sci. 2006, 15, 232–236. [Google Scholar] [CrossRef]
  9. Manglik, A.; Kruse, A.C.; Kobilka, T.S.; Thian, F.S.; Mathiesen, J.M.; Sunahara, R.K.; Pardo, L.; Weis, W.I.; Kobilka, B.K.; Granier, S. Crystal structure of the μ-opioid receptor bound to a morphinan antagonist. Nature 2012, 485, 321–326. [Google Scholar] [CrossRef]
  10. Sverrisdóttir, E.; Lund, T.M.; Olesen, A.E.; Drewes, A.M.; Christrup, L.L.; Kreilgaard, M. A review of morphine and morphine-6-glucuronide’s pharmacokinetic–pharmacodynamic relationships in experimental and clinical pain. Eur. J. Pharm. Sci. 2015, 74, 45–62. [Google Scholar] [CrossRef]
  11. Vinks, A.A.; Punt, N.C.; Menke, F.; Kirkendall, E.; Butler, D.; Duggan, T.J.; Cortezzo, D.E.; Kiger, S.; Dietrich, T.; Spencer, P.; et al. Electronic Health Record-Embedded Decision Support Platform for Morphine Precision Dosing in Neonates. Clin. Pharmacol. Ther. 2020, 107, 186–194. [Google Scholar] [CrossRef]
  12. Weiss, F.; Ciccocioppo, R.; Parsons, L.H.; Katner, S.; Liu, X.; Zorrilla, E.P.; Valdez, G.R.; Ben-Shahar, O.; Angeletti, S.; Richter, R.R. Compulsive drug-seeking behavior and relapse—Neuroadaptation, stress, and conditioning factors. Biol. Basis Cocaine Addict. 2001, 937, 1–26. [Google Scholar] [CrossRef]
  13. Kutlu, M.G.; Gould, T.J. Effects of drugs of abuse on hippocampal plasticity and hippocampus-dependent learning and memory: Contributions to development and maintenance of addiction. Learn. Mem. 2016, 23, 515–533. [Google Scholar] [CrossRef] [PubMed]
  14. Werner, C.T.; Mitra, S.; Auerbach, B.D.; Wang, Z.J.; Martin, J.A.; Stewart, A.F.; Gobira, P.H.; Iida, M.; An, C.N.; Cobb, M.M.; et al. Neuroadaptations in the dorsal hippocampus underlie cocaine seeking during prolonged abstinence. Proc. Natl. Acad. Sci. USA 2020, 117, 26460–26469. [Google Scholar] [CrossRef]
  15. Meye, F.J.; Trusel, M.; Soiza-Reilly, M.; Mameli, M. Neural circuit adaptations during drug withdrawal—Spotlight on the lateral habenula. Pharmacol. Biochem. Behav. 2017, 162, 87–93. [Google Scholar] [CrossRef] [PubMed]
  16. Burgdorf, C.E.; Schierberl, K.C.; Lee, A.S.; Fischer, D.K.; Van Kempen, T.A.; Mudragel, V.; Huganir, R.L.; Milner, T.A.; Glass, M.J.; Rajadhyaksha, A.M. Extinction of Contextual Cocaine Memories Requires Cav1.2 within D1R-Expressing Cells and Recruits Hippocampal Cav1.2-Dependent Signaling Mechanisms. J. Neurosci. 2017, 37, 11894–11911. [Google Scholar] [CrossRef]
  17. Lu, T.S.; Li, X.; Zheng, W.; Kuang, C.Y.; Wu, B.Y.; Liu, X.X.; Xue, Y.X.; Shi, J.; Lu, L.; Han, Y. Vaccines to Treat Substance Use Disorders: Current Status and Future Directions. Pharmaceutics 2024, 16, 84. [Google Scholar] [CrossRef] [PubMed]
  18. Haile, C.N.; Baker, M.D.; Sanchez, S.A.; Arteaga, C.A.L.; Duddupudi, A.L.; Cuny, G.D.; Norton, E.B.; Kosten, T.R.; Kosten, T.A. An Immunconjugate Vaccine Alters Distribution and Reduces the Antinociceptive, Behavioral and Physiological Effects of Fentanyl in Male and Female Rats. Pharmaceutics 2022, 14, 2290. [Google Scholar] [CrossRef] [PubMed]
  19. Moser, P.; Wolinsky, T.; Castagné, V.; Duxon, M. Current approaches and issues in non-clinical evaluation of abuse and dependence. J. Pharmacol. Toxicol. Methods 2011, 63, 160–167. [Google Scholar] [CrossRef]
  20. Zhu, J.; Ning, K.; Liu, B. Investigation and appraisal of non-clinical drug dependence in new drug development. J. China Pharm. Univ. 2008, 39, 373–375. [Google Scholar]
  21. Richardson, L.; Mammel, M.; Milloy, M.J.; Hayashi, K. Employment Cessation, Long Term Labour Market Engagement and HIV Infection Risk Among People Who Inject Drugs in an Urban Canadian Setting. Aids Behav. 2019, 23, 3267–3276. [Google Scholar] [CrossRef]
  22. Center for Drug Evaluation and Research. Technical Guidelines for Non-Clinical Drug Dependence Studies; Center for Drug Evaluation and Research: Silver Spring, MD, USA, 2022.
  23. Lerner, A.; Klein, M. Dependence, withdrawal and rebound of CNS drugs: An update and regulatory considerations for new drugs development. Brain Commun. 2019, 1, fcz025. [Google Scholar] [CrossRef]
  24. Marsden, J.; White, M.; Annand, F.; Burkinshaw, P.; Carville, S.; Eastwood, B.; Kelleher, M.; Knight, J.; O’Connor, R.; Tran, A.; et al. Medicines associated with dependence or withdrawal: A mixed-methods public health review and national database study in England. Lancet Psychiatry 2019, 6, 935–950. [Google Scholar] [CrossRef]
  25. Bluthenthal, R.N.; Simpson, K.; Ceasar, R.C.; Zhao, J.; Wenger, L.; Kral, A.H. Opioid withdrawal symptoms, frequency, and pain characteristics as correlates of health risk among people who inject drugs. Drug Alcohol Depend. 2020, 211, 107932. [Google Scholar] [CrossRef]
  26. Tarazi, D.; Maynes, J.T. Impact of Opioids on Cellular Metabolism: Implications for Metabolic Pathways Involved in Cancer. Pharmaceutics 2023, 15, 2225. [Google Scholar] [CrossRef]
  27. Antoine, D.; Singh, P.K.; Tao, J.Y.; Roy, S. Neonatal Morphine Results in Long-Lasting Alterations to the Gut Microbiome in Adolescence and Adulthood in a Murine Model. Pharmaceutics 2022, 14, 1879. [Google Scholar] [CrossRef]
  28. Danielewski, M.; Zielińska, S.; Merwid-Ląd, A.; Szandruk-Bender, M.; Słupski, W.; Włodarczyk, M.; Sozański, T.; Ziółkowski, P.; Szeląg, A.; Nowak, B. Sanguinarine-Chelerythrine from Coptis chinensis Offers Analgesic and Anti-Inflammatory Effects Without Gastrotoxicity. Pharmaceutics 2025, 17, 323. [Google Scholar] [CrossRef]
  29. Castro, N.C.F.; Silva, I.S.; Cartágenes, S.C.; Fernandes, L.M.P.; Ribera, P.C.; Barros, M.A.; Prediger, R.D.; Fontes-Júnior, E.A.; Maia, C.S.F. Morphine Perinatal Exposure Induces Long-Lasting Negative Emotional States in Adult Offspring Rodents. Pharmaceutics 2022, 14, 29. [Google Scholar] [CrossRef]
  30. Kudla, L.; Bugno, R.; Podlewska, S.; Szumiec, L.; Wiktorowska, L.; Bojarski, A.J.; Przewlocki, R. Comparison of an Addictive Potential of μ-Opioid Receptor Agonists with G Protein Bias: Behavioral and Molecular Modeling Studies. Pharmaceutics 2022, 14, 55. [Google Scholar] [CrossRef]
  31. Jin, T.L.; Duan, F. Rat Behavior Observation System Based on Transfer Learning. IEEE Access 2019, 7, 62152–62162. [Google Scholar] [CrossRef]
  32. Spragg, S.D.S. Morphine addiction in chimpanzees. Comp. Psychol. Monogr. 1940, 15, 132. [Google Scholar]
  33. Ahmed, S.H. Trying to make sense of rodents’ drug choice behavior. Prog. Neuro-Psychopharmacol. Biol. Psychiatry 2018, 87, 3–10. [Google Scholar] [CrossRef] [PubMed]
  34. Francis, D.L.; Schneider, C. Jumping after naloxone precipitated withdrawal of chronic morphine in the rat. Br. J. Pharmacol. 1971, 41, 424P–425P. [Google Scholar]
  35. Collier, H.O.J.; Schneider, C.; Francis, D.L. Modification of Morphine Withdrawal by Drugs Interacting with Humoral Mechanisms—Some Contradictions and Their Interpretation. Nature 1972, 237, 220–223. [Google Scholar] [CrossRef]
  36. Shiffman, S.; West, R.J.; Gilbert, D.G. Recommendation for the assessment of tobacco craving and withdrawal in smoking cessation trials. Nicotine Tob. Res. 2004, 6, 599–614. [Google Scholar] [CrossRef]
  37. Gellert, V.F.; Holtzman, S.G. Development and maintenance of morphine tolerance and dependence in the rat by scheduled access to morphine drinking solutions. J. Pharmacol. Exp. Ther. 1978, 205, 536–546. [Google Scholar] [CrossRef]
  38. Maldonado, R.; Negus, S.; Koob, G. Precipitation of morphine withdrawal syndrome in rats by administration of mu-, delta-and kappa-selective opioid antagonists. Neuropharmacology 1992, 31, 1231–1241. [Google Scholar] [CrossRef]
  39. Moayeri, A.; Mehdizadeh, R.; Karimi, E.; Aidy, A.; Ghaneialvar, H.; Abbasi, N. Thymol Nanopolymer Synthesis and Its Effects on Morphine Withdrawal Syndrome in Comparison with Clonidine in Rats. Front. Behav. Neurosci. 2022, 16, 843951. [Google Scholar] [CrossRef]
  40. Quintanilla, M.E.; Morales, P.; Santapau, D.; Ávila, A.; Ponce, C.; Berrios-Cárcamo, P.; Olivares, B.; Gallardo, J.; Ezquer, M.; Herrera-Marschitz, M.; et al. Chronic Voluntary Morphine Intake Is Associated with Changes in Brain Structures Involved in Drug Dependence in a Rat Model of Polydrug Use. Int. J. Mol. Sci. 2023, 24, 17081. [Google Scholar] [CrossRef]
  41. Halbout, B.; Hutson, C.; Agrawal, S.; Springs, Z.A.; Ostlund, S.B. Differential effects of acute and prolonged morphine withdrawal on motivational and goal-directed control over reward-seeking behaviour. Addict. Biol. 2024, 29, e13393. [Google Scholar] [CrossRef] [PubMed]
  42. López-Cano, M.; Font, J.; Aso, E.; Sahlholm, K.; Cabré, G.; Giraldo, J.; De Koninck, Y.; Hernando, J.; Llebaria, A.; Fernández-Dueñas, V.; et al. Remote local photoactivation of morphine produces analgesia without opioid-related adverse effects. Br. J. Pharmacol. 2023, 180, 958–974. [Google Scholar] [CrossRef] [PubMed]
  43. Srivastav, A.K.; Mishra, M.K.; Lillard, J.W.; Singh, R. Transforming Pharmacogenomics and CRISPR Gene Editing with the Power of Artificial Intelligence for Precision Medicine. Pharmaceutics 2025, 17, 555. [Google Scholar] [CrossRef] [PubMed]
  44. Yang, S.; Hu, X.; Zhu, J.; Zheng, B.; Bi, W.; Wang, X.; Wu, J.; Mi, Z.; Wu, Y. Aspects and Implementation of Pharmaceutical Quality by Design from Conceptual Frameworks to Industrial Applications. Pharmaceutics 2025, 17, 623. [Google Scholar] [CrossRef]
  45. Serrano, D.R.; Luciano, F.C.; Anaya, B.J.; Ongoren, B.; Kara, A.; Molina, G.; Ramirez, B.I.; Sánchez-Guirales, S.A.; Simon, J.A.; Tomietto, G.; et al. Artificial Intelligence (AI) Applications in Drug Discovery and Drug Delivery: Revolutionizing Personalized Medicine. Pharmaceutics 2024, 16, 1328. [Google Scholar] [CrossRef]
  46. El-Tanani, M.; Satyam, S.M.; Rabbani, S.A.; El-Tanani, Y.; Aljabali, A.A.A.; Al Faouri, I.; Rehman, A. Revolutionizing Drug Delivery: The Impact of Advanced Materials Science and Technology on Precision Medicine. Pharmaceutics 2025, 17, 375. [Google Scholar] [CrossRef] [PubMed]
  47. Albayati, N.; Talluri, S.R.; Dholaria, N.; Michniak-Kohn, B. AI-Driven Innovation in Skin Kinetics for Transdermal Drug Delivery: Overcoming Barriers and Enhancing Precision. Pharmaceutics 2025, 17, 188. [Google Scholar] [CrossRef]
  48. Świerczek, A.; Batko, D.; Wyska, E. The Role of Pharmacometrics in Advancing the Therapies for Autoimmune Diseases. Pharmaceutics 2024, 16, 1559. [Google Scholar] [CrossRef]
  49. Negrete, S.B.; Arai, H.; Natsume, K.; Shibata, T. Multi-view image-based behavior classification of wet-dog shake in Kainate rat model. Front. Behav. Neurosci. 2023, 17, 1148549. [Google Scholar] [CrossRef]
  50. Yu, H.S.; Xiong, J.W.; Ye, A.Y.; Li Cranfill, S.; Cannonier, T.; Gautam, M.; Zhang, M.; Bilal, R.; Park, J.E.; Xue, Y.J.; et al. Scratch-AID, a deep learning-based system for automatic detection of mouse scratching behavior with high accuracy. eLife 2022, 11, e84042. [Google Scholar] [CrossRef] [PubMed]
  51. Shih, Y.H.; Ke, T.C.; Lin, M.T.; Young, M.S. Sensor system for enhanced detection of locomotion and standing behavior in rats. IEEE Sens. J. 2008, 8, 357–364. [Google Scholar] [CrossRef]
  52. Kernan, W.J.; Mullenix, P.J.; Hopper, D.L. Pattern-Recognition of Rat Behavior. Pharmacol. Biochem. Behav. 1987, 27, 559–564. [Google Scholar] [CrossRef]
  53. Arai, H.; Shigemoto, M.; Natsume, K. Detection of the change in characteristics of self-grooming by the neural network in the latent period of the Rat Kainate Epilepsy model. Sice J. Control Meas. Syst. Integr. 2022, 15, 64–70. [Google Scholar] [CrossRef]
  54. Nath, T.; Mathis, A.; Chen, A.C.; Patel, A.; Bethge, M.; Mathis, M.W. Using DeepLabCut for 3D markerless pose estimation across species and behaviors. Nat. Protoc. 2019, 14, 2152–2176. [Google Scholar] [CrossRef] [PubMed]
  55. Li, W.; Liu, M.; Liu, H.; Guo, T.; Wang, T.; Tang, H.; Sebe, N. GraphMLP: A graph MLP-like architecture for 3D human pose estimation. Pattern Recognit. 2025, 158, 110925. [Google Scholar] [CrossRef]
  56. Cao, Z.; Hidalgo, G.; Simon, T.; Wei, S.E.; Sheikh, Y. OpenPose: Realtime Multi-Person 2D Pose Estimation Using Part Affinity Fields. IEEE Trans. Pattern Anal. Mach. Intell. 2021, 43, 172–186. [Google Scholar] [CrossRef] [PubMed]
  57. Fang, Q.; Xu, Z.H.; Hu, M.X.; Zeng, Q.Y.; Liu, C.J.; Chen, Q.J. SPGformer: Serial-Parallel Hybrid GCN-Transformer with Graph-Oriented Encoder for 2-D-to-3-D Human Pose Estimation. IEEE Trans. Instrum. Meas. 2024, 73, 8003015. [Google Scholar] [CrossRef]
  58. Yin, Y.F.; Liu, M.; Zhu, Q.G.; Zhang, S.S.; Hussien, N.A.; Fan, Y. Multibranch Attention Graph Convolutional Networks for 3-D Human Pose Estimation. IEEE Trans. Instrum. Meas. 2023, 72, 2520412. [Google Scholar] [CrossRef]
  59. Hu, Y.J.; Ferrario, C.R.; Maitland, A.D.; Ionides, R.B.; Ghimire, A.; Watson, B.; Iwasaki, K.; White, H.; Xi, Y.T.; Zhou, J.; et al. LabGym: Quantification of user-defined animal behaviors using learning-based holistic assessment. Cell Rep. Methods 2023, 3, 100415. [Google Scholar] [CrossRef]
  60. Hassan, R.; See, C.P.; Sreenivasan, S.; Mansor, S.M.; Müller, C.P.; Hassan, Z. Mitragynine Attenuates Morphine Withdrawal Effects in Rats—A Comparison with Methadone and Buprenorphine. Front. Psychiatry 2020, 11, 411. [Google Scholar] [CrossRef]
  61. Piczak, K.J. ESC: Dataset for environmental sound classification. In Proceedings of the 23rd ACM International Conference on Multimedia, Brisbane, Australia, 26–30 October 2015; pp. 1015–1018. [Google Scholar]
Figure 1. Behavioral video recording and analysis of a single device. (a) Video recording and processing workflow of the top Orange Pi (①). (b) Video recording and processing workflow of the side Orange Pi (② and ③). a: Communication with either ② or ③ is established based on the calculated viewing angle, transmitting the camera number that needs to be processed via TCP. b: Video clips containing only motion information are filtered from the differential frame signal, and the positions of the first and last frames of the video clips are transmitted to either ② or ③ via TCP.
Figure 1. Behavioral video recording and analysis of a single device. (a) Video recording and processing workflow of the top Orange Pi (①). (b) Video recording and processing workflow of the side Orange Pi (② and ③). a: Communication with either ② or ③ is established based on the calculated viewing angle, transmitting the camera number that needs to be processed via TCP. b: Video clips containing only motion information are filtered from the differential frame signal, and the positions of the first and last frames of the video clips are transmitted to either ② or ③ via TCP.
Toxics 13 00586 g001
Figure 2. Examples of behaviors measurable by MWB_Analyzer.
Figure 2. Examples of behaviors measurable by MWB_Analyzer.
Toxics 13 00586 g002
Figure 3. Improved YOLO-based side-view video classification method. (a) Basic structure of the CBAM module. (b) Basic structure of the CSPM module. (c) Basic structure of YOLOv5 image classification and the position of improvements. (d) Workflow for video clip classification based on the improved YOLO model.
Figure 3. Improved YOLO-based side-view video classification method. (a) Basic structure of the CBAM module. (b) Basic structure of the CSPM module. (c) Basic structure of YOLOv5 image classification and the position of improvements. (d) Workflow for video clip classification based on the improved YOLO model.
Toxics 13 00586 g003
Figure 4. (a) The original audio signal. (b) The filtered signal. (c) The signal after extracting distinct, intermittent sound segments. (d) The signal after identifying continuous values. Cyan-colored circles on the Figure 4d indicate initial screening markers for teeth chatter signals.
Figure 4. (a) The original audio signal. (b) The filtered signal. (c) The signal after extracting distinct, intermittent sound segments. (d) The signal after identifying continuous values. Cyan-colored circles on the Figure 4d indicate initial screening markers for teeth chatter signals.
Toxics 13 00586 g004
Figure 5. The Mel spectrogram of the signal.
Figure 5. The Mel spectrogram of the signal.
Toxics 13 00586 g005
Figure 6. The workflow to identify teeth chattering.
Figure 6. The workflow to identify teeth chattering.
Toxics 13 00586 g006
Figure 7. Visualization analysis based on Grad-CAM for the last convolutional layer is used to interpret the model’s prediction decisions. The overlaid pseudo-color heatmap (Grad-CAM) highlights the model’s key regions of interest, with red indicating high activation values (major contribution to prediction) and blue denoting low activation values (minor contribution).
Figure 7. Visualization analysis based on Grad-CAM for the last convolutional layer is used to interpret the model’s prediction decisions. The overlaid pseudo-color heatmap (Grad-CAM) highlights the model’s key regions of interest, with red indicating high activation values (major contribution to prediction) and blue denoting low activation values (minor contribution).
Toxics 13 00586 g007
Figure 8. The comprehensive mean scores of the experimental group (n = 11) and the control group (n = 3) for the first three days of rat withdrawal under different time thresholds. (a) Comprehensive scores of withdrawal behavior when the time threshold is 1 s. (b) Comprehensive scores of withdrawal behavior when the time threshold is 4 s. (c) Comprehensive scores of withdrawal behavior when the time threshold is 7 s. (d) Comprehensive scores of withdrawal behavior when the time threshold is 10 s. Data are presented as the mean ± SD. p values were calculated by two-tailed, unpaired t test in each case, and ns indicates values that are not significant. * p < 0.05, ** p < 0.01, and *** p < 0.001.
Figure 8. The comprehensive mean scores of the experimental group (n = 11) and the control group (n = 3) for the first three days of rat withdrawal under different time thresholds. (a) Comprehensive scores of withdrawal behavior when the time threshold is 1 s. (b) Comprehensive scores of withdrawal behavior when the time threshold is 4 s. (c) Comprehensive scores of withdrawal behavior when the time threshold is 7 s. (d) Comprehensive scores of withdrawal behavior when the time threshold is 10 s. Data are presented as the mean ± SD. p values were calculated by two-tailed, unpaired t test in each case, and ns indicates values that are not significant. * p < 0.05, ** p < 0.01, and *** p < 0.001.
Toxics 13 00586 g008
Figure 9. Behavioral withdrawal symptoms were evaluated daily for 5 consecutive days after discontinuation of drug administration. Rats were assigned to three groups: control (n = 4), low-dose (n = 10), and high-dose (n = 7). Data are presented as the mean ± SD. p values were calculated by one-way ANOVA followed by Tukey’s multiple comparisons test, and ns indicates values that are not significant. ** p < 0.01, and *** p < 0.001.
Figure 9. Behavioral withdrawal symptoms were evaluated daily for 5 consecutive days after discontinuation of drug administration. Rats were assigned to three groups: control (n = 4), low-dose (n = 10), and high-dose (n = 7). Data are presented as the mean ± SD. p values were calculated by one-way ANOVA followed by Tukey’s multiple comparisons test, and ns indicates values that are not significant. ** p < 0.01, and *** p < 0.001.
Toxics 13 00586 g009
Table 1. Testing results of different improved models and the optimal model’s performance on RK3588.
Table 1. Testing results of different improved models and the optimal model’s performance on RK3588.
CriterionBaselineBaseline + CBAM (Kernel = 3)Baseline + CSPM (Kernel = 3)Baseline + CSPM (Kernel = 7)Baseline + CBAM (Kernel = 7)RK3588 (Baseline + CSPM (Kernel = 3))
GroomingPrecision0.9360.9120.9120.9280.9280.904
Recall0.8600.8320.9500.8850.9590.950
F10.8970.8700.9310.9060.9430.926
Head-raisingPrecision0.9770.9890.9890.9770.9770.989
Recall0.9660.9660.9660.9770.9770.966
F10.9710.9770.9770.9770.9770.977
NormalPrecision0.8790.8940.9240.9090.9240.924
Recall0.8410.8810.9240.8700.8710.924
F10.8590.8870.9240.8890.8970.924
RearingPrecision0.9150.8720.8940.8090.8300.851
Recall0.9770.8541.0001.0001.0001.000
F10.9450.8630.9940.8940.9070.920
Genital lickingPrecision0.8310.8030.9580.8870.9720.958
Recall0.9520.9340.9190.9840.8960.932
F10.8870.8640.9380.9330.9320.944
Wall-supported rearingPrecision0.9900.9300.9901.0001.0000.990
Recall0.9610.9490.9610.9260.9430.943
F10.9750.9390.9750.9620.9710.966
Face-washingPrecision0.7690.8210.8720.8210.8210.872
Recall0.9090.9140.8290.8420.9140.791
F10.8330.8650.8500.8310.8650.829
AllTop-10.9180.9010.9420.9230.9380.936
Note: Bold values indicate the maximum within each respective metric category.
Table 2. A novel comprehensive scoring method.
Table 2. A novel comprehensive scoring method.
Types of BehaviorScoring Method
Wet-dog shakes1 point each time recorded
Head-raising1 point each time recorded
Stereotypic behaviors0.5 point each time recorded
Teeth chattering2 points if it occurs every 5 min
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhang, M.; Li, Q.; Li, S.; Sun, B.; Wu, Z.; Liu, J.; Geng, X.; Chen, F. MWB_Analyzer: An Automated Embedded System for Real-Time Quantitative Analysis of Morphine Withdrawal Behaviors in Rodents. Toxics 2025, 13, 586. https://doi.org/10.3390/toxics13070586

AMA Style

Zhang M, Li Q, Li S, Sun B, Wu Z, Liu J, Geng X, Chen F. MWB_Analyzer: An Automated Embedded System for Real-Time Quantitative Analysis of Morphine Withdrawal Behaviors in Rodents. Toxics. 2025; 13(7):586. https://doi.org/10.3390/toxics13070586

Chicago/Turabian Style

Zhang, Moran, Qianqian Li, Shunhang Li, Binxian Sun, Zhuli Wu, Jinxuan Liu, Xingchao Geng, and Fangyi Chen. 2025. "MWB_Analyzer: An Automated Embedded System for Real-Time Quantitative Analysis of Morphine Withdrawal Behaviors in Rodents" Toxics 13, no. 7: 586. https://doi.org/10.3390/toxics13070586

APA Style

Zhang, M., Li, Q., Li, S., Sun, B., Wu, Z., Liu, J., Geng, X., & Chen, F. (2025). MWB_Analyzer: An Automated Embedded System for Real-Time Quantitative Analysis of Morphine Withdrawal Behaviors in Rodents. Toxics, 13(7), 586. https://doi.org/10.3390/toxics13070586

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop