An automatic vehicle damage assessment method and system based on video segmentation in auto insurance claims.
By segmenting vehicle damage through a shared backbone and dual-branch network, combined with optical flow and calibration technologies, the problem of inconsistent damage quantification in auto insurance claims has been solved. This has achieved stable quantification at the video level and improved the credibility of evidence, ensuring the compliance and traceability of damage assessment results.
Patent Information
- Application Number
- CN202511379071.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-25
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-09-25
AI Technical Summary
In the auto insurance claims process, existing technologies are unable to reliably distinguish between different levels of vehicle damage. The lack of cross-frame spatiotemporal constraints leads to inconsistent quantitative indicators. Camera shake and changes in perspective cause mask drift. The lack of video segmentation and spatiotemporal consistency tracking results in insufficient credibility of evidence and inconsistent damage assessment results, making it difficult to meet audit and compliance requirements.
A shared backbone + dual-branch network is used for component and damage segmentation. Optical flow and re-identification are combined to maintain cross-frame consistency. Scale calibration is performed by calibration of license plates, wheel hubs, etc. Monocular depth and component curvature estimation are fused to calculate damage quantification indicators and map them to the component BOM, working hours and price database to generate a structured report.
It achieves stable quantification at the video level, improves the credibility of evidence and the efficiency of claims settlement, reduces discrepancies in loss assessment, ensures the traceability and compliance of loss assessment results, and reduces the rate of misjudgment and re-inspection.
Smart Images

