A system for assisting in the diagnosis of a prodromal phase of a childhood tic disorder
By designing an auxiliary diagnostic system for the prodromal phase of tic disorders in children, and utilizing a multi-feature temporal collaborative module and deep learning technology, weak signals of microtremors and breathing patterns are extracted from regular videos, enabling automatic identification of the prodromal impulse phase. This solves the problem that existing technologies cannot identify this phase and provides accurate early warning and diagnostic support.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 福建省儿童医院
- Filing Date
- 2026-06-12
- Publication Date
- 2026-07-10
AI Technical Summary
Existing technologies cannot simultaneously extract weak signals of microtremors and breathing patterns from routinely acquired videos of children's faces and chests without the need for additional sensors, and cannot use deep learning to mine the temporal causal relationship between the two and subsequent tics to achieve automatic identification of the prodromal impulse period.
A diagnostic system for the prodromal phase of tic disorders in children was designed, including a video acquisition module, a facial microtremor feature extraction module, a breathing pattern feature extraction module, and a tic action detection module. Cross-modal collaborative fusion was performed through a multi-feature temporal collaborative module. Features were extracted using a three-dimensional convolutional neural network and a spatiotemporal graph convolutional network. Combined with a gated attention mechanism and causal consistency contrast loss, the system can automatically identify the prodromal impulse phase.
It enables automatic identification of the prodromal impulse phase of tic disorders, improves early warning capabilities, provides a precise time window for behavioral intervention, and generates auxiliary diagnostic reports, avoiding misjudgments and significantly enhancing the ability to characterize the pathological circuits of tic disorders.
Smart Images