Figure CN120877197B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent interactive processing, specifically to a method and system for automatic vehicle damage assessment based on video segmentation in auto insurance claims. Background Technology
[0002] In the auto insurance claims process, accident investigation, damage identification, and loss assessment have long relied on manual experience and offline measurement comparisons. Current mainstream practices often involve taking photos or short videos as evidence, with the backend combining empirical rules or object detection and semantic / instance segmentation models based on single-frame images for auxiliary interpretation. However, single-frame perspective information is insufficient, making it difficult to reliably distinguish between different levels of damage, such as surface scratches, paint chips, and dents or cracks accompanying metal substrate deformation; strong reflections, highlights, and shadow variations often lead to misjudgments. Due to the lack of cross-frame spatiotemporal constraints, camera shake, occlusion, and perspective switching can cause mask drift and instance loss, resulting in significant fluctuations in quantitative indicators such as the length and area of the same component across different frames, leading to poor consistency in verification.
[0003] On the other hand, the mapping from pixels to actual size is generally lacking. Relying solely on empirical proportions or simple rulers is easily affected by framing distance and perspective, making it difficult to reliably obtain geometric indicators such as dent depth, crack span, and scratch width. Even with monocular depth estimation, most methods do not incorporate prior knowledge of the curvature and standard surface of vehicle components, leading to unstable depth and normal estimations in curved surfaces, polygonal lines, or edge transition areas. Regarding the evidence collection chain, user-end videos often undergo platform transcoding, secondary compression, or editing, resulting in inconsistent frame rates and GOP structures, and instances of duplicate frames, frame insertions, and frame deletions. Existing systems lack verification mechanisms such as chain hashing, time stamping, and digital signatures for claims scenarios, resulting in insufficient credibility and probative value of evidence. In terms of business integration, the mapping between damage identification results and parts BOMs, repair labor hours, and parts price databases is not standardized. Incorrect vehicle identification or inconsistent part codes can lead to omissions in procedures, pricing discrepancies, and regional coefficient omissions, resulting in significant differences in damage assessments between different surveyors or different batches, making it difficult to meet audit and compliance requirements. Overall, existing research has focused on photo-level defect detection or component segmentation, lacking an end-to-end closed loop of "video segmentation + spatiotemporal consistency tracking". It has not formed a technical path centered on reference object self-calibration, surface prior constraints and real scale quantification, nor has it linked grade assessment with price / work time knowledge base to form a structured and verifiable report.
[0004] Given the aforementioned pain points, the industry urgently needs an automated vehicle damage assessment technology system that uses video as the core input, takes into account both component-level and damage-level segmentation, can maintain instance consistency across frames, can perform real-scale quantification and automatically connect with BOM / labor / price databases, and also has the ability to verify evidence chains and anomaly labeling, in order to improve claims efficiency, consistency and traceability. Summary of the Invention
[0005] To address the aforementioned problems in existing technologies, this invention proposes an automatic vehicle damage assessment method and system based on video segmentation for auto insurance claims. The method uses accident video as input to construct a chained hash and digital signature, and detects secondary compression / frame pulling. A shared backbone + dual-branch network is used to segment components and damage, combining optical flow and re-identification to maintain cross-frame consistency and refine the mask. Under license plate / wheel hub / marking calibration, monocular depth and component curvature a priori estimation are used to estimate dent depth and normal perturbation. Quantitative indicators such as scratch length / width, paint chipping area, and crack span are calculated according to component topology and graded. The assessment results are mapped to a component BOM, labor time, and price database, automatically generating replacement / repair / painting plans and cost details, and outputting a structured report containing keyframe overlay and checksum, achieving stable video-level quantification, traceable evidence, and automatic damage assessment.
[0006] This application provides an automatic vehicle damage assessment method based on video segmentation for auto insurance claims, including the following steps:
[0007] S1: Acquire the video sequence of the accident vehicle, calculate the content hash of each frame and form a chain hash with the time information, attach a digital signature, and perform secondary compression and frame pulling detection; S2: Utilize a video segmentation network with a shared backbone and two branches to segment the video sequence into components and detect damage categories, obtaining component masks and damage masks; S3: Based on optical flow and re-identification spatiotemporal consistency tracking, maintain consistent identification for the same damage instance across frames and refine the mask; S4: Perform scale calibration based on license plate, wheel hub, or ground markings, and combine monocular depth estimation and component curvature a priori to estimate dent depth and surface normal perturbation; S5: Calculate the scratch length, width, paint peeling area, crack span, and dent depth quantification indicators, and assess the damage level under component topological constraints; S6: Map the assessment results to the component BOM, repair time database, and price database to generate cost calculation and recommendation schemes for replacement, repair, and painting.
[0008] Preferably, step S1 includes:
[0009] S11: Perform size normalization, noise reduction and color correction on each frame of the video sequence, extract brightness information, generate a perceptual content fingerprint for the frame based on low-frequency features, and calculate a secure hash fingerprint for the pixel byte stream of the frame after removing metadata.
[0010] S12: The perceptual content fingerprint, secure hash fingerprint, display timestamp of the frame, timestamp returned by a trusted time source, chain value of the previous frame, and acquisition device identifier are concatenated in a preset order to generate a chained summary value for the current frame, so that if the content or time information of any frame is modified, the chain value of all subsequent frames will be inconsistent.
[0011] S13: Use the private key in the terminal security module to generate a digital signature for the chain digest value, and store or upload the digital signature and timestamp together with the chain digest of the frame to form a traceable chain of evidence.
[0012] S14: Perform secondary compression detection: Analyze the encoder fingerprint, quantization parameter distribution, bit rate and image group structure of the encoded bit stream, check whether encoder inconsistency, periodic holes in quantization distribution, abnormal increase in block effect energy and bit rate and structure mismatch characteristics occur at the same time, and combine the error analysis residual map distribution. If the rules are met, it is marked as secondary compression.
[0013] S15: Perform frame pulling detection: compare the deviation between the timestamp interval of adjacent frames and the nominal frame period, and combine the pixel difference between adjacent frames with the continuous abnormally low value of optical flow intensity to identify duplicate frames, deleted frames, or interpolated frames; when abnormally low values are detected in continuous segments, mark the abnormality type, start and end positions, and duration.
[0014] S16: Write the chain digest, digital signature, and time stamp of each frame, as well as the results of secondary compression and frame pulling detection, into the evidence log that only increases and never decreases, and generate the chain digest again at the video segment level to facilitate subsequent rapid verification and judicial evidence collection.
[0015] Preferably, step S2 includes: constructing a video segmentation network with a shared backbone and two branches. The shared backbone is a spatiotemporal feature encoder that receives multiple adjacent video frames as input and outputs a unified spatiotemporal feature map using multi-scale feature extraction, feature pyramid fusion, and temporal attention mechanisms. The component branch is equipped with a semantic decoding head and an instance decoding head. It first outputs pixel-level semantic maps of the vehicle body components based on the unified spatiotemporal feature map, then generates corresponding component instance masks based on contour parameters, and improves the integrity of edges and components through morphological connectivity correction. The damage branch performs fine-grained damage category segmentation under the spatial constraints and attention guidance of the component masks, and sets edge enhancement and high reflectivity. The texture discrimination submodule distinguishes scratches, dents, paint chips, and cracks, and outputs corresponding pixel masks and confidence maps. The segmentation process is as follows: after the video frames within the sliding window are encoded with a shared backbone, a stable component mask is first obtained from the component branch, and small hole filling and adhesion separation are performed. Then, the component mask is used as a mask and guiding feature to be sent to the damage branch to complete the damage segmentation. Subsequently, the results of the two branches are subjected to cross-scale fusion and boundary guidance post-processing to obtain the final component mask and damage mask. In the inference stage, a keyframe priority and mask propagation strategy is adopted for long videos to reduce jitter and improve inter-frame consistency. The network supports lightweight deployment on the edge and verification on the cloud.
[0016] Preferably, step S3 includes:
[0017] S31: Calculate dense optical flow for two adjacent frames. Dense optical flow is a pixel-wise displacement vector field covering the effective pixel grid of the entire image. Dense optical flow is obtained by a hierarchical registration solver under fixed preset parameters. Forward and backward consistency checks and reprojection difference checks are used to determine the quality of optical flow. Regions exceeding a preset threshold are marked as uncertain regions. S32: Based on the dense optical flow, the damage mask of the previous frame is mapped to the current frame to generate a prediction mask. A candidate search band is formed by expanding the uncertain region by a fixed pixel width. S33: Extract appearance features from the candidate regions based on shared backbone features. According to the rule that the similarity is not lower than the first preset threshold and the overlap with the prediction mask is not lower than the second preset threshold, the current frame candidate is associated with the historical trajectory one-to-one and inherits the same identifier. Unassociated candidate trajectories are newly created. Trajectories that have not been matched for more than a preset number of consecutive frames are terminated. S34: Perform boundary alignment and hole filling on the current frame mask of the associated instances. Smooth the mask by majority voting within a fixed-length time window to obtain a temporally consistent refined mask.
[0018] Preferably, step S4 includes:
[0019] S41: Perform monocular depth estimation on keyframes containing the damage mask, wherein the monocular depth estimation refers to network inference that outputs pixel-wise relative distance values for a single frame of color image; and use the obtained pixel-to-size conversion coefficients to scale the relative distance values to obtain a scaled depth map.
[0020] S42: Determine the target component region based on the obtained component mask, and retrieve the curvature a priori of the component in an undamaged state from the component surface library. The curvature a priori is the standard surface model of the component.
[0021] S43: Geometrically register the prior surface with the target component region, and use the annular undamaged band outside the damage mask as a reference to locally adjust the prior surface so that it is consistent with the overall pose and scale of the current frame, thus obtaining the baseline surface.
[0022] S44: Within the damaged mask area, the depth map at the real scale is compared pixel by pixel with the baseline surface to obtain the deformation relative to the undamaged state. The deformation that deviates inward is defined as the depression depth, and the maximum value, average value and area are output.
[0023] S45: Calculate the surface normal direction of the current frame based on the local changes of the depth map, and compare the difference with the normal direction of the baseline surface to obtain the surface normal perturbation distribution and its statistics; smooth and threshold noise reduction are performed on the indentation depth and normal perturbation results within a fixed time window, and the frame-level indentation depth and surface normal perturbation index is output.
[0024] Preferably, step S5 includes:
[0025] S51: Within the target vehicle body part mask, calculate quantitative indicators for the damage mask, including: for scratches, the total length of the connected center path is taken as the length, and the average and maximum widths are read from the equally spaced vertical cross sections; for paint chips, the area is converted from the number of mask pixels by scale and holes are deducted; for cracks, the span is taken as the longest connected path after refinement; for depressions, the maximum depth within the mask is taken from the depth map, and the effective area not lower than the starting threshold is calculated.
[0026] S52: Summarize multiple similar damages within the same component according to component topology, sum the length and area, take the maximum depth, and mark them as cross-joint events when they cross joints or stiffeners.
[0027] S53: Component determination is performed based on preset mild, moderate, and severe thresholds: any indicator reaching a medium or high threshold, or a seam crossing event, or involving a sensor component is judged as severe; all indicators below the low threshold, without seam crossing, and not within the edge warning zone are judged as mild; the rest are judged as moderate; wherein, the edge warning zone is a strip-shaped area formed by a preset pixel distance extending inward or outward from the boundary of the corresponding component, and the pixel distance is a fixed preset value.
[0028] S54: Summarize the whole vehicle level results by component level and record the triggering basis used for level determination.
[0029] Preferably, step S6 includes:
[0030] S61: Based on the vehicle model recognition results, map the component segmentation labels to standard part codes, and map the damage categories and levels to process codes, including replacement, sheet metal repair, grinding, and painting; automatically add additional disassembly, calibration, and correction processes for cross-seam or sensor-related components; S62: Obtain the price of the corresponding part from the price database, obtain the working hours for each process from the working hour database, and obtain the material quota and unit price from the material database according to the painting area and paint type;
[0031] S63: If it is a heavy-duty, cross-seam, or sensor-related component, a replacement solution is recommended; if it is a surface layer without geometric deformation, spraying or polishing is recommended; for the rest, the solution with the lowest total cost is recommended, and alternative solutions in descending order of total cost are provided simultaneously; S64: The solution outputs part codes, process codes, price and time data sources and versions, regional coefficients and triggering basis to form a traceable cost detail.
[0032] This invention also provides an automatic vehicle damage assessment system based on video segmentation for auto insurance claims, comprising:
[0033] The system comprises the following modules: a video sequence acquisition module for the accident vehicle, a content hashing module for each frame, a chain hashing module for each frame, a digital signature, secondary compression, and frame-by-frame detection; a segmentation module, using a shared backbone and dual-branch video segmentation network, performing component segmentation and damage category segmentation on the video sequence to obtain component masks and damage masks; a mask refinement module, based on optical flow and spatiotemporal consistency tracking of re-identification, maintaining consistent identification for the same damage instance across frames and refining the mask; a scale calibration module, based on license plates, wheel hubs, or ground markings, performing scale calibration and combining monocular depth estimation and component curvature a priori estimation to estimate dent depth and surface normal perturbation; a damage rating module, calculating quantitative indicators such as scratch length, width, paint chipping area, crack span, and dent depth, and performing damage rating under component topological constraints; and an output module, mapping the rating results to the component BOM, repair time database, and price database to generate cost calculation and recommendation schemes for replacement, repair, and painting.
[0034] Preferably, the module for acquiring the video sequence of the accident vehicle includes:
[0035] For each frame of the video sequence, size normalization, noise reduction and color correction are performed, brightness information is extracted, and a perceptual content fingerprint of the frame is generated based on low-frequency features; and after removing metadata, a secure hash fingerprint of the pixel byte stream of the frame is calculated.
[0036] The perceptual content fingerprint, secure hash fingerprint, display timestamp, timestamp returned by a trusted time source, chain value of the previous frame, and acquisition device identifier of the frame are concatenated in a preset order to generate a chained digest value of the current frame, so that if the content or time information of any frame is modified, the chain value of all subsequent frames will be inconsistent.
[0037] The private key in the terminal security module is invoked to generate a digital signature for the chain digest value, and the digital signature and timestamp are stored or uploaded together with the chain digest of the frame to form a traceable chain of evidence.
[0038] Secondary compression detection is performed: the encoder fingerprint, quantization parameter distribution, bit rate and image group structure of the encoded bit stream are analyzed, and the characteristics of encoder inconsistency, periodic holes in quantization distribution, abnormal increase in block effect energy and bit rate and structure mismatch are comprehensively checked. The abnormal distribution of residual map is analyzed in conjunction with the error level. If the rules are met, it is marked as secondary compression.
[0039] Frame pulling detection is performed: the deviation between the timestamp interval of adjacent frames and the nominal frame period is compared, and the pixel difference between adjacent frames and the continuous abnormally low value of optical flow intensity are combined to identify duplicate frames, deleted frames, or interpolated frames; when the above pattern is detected in a continuous segment, the abnormality type, start and end positions and duration are marked; the optical flow intensity is the magnitude of the optical flow vector at the pixel position.
[0040] The chain digest, digital signature, and time stamp of each frame, as well as the results of secondary compression and frame pulling detection, are written into an evidence log that only increases and never decreases. A chain digest is then generated again at the video segment level to facilitate rapid verification and judicial evidence collection.
[0041] Preferably, the segmentation module includes: constructing a video segmentation network with a shared backbone and two branches. The shared backbone is a spatiotemporal feature encoder that receives multiple adjacent video frames as input and outputs a unified spatiotemporal feature map using multi-scale feature extraction, feature pyramid fusion, and temporal attention mechanisms. The component branch is equipped with a semantic decoding head and an instance decoding head. It first outputs pixel-level semantic maps of the vehicle body components based on the unified spatiotemporal feature map, then generates corresponding component instance masks based on contour parameterization, and improves the integrity of edges and small components through boundary refinement and morphological connectivity correction. The damage branch performs fine-grained damage category segmentation under the spatial constraints and attention guidance of the component mask, and sets edge enhancement, ... The reflection specular sensitivity and texture discrimination submodule distinguishes scratches, dents, paint chips, and cracks, and outputs corresponding pixel masks and confidence maps. The segmentation process is as follows: after the video frames within the sliding window are encoded with a shared backbone, a stable component mask is first obtained from the component branch, and small hole filling and adhesion separation are performed. Then, the component mask is used as a mask and guiding feature to be sent to the damage branch to complete the damage segmentation. Subsequently, the results of the two branches are subjected to cross-scale fusion and boundary guidance post-processing to obtain the final component mask and damage mask. In the inference stage, a keyframe priority and mask propagation strategy is adopted for long videos to reduce jitter and improve inter-frame consistency. The network supports lightweight deployment on the edge and verification on the cloud.
[0042] This invention provides a method and system for automatic vehicle damage assessment based on video segmentation in auto insurance claims, and the beneficial technical effects it can achieve are as follows:
[0043] 1. This application utilizes a shared backbone + dual-branch network to achieve two-level segmentation of "component-damage". First, a stable component mask is obtained, followed by fine-grained damage segmentation within the component. Cross-frame trajectories are established by combining optical flow propagation and re-identification. Boundary alignment, hole filling, and temporal smoothing are employed to suppress jitter, ensuring that the same scratch / dent maintains consistent identification and shape across multiple frames. Pixel-to-actual-size calibration is achieved using license plates, wheel hubs, or ground markings. By fusing monocular depth and component curvature a priori measurements, true-scale indicators such as dent depth, scratch length / width, paint chipping area, and crack span are obtained, significantly reducing measurement errors caused by perspective, jitter, and lighting variations. In scenarios with occlusion, rapid motion, and compression artifacts, uncertainty masks and keyframe re-initialization are used to ensure tracking continuity and guarantee quantization stability in long videos. 2. This invention addresses the problem of easily transcoded and edited evidence in claims processing. At the acquisition end, this invention calculates the content fingerprint of each frame and concatenates it with time information to form a chain digest, attaching a digital signature using the terminal's private key to construct a traceable chain of evidence. Simultaneously, it automatically detects secondary compression, duplicate / deleted frames, and accurately marks abnormal segments and their durations on the timeline. The system writes the chain digest, signature, time stamp, and detection results into an ever-increasing audit log, and regenerates the digest at the fragment level for rapid verification. The output report includes metadata such as keyframe overlay, quantitative details, algorithm and price library version numbers, and verification codes, facilitating internal and external review, compliance audits, and judicial evidence collection, significantly improving the credibility of evidence and reducing dispute resolution costs.
[0044] 3. This invention standardizes and maps component and damage results to the vehicle model BOM, labor hours, and price database, automatically generating a "replacement / repair / painting" work list and cost range. For cases involving gaps, sensor-related issues, and severe structural damage, it automatically adds disassembly, calibration, and correction procedures, and restricts non-compliant strategies according to rules. The system recommends optimal and alternative solutions based on grade, geometric quantities, and regional coefficients, clearly identifying cost drivers and their sources, achieving transparency and traceability. Lightweight edge-side inference combined with cloud-side verification and batch reporting enables real-time suggestions at the inspection site and one-click case creation in the backend. Standardized coding reduces human error, shortens the claims cycle, and lowers misjudgment and re-inspection rates, resulting in quantifiable cost reduction and efficiency improvement. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is a flowchart of the steps of an automatic vehicle damage assessment method based on video segmentation in auto insurance claims according to the present invention;
[0047] Figure 2 This is a schematic diagram of an automatic vehicle damage assessment system based on video segmentation in auto insurance claims, according to the present invention. Detailed Implementation
[0048] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0049] Example 1:
[0050] In view of the aforementioned problems mentioned in the prior art, and in order to solve the above technical problems, as shown in the appendix. Figure 1 As shown: This application provides an automatic vehicle damage assessment method based on video segmentation in auto insurance claims, including the following steps:
[0051] S1: Obtain the video sequence of the accident vehicle, calculate the content hash of each frame and form a chain hash with the time information, attach a digital signature, and perform secondary compression and frame pulling detection; in some embodiments, the size normalization target frame size is fixed at 1280×720 (width×height). If the original frame is not 16:9, it is first scaled according to the shortest side alignment ratio to make the short side equal to the target short side (720 height or 1280 width), and bilinear interpolation is used; then the center of the long side is cropped to the target size (without black border padding). The color space is kept as sRGB / 8bit.
[0052] S11-2 Temporal Denoising: For the i-th frame, perform pixel-by-pixel median filtering (median of the three frames) on the three frames [i-1, i, i+1]. Boundary frames (the beginning and end of the video) are padded with the current frame. Spatial Denoising: Apply bilateral filtering to the temporal median result. The OpenCV bilateralFilter parameters are fixed as follows: diameter d=5, sigmaColor=25, sigmaSpace=25. If only a single frame is available (e.g., the first frame captured in real time), only spatial denoising is performed.
[0053] S11-3 Color Correction (White Balance + Gamma) White Balance: Gray-World method is used. The mean values of the R / G / B channels of the denoised frame are calculated, and linear gain correction is performed according to R'=R·(μ / μ_R), G'=G·(μ / μ_G), and B'=B·(μ / μ_B), respectively, where μ is the arithmetic mean of the three channels; the gain coefficient is truncated to [0.5, 1.5], and overflow is truncated to [0, 255]. Gamma Correction: Inverse gamma of γ=2.2 is applied uniformly to the three channels: first normalize to [0, 1], execute x_out=x_in^(1 / 2.2), then map back to [0, 255] and round to 8 bits. S11-4 Luminance Information Extraction Color Space Conversion: The corrected RGB frame is converted to Y'CbCr according to the BT.709 standard, and the Y' channel is taken as the luminance map (8 bits).
[0054] Brightness information includes:
[0055] 1 pixel-by-pixel Y' plane (size 1280×720, row-first storage);
[0056] 2. Luminance histogram: 256 buckets (0–255), using whole-frame statistics;
[0057] 3-frame-level statistics: the mean and variance (unbiased variance) of Y'.
[0058] The above three items are collectively referred to as "luminance information". S11-5 Low-frequency features and perceptual content fingerprint: The luminance map is reduced to 32×32 using Lanczos interpolation; a two-dimensional DCT is performed on the 32×32 luminance block (any standard implementation is acceptable, and the result can be represented by 64-bit floating point); the upper left 8×8 coefficient block (excluding DC terms) is taken as the "low-frequency coefficient set"; the median of the 63 low-frequency coefficients is calculated, and a 64-bit binary fingerprint is generated according to the rule of "≥median is recorded as 1, otherwise as 0" (DC terms are recorded as 0); the 64 bits are packed into 8 bytes (big-endian) according to the row scanning order, and recorded as pHash, which is the "perceptual content fingerprint". S11-6 Removal of metadata and secure hash fingerprint: The implementation of metadata removal is as follows: For the normalized, denoised, and corrected frame, the RGB888 original pixel buffer is read directly from memory (row priority, each row is continuous, and each pixel has a fixed RGB order), without writing to any container file before reading, that is, no EXIF / XMP / container header and other metadata are involved. The secure hash fingerprint is calculated based on the following consecutive byte sequence: 1. Two bytes, big-endian, width = 1280; 2. Two bytes, big-endian, height = 720; 3. RGB888 pixel bytes (length 1280×720×3, row-major). The hash algorithm used is SHA-256, and the output is 32 bytes, denoted as dHash (secure hash fingerprint).
[0059] The S12 chain digest construction (serialization, order, and encoding correspond one-to-one) uses a length prefix to concatenate fields in sequence. Each field is encoded as: 1 byte type code + 2 bytes big-endian length + payload. The field order is fixed as follows: 0x01 pHash (8 bytes); 0x02 dHash (32 bytes); 0x03 Frame display timestamp PTS (int64 big-endian, in microseconds); 0x04 Trusted time stamp TS (UTCISO-8601 string, e.g., 2025-09-17T12:00:00Z, UTF-8); 0x05 Previous frame chain value H_{i-1} (32 bytes of all zeros if it is the first frame); 0x06 Acquisition device identifier CID (16 bytes, e.g., device serial number fixedly mapped by UUIDv4). The concatenated byte sequence is used to calculate H_i (32 bytes) using SHA-256, which is used as the "current frame chain digest value".
[0060] S13 Terminal Security Module Signing and Upload (Key Type, Encapsulation, and Return Item): This section defines and implements the terminal security module, referring to the hardware-bound key storage and signing environment, such as ArmTrustZone. During initial device registration, an ECDSA-P256 private key (ES256) is generated within this environment; this private key cannot be exported. The exported public key certificate chain is used for server-side signature verification. Signing and Encapsulation: H_i (32 bytes) is signed using ECDSA-P256 / SHA-256, and the signature result is DER encoded and denoted as Sig_i. Each frame uploads the following fields: H_i (32 bytes), Sig_i (DER variable length), TS (ISO-8601), CID (16 bytes), and KeyID (public key identifier, 8 bytes). Transmission uses HTTPS / TLS 1.2+, and the server stores the signature verification status and certificate chain version number.
[0061] S14 secondary compression detection applies the following four characteristics to the keyframes of each GOP and the subsequent 14 frames. A frame is marked as "suspected of secondary compression" if any two characteristics are triggered simultaneously; if the proportion of suspected frames is ≥20%, the segment is marked as "secondary compressed": Encoder / GOP fingerprint consistency analysis H.264 / H.265 SPS / PPS / VPS: profile_idc / level_idc, reference frame number, whether it contains B frames, IDR period (GOP length). If the difference between the container frame rate and the bitstream timebase-estimated frame rate is >5%; or the variance of the GOP length within the same segment is >25; then a vote is triggered. Abnormal distribution of quantization parameters (QP) (macroblock / CTU level): Extract the QP value histogram (0–51) of all P / B frames within the segment. If the histogram shows periodic holes: an autocorrelation coefficient ≥0.3 with lag=2 or 3; and the number of empty buckets ≥5; then a vote is triggered.
[0062] A histogram is constructed using the periodicity of transform coefficient energy against the absolute values of the transform coefficients in the residual block. Autocorrelation is performed on the histogram; when lag=2 or 3, the autocorrelation coefficient ≥ 0.25 triggers a vote. Error Level Analysis (ELA) is used to analyze residual map anomalies. The frame is recompressed at JPEG quality Q=90, and the pixel-by-pixel absolute difference is calculated between the frame and the original frame to obtain the residual map. The energy percentage of the residual at the 8×8 grid boundaries is statistically analyzed; if **≥35%** (i.e., energy is significantly concentrated at the block boundaries), a vote is triggered. "Quantization parameter distribution" refers to the frequency distribution of QP values in the macroblock / CTU; "anomaly distribution" refers to the ELA residual exhibiting a grid-like concentration at typical compressed block boundaries rather than a natural texture distribution.
[0063] S15 frame pulling (repeated / inserted frame) detection (PTS, pixel difference, optical flow intensity triple constraints), the nominal frame period is the mode of the PTS difference between adjacent frames. (Unit: microseconds). Low-dimensional pixel difference downsamples the S11-4 luminance map to 320×180; calculates the mean absolute difference (MAD) between adjacent frames, still in 8-bit luminance levels. Optical flow intensity is calculated on the 320×180 luminance map using Farnebäck dense optical flow (OpenCV parameters: pyr_scale=0.5, levels=3, winsize=15, iterations=3, poly_n=5, poly_sigma=1.2), where "optical flow intensity" is defined as the median (in pixels) of the optical flow vector magnitude. Judgment rule (if one of them is satisfied, the corresponding event is marked) Duplicate frames / frozen segments: if A frame with MAD < 2.0 and optical flow intensity < 0.05 is considered a duplicate frame; five or more consecutive frames are considered a frozen segment. Frame deletion: If... This is recorded as a frame deletion event; if they occur consecutively, they are merged into a segment. Interpolation generation / resampling: If alternating short / long ΔPTS patterns occur (short < , length> A segment lasting ≥10 frames with an average optical flow intensity <0.2 is designated as an interpolated resampling segment. Output: Records the type, start and end frame numbers, start and end PTS, and duration of each event.
[0064] The S16 evidence log and segment-level digests are stored in append-only JSONLines (ND-JSON) files or WORM (Write-OnceRead-Many) format. Each frame contains one line with fields including: frame_no, PTS, H_i (hex), Sig_i (DERbase64), TS, CID, frame_event, and algo_version. Segment-level chained digests are generated in segments of 100 frames (segments shorter than 100 frames are also generated). The H_i values within each segment are concatenated sequentially and then SHA-256 is performed to obtain SegmentHash_k. A segment digest containing segment_index, start_frame, end_frame, and SegmentHash_k is appended to the end of the log. For immutable log file archiving, the entire file is SHA-256ed and re-signed by the terminal security module of the same device, forming an archiving record (including archiving time, file size, and total hash). S2: Using a video segmentation network with a shared backbone and two branches, the video sequence is segmented into components and damage categories to obtain component masks and damage masks. In some embodiments, a "shared backbone + two branches" video segmentation network is used, with the input being a sliding window of size 640×360 with adjacent T=8 frames and a stride of 2. Shared backbone (spatiotemporal feature encoder): A lightweight convolutional backbone (depthseparable convolution) extracts four levels of features: 1 / 4, 1 / 8, 1 / 16, and 1 / 32. Local temporal attention blocks (temporal window = 8, spatial window = 16×16) are inserted at the 1 / 8 and 1 / 16 levels for appearance alignment of the same target between adjacent frames. Feature fusion: The four levels of features are fused by BiFPN to output a unified spatiotemporal feature pyramid {P2, P3, P4, P5}. Component Branch—Semantic Decoding Head: Concatenates and upsamples {P2–P5}, outputting pixel-level semantic maps of K body components (e.g., bumpers, hoods, fenders, doors, lights, etc.), and refines boundaries using soft thresholding and conditional random fields. Component Branch—Instance Decoding Head: Generates instance center heatmaps and contour parameters based on the semantic results, and outputs component instance masks using a dynamic convolutional mask generator; subsequently, it performs hole filling (radius 3) and adhesion splitting (distance transform + watershed) to obtain stable component masks.
[0065] Damage Branch—Attention Guidance: The semantic map of the component is projected 1×1 and used as a spatial attention mask, multiplied with spatiotemporal features, activating the damage channel only within the component region. Damage Branch—Three Sub-modules: The edge enhancement module incorporates Sobel / Scharr edge guidance features and saliency maps of elongated structures to improve scratch and crack responses; the specular sensitivity module filters specular bands based on brightness and reflectance channels to enhance dent specular deformation cues; the texture discrimination module fuses LBP and local contrast channels to distinguish between paint chipping and shadows. This branch outputs pixel masks and confidence maps for six types of damage (scratches, dents, paint chipping, cracks, breakage, and edge deformation). The dual-branch result fusion uses the component mask as the upper limit, cropping the damage mask; across scales, a "high-resolution priority + low-resolution hole filling" approach is adopted, followed by boundary alignment using a guided filter r=2 and a stride=1. The segmentation process first passes each window through a shared backbone and BiFPN, then runs the component branch to obtain a stable component mask. This mask, along with guiding features, is then fed into the damage branch to complete fine-grained segmentation. Finally, two types of masks and their confidence scores are output. The long video inference strategy prioritizes keyframes, performing full inference every 8 frames. Interval frames utilize pyramid feature correlation for mask propagation and local refinement to reduce jitter and maintain inter-frame consistency. The deployment edge uses a lightweight backbone and INT8 quantization, achieving a single-window latency of <120ms. Cloud-based verification can increase T to 16 and enable higher resolution for greater accuracy.
[0066] In one embodiment, after feature extraction via a lightweight convolutional backbone, a hidden layer employs an improved activation function. Its expression is:
[0067]
[0068] in, For learnable slope parameters, This represents the number of effective adjacent frames that varies over time. The sigmoid function represents the nonlinear operation, and x represents the features extracted by the lightweight convolutional backbone. A time-varying term T is introduced as a "temperature term" to adaptively adjust the gating slope: a smaller T is used for scenes with intense motion, inter-frame inconsistencies, or shaky framing, enhancing nonlinearity and noise reduction capabilities, and highlighting weak targets such as fine scratches / cracks; a larger T is used for scenes with stable scenes, longer time windows, or obvious compression artifacts, reducing over-response and avoiding false boundaries and overfitting. This mechanism automatically balances short-term details and long-term steady-state within the same network, resulting in better cross-frame mask consistency, cleaner boundaries, and reduced fluctuations in quantification metrics such as indentation depth / area. Simultaneously, T is a data-dependent variable, providing interpretability and improving robustness and convergence stability against frame rate changes and compression artifacts. A scalar T is generated for each target component and each sliding window. Spatiotemporal stability features are extracted within the temporal window of that component: average optical flow magnitude, IoU stability between the segmentation mask and the previous frame, average absolute value of the brightness frame difference, sharpness (Laplacian variance), and compression block score, all of which are normalized to 0–1. The above features are concatenated and passed through a two-layer lightweight MLP (containing ReLU), with Softplus+ε added to the end to ensure a positive value, resulting in T_raw. T_raw is mapped and truncated to the interval [T_min, T_max] (e.g., 0.6–2.5), and then an exponential moving average is performed (coefficient 0.7) to avoid jitter, updated every K=4 frames. In the forward pass, T is used as a constant in activation (gradients can be stopped), while 'a' adopts a learnable channel scale. If optical flow cannot be calculated, the three terms "frame difference, sharpness, and IoU stability" are used instead, with the process unchanged. S3: Spatiotemporal consistency tracking based on optical flow and re-identification maintains consistent labeling for the same damage instance across frames and refines it using a mask. In some embodiments, S31 dense optical flow calculation and uncertain region labeling input two adjacent video frames. The brightness maps of the two frames are first uniformly scaled to 640 pixels wide and 360 pixels high, using bilinear interpolation. The brightness map is obtained by converting the corrected RGB using BT.709. The dense optical flow algorithm uses DualTV-L1 (implemented according to the OpenCV standard), with fixed parameters: tau 0.25, lambda 0.15, theta 0.3, 5 pyramid layers, 5 twists per layer, 30 inner and 10 outer iterations respectively, scale step size 0.5, epsilon 0.01, and gamma 0. After outputting the displacement field, a 3×3 median filter is applied to both the horizontal and vertical channels. Forward and backward consistency checks calculate the forward and backward optical flow separately, mapping the same pixel forward to the next frame and then back in reverse. If the round-trip position deviation exceeds 1.5 pixels, the pixel is marked as inconsistent. Reprojection difference checks sample the brightness map of the next frame at the forward-mapped position and calculate the absolute difference with the original brightness of the current frame. When the difference is greater than 20 gray levels and the gradient magnitude at that point is less than 5 (low-texture region), it is marked as unreliable in terms of luminance.Pixels that satisfy any one of the checks within an uncertain region are considered uncertain regions, resulting in a binary image. This binary image is then dilated 5×5 to form a continuous uncertain band. The coordinates of the optical flow and the uncertain band are then mapped back to the original resolution proportionally.
[0069] S32 Mask Forward Mapping and Candidate Search Band: Mask mapping maps the mask boundary points to the current frame position for each confirmed damage instance mask from the previous frame using forward optical flow, and generates a predicted mask using bilinear interpolation. A 3×3 closing operation is performed on the predicted mask to repair cracks, and tiny connected components with an area less than 30 pixels are removed. Candidate Search Band: The outer contour of the predicted mask is joined with the uncertain region, and two 3×3 dilation operations are performed on this, resulting in a candidate search band approximately 6 to 8 pixels wide. Subsequent searches only look for current frame candidates related to the instance within this search band, reducing mismatches and omissions.
[0070] S33 Appearance Feature Extraction and One-to-One Association: Candidate Generation extracts connected components of each damage category from the damage segmentation results of the current frame, filtering out noise blocks with an area less than 50 pixels; only candidate regions that spatially overlap with the predicted mask and whose centroids fall within the candidate search band are retained. Appearance features are sampled in a 7×7 region alignment on the shared backbone mid-to-high-level fusion feature map, followed by two layers of 3×3 convolution and one global average pooling to obtain a 128-dimensional appearance vector, which is then L2 normalized. Each instance in tracking maintains a 128-dimensional appearance prototype, updated using an exponential moving average with a coefficient of 0.7. Association Thresholds: Appearance similarity between candidates and the trajectory is determined using cosine similarity, with a threshold of no less than 0.6; geometric thresholds are determined using an intersection-union ratio (IU) of no less than 0.3, and the distance between the candidate centroid and the predicted mask centroid does not exceed 50 pixels. Matching Method: For candidates meeting the thresholds and the tracking trajectory, a one-to-one global match is performed using the Hungarian algorithm based on a comprehensive score (appearance first, then IU); successfully matched instances inherit the same instance identifier. For trajectory management, newly created temporary trajectories that are not matched need to be successfully matched three times consecutively before becoming confirmed trajectories; confirmed trajectories are terminated if they are not matched for ten consecutive frames; temporary trajectories are abandoned if they are not matched for three consecutive frames. Occlusion and high uncertainty handling: When more than half of the predicted mask falls within the uncertainty zone, the original identifier is allowed to be retained for up to five frames, even if there is no match at present; at the same time, the centroid and bounding box are linearly extrapolated based on the motion trend of the previous frame for continued retrieval in the next frame.
[0071] S34 mask refinement and temporal smoothing include: boundary alignment: within two pixels on each side of the mask boundary normal direction, the pixel position with the largest brightness gradient is searched, and the boundary point is moved to that position; after alignment, a 3×3 opening operation is performed once and a 3×3 closing operation is performed once to remove burrs and close small gaps. Hole and adhesion handling: holes with an area of less than 50 pixels are filled; when narrow bridges or figure-eight adhesions occur, a distance transformation is performed first, and then a watershed strategy is used at the narrowest point to divide it into two instances to maintain a reasonable topology. Temporal smoothing: a mask sliding window with a length of 5 frames is maintained for each instance, and a majority vote is performed pixel by pixel to obtain the smoothed mask for the current frame; the centroid and area of the instance are smoothed using an exponential smoothing with a weight of 0.5 to suppress jitter. Frame-level confidence is based on the average confidence of pixels within the mask, and the minimum value is referenced with a weight of 3:7; if it is too low, a quality alarm is triggered. Degradation and Reinitialization: If the area of the refined mask is less than 30 pixels for three consecutive frames, the trajectory is downgraded to a pending confirmation state; when the viewpoint change causes the cross-union ratio of two consecutive frames to be less than 0.1, keyframe reinitialization is triggered, propagation is ignored, and the segmentation result of the current frame is directly used as the new starting point.
[0072] S4: Scale calibration is performed based on license plates, wheel hubs, or ground markings, and the indentation depth and surface normal perturbation are estimated by combining monocular depth estimation and component curvature a priori estimation. In some embodiments, S41 involves monocular depth estimation and scale normalization. The monocular depth network uses an encoder-decoder based monocular depth model (e.g., DPT-type architecture, fixed number of channels, input size 512×288). Keyframes are scaled to 512×288 using bilinear interpolation and input to the network to obtain a relative depth map (16-bit grayscale, value range depends on the network output). Relative depth preprocessing: The relative depth is cropped at 1% and 99% quantiles to remove extreme values, then linearly stretched to a fixed value range, and subsequently restored to 1280×720 using bilinear interpolation. To preserve boundaries, guided bilateral filtering (guided by the original color image, window diameter 7, chromaticity standard deviation 25, spatial standard deviation 25) is used to smooth the edges of the depth map, resulting in a more stable relative depth. Conversion factor acquisition: License plate is used first: Detect the four corners of the license plate and confirm that the aspect ratio is within the national standard tolerance (width 440mm, corresponding height set according to vehicle type and license plate system). Establish a mapping from the license plate plane to the pixel plane through four-point perspective to obtain the local millimeter / pixel conversion factor on this plane. If the license plate is unavailable, the wheel hub is used: Detect the outer circle and fit the diameter; the actual diameter value is taken from the vehicle model library (obtained from VIN or vehicle model recognition); if no vehicle model library is available, a default of 640mm is used and marked "default value" in the log. Then, it is degenerated into ground markings: Detect horizontal solid or dashed line segments, using a standard line width of 150mm. If multiple reference objects are detected simultaneously, select the one closest to the target component mask boundary as the primary reference to avoid scale extrapolation errors. Scale normalization: Within the area covered by the primary reference object, calculate the actual length corresponding to the unit length of the relative depth, and map the relative depth to a depth map with true scale (unit: millimeters) according to a linear ratio. When the target component and the reference object are not coplanar, the coefficient is used directly only in the neighborhood where the depth difference is less than 0.5 meters; pixels beyond this range are extrapolated according to the average coefficient of the adjacent calibrated areas and marked "extrapolated" in the report.
[0073] S42 Target Part Region Determination and Curve Prior A priori loading: Target part region: In the part mask of S2, the largest connected region that intersects with the damaged mask is taken as the target part region; a 3×3 closing operation is performed on this region once to remove slits and delete small holes with an area of less than 100 pixels. Curve Prior A priori loading: The standard surface model of the part (triangular mesh or subdivided surface, in millimeters, in a standard orientation) is loaded from the part surface library. The model is differentiated according to the vehicle model version; if the vehicle model is unknown, a general template of the same level (e.g., "mid-size sedan hood template") is used.
[0074] S43 Prior Geometry Registration and Local Adjustment, Coarse Alignment (Poses and Scale): Align the bounding rectangle of the target part region with the bounding box of the standard surface model, initializing translation, rotation, and scaling; then iterate with contour alignment as the goal: each time the prior model's projected contour is rendered, the average shortest distance metric is calculated between it and the part mask boundary, gradually adjusting the pose until this metric no longer significantly decreases or reaches a maximum of 50 iterations. Annular Undamaged Zone: Expand the damaged mask outward by 15 pixels and intersect with the part region to obtain an "annular undamaged zone"; this zone serves as a fixed reference area for subsequent local adjustments. Local Adjustment (Deformation Allowed Only in Damaged Areas): Establish a 16×16 control mesh on the part region; control points are locked outside the annular zone and damaged area, allowing displacement along the normal direction within the damaged mask. Displacement is limited to no more than 10 mm, and the difference between adjacent control points is no more than 3 mm to ensure smoothness. The optimization sequence is as follows: first, perform three rounds of coarse adjustment (large step size) on the mesh, then perform up to 30 rounds of fine adjustment (small step size), until the projection error between two iterations decreases to less than 0.1 pixels or the iteration limit is reached. After completion, a baseline shape that is consistent with the pose of the current frame and fits the undamaged areas is obtained.
[0075] Pixel-level comparison and statistics of S44 indentation depth. Pixel-level comparison range: limited to pixel-by-pixel within the damage mask. Comparison method: compare the true scale depth value of each pixel with the corresponding depth value of the baseline surface; if the pixel deviates inward from the baseline by more than 1 mm, it is counted as an "effective indentation"; deviations less than or equal to 1 mm are considered noise suppression. Result statistics: output the maximum indentation depth, average indentation depth, effective indentation area (effective indentation pixels converted to millimeters / pixel), and the bounding box of the indentation area. Simultaneously record the "extrapolated scale pixel percentage," and when the percentage exceeds 30%, a "scale extrapolation prompt" is given in the report.
[0076] S45 Surface Normal Calculation, Perturbation Comparison, and Temporal Smoothing: Current Frame Normal Direction: In the 5×5 neighborhood of each pixel, local plane fitting (least squares or RANSAC, fixed upper limit of 20 iterations, fixed residual threshold) is performed on the true-scale depth value, and the vertical direction of this plane is used as the surface normal direction; in areas where there are insufficient effective pixels for texture or depth, it degenerates to 3×3 neighborhood fitting. Baseline Normal Direction: The normal direction of the corresponding pixel is directly read from the baseline surface (defined by the tangent of the model surface at that pixel position), without the need for refitting. Difference Comparison: For each pixel, the angle (in degrees) between the current frame normal and the baseline normal is calculated. When the angle is greater than 2 degrees, it is included in the "effective normal perturbation"; the maximum perturbation angle, average perturbation angle, perturbation area, and perturbation heatmap are output. Temporal smoothing and noise suppression: Two frames are taken from each side of the keyframe (a total of 5 frame windows), and median filtering is applied to the indentation depth and normal perturbation respectively. A dual-threshold strategy is also employed: sporadic pixels smaller than 1 mm or 1 degree are directly suppressed, while consecutive pixels above the threshold are retained. For locations with significant jumps across frames (difference between adjacent frames > 50%), majority voting from neighboring frames is prioritized to stabilize the output. Quality labeling: When more than 40% of the pixels in the damaged area come from the "scale extrapolation region," or the area of the annular undamaged zone is less than **10%** of the component area, a "reduced credibility" mark is added to the normal perturbation and indentation depth results for that frame, and the reason is clearly stated in the report. Outputs: Frame-level dent depth map (mm, 8 / 16-bit raster), normal perturbation map (degrees, 8 / 16-bit raster); Statistics: Maximum / average dent depth, effective dent area, maximum / average normal perturbation, perturbation area; Process records: reference object type and parameters (license plate / wheel hub / ground markings), source of conversion coefficients used, baseline surface model version, number of local adjustment iterations and whether the limit is triggered, extrapolation ratio and confidence level. S5: Calculate the scratch length, width, paint chipping area, crack span, and dent depth quantification indicators, and evaluate the damage level under the component topology constraints; In some embodiments, inputs and preparation inputs: target vehicle body component mask, masks for each damage category (scratches / paint chipping / cracks / dents), pixel-to-millimeter conversion of the frame (mm / px), and (if it is a dent) the true-scale depth map of the frame. Preprocessing: Perform a 3×3 opening operation to remove burrs for each type of damage mask; remove noise with a connected component area less than 20px. All lengths, widths, and areas are calculated after conversion to millimeters.
[0077] S51: The calculation method for quantitative indicators is as follows:
[0078] Scratch (Length, Average Width, Maximum Width) a. Center Path (Skeleton): Refine the scratch mask (Zhang–Suen iterative shrinkage until stable) to obtain the skeleton. Delete short spikes with branch length <5px, retaining the longest connected skeleton. b. Length: The skeleton moves along the pixel grid with a step size of 2px, accumulating the segment length; after conversion to millimeters, it is used as the "scratch length". c. Width Sampling: Sampling the normal direction on the skeleton at intervals of 2px, the sum of the distances to the left and right intersection points with the mask boundary is used as the width at that point; the average width and maximum width of the entire strip are taken. For robustness, the median width of three consecutive points is taken before calculation.
[0079] Paint chipping (area) a. Hole deduction: Fill the outer flood of the paint chipping mask to determine the background, then reverse the process to obtain the internal holes; deduct the hole pixels from the total number of pixels. b. Area: Effective number of pixels × (mm / px) 2 The area of paint chipping (mm) was obtained. 2 ).
[0080] Crack (span) a. Refinement and purification: Refine the crack mask, deleting ends smaller than 5px; when bifurcations exist, construct an unweighted graph with each endpoint as a graph node and pixel connectivity as an edge. b. Longest connected path: Use the farthest distance between endpoint pairs (by path steps) as the crack span, converted to millimeters. If there are multiple crack segments, calculate the span for each segment and take the maximum value as the span of this type of crack for that component, and record the total number of cracks.
[0081] Depression (maximum depth, effective area): a. Maximum depth: Read the depth map value within the depression mask and take the maximum value as the "maximum depression depth". b. Effective area: Set the starting threshold to 1.0mm; only pixels with a depth ≥ 1.0mm are counted as effective depression pixels, their number × (mm / px). 2 c. Abnormal suppression: Area < 50 mm 2 Small isolated pits with a maximum depth of less than 1.2 mm are ignored.
[0082] S52: Summary and cross-seam marking within the same component. For multiple similar damages within a component, the summary rules are: length and area are summed; the maximum depth is taken; the width retains a weighted average (weighted by the length of each segment). If the same damage's connected domain spans multiple categories (rare): the category with the highest confidence level is included. Component topology and cross-seam events: Load the corresponding seam / reinforcement / weld point lines (polylines / curves) for this vehicle model from the component topology library and generate a strip-shaped region with a 5mm buffer. If any damage mask intersects with this strip-shaped region, it is marked as a cross-seam event; if the intersecting object type is a reinforcement or weld point, it is marked as a structural cross-seam (stronger than ordinary seams). Edge warning zone: A strip-shaped region is formed 10mm inwards and outwards from the outer contour of the component; damage falling into this zone is recorded as "hit edge warning zone".
[0083] S53: Component-level Judgment (Light / Medium / Severe) For ease of standardized adaptation, general thresholds are provided (can be refined by vehicle model or material, defaults are as follows): Scratches: Length < 80mm and average width < 2.0mm → leaning towards light; Length 80–250mm or average width 2.0–4.0mm → moderate; Any exceeding the upper limit → severe. Paint chipping area: < 400mm² 2 Mild; 400–2000 mm 2 Moderate; >2000mm 2 Severe. Crack span: <30mm (mild); 30–80mm (moderate); >80mm (severe). Maximum depression depth: <1.5mm (mild); 1.5–5.0mm (moderate); >5.0mm (severe). Effective depression area: <1500mm² 2 Mild; 1500–6000 mm 2 Moderate; >6000mm 2 Severe.
[0084] Upgrade Rules (any one triggers upgrade to severe): a) Structural gap crossing occurs; b) Involves safety-related components or their mounting surfaces (including front and rear bumper crossbeams, longitudinal beam ends, shock absorber towers / reinforcement beams, door anti-collision beams, light mounting brackets, radar / camera / ultrasonic sensor windows and brackets); c) Two or more indicators within the same component reach moderate or higher levels. Light / Medium / Severe Judgment Logic: Severe: Triggering any upgrade rule, or any indicator reaching the severe threshold. Light: All indicators are within the light threshold, no gap crossing event, and no edge warning zone is hit. Moderate: Other situations (between the above two). The output simultaneously records: the triggered threshold, whether a gap crossing occurred, whether the edge warning zone was hit, and whether the safety-related component area was covered.
[0085] S54: Vehicle Level Summary and Recording. The vehicle level starts with the highest level of each component. If **≥2 structural components are classified as moderate, or ≥1 structural component as severe,** the vehicle level is increased by one level (not exceeding severe). If all components are classified as mild and do not involve structural components, the vehicle level is classified as mild. The output record for each component includes: values of each indicator, gap and edge markings, a list of hit safety-related components, and the final level. For the entire vehicle, it includes: the final level and the specific reason for the upgrade (e.g., "Structural component × 2 moderate" or "Structural gap"). The safety-related component area is derived from the 2D projection area of the vehicle model library. If the vehicle model is unknown, a general template is used and marked "Template Level" in the report. The skeleton and longest path steps are performed on a binary mask to ensure independence from network confidence. The normal direction of width sampling is determined by the perpendicular line of the local tangent of the skeleton. Area and length statistics are performed after conversion to millimeters; one decimal place is retained. All thresholds are fixed presets and can be managed by region or insurance line version number. The "threshold set version" is written in the report. S6: Map the evaluation results to the parts BOM, repair labor hour database and price database to generate cost calculation and recommendation schemes for replacement, repair and painting. In some embodiments, the data and code table vehicle model and part mapping table is as follows: Vehicle model identifier: obtained by decoding VIN to model_id (e.g., "SDN-2022-1.5T-AT"). Part label → Standard part code: front_bumper_cover → PC-11-01-001 (front bumper cover), hood → PC-12-01-001 (engine hood), left_fender → PC-13-01-002 (left fender) front_radar_bracket → EL-41-02-003 (front radar bracket). Each entry contains: part_code, oem_flag (original / aftermarket), safety_class (structural part / cover part / electrical part / sensor associated part).
[0086] The process code table is as follows: RPL replacement, RPR sheet metal repair, SND grinding, PNT painting, BLN adjacent part transition, REM disassembly, INS installation, CAL-RADAR radar calibration, CAL-CAM camera calibration, AIM lighting calibration, and SCAN electronic system scanning. Each code includes: standard labor hours (std_labor_hours) (stored in segments by part / area / level) and trade category (Mechatronics / Sheet Metal / Painting / Electrical Assembly / Calibration).
[0087] The price / labor / materials database fields are as follows: Price database: part_code, brand_type (OEM / OEM preferred / OEM economical) and corresponding part_price, currency, region_coeff, data_version. Labor database: key is (model_id, part_code, op_code, optional severity_level or area_bucket), value is std_labor_hours. Material database: provides material_allowance and paint_system descriptions according to the painting system and area bucket (e.g., solid / metallic / pearl×panel_half / panel_full×area segment); includes hazard_fee_flag (whether environmental / consumable surcharges are included).
[0088] S61: Mapping and Additional Process Determination (Explicit Rules) Part Mapping: The system reads the target part mask label (from S2) and looks up the part_code and safety_class in the mapping table by model_id. If not found, it reverts to the same level of general part code and marks "mapping downgrade" in the log. Damage → Process Mapping: Scratches / paint peeling (minor and no geometric deformation): SND+PNT. Dents (minor / moderate): RPR+PNT; (heavy or structural parts) → RPL. Cracks (covering plastic and cracks >30mm): RPL; ≤30mm and non-safety parts → RPR+PNT. Automatic addition of additional processes: Cross-seam events (S52 marking): REM+INS for the same component, and add BLN to adjacent affected components (see S63 rule); Involving sensor components (sensor window or bracket, wiring harness location): Add REM, INS, SCAN; If disassembly or replacement of radar / camera, add CAL-RADAR / CAL-CAM; Replacement or disassembly of lamps / headlights: Add AIM; Full part painting or metallic / pearl finish: Add BLN to adjacent visible surfaces in the same field of view (see S63 for details).
[0089] S62: Data Acquisition and Regional Coefficient (Determining Source and Priority), Part Price Acquisition: First, retrieve the OEM price from the price database by part_code; if the user prefers "Economical Solution" or OEM is missing, select brand_type as "Second-hand Factory Preferred," and if missing again, select "Second-hand Factory Economical." The selection result, along with currency, region_coeff, and data_version, is cached in the current estimation context. Labor Hour Acquisition: Retrieve using (model_id, part_code, op_code) as the key; if labor hours are segmented by level or area, they fall into the corresponding bucket based on the quantification results of S51 (e.g., the effective area bucket for depressions "≤1500 / 1500–6000 / ≥6000"). If missing, backfill using the common average of the same platform and mark "Labor Hour Backfill." Material Quota Acquisition: Read paint_system (solid color / metallic / pearl) and spraying range (partial / half part / full part), and retrieve material_allowance and hazard_fee_flag by area bucket. Region coefficient: The region_coeff returned by the price library is applied to both part prices and labor hours; if missing, it defaults to 1.00 and is recorded as "Region coefficient default".
[0090] S63: Solution Generation and Recommendation (Compliance Constraints + Decision Order), generating three candidate solutions (if applicable):
[0091] Option A (Replacement Direction): Use RPL on target parts that are "heavy", "structural gaps", or "involving sensor components", and automatically add the necessary REM / INS / SCAN / CAL-*, spraying and BLN.
[0092] Option B (Repair-oriented): For cover parts that are "light / moderate and non-structural with no cracks >30mm", use RPR+PNT; if there are only surface paint chips / scratches and no geometric deformation, use SND+PNT or polishing (polishing is a note item, and if it is available in the time library, it will be used).
[0093] Option C (Economy Part Replacement): Based on Option A, switch the replaceable parts from OEM to "Aftermarket Preferred / Economy". Compliance / Prohibition Rules (Mandatory Constraints): For structural parts reaching moderate or higher damage, "painting only / repair only" is prohibited; cracked plastic covers with a span >30mm must be replaced; once sensor windows or brackets are removed or replaced, the corresponding CAL-* must be included; "repair-oriented options" are not provided for airbag and restraint system related components. Adjacent Part Transition (BLN) Rules: When painting a whole part or the color is metallic / pearl, add BLN to the exterior parts adjacent to the target part and in the same field of view; the adjacent definition comes from the vehicle exterior adjacency table, and the field of view is defined by front / rear / side blocks. Recommended Order: If any of the conditions of "severe, cross-seam, sensor involved" are met, Option A is recommended first; if it is a surface layer and there is no geometric deformation, Option B is recommended first; for other cases: under the premise of compliance, compare the total cost of A / B / C, recommend the lowest cost, and sort the rest as alternatives in descending order of cost. Parallel preferences and options: If the user specifies "use OEM only" or "as economical as possible", incompatible solutions will be filtered out according to preference; if the total cost difference is less than 3%, the priority order is A (reliability) > B (repairability) > C (economic).
[0094] S64: Output and Traceability (Fields and Versioning) Cost Details Line Item Structure (One process or part per line): line_id, part_code, part_name, brand_type, op_code, op_name, std_labor_hours, labor_trade, labor_rate_source (if the rate is maintained by the system, include the version number; if returned by an external library, fill in "external"), material_allowance, region_coeff, data_version_part, data_version_labor, data_version_material, currency, notes (trigger basis / compliance rules). If the line item is a calibration type, it also includes calibration_type and required_by (which disassembly / assembly triggers it). Scheme-level metadata: scheme_id, scheme_type (A / B / C), trigger_factors (heavy / seam / sensor / color system / whole part painting, etc.), excluded_rules (reason for prohibition), region_id, generated_at, algo_version, db_snapshot_id. Triggering criteria are recorded: quantitative indicators, levels, cross-seam events, edge warning zone hits, and a list of safe components from S51–S53 are written; each item is accompanied by a "source frame number / timestamp". The output simultaneously generates machine-readable JSON and human-readable PDF; the JSON contains all the above fields; the PDF includes keyframe overlays, component / damage mask thumbnails, a cost summary table, and a data version number. The scheme and details are recorded in the evidence log with hashes and signatures (reusing the S16 mechanism) to ensure report-evidence chain consistency.
[0095] Preferably, step S1 includes:
[0096] S11: Perform size normalization, noise reduction and color correction on each frame of the video sequence, extract brightness information, generate a perceptual content fingerprint for the frame based on low-frequency features, and calculate a secure hash fingerprint for the pixel byte stream of the frame after removing metadata.
[0097] S12: The perceptual content fingerprint, secure hash fingerprint, display timestamp of the frame, timestamp returned by a trusted time source, chain value of the previous frame, and acquisition device identifier are concatenated in a preset order to generate a chained summary value for the current frame, so that if the content or time information of any frame is modified, the chain value of all subsequent frames will be inconsistent.
[0098] S13: Use the private key in the terminal security module to generate a digital signature for the chain digest value, and store or upload the digital signature and timestamp together with the chain digest of the frame to form a traceable chain of evidence.
[0099] S14: Perform secondary compression detection: Analyze the encoder fingerprint, quantization parameter distribution, bit rate and image group structure of the encoded bit stream, and comprehensively check whether there are characteristics such as encoder inconsistency, periodic holes in quantization distribution, abnormal increase in block effect energy, and mismatch between bit rate and structure. Combine the abnormal distribution of residual map with error level analysis, and mark it as secondary compression if it meets the rules.
[0100] S15: Perform frame pulling detection: compare the deviation between the timestamp interval of adjacent frames and the nominal frame period, and combine the pixel difference between adjacent frames with the continuous abnormally low value of optical flow intensity to identify duplicate frames, deleted frames, or interpolated frames; when the above pattern is detected in a continuous segment, mark the abnormality type, start and end positions and duration; the optical flow intensity is the magnitude of the optical flow vector at the pixel position.
[0101] S16: Write the chain digest, digital signature, and time stamp of each frame, as well as the results of secondary compression and frame pulling detection, into the evidence log that only increases and never decreases. Optionally, a chain digest can be generated again at the video segment level to facilitate subsequent rapid verification and judicial evidence collection.
[0102] Preferably, step S2 includes: constructing a video segmentation network with a shared backbone and two branches, wherein the shared backbone is a spatiotemporal feature encoder that receives multiple adjacent video frames as input and outputs a unified spatiotemporal feature map using multi-scale feature extraction, feature pyramid fusion, and temporal attention mechanisms; wherein, the component branch is equipped with a semantic decoding head and an instance decoding head, which first outputs pixel-level semantic maps of the vehicle body components based on the unified spatiotemporal feature map, and then generates corresponding component instance masks based on center or contour parameterization, and improves the integrity of edges and small components through boundary refinement and morphological connectivity correction; the damage branch performs fine-grained damage category segmentation under the spatial constraints and attention guidance of the component mask, and sets edge enhancement, high reflectivity, etc. The light-sensitive and texture discrimination submodule distinguishes between categories such as scratches, dents, paint chips, cracks, damage, and edge deformation, and outputs corresponding pixel masks and confidence maps. The segmentation process is as follows: after the video frames within the sliding window are encoded using a shared backbone, a stable component mask is first obtained from the component branch, and small hole filling and adhesion separation are performed. Then, the component mask is used as a mask and guiding feature to be sent to the damage branch to complete damage segmentation. Subsequently, the results of the two branches are subjected to cross-scale fusion and boundary guidance post-processing to obtain the final component mask and damage mask. In the inference stage, a keyframe priority and mask propagation strategy is adopted for long videos to reduce jitter and improve inter-frame consistency. The network supports lightweight deployment on the edge and verification on the cloud.
[0103] Preferably, step S3 includes:
[0104] S31: Calculate dense optical flow for two adjacent frames. Dense optical flow is a pixel-wise displacement vector field covering the effective pixel grid of the entire image. Dense optical flow is obtained by a hierarchical registration solver under fixed preset parameters. Forward and backward consistency checks and reprojection difference checks are used to determine the quality of optical flow. Regions exceeding a preset threshold are marked as uncertain regions. S32: Based on the dense optical flow, the damage mask of the previous frame is mapped to the current frame to generate a prediction mask. A candidate search band is formed by expanding the uncertain region by a fixed pixel width. S33: Extract appearance features from the candidate regions based on shared backbone features. According to the rule that the similarity is not lower than the first threshold and the overlap with the prediction mask is not lower than the second threshold, the current frame candidate is associated with the historical trajectory one-to-one and inherits the same identifier. Unassociated candidate trajectories are newly created. Trajectories that have not been matched for more than a preset number of consecutive frames are terminated. S34: Perform boundary alignment and hole filling on the current frame mask of the associated instances. Smooth the mask by majority voting within a fixed-length time window to obtain a temporally consistent refined mask.
[0105] Preferably, step S4 includes:
[0106] S41: Perform monocular depth estimation on keyframes containing the damage mask, wherein the monocular depth estimation refers to network inference that outputs pixel-wise relative distance values for a single frame of color image; and use the obtained pixel-to-size conversion coefficients to scale the relative distance values to obtain a scaled depth map.
[0107] S42: Determine the target component region based on the obtained component mask, and retrieve the curvature a priori of the component in an undamaged state from the component surface library. The curvature a priori is the standard surface model of the component.
[0108] S43: Geometrically register the prior surface with the target component region, and use the annular undamaged band outside the damage mask as a reference to locally adjust the prior surface so that it is consistent with the overall pose and scale of the current frame, thus obtaining the baseline surface.
[0109] S44: Within the damaged mask area, the depth map at the real scale is compared pixel by pixel with the baseline surface to obtain the deformation relative to the undamaged state. The deformation that deviates inward is defined as the depression depth, and the maximum value, average value and area are output.
[0110] S45: Calculate the surface normal direction of the current frame based on the local changes of the depth map, and compare the difference with the normal direction of the baseline surface to obtain the surface normal perturbation distribution and its statistics; smooth and threshold noise reduction are performed on the indentation depth and normal perturbation results within a fixed time window, and the frame-level indentation depth and surface normal perturbation index is output.
[0111] Preferably, step S5 includes:
[0112] S51: Within the target vehicle body part mask, calculate quantitative indicators for the damage mask, including: for scratches, the total length of the connected center path is taken as the length, and the average and maximum widths are read from the equally spaced vertical cross sections; for paint chips, the area is converted from the number of mask pixels by scale and holes are deducted; for cracks, the span is taken as the longest connected path after refinement; for depressions, the maximum depth within the mask is taken from the depth map, and the effective area not lower than the starting threshold is calculated.
[0113] S52: Summarize multiple similar damages within the same component according to component topology, sum the length and area, take the maximum depth, and mark them as cross-joint events when they cross joints or stiffeners.
[0114] S53: Component-level judgment is made based on preset mild, moderate, and severe thresholds: any indicator reaching the medium or high threshold, or a cross-sealing event, or involving safety-related components is judged as severe; all indicators below the low threshold, without cross-sealing, and not within the edge warning zone are judged as mild; the rest are judged as moderate.
[0115] S54: Summarize the whole vehicle level results by component level and record the triggering basis used for level determination.
[0116] Preferably, step S6 includes:
[0117] S61: Based on the vehicle model recognition results, map the component segmentation labels to standard part codes, and map the damage categories and levels to process codes, including replacement, sheet metal repair, grinding, and painting; automatically add additional disassembly, calibration, and correction processes for cross-seam or sensor-related components; S62: Obtain the price of the corresponding part from the price database, obtain the working hours for each process from the working hour database, and obtain the material quota and unit price from the material database according to the painting area and paint type;
[0118] S63: If it is a heavy-duty, cross-seam, or sensor-related component, a replacement solution is recommended; if it is a surface layer without geometric deformation, spraying or polishing is recommended; for the rest, the solution with the lowest total cost is recommended, and alternative solutions in descending order of total cost are provided simultaneously; S64: The solution outputs part codes, process codes, price and time data sources and versions, regional coefficients and triggering basis to form a traceable cost detail.
[0119] This application also provides an automatic vehicle damage assessment system based on video segmentation for auto insurance claims, such as... Figure 2As shown, it includes: an edge-side acquisition and trusted processing unit (mobile survey terminal or vehicle-mounted recording terminal), an imager and optical CMOS image sensor (including adjustable ISP), and a lens assembly; optional supplementary lighting LED / floodlight. The main control SoC includes CPU / GPU / NPU, supporting local inference and image preprocessing. A trusted and key hardware security unit (eSE / TPM) and TEE (such as ARMTrustZone) are used for private key storage and frame-level signature. Positioning and attitude sensing: GNSS module (including external or patch antenna), IMU (accelerometer / gyroscope). Audio and auxiliary: microphone (optional), buzzer (prompt). Storage and memory: LPDDR4 / 5, eMMC / UFS flash memory (local cache and logs that only increment). Communication: 4G / 5G cellular module (eSIM / SIM), Wi-Fi (802.11ac / ax), Bluetooth (auxiliary accessories). Display and interaction: touchscreen / indicator lights / physical buttons (can be combined into a mobile phone format). Power Supply: Lithium battery + power management, or 12V vehicle power. Edge Computing Gateway, Industrial-Grade Host: x86 / ARM CPU, supports GPU / edge TPU / Jetson and other accelerator cards. Network: Gigabit Ethernet (RJ-45) / PoE, Wi-Fi AP / STA. Local Storage: NVMe SSD array (caching video and intermediate results), read-only log disk (WORM configuration). Time Synchronization: Hardware clock and NTP / PTP client. Security: Built-in HSM / encryption card (optional) for end-to-cloud credential brokering.
[0120] Cloud-based computing and business support API gateway / load balancer: handles HTTPS / mTLS traffic. Inference cluster: GPU / AI accelerated servers (containerized orchestration) run services such as video segmentation, tracking, and depth estimation. Object storage: stores evidence videos, keyframes, masks, and report files (supports WORM / versioning). Database: transaction database (e.g., relational DB) stores case data, quantitative indicators, and cost details; price / work hours / materials and vehicle parts databases; evidence log index. Message and task orchestration: message queues / streaming buses (e.g., Kafka) and job schedulers. Time and key infrastructure: Trusted Timestamp Service (TSA), key management service (KMS / HSM cluster). Auditing and monitoring: centralized log, indicator, and alarm system.
[0121] 1) Internal connections on the device side: Camera → SoC / ISP: MIPICSI-2 bus; Display → SoC: MIPIDSI; Security Unit → SoC: I 2 C / SPI; IMU→SoC: I 2 C / SPI; GNSS → SoC: UART; Audio codec → SoC: I 2S / PCM; Storage → SoC: UFS / eMMC; Cellular Module / Wi-Fi / BT → SoC: PCIe / USB / UART / SDIO (depending on the device).
[0122] 2) Edge-to-Cloud Network Connection: Wireless Wide Area: The device connects directly to the cloud via 4G / 5G (NR / LTE, APN optional); Local Area / Campus: The device or camera accesses the edge gateway via Wi-Fi / Ethernet, and the gateway uplinks to the cloud via fiber optic / Ethernet; Transmission Protocol: HTTPS / TLS1.2+mutual authentication (mTLS) is the default; Large files are uploaded in chunks using HTTP / 2, and events / states are uploaded via MQTT over TLS; Internal microservices use gRPC / HTTP2; Time Synchronization: The device and edge use SNTP / NTP; The cloud cluster uses NTP / PTP; Timestamp requests are completed via the RFC3161 TSA interface. Edge-to-Cloud Connection: North-South: The edge calls the cloud API gateway (mTLS) to upload videos and masks in batches according to policies, with resume capability; East-West: Services within the cloud communicate with each other via ServiceMesh or zero-trust network segments; Models and code tables are distributed to the edge via a dedicated artifact repository / configuration center. Peripheral / sensor and component library association VIN / OBD access: Connect to the OBD gateway via BLE / Wi-Fi / Ethernet to read vehicle VIN and sensor self-test; Vehicle model and component library synchronization: The edge / end side periodically pulls incremental packages of BOM / topology / price and labor hours from the cloud (effective after signature verification).
[0123] Data and evidence chain implementation at the endpoint: A content fingerprint and chained hash are generated for each frame, and signed using a TEE / eSE private key; anomaly detection results and signatures are encrypted and uploaded along with frame metadata or cached locally. At the edge / cloud: Upon receipt, data is immediately written to WORM / immutable object storage, along with audit logs and segment-level hashes; the business database stores an index and version number pointing to the object storage. Keys and certificates: End-side certificates are pre-configured or issued upon initial registration; cloud-side KMS / HSM handles certificate issuance and revocation, and the API gateway implements mTLS and certificate fixation.
[0124] Key points for power supply and physical deployment: End-side: IP54 or higher protection (vehicle-mounted power supply or mobile power bank), cameras and supplementary lighting with temperature protection; Edge: 19-inch rack or wall-mounted industrial control box, UPS and surge protection, operating temperature -10~55℃; Cloud-side: Redundant power and network in the data center, N+1 GPU nodes, storage with three replicas or erasure coding across availability zones. Redundancy and offline fault tolerance: Offline caching: End / edge local caching of ≥48 hours of data, batch synchronization after network recovery; Dual links: Prioritize Ethernet / fiber, automatic switching to 4G / 5G in uplink failure; Time source redundancy: GNSS, NTP multi-source selection, RTC temporary storage in case of out-of-synchronization, and TSA re-signing upon network reconnection. Includes:
[0125] The system comprises the following modules: a video sequence acquisition module for the accident vehicle, a content hashing module for each frame, a chain hashing module for each frame, a digital signature, secondary compression, and frame-by-frame detection; a segmentation module, using a shared backbone and dual-branch video segmentation network, performing component segmentation and damage category segmentation on the video sequence to obtain component masks and damage masks; a mask refinement module, based on optical flow and spatiotemporal consistency tracking of re-identification, maintaining consistent identification for the same damage instance across frames and refining the mask; a scale calibration module, based on license plates, wheel hubs, or ground markings, performing scale calibration and combining monocular depth estimation and component curvature a priori estimation to estimate dent depth and surface normal perturbation; a damage rating module, calculating quantitative indicators such as scratch length, width, paint chipping area, crack span, and dent depth, and performing damage rating under component topological constraints; and an output module, mapping the rating results to the component BOM, repair time database, and price database to generate cost calculation and recommendation schemes for replacement, repair, and painting.
[0126] Preferably, the module for acquiring the video sequence of the accident vehicle includes:
[0127] For each frame of the video sequence, size normalization, noise reduction and color correction are performed, brightness information is extracted, and a perceptual content fingerprint of the frame is generated based on low-frequency features; and after removing metadata, a secure hash fingerprint of the pixel byte stream of the frame is calculated.
[0128] The perceptual content fingerprint, secure hash fingerprint, display timestamp, timestamp returned by a trusted time source, chain value of the previous frame, and acquisition device identifier of the frame are concatenated in a preset order to generate a chained digest value of the current frame, so that if the content or time information of any frame is modified, the chain value of all subsequent frames will be inconsistent.
[0129] The private key in the terminal security module is invoked to generate a digital signature for the chain digest value, and the digital signature and timestamp are stored or uploaded together with the chain digest of the frame to form a traceable chain of evidence.
[0130] Secondary compression detection is performed: the encoder fingerprint, quantization parameter distribution, bit rate and image group structure of the encoded bit stream are analyzed, and the characteristics such as encoder inconsistency, periodic holes in quantization distribution, abnormal increase in block effect energy and mismatch between bit rate and structure are comprehensively checked. The abnormal distribution of residual map is analyzed in conjunction with the error level. If the rules are met, it is marked as secondary compression.
[0131] Frame pulling detection is performed: the deviation between the timestamp interval of adjacent frames and the nominal frame period is compared, and the pixel difference between adjacent frames and the continuous abnormally low value of optical flow intensity are combined to identify duplicate frames, deleted frames, or interpolated frames; when the above pattern is detected in a continuous segment, the abnormality type, start and end positions and duration are marked; the optical flow intensity is the magnitude of the optical flow vector at the pixel position.
[0132] The chain digest, digital signature, and time stamp of each frame, as well as the results of secondary compression and frame pulling detection, are written into an evidence log that only increases and never decreases. A chain digest is then generated again at the video segment level to facilitate rapid verification and judicial evidence collection.
[0133] Preferably, the method includes: constructing a video segmentation network with a shared backbone and two branches, wherein the shared backbone is a spatiotemporal feature encoder that receives multiple adjacent video frames as input and outputs a unified spatiotemporal feature map using multi-scale feature extraction, feature pyramid fusion, and temporal attention mechanisms; wherein, the component branch is equipped with a semantic decoding head and an instance decoding head, which first outputs pixel-level semantic maps of the vehicle body components based on the unified spatiotemporal feature map, and then generates corresponding component instance masks based on center or contour parameterization, and improves the integrity of edges and small components through boundary refinement and morphological connectivity correction; the damage branch performs fine-grained damage category segmentation under the spatial constraints and attention guidance of the component mask, and sets edge enhancement and reflective highlight sensitivity. The system includes a texture discrimination submodule to distinguish between categories such as scratches, dents, paint chips, cracks, damage, and edge deformation, and outputs corresponding pixel masks and confidence maps. The segmentation process is as follows: after the video frames within the sliding window are encoded using a shared backbone, a stable component mask is first obtained from the component branch, and small hole filling and adhesion separation are performed. Then, the component mask is used as a mask and guiding feature to be sent to the damage branch to complete damage segmentation. Subsequently, the results of the two branches are subjected to cross-scale fusion and boundary guidance post-processing to obtain the final component mask and damage mask. During the inference stage, a keyframe priority and mask propagation strategy is adopted for long videos to reduce jitter and improve inter-frame consistency. The network supports lightweight deployment on the edge and verification on the cloud.
[0134] This invention provides a method and system for automatic vehicle damage assessment based on video segmentation in auto insurance claims, and the beneficial technical effects it can achieve are as follows:
[0135] 1. This application utilizes a shared backbone + dual-branch network to achieve two-level segmentation of "component-damage". First, a stable component mask is obtained, followed by fine-grained damage segmentation within the component. Cross-frame trajectories are established by combining optical flow propagation and re-identification. Boundary alignment, hole filling, and temporal smoothing are employed to suppress jitter, ensuring that the same scratch / dent maintains consistent identification and shape across multiple frames. Pixel-to-actual-size calibration is achieved using license plates, wheel hubs, or ground markings. By fusing monocular depth and component curvature a priori measurements, true-scale indicators such as dent depth, scratch length / width, paint chipping area, and crack span are obtained, significantly reducing measurement errors caused by perspective, jitter, and lighting variations. In scenarios with occlusion, rapid motion, and compression artifacts, uncertainty masks and keyframe re-initialization are used to ensure tracking continuity and guarantee quantization stability in long videos. 2. This invention addresses the problem of easily transcoded and edited evidence in claims processing. At the acquisition end, this invention calculates the content fingerprint of each frame and concatenates it with time information to form a chain digest, attaching a digital signature using the terminal's private key to construct a traceable chain of evidence. Simultaneously, it automatically detects secondary compression, duplicate / deleted frames, and accurately marks abnormal segments and their durations on the timeline. The system writes the chain digest, signature, time stamp, and detection results into an ever-increasing audit log, and regenerates the digest at the fragment level for rapid verification. The output report includes metadata such as keyframe overlay, quantitative details, algorithm and price library version numbers, and verification codes, facilitating internal and external review, compliance audits, and judicial evidence collection, significantly improving the credibility of evidence and reducing dispute resolution costs.
[0136] 3. This invention standardizes and maps component and damage results to the vehicle model BOM, labor hours, and price database, automatically generating a "replacement / repair / painting" work list and cost range. For cases involving gaps, sensor-related issues, and severe structural damage, it automatically adds disassembly, calibration, and correction procedures, and restricts non-compliant strategies according to rules. The system recommends optimal and alternative solutions based on grade, geometric quantities, and regional coefficients, clearly identifying cost drivers and their sources, achieving transparency and traceability. Lightweight edge-side inference combined with cloud-side verification and batch reporting enables real-time suggestions at the inspection site and one-click case creation in the backend. Standardized coding reduces human error, shortens the claims cycle, and lowers misjudgment and re-inspection rates, resulting in quantifiable cost reduction and efficiency improvement.
[0137] The above provides a detailed description of an automatic vehicle damage assessment method and system based on video segmentation in auto insurance claims. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas and methods of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.
Claims
1. A method for automatic assessment of vehicle damage based on video segmentation in vehicle insurance claim settlement, characterized in that, The method comprises the steps of: S1: obtaining a video sequence of an accident vehicle, calculating a content hash for each frame and forming a chain hash with time information, adding a digital signature and performing secondary compression and frame pulling detection; S11: performing size normalization, denoising and color correction on each frame of the video sequence, extracting brightness information, generating a perceptual content fingerprint of the frame based on low-frequency features; and after removing metadata, calculating a secure hash fingerprint of the pixel byte stream of the frame; S12: concatenating the perceptual content fingerprint of the frame, the secure hash fingerprint, the display timestamp of the frame, the time marker returned by the trusted time source, the chain value of the previous frame, and the acquisition device identifier in a predetermined order to generate a chain digest value for the frame, so that any change in the content or time information of any frame will cause the chain values of all subsequent frames to be inconsistent; S13: calling a private key in a terminal security module to generate a digital signature for the chain digest value, and storing or uploading the digital signature and the time marker together with the chain digest of the frame to form a traceable evidence chain; S14: secondary compression detection: analyzing the encoder fingerprint, quantization parameter distribution, code rate, and image group structure of the encoded bit stream, checking for simultaneous occurrence of inconsistent encoders, periodic voids in quantization distribution, abnormal increase in block effect energy, and mismatch between code rate and structure, and combining error analysis of residual image distribution to satisfy the rule to mark as secondary compression; S15: frame pulling detection: comparing the deviation of the time stamp interval between adjacent frames and the nominal frame period, combining the continuous abnormal low value of the pixel difference and optical flow intensity of adjacent frames to identify repeated frames, deleted frames, or interpolated generated frames; when detecting abnormal low values in consecutive sections, mark the abnormal type, start and end position, and duration; S16: write the chain digest, digital signature, and time marker of each frame, as well as the secondary compression and frame pulling detection results into an evidence log that only increases and does not decrease, and generate a chain digest again at the video segment level to facilitate subsequent quick verification and judicial evidence; S2: using a shared backbone and a double-branch video segmentation network to perform component segmentation and damage class segmentation on the video sequence to obtain component masks and damage masks; S3: based on the spatiotemporal consistency tracking of optical flow and re-identification, the same damage instance is kept consistent in cross-frame and is subjected to mask refinement; S4: based on license plate or hub or ground marking, perform scale calibration, and combine monocular depth estimation and component curvature prior to estimate the depth of the depression and the disturbance of the surface normal; S5: calculate the scratch length, width, paint loss area, crack span, and depression depth quantitative indicators, and perform damage level assessment under the constraint of component topology; S6: map the assessment results to the component BOM, repair work hour database, and price library to generate cost calculation and recommendation schemes for replacement, repair, and painting.
2. The method for automatic assessment of vehicle damage based on video segmentation in vehicle insurance claim settlement according to claim 1, wherein, The step S2 comprises: constructing a shared backbone and double-branch video segmentation network, the shared backbone is a space-time feature encoder, receiving adjacent multiple frames of video as input, using multi-scale feature extraction, feature pyramid fusion and time sequence attention mechanism to output unified space-time feature map; wherein, the component branch is provided with a semantic decoding head and an instance decoding head, first outputting a pixel-level semantic map of the vehicle body component according to the unified space-time feature map, then generating a corresponding component instance mask according to the contour parameters, and improving the edge and the integrity of the component through morphological connectivity correction; the damage branch performs fine-grained damage class segmentation under the spatial constraint and attention guidance of the component mask, and sets edge enhancement, reflection highlight sensitivity and texture discrimination submodules to distinguish scratch, dent, paint loss and crack categories and output corresponding pixel masks and confidence maps; the segmentation process is: after the video frames in the sliding window are encoded by the shared backbone, first obtain stable component masks by the component branch and perform small hole filling and adhesion separation, then input the component masks as masks and guide features into the damage branch to complete damage segmentation, and then post-process the results of the two branches in a cross-scale fusion and boundary guidance manner to obtain the final component mask and damage mask; in the inference stage, the key frame priority and mask propagation strategy are used for long video to reduce jitter and improve inter-frame consistency, and the network supports end-side lightweight deployment and cloud-side review.
3. The method of claim 1, wherein the method further comprises: The step S3 comprises: S31: calculating dense optical flow for adjacent two frames, the dense optical flow being a pixel-by-pixel displacement vector field covering the effective pixel grid of the whole image; the dense optical flow is obtained by a hierarchical registration solver under fixed preset parameters, and forward and backward consistency checking and re-projection difference checking are used to determine the quality of the optical flow, and areas exceeding a preset threshold are marked as uncertain areas; S32: mapping the damage mask of the last frame to the current frame to generate a predicted mask according to the dense optical flow, and forming a candidate search band by expanding a fixed pixel width outside the uncertain area; S33: extracting appearance features on the shared backbone features for the candidate area, and associating the current frame candidate with the historical trajectory one by one and inheriting the same identifier according to the rule that the similarity is not less than a first preset threshold and the overlap degree with the predicted mask is not less than a second preset threshold; a new trajectory is created for the unassociated candidate, and a trajectory is terminated if it is not matched for more than a preset number of frames in succession; S34: performing boundary alignment and hole filling on the current frame mask of the associated instance, and performing majority voting smoothing within a fixed length time window to obtain a time-consistent refined mask.
4. The method of claim 1, wherein the method further comprises: The step S4 comprises: S41: performing monocular depth estimation on the key frame containing the damage mask, the monocular depth estimation referring to network inference outputting a pixel-by-pixel relative distance value for a single color image; and using the obtained conversion coefficient of the pixel and the actual size to scale the relative distance value to obtain a depth map; S42: determining a target component region according to the obtained component mask, and calling the curvature prior of the component in the undamaged state from the component surface library, the curvature prior being a standard surface model of the component; S43: Geometrically register the curvature prior with the target component region, and locally adjust the prior shape surface to be consistent with the overall pose and scale of the current frame, taking the annular undamaged band outside the damage mask as a reference, to obtain a baseline shape surface; S44: Within the damage mask, compare the real-scale depth map with the baseline shape surface pixel by pixel to obtain the deformation relative to the undamaged state, define the inwardly deviated deformation as the dent depth, and output the maximum value, average value, and area; S45: Calculate the surface normal direction of the current frame based on the local changes of the depth map, and compare the difference with the normal direction of the baseline shape surface to obtain the surface normal disturbance distribution and its statistics; smooth and threshold the dent depth and normal disturbance results within a fixed timing window to output the frame-level dent depth and surface normal disturbance indicators.
5. The method of claim 1, wherein the method further comprises: The step S5 includes: S51: Calculate the quantitative indicators of the damage mask within the target vehicle body component mask, including: the total length of the scratch is taken as the length, and the average value and maximum value of the width are read at equal intervals in the vertical section; the area of the paint loss is calculated by converting the number of mask pixels into area and deducting the holes; the longest connected path is taken as the span after thinning the crack; the maximum depth in the depth map is taken as the dent, and the effective area that is not less than the threshold is counted; S52: Aggregate multiple similar damages in the same component according to the component topology, sum the lengths and areas, and take the maximum depth, and mark as a cross-seam event when crossing the seam or reinforcing rib; S53: Determine the component according to the preset mild, moderate, and severe thresholds: any indicator reaching the medium-high threshold or appearing a cross-seam event or involving a sensor component is determined as severe; all indicators being below the low threshold and without a cross-seam and not being in the edge warning belt are determined as mild; the rest are determined as moderate; S54: Aggregate the vehicle-level results according to the component-level results, and record the triggering basis for the determination.
6. The method of claim 1, wherein the method further comprises: The step S6 includes: S61: According to the vehicle model recognition result, map the component segmentation label to the standard component code, and map the damage category and level to the process code, including replacement, sheet metal repair, polishing, and painting; automatically add disassembly, calibration, and correction processes for the cross-seam or sensor-involved components; S62: Obtain the price of the corresponding part from the price library, obtain the working hours of each process from the working hour library, and obtain the material quota and unit price according to the painting area and color paint category from the material library; S63: If it is severe, cross-seam, or involves a sensor component, recommend a replacement solution; if it is a surface layer and has no geometric deformation, recommend painting or polishing; otherwise, recommend the solution with the lowest total cost, and simultaneously give alternative solutions in descending order of total cost; S64: Output the part code, process code, price, and working hour data source and version, regional coefficient, and triggering basis to form a traceable cost breakdown.
7. A system for automatic assessment of vehicle damage based on video segmentation in vehicle insurance claims, characterized in that, It includes: A video sequence acquisition module for an accident vehicle, which calculates the content hash of each frame and forms a chain hash with the time information, adds a digital signature, and performs secondary compression and frame detection; Each frame of the video sequence is normalized in size, denoised, and color corrected, the brightness information is extracted, and the perceptual content fingerprint of the frame is generated based on low-frequency features; And after removing the metadata, the pixel byte stream of the frame is calculated for a secure hash fingerprint; The perceptual content fingerprint of the frame, the secure hash fingerprint, the display timestamp of the frame, the time mark returned by the trusted time source, the chain value of the previous frame, and the acquisition device identification are concatenated in a preset order to generate a chained digest value of the frame, so that any frame content or time information is modified, which will cause inconsistency in the chain value of all subsequent frames; The private key in the terminal security module is called to generate a digital signature for the chained digest value, and the digital signature and the time mark are stored or uploaded together with the chained digest of the frame to form a traceable evidence chain; Second compression detection is performed: the encoder fingerprint, quantization parameter distribution, code rate, and group structure of the encoded bit stream are analyzed to check whether the encoder is inconsistent, the quantization distribution is periodic and hollow, the block effect energy abnormally increases, and the code rate and structure are mismatched, and the distribution of the error analysis residual graph is combined to meet the rules when labeled as secondary compression; Frame pulling detection is performed: the deviation of the interval between adjacent frame timestamps and the nominal frame period is compared, and the continuous abnormal low value of the adjacent frame pixel difference and the optical flow intensity is combined to identify repeated frames, deleted frames, or interpolated generated frames; when continuous sections with abnormal low values are detected, the abnormal type, start and end positions, and duration are marked; The chained digest, digital signature, and time mark of each frame, as well as the results of secondary compression and frame pulling detection, are written into an evidence log that only increases and does not decrease, and a chained digest is generated again at the video segment level, facilitating subsequent rapid verification and forensic segmentation modules, which use a shared trunk and a double-branch video segmentation network to perform component segmentation and damage class segmentation on the video sequence to obtain component masks and damage masks; The mask refinement module tracks the spatiotemporal consistency based on optical flow and re-identification, keeps the same damage instance consistent across frames, and refines the mask; The scale calibration module performs scale calibration based on license plates or wheel hubs or ground markings, and estimates the depth of concave and surface normal disturbance based on monocular depth estimation and component curvature prior; The grade evaluation module calculates the length, width, paint loss area, crack span, and concave depth quantitative indicators, and performs damage grade evaluation under the constraint of component topology; The output module maps the evaluation results to the zero-component BOM, maintenance man-hour database, and price library to generate replacement, repair, and painting cost calculation and recommendation schemes.
8. The system for automatic assessment of vehicle damage based on video segmentation in vehicle claim settlement of claim 7, wherein, The segmentation module comprises a video segmentation network with a shared backbone and double branches, the shared backbone is a spatio-temporal feature encoder, receives adjacent multiple frames of video as input, adopts multi-scale feature extraction, feature pyramid fusion and time sequence attention mechanism to output unified spatio-temporal feature map; wherein, the component branch is provided with a semantic decoding head and an instance decoding head, first outputs the pixel-level semantic map of the vehicle body component according to the unified spatio-temporal feature map, then generates the corresponding component instance mask according to the contour parameterization, and improves the integrity of the edge and small component through boundary refinement and morphological connectivity correction; the damage branch performs fine-grained damage class segmentation under the spatial constraint and attention guidance of the component mask, sets edge enhancement, reflection highlight sensitivity and texture discrimination sub-modules to distinguish scratch, dent, paint loss and crack categories and output corresponding pixel mask and confidence map; the segmentation process is as follows: after the video frames in the sliding window are encoded by the shared backbone, first obtain stable component mask by the component branch and perform small hole filling and adhesion separation, then input the component mask as a mask and guide feature into the damage branch to complete damage segmentation, then post-process the results of the two branches in cross-scale fusion and boundary guidance to obtain the final component mask and damage mask; in the inference stage, the key frame priority and mask propagation strategy are adopted for long video to reduce jitter and improve inter-frame consistency, and the network supports end-side lightweight deployment and cloud-side review.
Citation Information
Patent Citations
Vehicle insurance assessment method and system based on automatic detection of external damage of vehicle
CN118135338A
Vehicle mutual-aid claim settlement method and system based on multi-modal data fusion
CN120125355A