Figure CN122369900A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical artificial intelligence-assisted diagnostic technology, and in particular to an auxiliary diagnostic system for the prodromal stage of childhood tic disorders. Background Technology
[0002] Childhood tic disorders are a common neurodevelopmental disorder. Currently, clinical diagnosis mainly relies on physicians' visual observation and scale assessment of tic movements, which is highly subjective and has a low early recognition rate. In recent years, deep learning-assisted diagnostic systems based on video behavior analysis have achieved, to some extent, automatic identification of tic movements by extracting the spatiotemporal motion features of tic movements such as blinking, nose twitching, and throat clearing. However, those skilled in the art have long overlooked a pathological phenomenon with significant clinical value that is extremely difficult to capture through video signals—the "prodromal impulse period" preceding a tic movement. Neurological studies have confirmed that more than 80% of children with tic disorders experience an unpleasant sensory impulse (i.e., a prodromal impulse) 0.5-2 seconds before the tic movement occurs. Children temporarily relieve this impulse by performing the tic movement. Therefore, the identification of the prodromal impulse plays an irreplaceable role in the early warning, differential diagnosis (distinguishing it from other motor disorders without a prodromal impulse), and behavioral intervention (such as habit reversal training) of tic disorders. However, the prodromal impulse is a subjective feeling and cannot be directly observed through video; existing computer vision-assisted diagnostic systems have never ventured into this area. Even more challenging is that, although recent neurophysiological studies have found that children in the prodromal phase exhibit facial muscle microtremors with a frequency of 0.5-2 Hz and an amplitude of less than 0.5 mm, accompanied by a brief 20-30% increase in respiratory rate as a form of autonomic stress response, both physiological signals are extremely weak. The microtremor amplitude is far below the noise level of conventional videos, and the respiratory changes are easily confused with common behaviors such as crying and coughing in children. Furthermore, these two signals originate from different physiological mechanisms of the motor cortex and the autonomic nervous system, respectively. No existing technology has ever attempted to extract these two signals from ordinary videos and establish a cross-modal temporal causal relationship. Therefore, how to simultaneously extract the weak signals of microtremors and respiratory patterns from conventionally acquired videos of children's faces and chests without additional sensors, and how to use deep learning to mine the temporal causal relationship between these signals and subsequent tics, thereby achieving automatic identification of the prodromal phase, has become a pressing but long-neglected technical challenge in this field. Summary of the Invention
[0003] The technical problem to be solved by this invention is: how to simultaneously extract weak signals of microtremors and breathing patterns from conventionally acquired videos of children's faces and chests without the need for additional sensors, and to mine the temporal causal relationship between the two and subsequent tics through deep learning, thereby achieving automatic identification of the prodromal impulse period.
[0004] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A diagnostic aid system for the prodromal stage of childhood tic disorders, comprising: The auxiliary diagnostic output module is configured to: determine whether the current time window is a prodromal period based on the comparison result of the prodromal impulse index and a preset threshold, and output the prodromal period confidence level; when it is determined to be a prodromal period, generate an early warning signal including visual and / or auditory cues according to the type of tic and the predicted occurrence time, and output the early warning signal before the tic occurs; and generate an auxiliary diagnostic report based on all prodromal events detected during the entire monitoring period, the auxiliary diagnostic report including the frequency of prodromal events, average confidence level, and comprehensive evaluation recommendations.
[0005] Furthermore, the aforementioned auxiliary diagnostic system for the prodromal stage of childhood tic disorders also includes: The video acquisition module is used to acquire video data of the face and chest area of the child to be diagnosed. The facial micro-tremor feature extraction module is configured to perform Euler video magnification processing on the facial region in the video data, extract local skin color changes and motion signals with a frequency range of 0.5-2Hz, and encode them into facial micro-tremor feature vectors through a three-dimensional convolutional neural network. A breathing pattern feature extraction module is configured to extract breathing waveforms from the chest region in the video data, detect abrupt changes in breathing frequency, and encode them as a respiratory stress feature vector. The tic-twitch detection module is configured to use a spatiotemporal graph convolutional network to detect tic-twitch actions in the video data and output the type and occurrence time of the tic-twitch action. The multi-feature temporal coordination module uses the occurrence time output by the tic action detection module as the anchor point, traces back a preset time window, aligns the facial micro-tremor feature vector with the respiratory stress feature vector temporally, and fuses them through an attention mechanism to generate a precursor impulse index.
[0006] Furthermore, in the aforementioned auxiliary diagnostic system for the prodromal stage of childhood tic disorders, the Euler video amplification processing in the facial microtremor feature extraction module includes: performing Laplacian pyramid decomposition on the facial image sequence, applying 0.5-2Hz bandpass filtering to the time signals of each spatial frequency band, multiplying the filtered signals by an amplification factor and superimposing them back into the original pyramid layer, and then obtaining the amplified video sequence through pyramid reconstruction.
[0007] Furthermore, in the aforementioned auxiliary diagnostic system for the prodromal stage of childhood tic disorders, the Laplace pyramid decomposition has 5 layers, the bandpass filter uses a 4th-order Butterworth IIR filter, and the amplification factor... .
[0008] Furthermore, in the aforementioned auxiliary diagnostic system for the prodromal stage of childhood tic disorders, the respiratory pattern feature extraction module is configured to: calculate the mean value of the green channel of all pixels in the chest region to obtain the original respiratory signal, detect the peak after median filtering and low-pass filtering to calculate the instantaneous respiratory frequency, and extract the respiratory frequency mutation amplitude, recovery time and waveform symmetry as components of the respiratory stress feature vector.
[0009] Furthermore, in the aforementioned auxiliary diagnostic system for the prodromal phase of childhood tic disorders, the attention mechanism in the multi-feature temporal collaborative module is gated attention. Specifically, the calculation method is as follows: the facial microtremor feature vector and the respiratory stress feature vector are mapped to a common space through a linear mapping layer, the two mapped feature vectors are concatenated and input into a single-layer fully connected network, and the attention weight β is obtained through the Sigmoid function. The fused feature vector is represented as follows: ,in and The feature vectors after mapping.
[0010] Furthermore, in the aforementioned auxiliary diagnostic system for the prodromal phase of childhood tic disorders, the multi-feature temporal collaboration module also includes causal consistency comparison loss. This causal consistency comparison loss is used to narrow the distance between the prodromal features and corresponding tic movement features of the same child, and to widen the distance between the prodromal features and tic movement features of different samples. Its loss function is defined as: in The normalized Euclidean distance between the prodromal features and the tic behavior features is denoted as Euclidean distance. Indicates positive sample pairs, Indicates negative sample pairs, This is the marginal value.
[0011] Furthermore, in the aforementioned auxiliary diagnostic system for the prodromal stage of childhood tic disorders, the preset time window is 1 second before the tic occurs, corresponding to 60 frames of video data.
[0012] Furthermore, in the aforementioned auxiliary diagnostic system for the prodromal stage of childhood tic disorders, the tic action detection module uses a spatiotemporal graph convolutional network with an input segment length of 180 frames, a stride of 30 frames for sliding sampling, and outputs the action classification probability and the predicted offset of the tic action start frame.
[0013] The beneficial effects of this invention are as follows: This invention, for the first time, synchronously extracts two weak physiological signals—facial microtremors and respiratory patterns—from conventional videos, two signals never before used in the field for tic disorder diagnosis. Through a gated attention mechanism with tic movements as temporal anchors, it performs cross-modal collaborative fusion, achieving automatic identification of the prodromal impulse phase of tic disorders. This results in the following synergistic beneficial effects: First, microtremor and respiratory features are temporally complementary; while microtremor signals are specific, they have a low signal-to-noise ratio, while respiratory signals are stable but easily interfered with. Second, the gated attention mechanism can automatically suppress false positives in breathing, when there is only respiratory stress without a corresponding response. During microtremors, attention weight is actively reduced, effectively avoiding false alarms from common behaviors in children such as crying and coughing. Third, by using causal consistency contrast loss to narrow the temporal dependence between prodromal features and subsequent tics, the model progresses from simply identifying "correlation" to learning "causal association," significantly enhancing its ability to represent the pathological circuitry of tic disorders. Fourth, the audiovisual warning signals output by the auxiliary diagnostic module can alert doctors and patients 0.7 seconds before a tic occurs, providing a precise time window for behavioral interventions such as habit reversal training. The generated diagnostic report can directly assist in clinical differential diagnosis, avoiding misdiagnosis of the prodromal phase as allergic movements or other motor disorders. In summary, this invention, through the synergy of multiple physiological features and causal temporal modeling, fundamentally solves the technical blind spot of existing technologies that cannot identify the prodromal phase of tics. Attached Figure Description
[0014] Figure 1 This is a block diagram of an auxiliary diagnostic system for the prodromal stage of tic disorders in children, as described in Specific Embodiment 1 of the present invention. Detailed Implementation
[0015] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.
[0016] Example 1 This embodiment relates to an auxiliary diagnostic system for the prodromal stage of childhood tic disorders.
[0017] This embodiment was conducted in the neurology department of a top-tier children's hospital. All experiments were approved by the hospital's ethics committee, and informed consent was obtained from the children's guardians.
[0018] Eighty children aged 6–12 years (mean 8.5 ± 2.3 years) who met the diagnostic criteria for Tourette syndrome according to the Diagnostic and Statistical Manual of Mental Disorders (DSM-5) were included in this study. All children reported having prodromal urges and a YGTSS prodromal urge subscale score ≥2. Exclusion criteria included: children currently taking antitic medications, children with other movement disorders, and children with facial skin conditions that affected video analysis.
[0019] Fifty healthy children with no history of tics or mental illness were included, aged 6-12 years, with a mean age of 8.2 ± 2.1 years.
[0020] Forty children diagnosed with allergic conjunctivitis and / or rhinitis by skin prick test were included. They had frequent blinking and sniffing but no tic disorder diagnosis. Their age ranged from 6 to 12 years, with a mean age of 8.4 ± 2.0 years.
[0021] Video capture equipment and environment: Camera: Basler acA1920-155uc (color CMOS, 1920×1080 resolution) Lens: Computar M1214-MP2 (focal length 12mm, F1.4) Frame rate: 60 frames per second (fps), higher than the standard 30 fps to capture micro-jumps. Shooting environment: A private consultation room in a hospital, with a uniform light gray background. Two LED soft lights (color temperature 5000K, illuminance 1000 lux) were used to illuminate from a 45-degree angle on the left and right to avoid shadows on the face.
[0022] Shooting distance: The child sits on a fixed chair 1.5 meters away from the camera. The camera height is adjusted to be at eye level with the child, while ensuring that the chest area (from below the neck to the xiphoid process) is fully visible.
[0023] Data collection duration: Each child recorded a 10-minute video, including a free play period (5 minutes) and a doctor-guided designated action (deep breathing, closing eyes, rapid blinking, etc., used to collect control data).
[0024] Data annotation: Two specialists in tic disorders (with over 5 years of clinical experience) independently used ELAN annotation software to annotate each motion segment frame by frame. The annotations included: Start and end frames of tics: indicate the type of tics (blinking, sniffling, throat clearing, others) and the precise start frame number. and end frame number .
[0025] Prodromal Impulse Phase: Based on the child's subjective report (by playing back the video and having the child recall and indicate "the moment before the tics started") and behavioral observation, the annotator marks the 0.5-2 second time window before the onset of the tic as the prodromal phase, and records the starting frame of the prodromal phase. and end frame .
[0026] The consistency of the annotations was tested using the Kappa coefficient. In this example, Kappa = 0.86, indicating good consistency.
[0027] A total of 1560 valid labeled samples were obtained: 650 blinking, 380 nose twitching, 320 throat clearing, and 210 other tics, with corresponding prodromal samples of 1560. All data were randomly divided into training, validation, and test sets in a ratio of 7:1.5:1.5, ensuring that all segments from the same subject appeared in only the same set.
[0028] To alleviate the problem of limited sample size, online data augmentation is performed on video clips during the training phase: Horizontal Flip (probability 0.5): Horizontally flips the RGB frame, simultaneously changing the skeleton point coordinates. (Normalized coordinates) transformation to The one-dimensional sequence of respiratory signals is not horizontally flipped.
[0029] Brightness jitter: Randomly multiply by a coefficient [0.8, 1.2], applied only to RGB frames.
[0030] Time warp (probability 0.5): Randomly resample the frame sequence at 0.9~1.1 times the speed, keeping the total number of frames unchanged at 150 frames (action network) or 120 frames (micro-tremor network). Specifically, a new time index sequence is generated, and a new RGB frame sequence is obtained by sampling from the original frame sequence using linear interpolation; simultaneously, the skeletal point sequence (x, y coordinates of 32 keypoints) and the respiratory signal sequence are also processed. Linear interpolation is performed using the same time interpolation factor to ensure time alignment of all modes.
[0031] Random cropping (for motion branch skeleton points only): A 1120×896 region is randomly cropped from the original 1280×1024 image to simulate slight camera movement. Keypoint coordinates are transformed synchronously, while breathing signals remain unchanged.
[0032] System hardware and software platform: Compute server: Dell PowerEdge R750, configured with 2 Intel Xeon Gold 6348 CPUs (2.6GHz, 28 cores), 4 NVIDIA A100 GPUs (80GB VRAM), and 256GB DDR4 RAM.
[0033] Operating System: Ubuntu 22.04 LTS Deep learning frameworks: PyTorch 2.0.0, CUDA 11.8, cuDNN 8.6.0 Video processing libraries: OpenCV 4.7.0, scikit-video 1.1.11, SciPy 1.9.0 Euler video upscaling implementation: Based on a custom PyTorch layer, using Laplacian pyramid decomposition and IIR filtering.
[0034] The video acquisition module is used to acquire video data of the face and chest area of the child to be diagnosed. All videos were first downsampled to 1280×720 resolution using OpenCV's resize function, maintaining 60fps. Face detection and alignment were then performed: MTCNN (Multi-Task Cascaded Convolutional Network) was used to detect the face positions in the first frame, obtaining facial bounding boxes. The facial region was cropped out, uniformly sized to 256×256 pixels, and scaled down to 112×112 pixels as input to the micro-vibration extraction network. Simultaneously, based on human proportions (from below the neck to the xiphoid process), the thoracic region was cropped from the original image, sized to 640×480 pixels, for respiratory analysis. The cropping position of the thoracic region was fixed relative to the face position (the bottom edge of the face bounding box extended downwards by 1.5 times the face height).
[0035] The facial micro-tremor feature extraction module is configured to perform Euler video magnification processing on the facial region in the video data, extract local skin color changes and motion signals with a frequency range of 0.5-2Hz, and encode them into facial micro-tremor feature vectors through a three-dimensional convolutional neural network. This module is used to perform the following operations on each facial video clip (2 seconds long, i.e., 120 frames, 60fps): Each frame of the image is decomposed into a 5-layer Laplacian pyramid, resulting in 5 spatial frequency bands from high to low frequency. Layer 0 represents the highest frequency (details), and layer 4 represents the lowest frequency (global illumination). All pyramid layers use the same magnification factor α=50 because the precursor micro-tremors are present in multiple spatial frequency bands.
[0036] Bandpass filtering was applied to the time series (length 120) of each pixel at each level of the pyramid. The filter was a 4th-order Butterworth IIR filter with a passband frequency range of 0.5-2Hz (corresponding to the typical frequency of micro-tremors during the precursor impulse phase), and a sampling frequency of 60Hz. The filtered signal... Indicates the first Layer in pixels Place, time The filtered signal.
[0037] Multiply the filtered signal by the amplification factor. Then, the layers are stacked back onto the original pyramid: in, This is the original pyramid layer signal. This is the amplified signal from the pyramid layers.
[0038] Starting from the lowest frequency layer (layer 4), for , will the Upsample the layer image (using bilinear interpolation with a magnification factor of 2) to make its size the same as the layer 1. Magnified image of the layer Add each pixel individually to get the new first pixel. Layer reconstruction results. Repeat this process until layer 0, finally obtaining the magnified color video sequence. The dimensions are 120×112×112×3. In this video sequence, skin color changes and minute movements (amplitude <0.5mm) that are originally invisible to the naked eye are magnified and presented as visible fluctuations.
[0039] The enlarged video sequence Input a 3DResNet-18 network. To accommodate an input duration of 120 frames, modify the first layer's convolutional kernels: The original 3D ResNet-18's first convolutional kernel size is 3×7×7 (time×height×width) with a stride of 1×2×2. This embodiment modifies it to 5×7×7 with a stride of 1×2×2, while keeping the other layers unchanged. After modification, 120 input frames are processed through Conv1 to output 60 frames in the time dimension.
[0040] Detailed parameters of the network structure: Conv1: 64 5×7×7 convolutional kernels, stride 1×2×2, output size 60×56×56×64 MaxPool1: 1×3×3 max pooling, stride 1×2×2, output size 60×28×28×64 ResBlock1 (2 convolutional layers): 64 output channels, size 60×28×28×64 ResBlock2: Outputs 128 channels, downsampled time dimension (convolution stride 2), dimensions 30×14×14×128 ResBlock3: Outputs 256 channels, downsampling time dimension, dimensions 15×7×7×256 ResBlock4: Outputs 512 channels, downsampling time dimension, size 8×4×4×512 Global average pooling (time and space): outputs a 512-dimensional feature vector. .
[0041] Pre-training: Due to the scarcity of micro-tremor data, self-built synthetic datasets were used for supervised pre-training. The synthetic datasets simulated micro-tremors by randomly generating 0.5-2Hz sine wave signals and superimposing them onto the background of face videos. Pre-training employed a contrastive learning framework (SimCLR) to enable the network to extract minute motion features. After pre-training, the entire network was fine-tuned on real datasets.
[0042] A breathing pattern feature extraction module is configured to extract breathing waveforms from the chest region in the video data, detect abrupt changes in breathing frequency, and encode them as a respiratory stress feature vector. This module is used to complete the following steps: For each frame of the thoracic region (size 640×480), calculate the mean green channel value of all pixels within that region. Because hemoglobin significantly absorbs green light, the chest rise and fall caused by respiration leads to changes in local blood volume, thus affecting the intensity of the green channel. A one-dimensional time-series signal was obtained. The length is the same as the number of video frames (60Hz sampling). Median filtering (window size 5 frames) is used to remove salt-and-pepper noise, resulting in... .
[0043] The signal is then smoothed using a low-pass filter (cutoff frequency 5Hz, Butterworth second order) to obtain the breathing waveform. .
[0044] For each twitch action, start with the twitch start frame. Use this as an anchor point to look back 1 second (60 frames) into the time window. Extract the respiratory waveform segment within this window. Boundary handling: If If the window starts capturing from frame 1, the missing frames before the window's start position are filled with the breath value of the first frame; if the window's end position exceeds the total number of video frames... Then, the breathing value from the last frame is used to fill up to frame 60. If If the sample is not found, then skip it (in very rare cases).
[0045] Peak detection: Using SciPy's find_peaks function, with a minimum peak interval of 0.5 seconds (corresponding to a maximum respiratory rate of 120 breaths / minute), detection was performed. Record all local maxima and peak positions. Peak height .
[0046] Instantaneous respiratory rate calculation: time interval between adjacent peaks (Unit: frame), instantaneous frequency (times / minute).
[0047] Baseline frequency: Take 2-1 seconds before the start of the action (i.e., the first half of the window, frame index). arrive The average respiratory rate was used as the baseline. If the interval is less than 60 frames, then the available frames are used for calculation.
[0048] Mutation magnitude: .
[0049] Recovery time: from the peak of the mutation to the return of respiratory rate to The time (in seconds) required within the specified range.
[0050] Waveform symmetry: Calculate the ratio of the slope of the rising phase to the slope of the falling phase. The rising slope is the average rate of change from the point of abrupt change (where the respiratory rate begins to rise significantly) to the peak value, and the falling slope is the average rate of change from the peak value to the recovery point. Symmetry ,like Indicates symmetry. It indicates that the rise is fast and the fall is slow.
[0051] The above features ( Recovery time, symmetry The original respiratory feature vector is formed by concatenating the average respiratory rate, respiratory rate variance, and number of peaks within the window as scalar features. .
[0052] Will A 2-layer multilayer perceptron (MLP) is input and subjected to nonlinear transformation to obtain a 128-dimensional respiratory pattern feature vector. .
[0053] MLP structure: First layer: Linear transformation (12→64) + BatchNorm + ReLU Second layer: Linear transformation (64→128) + BatchNorm + ReLU The MLP is trained jointly with the entire model.
[0054] The tic-twitch detection module is configured to use a spatiotemporal graph convolutional network to detect tic-twitch actions in the video data and output the type and occurrence time of the tic-twitch action. This module is used for: OpenPose (version 1.7.0) was used to extract human skeletal key points from video frames. To accommodate facial tics detection in children, 32 key points were selected, including 25 points on the body (nose, neck, shoulder, elbow, wrist, hip, knee, ankle, etc.) and 8 points on the face (inner and outer corners of the left and right eyes, tip of the nose, corner of the mouth, and philtrum). Key point coordinates were normalized to the [0,1] interval.
[0055] The network architecture employs a Spatiotemporal Graph Convolutional Network (ST-GCN), comprising 9 spatiotemporal graph convolutional layers. The graph topology is based on natural human connectivity. The input segment length is 180 frames (3 seconds, 60fps), with a stride of 30 frames for sliding sampling.
[0056] Output: Action classification probability (Tic / Allergy / Normal); The predicted start time is obtained by combining the predicted offset of the starting frame of the tic action with the starting frame of the segment. (Floating-point number), rounded to the nearest integer during reasoning.
[0057] Loss function: Action classification cross-entropy Start frame regression smoothing L1 loss Total motion loss .
[0058] The multi-feature temporal collaboration module uses the occurrence time output by the tic action detection module as the anchor point, traces back a preset time window, aligns the facial micro-tremor feature vector with the respiratory stress feature vector temporally, and fuses them through an attention mechanism to generate a precursor impulse index. This module is used for: Feature extraction temporal window alignment: Let the prediction start frame of the tics be... (Integer).
[0059] Extracting facial video clips from arrive A total of 60 frames were obtained, which, after being amplified by EVM and processed by 3DResNet-18, yielded a 512-dimensional micro-tremor feature vector. Boundary handling: If If the window starts capturing from frame 1, missing frames before the window's start position are filled with the pixel values of the first frame; if the window's end position exceeds the total number of video frames, the last frame is used to fill the gaps up to frame 60. If the sample does not pass the window, then skip this window (this sample will not be included in the predecessor loss calculation).
[0060] Extract respiratory signals within the same time window After respiratory feature extraction and MLP, a 128-dimensional respiratory feature vector was obtained. The filling method is the same as above.
[0061] Will and Each is mapped to a 128-dimensional common space through a linear mapping layer: in, and The weight matrix is a learnable matrix; and It is the bias vector; and This is the mapped 128-dimensional feature vector.
[0062] Will and The concatenation yields a 256-dimensional feature vector. Given a single-layer fully connected network, output a scalar. The attention weights are then obtained through the Sigmoid function. : in: For the Sigmoid function; This is the weight vector; It is a biased scalar; superscript This indicates transpose.
[0063] Fusion characteristics: in This is the fused predecessor feature vector.
[0064] Will The input is fed into a binary classifier (fully connected layers 128→2), which outputs the precursor impulse index. , representing the probability that the current time window belongs to the preceding period. The loss function is the binary cross-entropy. : in This indicates that the time window is indeed the precursor period (according to the annotation). Indicates a non-precursor stage.
[0065] During the training phase, The calculation uses the actual start time of the labeled twitching. This serves as an anchor point for selecting the window, ensuring proper gradient backpropagation. Simultaneously, the prediction time is used. Calculate monitoring loss by capturing another window (and The format is the same, but during computation, the gradient is blocked using `.detach()` on the input features and does not participate in backpropagation. This monitoring loss is only used for logging and early stopping detection (if the monitoring loss continues to fail to decrease, it indicates that the accuracy of the action detection network needs to be improved). On the validation set... and When the mean absolute error is less than 3 frames, start randomly switching to use prediction anchor point calculation with a 50% probability. (At this point, the gradient is backpropagated normally) to enhance the model's adaptability to prediction errors.
[0066] To strengthen the causal relationship between precursor features and subsequent tics, enabling the model to learn that "precursor features should be closely related to the upcoming tics," a contrastive loss is introduced. Positive and negative sample pairs are randomly sampled from each batch. Positive sample pairs: Precursor features of the same sample Tic motion characteristics corresponding to this sample The vectors formed by mapping the 512-dimensional features from the ST-GCN classification layer to the 128-dimensional features are positive pairs.
[0067] Negative sample pairs: Precursor characteristics Tic movement characteristics compared to another different sample Form negative pairs. Negative sample pairs are sampled within the current batch. If there are insufficient negative samples in the batch, a historical feature queue (size 256) is maintained to store features of recent samples, from which samples are drawn. The historical feature queue is initialized to empty. The first batch only uses negative samples from the current batch. After processing each batch, the tumbling action features of the current batch are... (Normalized) Add to the queue. When the queue exceeds 256, pop the earliest added feature (first-in, first-out strategy).
[0068] First of all and Perform L2 normalization separately: in .
[0069] Then calculate the contrastive loss: in: , representing the Euclidean distance between two normalized eigenvectors, with values ranging from 0 to 1. ; Indicates positive sample pairs. Indicates negative sample pairs; The margin is determined by a grid search on the validation set (the value ranges from 0.5 to 1.2, with step sizes of 0.1 and 0.8 yielding the best results). Indicates taking The maximum value of 0.
[0070] The entire model is trained end-to-end, and the total loss is: The weights (0.5, 0.2) were determined through a grid search on the validation set.
[0071] The auxiliary diagnostic output module outputs the confidence level of the prodromal phase of tic disorder and a warning signal that tic is about to occur based on the prodromal impulse index.
[0072] Assume the multi-feature temporal collaborative module outputs the precursor impulse index for the current time window (1 second before the start of tic prediction). This index represents the probability of a precursor impulse existing within the current time window. The system employs a dynamic threshold determination strategy. Default threshold .
[0073] like If the time window is positive, it is considered a precursor period; otherwise, it is considered a non-precursor period.
[0074] The system outputs the confidence level of the precursor period determination. The calculation method is as follows: That is, the confidence level is equal to the distance between the precursor impulse index and the decision boundary mapped to... Interval.
[0075] When the condition is determined to be in the precursor period, the system outputs a warning signal before the actual twitching action occurs. The warning signal is generated based on the following information: Lead time for early warning: ,in This represents the current processing time (i.e., the end time of the previous window). This refers to the time corresponding to the start frame of the twitching motion predicted by the twitching motion detection network. In this system, since the preceding window length is 1 second and the processing delay is approximately 0.2-0.3 seconds, the actual warning lead time is approximately 0.7-0.8 seconds.
[0076] Warning content includes the type of tic that is about to occur (obtained from the output of the tic action detection network, such as "blinking", "nose twitching", "throat clearing" etc.) and the estimated time of occurrence (in milliseconds).
[0077] The warning signal output combines visual and auditory cues: Visual cues: The facial area is marked with a colored box on the live video screen, and the text prompt "Prodromal phase - [Tic type] tic is about to occur" is displayed, while the confidence level is displayed as a progress bar.
[0078] Auditory cues: Playing short, sharp beeps (such as a "beep") allows doctors to receive alerts without having to constantly look at the screen while observing the child.
[0079] For a complete video recording (e.g., 5 minutes), the system summarizes all detected prodromal events and generates an auxiliary diagnostic report, which includes: Total number and frequency of precursor events (times / minute); Average precursor confidence level; The temporal correlation between the prodromal period and the tic action is consistent (i.e. (Matching rate with the actual occurrence of subsequent twitching actions). Comprehensive assessment recommendation: If the frequency of prodromal period identification is higher than the normal reference value (according to large sample statistics, the false alarm rate of prodromal period in normal children is <5% in this example, while the prodromal period identification rate in children with tic disorders is >85%), then "Tic disorder is highly suspected, and further clinical evaluation is recommended".
[0080] This module also provides an optional interface for connecting behavioral intervention devices (such as a vibrating wristband). When the condition is identified as a prodromal phase and the confidence level is >0.8, the system can send a command to the vibrating wristband via Bluetooth, causing the child to feel a wrist vibration and thus execute a counter-response (such as forcefully closing the eyes to counter the urge to blink). This function requires joint setup by the doctor and the child's parents before it can be enabled.
[0081] Model training hyperparameters: Optimizer: AdamW Weight decay ); Initial learning rate: Multiply by 0.1 every 30 epochs; Batch size: 16 (each batch contains 8 tic samples, 4 normal controls, and 4 allergy controls to ensure class balance). Total number of epochs: 150; Early stopping strategy: If the classification AUC on the validation set does not improve for 15 consecutive epochs, training is stopped and the optimal model parameters are restored.
[0082] Gradient clipping: Global norm is limited to 5.0.
[0083] The final evaluation was conducted using an independent test set (containing 20 subjects, 8 in the tic group, 6 in the normal group, and 6 in the allergy group, totaling approximately 400 tic movement fragments).
[0084] The inference phase strictly uses tic-twitch detection network predictions. Using this as an anchor point, the predecessor window is extracted (with the same boundary padding method as during training), and the predecessor impulse index is calculated. If so, the window is determined to be in the precursor period, and a warning signal is output. Since the system can calculate in real time, the early warning lead time is approximately equal to the length of the preceding window minus the processing delay, which is about 0.6-0.8 seconds in this system.
[0085] Attention weight analysis: In the test set, for true precursor samples, the average attention weight... (That is, microtremors and respiration contribute equally); for false positive candidates with only respiratory changes and no microtremors (such as respiratory changes after crying), the average This indicates that the model has learned to reduce the weight of respiratory features and rely on microtremor features to make judgments, thereby suppressing false positives.
[0086] The effect of causal consistency comparison loss: Ablation experiments show that removal Subsequently, the accuracy of precursor identification dropped to 84.7%, and the AUC decreased to 0.89. Analysis revealed that after removing the contrast loss, the model was more prone to associating precursor features with non-corresponding tics (e.g., incorrectly associating a blink as a precursor feature with a subsequent nose-wrinkling), leading to confusion in temporal causality. Then, the distance between positive sample pairs The distance between negative sample pairs decreased from 0.85 to 0.52, and the distance between negative sample pairs increased from 0.61 to 1.13, effectively strengthening the causal relationship.
[0087] Clinical validation examples: An 8-year-old male patient presented with involuntary blinking and nose twitching for six months, raising strong clinical suspicion of Tourette syndrome. Five minutes of his video was collected and input into the system. The system detected a predicted tic at the 47-second mark, simultaneously extracting microtremors and respiratory features from the preceding one-second window to calculate the precursor impulse index. The system issues a warning 0.7 seconds before the tic occurs: "Prodromal detection, a blinking tic is about to occur." This warning allows doctors to show children objective signals "before the tic is felt," aiding in habit reversal training (where the child responds with a counter-response when they sense the prodromal impulse). Existing systems that only detect tic movements cannot provide any prodromal information, hindering timely behavioral intervention.
[0088] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A diagnostic system for the prodromal stage of childhood tic disorders, characterized in that, include: The auxiliary diagnostic output module is configured to: determine whether the current time window is a prodromal period based on the comparison result between the prodromal impulse index and a preset threshold, and output the prodromal period confidence level; when it is determined to be a prodromal period, generate an early warning signal containing visual and / or auditory cues according to the type of tic and the predicted occurrence time, and output the early warning signal before the tic occurs. In addition, an auxiliary diagnostic report is generated based on all precursor events detected during the entire monitoring period. The auxiliary diagnostic report includes the frequency of precursor events, average confidence level, and comprehensive assessment recommendations.
2. The auxiliary diagnostic system for the prodromal stage of childhood tic disorders according to claim 1, characterized in that, Also includes: The video acquisition module is used to acquire video data of the face and chest area of the child to be diagnosed. The facial micro-tremor feature extraction module is configured to perform Euler video magnification processing on the facial region in the video data, extract local skin color changes and motion signals with a frequency range of 0.5-2Hz, and encode them into facial micro-tremor feature vectors through a three-dimensional convolutional neural network. A breathing pattern feature extraction module is configured to extract breathing waveforms from the chest region in the video data, detect abrupt changes in breathing frequency, and encode them as a respiratory stress feature vector. The tic-twitch detection module is configured to use a spatiotemporal graph convolutional network to detect tic-twitch actions in the video data and output the type and occurrence time of the tic-twitch action. The multi-feature temporal coordination module uses the occurrence time output by the tic action detection module as the anchor point, traces back a preset time window, aligns the facial micro-tremor feature vector with the respiratory stress feature vector temporally, and fuses them through an attention mechanism to generate a precursor impulse index.
3. The auxiliary diagnostic system for the prodromal stage of childhood tic disorders according to claim 2, characterized in that, The Euler video amplification processing in the facial micro-tremor feature extraction module includes: decomposing the facial image sequence into a Laplacian pyramid, performing 0.5-2Hz bandpass filtering on the time signals of each spatial frequency band, multiplying the filtered signals by an amplification factor and superimposing them back into the original pyramid layer, and then obtaining the amplified video sequence through pyramid reconstruction.
4. The auxiliary diagnostic system for the prodromal stage of childhood tic disorders according to claim 3, characterized in that, The Laplace pyramid decomposition has 5 layers, the bandpass filter uses a 4th-order Butterworth IIR filter, and the amplification factor... .
5. The auxiliary diagnostic system for the prodromal stage of childhood tic disorders according to claim 2, characterized in that, The breathing pattern feature extraction module is configured to: calculate the mean value of the green channel of all pixels in the chest region to obtain the original breathing signal, detect the peak after median filtering and low-pass filtering to calculate the instantaneous breathing frequency, and extract the amplitude of the breathing frequency change, recovery time and waveform symmetry as components of the breathing stress feature vector.
6. The auxiliary diagnostic system for the prodromal stage of childhood tic disorders according to claim 2, characterized in that, The attention mechanism in the multi-feature temporal collaboration module is gated attention. Specifically, the facial micro-tremor feature vector and the respiratory stress feature vector are mapped to a common space via a linear mapping layer. The two mapped feature vectors are then concatenated and input into a single-layer fully connected network, where the attention weight β is obtained through a Sigmoid function. The fused feature vector is represented as follows: ,in and The feature vectors after mapping.
7. The auxiliary diagnostic system for the prodromal stage of childhood tic disorders according to claim 2, characterized in that, The multi-feature temporal collaboration module also includes causal consistency comparison loss, which is used to narrow the distance between the prodromal features and corresponding tic movement features of the same child, and to widen the distance between the prodromal features and tic movement features of different samples. Its loss function is defined as: in The normalized Euclidean distance between the prodromal features and the tic behavior features is denoted as Euclidean distance. Indicates positive sample pairs, Indicates negative sample pairs, This is the marginal value.
8. The auxiliary diagnostic system for the prodromal stage of childhood tic disorders according to claim 2, characterized in that, The preset time window is 1 second before the twitching action occurs, corresponding to 60 frames of video data.
9. The auxiliary diagnostic system for the prodromal stage of childhood tic disorders according to claim 2, characterized in that, The twitching action detection module uses a spatiotemporal graph convolutional network with an input segment length of 180 frames and a stride of 30 frames for sliding sampling. It outputs the action classification probability and the predicted offset of the twitching action start frame.