Image recognition method and device, equipment and storage medium
By collecting full image data and performing multi-stage purification and feature extraction, combined with a joint task recognition model, the problems of material differences and interference factors in the recognition of discoloration of used car carpets were solved, achieving a recognition effect with high accuracy and reliability.
Patent Information
- Application Number
- CN202511820400.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-04
- Publication Date
- 2026-02-24
AI Technical Summary
Existing technologies struggle to accurately identify carpet discoloration in used car transactions, especially in scenarios with multiple materials and interference, making it difficult to effectively distinguish between genuine carpet discoloration and color differences caused by stains or changes in lighting.
By collecting full image data and auxiliary information, multi-stage purification and feature extraction are performed. Combined with a joint task recognition model, material determination, color change classification and regional positioning are integrated. A standardized recognition report is generated through confidence verification and manual correction.
It significantly improves the accuracy and reliability of used car carpet color change recognition, effectively distinguishes between genuine color changes and interference factors, generates high-quality recognition reports, and adapts to complex scenario needs.
Smart Images

Figure CN121564427A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition technology, and in particular to an image recognition method, apparatus, device, and storage medium. Background Technology
[0002] In the used car market and vehicle inspection sector, accurate identification of flood-damaged vehicles is crucial for addressing information asymmetry, ensuring fair transactions, and reducing consumer risk. Carpets, as key components inside the vehicle that come into contact with water, directly reflect whether and how severely the vehicle has been flooded. After a vehicle has been submerged, moisture penetrates the carpet fibers and underlying substrate, causing localized or overall discoloration such as yellowing, blackening, and water stains. Furthermore, the discoloration characteristics of carpets made from different materials vary significantly.
[0003] Furthermore, similar patents such as CN112712066B disclose image recognition methods, devices, computer equipment, and storage media. These methods relate to the field of computer vision in artificial intelligence, primarily focusing on image recognition technology within computer vision. The methods include: acquiring an image to be recognized, which includes traffic signs to be recognized; extracting features from the image to obtain a feature vector; matching the feature vector with aggregated vectors of various traffic signs to obtain a matching degree between the image to be recognized and each type of traffic sign; wherein the aggregated vector corresponding to each type of traffic sign is obtained by aggregating the feature vectors of multiple images including traffic signs of the corresponding category; and determining the category of the traffic sign to be recognized in the image based on the matching degree. This method can improve the accuracy of identifying traffic sign categories from images, and the identified traffic sign categories can be applied to map building or vehicle navigation. This invention achieves accurate identification of specific targets, but the solution focuses on the identification of general targets with clear outlines and distinct features, such as traffic signs. It is not optimized for the scenario characteristics of used car carpet color change identification. It lacks an adaptation mechanism for complex factors such as carpet material differences, light interference, and stain confusion, and cannot distinguish between the actual color change of the carpet and the color difference caused by stains and light changes. Summary of the Invention
[0004] To address the aforementioned technical problems in existing vehicle carpet color change recognition processes, this invention provides a comprehensive data support method that can collect full image data and auxiliary information, covering multiple materials and interference scenarios. The preprocessing layer, through denoising, illumination normalization, and semantic segmentation, accurately extracts the effective carpet area and eliminates environmental interference. The feature extraction layer integrates texture and depth features, and a dynamic attention strategy strengthens the weight of key features, improving the recognition accuracy of material and color change features. A joint task recognition model integrates material determination, color change classification, and region localization. Combining confidence verification and manual correction ensures recognition accuracy, while data feedback enables iterative model optimization. The overall solution effectively distinguishes between genuine color changes and color differences caused by stains and lighting, significantly improving the accuracy and reliability of used car carpet color change recognition. The method includes the following steps: The image acquisition interface and historical data storage interface are called to collect full image data and auxiliary information for carpet color change recognition. The full image data includes panoramic images of the vehicle interior, standard sample images of carpets of different materials, and carpet images under various interference scenarios. The auxiliary information includes image acquisition environment parameters and basic carpet material information. The full image data is processed through a preprocessing layer to perform multi-stage purification, including image denoising, illumination normalization adjustment and carpet area semantic segmentation, generating purified image data containing only the effective area of the carpet. Multi-dimensional feature extraction is performed on the purified image data through the feature extraction layer, extracting the texture features of the carpet material and the deep features based on deep learning respectively. A dynamic attention fusion strategy is used to fuse the two types of features to generate a carpet fusion feature vector with unified dimensions. The carpet's fused feature vector is input into a preset joint task recognition model through the recognition layer, and the carpet material type determination, discoloration state classification, and discoloration area location are completed in sequence to generate preliminary recognition results. The preliminary recognition results include material type identifier, discoloration state label, discoloration area mask, and recognition confidence. The initial identification results are validated, and low-confidence identification results are filtered out by combining the preset confidence threshold. The manual interactive correction process is triggered to obtain the manually corrected identification results. The application layer converts the recognition results into a standardized data format, including color change determination results, color change degree classification, color change range boundary information, material type, and final confidence level, generating recognition report data that can be connected to the vehicle condition detection system. The recognition report data is pushed to the target vehicle condition detection system, while the manually corrected data and recognition feedback information are sent back to the data layer for incremental updates of the dataset and iterative optimization of the recognition model.
[0005] This invention utilizes multiple interfaces to collect panoramic images of the vehicle interior, standard samples of various materials, and images of various interference scenarios. Combined with collected environmental parameters and basic material information, it achieves comprehensive data coverage and scene adaptability, laying the foundation for complex scene recognition. The preprocessing layer, through denoising, illumination normalization, and semantic segmentation, accurately extracts the effective area of the carpet, completely eliminating the effects of uneven illumination and background interference, overcoming the shortcomings of similar solutions in handling environmental interference. The feature extraction layer integrates texture features and deep learning features, and a dynamic attention strategy strengthens the weight of key features, significantly improving the recognition accuracy of material differences and color-changing features. The joint task recognition model integrates material determination, color-changing classification, and region localization. Combined with confidence verification and manual correction, it effectively distinguishes between genuine carpet color changes and color differences caused by stains and illumination, ensuring recognition accuracy. The application layer generates a standardized recognition report that interfaces with the vehicle condition detection system. Simultaneously, manual data correction and feedback enable incremental updates of the dataset and iterative optimization of the model, forming a virtuous cycle. The overall solution significantly improves the accuracy, reliability, and scenario adaptability of carpet color change recognition in used cars, providing professional and efficient data support for vehicle condition inspection and meeting the core needs of used car evaluation scenarios.
[0006] Preferably, the step of calling the image acquisition interface and historical data storage interface to acquire full image data and auxiliary information for carpet color change recognition includes the following steps: Call the real-time acquisition interface of the image acquisition device to obtain panoramic images of the vehicle interior from different angles, and simultaneously record the ambient lighting parameters, shooting distance parameters and device model information during image acquisition, and generate a real-time image dataset with acquisition parameter tags; Call the historical image storage database interface to extract labeled standard sample images of carpets of different materials. The standard sample images cover different discoloration states and complete texture features of carpets of various materials, and generate a set of standard sample images of carpets. Call the interference scene image acquisition interface to acquire carpet images containing interference factors such as stains, wear, uneven lighting, and component occlusion, record the type identification and interference degree description of each interference scene, and generate an interference scene image dataset; Call the material information management interface to obtain the material composition description, texture structure characteristics and physical property parameters of various carpets, and generate a carpet material auxiliary information set; Based on the real-time image dataset, carpet standard sample image set, interference scene image dataset, and carpet material auxiliary information set, the data is classified and associated according to data type. Corresponding material auxiliary information and acquisition parameters are bound to each type of image data to generate an integrated set of full image data and auxiliary information.
[0007] This invention, through multi-source interface integration and full-scene data acquisition, completely solves the core pain points of incomplete data coverage and poor scene adaptability in used car carpet color change recognition. It calls a real-time acquisition interface to obtain panoramic images of the car's interior marked with environmental parameters, ensuring data real-time performance and scene authenticity; it extracts labeled standard sample images of carpets of various materials, providing authoritative reference benchmarks for the recognition model; it collects scene images containing interference factors such as stains and uneven lighting, allowing the model to learn interference features in advance, compensating for the lack of interference scene adaptability in similar patents; it simultaneously acquires auxiliary information such as carpet material composition and texture structure, providing data support for subsequent material determination and color change recognition. By classifying and associating image data with auxiliary information and acquisition parameters, a comprehensive full dataset is generated, covering carpet images of different materials and color change states, as well as various interference scenes and key auxiliary information. This completely changes the traditional solution's limitation of single data and inability to cope with complex real-world scenarios, laying a comprehensive and high-quality data foundation for subsequent accurate recognition.
[0008] Preferably, the step of performing multi-stage purification processing on the full image data through a preprocessing layer, sequentially completing image denoising, illumination normalization adjustment, and semantic segmentation of the carpet region, includes the following steps: Adaptive denoising processing is performed on various types of images in the full image data. A filtering algorithm with a fusion texture preservation mechanism is used to extract carpet fiber texture details while removing image noise, generating a denoised texture-enhanced image. Based on the denoised texture enhancement image and the ambient lighting parameters in the auxiliary information, the lighting component decomposition algorithm is used to separate the lighting influence component and the reflection feature component of the image to generate a set of lighting influence parameters. Based on the set of illumination influence parameters, dynamic illumination compensation and adjustment are performed on the reflection feature components to eliminate the interference of illumination differences under different acquisition environments and generate an illumination-standardized image. The illumination-normalized image is input into the improved semantic segmentation model, which enhances the feature differences between the carpet area and other parts of the vehicle body through an attention gate mechanism, and outputs a preliminary mask image of the carpet area. Based on the texture structure features in the basic information of carpet material, the initial mask image is subjected to edge optimization processing to correct the deviation area of the segmentation boundary and generate a carpet area mask image. The illumination-normalized image is matched pixel-level with the carpet area mask image to extract the image area within the mask coverage area, generating purified image data containing only the effective area of the carpet.
[0009] This invention employs a multi-stage refined purification process to precisely address the technical shortcomings of traditional solutions, such as difficulty in eliminating environmental interference and inaccurate carpet area extraction. A filtering algorithm with a fusion texture preservation mechanism is used to retain carpet fiber texture details while denoising, avoiding feature loss caused by simple denoising. Based on the collected illumination parameters, illumination component decomposition and dynamic compensation adjustment eliminate interference from illumination differences under different environments, solving the problem of color misjudgment caused by uneven illumination. An improved semantic segmentation model enhances the feature differences between the carpet and other components through an attention gate mechanism, and optimizes the segmentation boundary by combining material texture features to generate an accurate carpet area mask image. Finally, pixel-level matching is used to extract the effective area of the carpet, completely eliminating irrelevant interference such as background and occluding components. This comprehensive purification system of "denoising-illumination normalization-semantic segmentation" allows image data to focus on the core area of the carpet and eliminates multiple interferences such as illumination, noise, and background, providing high-purity, standardized image data for subsequent feature extraction and recognition, significantly improving the anti-interference ability and recognition accuracy of the recognition model.
[0010] Preferably, the step of performing pixel-level matching between the illumination-normalized image and the carpet area mask image to extract the image region within the mask coverage area includes the following steps: A pixel coordinate system is constructed for the illumination-normalized image, and a unique spatial coordinate identifier is assigned to each pixel to generate a normalized image with coordinate labels; The masked image of the carpet area is parsed to extract the pixel status identifiers and spatial distribution features of the effective mask area, and a mask area attribute dataset is generated. Based on a standardized image and mask region attribute dataset with coordinate labels, a pixel coordinate association mapping is established to generate an image-mask coordinate matching table. According to the image-mask coordinate matching table, the set of target pixel coordinates corresponding to the effective mask region is selected to generate a list of pixel coordinates of the carpet region. Based on the list of pixel coordinates of the carpet area, the pixel value information corresponding to the coordinates is extracted from the standardized image with coordinate labels to generate the original carpet area pixel dataset; edge pixel smoothing processing is performed on the original carpet area pixel dataset, and pixel deviation in the edge transition area is corrected through pixel neighborhood association analysis to generate the smoothed carpet pixel dataset. By combining the texture feature parameters in the basic information of carpet material, the texture consistency of the smoothed carpet pixel dataset is checked, abnormal pixels that do not conform to the material texture features are removed, and a texture-compliant carpet pixel dataset is generated. Based on a texture-compliant carpet pixel dataset, the image data is reconstructed according to the spatial coordinate order of the original image to generate cleaned image data that contains only the effective area of the carpet and has complete texture features.
[0011] This invention comprehensively solves the problems of incomplete carpet area extraction, blurred edges, and inclusion of abnormal pixels in traditional methods through pixel-level precise matching and multi-round optimization. A pixel coordinate system is constructed for the illumination-standardized image, the effective area attributes of the mask image are analyzed, and a precise coordinate correlation mapping is established to ensure accurate selection of carpet area pixels. Edge smoothing processing is performed on the extracted raw pixel data to correct pixel deviations in edge transition areas, avoiding image distortion caused by blurred segmentation boundaries. Consistency verification is performed in conjunction with carpet material texture features to remove abnormal pixels that do not conform to material characteristics, ensuring the completeness and purity of the extracted carpet area texture features. Finally, purified image data containing only the effective carpet area is reconstructed according to spatial coordinates, ensuring both the integrity and accuracy of the carpet area and the authenticity and integrity of the texture features, completely changing the low accuracy and susceptibility to interference of traditional area extraction methods. This step provides high-quality image input for subsequent multi-dimensional feature extraction, ensuring that feature extraction can accurately capture key information related to carpet material and color change, laying a solid foundation for subsequent accurate recognition.
[0012] Preferably, the step of filtering the set of target pixel coordinates corresponding to the effective mask region based on the image-mask coordinate matching table includes the following steps: The image-mask coordinate matching table is structured and parsed to extract pixel coordinate identifiers, mask status markers, and coordinate association confidence parameters to generate a coordinate-mask attribute mapping dataset. Based on the coordinate-mask attribute mapping dataset, the mask status filtering rule engine is called to set the mask valid status judgment conditions and generate valid status filtering parameters. Based on the valid state filtering parameters, the mask state markers in the coordinate-mask attribute mapping dataset are verified one by one to filter out candidate coordinate records that meet the valid state and generate a candidate coordinate dataset; spatial continuity analysis is performed on the candidate coordinate dataset to calculate the spatial distance parameters and connectivity feature values of adjacent coordinate points and generate a coordinate space association parameter set. Based on a coordinate space association parameter set, a region growing algorithm is used to mine connected coordinate regions, generating connected coordinate region clusters and region boundary feature parameters. Specifically, the generation process of the connected coordinate region clusters involves: extracting spatial location features and neighborhood association strength parameters of coordinate points from the coordinate space association parameter set to generate a coordinate point neighborhood association dataset; selecting unlabeled coordinate points as initial growth seed points and extracting the neighborhood connectivity threshold parameter of these seed points; determining the connectivity of neighboring coordinate points based on the neighborhood connectivity threshold parameter, filtering out neighboring coordinate points that meet the connectivity conditions and marking them as members of the same region, generating a temporary region growing set; using the coordinate points in the temporary region growing set as new seed points, iteratively performing neighborhood connectivity determination and region expansion operations until no new coordinate points can be added, generating the final connected coordinate region cluster. By combining the preset shape features and size thresholds of the carpet area, the validity of the connected coordinate region clusters is verified, and invalid region clusters with abnormal area or mismatched shape are removed to generate a set of valid coordinate region clusters. Extract all contained pixel coordinates from the set of valid coordinate region clusters and integrate them to generate an initial list of pixel coordinates for the carpet region. Redundancy is eliminated and the order is optimized from the initial list of pixel coordinates for the carpet area. The coordinate points are then reordered according to the spatial distribution of the image to generate the final list of pixel coordinates for the carpet area.
[0013] This invention completely solves the core pain points of traditional coordinate filtering methods, namely poor spatial correlation and inaccurate extraction of effective regions, through structured analysis and multi-round precise screening. The image-mask coordinate matching table is structuredly analyzed to extract coordinate identifiers, mask states, and correlation confidence. Effective state conditions are set using a filtering rule engine to achieve preliminary precise screening of candidate coordinates. Spatial continuity analysis is used to calculate the distance and connectivity features between adjacent coordinates, and a region growing algorithm is employed to mine clusters of connected coordinate regions, ensuring the spatial integrity of the carpet area and avoiding fragmentation caused by isolated coordinate points. Connected region clusters are verified using preset shape features and size thresholds of the carpet, eliminating invalid regions with abnormal areas or mismatched shapes, ensuring the rationality of the extracted regions. Finally, through redundancy removal and sequence optimization, an ordered list of carpet region pixel coordinates is generated. This entire process of "analysis-screening-connectivity analysis-validity verification-optimization" ensures the accuracy, integrity, and spatial continuity of the target pixel coordinate set, completely changing the current situation of messy coordinate screening and incomplete extraction of effective regions in traditional methods. It provides accurate coordinate support for subsequent carpet area image reconstruction and feature extraction, significantly improving the reliability of the overall recognition process.
[0014] Preferably, the step of extracting multi-dimensional features from the purified image data through a feature extraction layer, extracting texture features of the carpet material and deep features based on deep learning, and then using a dynamic attention fusion strategy to fuse the two types of features includes the following steps: The purified image data is divided into local regions, and the image is segmented into multiple non-overlapping local image blocks according to a preset grid size, generating a set of local image blocks. Local structural features are extracted from each local image block, and a texture pattern description algorithm is used to capture the spatial distribution relationship of pixels within the image block, generating a local structural feature descriptor. Gray-level distribution analysis is performed on the set of local image blocks, calculating the correlation statistical features of gray-level values within the image blocks, generating gray-level distribution correlation feature parameters. Based on the texture feature template corresponding to the carpet material type, the local structural feature descriptors and gray-level distribution correlation feature parameters of all local image blocks are filtered, retaining effective features highly correlated with the material texture. The filtered effective features are arranged in order according to the spatial position of the local image blocks, generating a global texture feature sequence. The global texture feature sequence is converted into a fixed-dimensional structured texture feature vector using a feature quantization encoding algorithm. The purified image data is input into an improved deep learning feature extraction model. The model strengthens the feature response of the discolored area through an attention module, suppresses invalid features in the normal texture area, and generates a deep feature vector containing semantic information. The structured texture feature vector and the depth feature vector are mapped to the same dimension, and the two types of features are transformed into the same feature space to generate feature pairs of the same dimension. Based on carpet material auxiliary information and preliminary texture analysis results, a feature importance evaluation model is constructed to calculate the feature contribution parameters of the two types of features in different material scenarios. Based on the feature contribution parameter, the attention fusion weight is dynamically adjusted, and the same-dimensional feature pairs are weighted and fused to generate a preliminary fused feature vector. The feature optimization model is invoked to remove redundant information and enhance core features from the preliminary fused feature vector, generating a carpet fusion feature vector with unified dimensions and optimized representation capabilities.
[0015] This invention precisely addresses the shortcomings of traditional solutions, such as single feature representation and poor material adaptability, through multi-dimensional feature extraction and dynamic attention fusion. The purified image is divided into local image blocks, and local structural features and grayscale distribution correlation features are extracted. Effective features are then selected using material texture templates to generate a structured texture feature vector, comprehensively capturing the surface texture details of the carpet material. An improved deep learning model enhances the feature response of discoloration areas through an attention module, generating a deep feature vector containing semantic information to uncover the deep semantic features of carpet discoloration. Dimensionality consistency mapping transforms both types of features into the same space. A feature importance evaluation model is constructed based on material-aided information, dynamically adjusting the fusion weights to achieve precise fusion of texture features and deep features. This preserves the detailed information of the material texture while incorporating deep semantic features, improving the feature adaptability to different materials and discoloration states. The carpet fusion feature vector generated in this step has unified dimensions and strong representational capabilities, effectively distinguishing between genuine carpet discoloration and color differences caused by stains or lighting changes. This overcomes the shortcomings of traditional single features in handling complex scenes, providing high-quality feature support for subsequent accurate identification.
[0016] Preferably, the step of performing dimensionality-consistent mapping on the structured texture feature vector and the depth feature vector to transform the two types of features into the same feature space includes the following steps: The feature dimension identifiers, feature distribution ranges, and semantic association attributes of the structured texture feature vectors and depth feature vectors are extracted respectively to generate a feature attribute description dataset; based on the feature attribute description dataset, a feature space mapping benchmark model is constructed to determine the feature space transformation anchor point parameters of the two types of feature vectors. The feature dimension expansion algorithm is invoked to perform feature interpolation on the feature vector with low dimension, supplement the semantic association of derived feature dimensions, and generate a dimension pre-expanded feature vector. For a pre-expanded feature vector and another feature vector, a feature semantic alignment algorithm is used to mine the semantic mapping relationship between the features and generate a semantic mapping correlation matrix. Based on the semantic mapping correlation matrix, a feature space distortion transformation algorithm is used to adjust the distribution of the feature vectors and generate a space-adapted feature vector. Extract the feature variance parameter and semantic contribution coefficient of the spatially adapted feature vector, and calculate the feature space transformation weight by combining the anchor point parameter of the feature space mapping benchmark model. Based on the feature space transformation weight, perform feature projection transformation on the two types of feature vectors, map them to the preset unified feature space, and generate preliminary same-dimensional feature vector pairs. The initial same-dimensional feature vector pairs are subjected to feature orthogonalization to eliminate redundant feature components between vectors and generate same-dimensional feature pairs with consistent dimensions and independent features.
[0017] This invention comprehensively solves the core problems of dimensional incompatibility and semantic redundancy in traditional feature fusion by using feature space adaptation and orthogonalization. It extracts the dimensional identifiers, distribution ranges, and semantic attributes of two types of features, constructs a feature space mapping benchmark model, and determines the transformation anchor point parameters, providing a scientific basis for feature mapping. For low-dimensional features, dimensional expansion and derivative feature supplementation are performed. Semantic alignment algorithms are used to mine semantic relationships between features, generating a semantic mapping matrix to ensure the semantic consistency of the two types of features. Spatial distortion and projection transformations are employed to accurately map the two types of features to a unified feature space, generating preliminary same-dimensional feature vector pairs. Orthogonalization eliminates redundant components between vectors, ensuring the independence and effectiveness of the features. This step achieves comprehensive adaptation of structured texture features and deep features in terms of dimension, semantics, and spatial distribution, avoiding poor fusion results caused by inconsistent feature dimensions and semantic mismatch, and significantly improving the purity and representational ability of the fused features. Compared to traditional simple splicing or weighted fusion methods, the feature space mapping and orthogonalization process in this step can better highlight the core features related to carpet material and color change, providing key support for the subsequent recognition model to accurately distinguish between real color change and interference factors.
[0018] As a preferred embodiment, the second technical solution of the present invention is: an image recognition device for executing the image recognition method described above. This image recognition system includes a data layer module, a preprocessing layer module, a feature extraction layer module, a recognition layer module, and an application layer module. Each module interacts with the other via a data bus and interface. The data layer module responds to image recognition trigger operations, calls relevant interfaces to collect full image data and auxiliary information, including panoramic images of the vehicle interior, standard sample images, images of interfering scenes, and basic material information, and simultaneously receives manually corrected data for dataset updates. The preprocessing layer module performs denoising, illumination normalization, and semantic segmentation of the carpet area on the full image data to generate purified image data. The feature extraction layer module extracts texture features and deep learning deep features from the purified image data, and generates a carpet fusion feature vector through a dynamic attention fusion strategy. The recognition layer module inputs the fused feature vector into a joint task recognition model to complete material determination, color change classification, and region localization, generating preliminary recognition results and supporting manual correction. The application layer module converts the accurate recognition results into a standardized format, generates recognition report data, pushes it to the target system, and synchronously feeds back iterative data.
[0019] This invention, through modular architecture design and end-to-end collaborative linkage, completely solves the core pain points of traditional image recognition devices, such as poor scene adaptability, weak anti-interference ability, and fragmented recognition process. The data layer module integrates multiple interfaces to collect full image data and auxiliary information, covering real scenes, standard samples, interference scenes, and material information. It also receives manually corrected data to support iteration, laying a comprehensive data foundation for accurate recognition. The preprocessing layer module eliminates environmental interference and accurately extracts the effective area of the carpet through noise reduction, illumination normalization, and semantic segmentation, solving the shortcomings of similar solutions in dealing with illumination and background interference. The feature extraction layer module integrates texture features and deep learning deep features, and uses dynamic attention strategies to strengthen core features, improving the recognition of material and color change features. The recognition layer module integrates material judgment, color change classification, and area localization through a joint task model. Combined with a manual correction mechanism, it effectively distinguishes between real color changes and color differences caused by stains and illumination. The application layer module generates standardized recognition reports to connect with the target system and synchronously feeds back iterative data to form a closed loop. Each module interacts efficiently through the data bus and interface, constructing a complete system of "data-preprocessing-feature extraction-recognition-application". This system is not only adapted to the scenario characteristics of used car carpet color change recognition, but also ensures the accuracy and efficiency of recognition, completely changing the status quo of general recognition devices that are "not suitable for the scenario and have a single recognition dimension".
[0020] As a preferred embodiment, the third technical solution of the present invention is a computer device, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the image recognition method described above.
[0021] This invention, through deep integration of hardware and software in a computer device, precisely addresses the problems of low efficiency, poor stability, and inability to support complex algorithms inherent in traditional solutions. The computer device's memory provides ample and secure storage space for all image data, model files, and auxiliary information, ensuring stable access to data and models and avoiding the inefficiency and data loss risks caused by scattered data storage. The processor, with its powerful computing capabilities, efficiently schedules the core functions of each module, including parallel acquisition of multi-source data, computation of complex preprocessing algorithms, deep feature extraction, and joint task model inference, enabling real-time processing of large-scale data and rapid execution of complex algorithms. Compared to traditional solutions that rely on general-purpose hardware and have insufficient computing power, this computer device provides a dedicated, high-performance operating platform for the used car carpet color-changing recognition method, ensuring refined preprocessing, in-depth feature extraction, and accurate recognition, meeting the core requirements of used car evaluation scenarios for recognition efficiency and stability. Simultaneously, the deep adaptation of hardware and software avoids compatibility issues, ensuring smooth operation and iterative optimization of the entire recognition process, providing solid support for the large-scale application of used car condition detection.
[0022] As a preferred embodiment, the fourth technical solution of the present invention is: a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the image recognition method as described above.
[0023] This invention comprehensively addresses the core pain points of traditional solutions—limited application, poor reusability, and high deployment costs—through program storage and cross-platform adaptation on a computer-readable storage medium. The computer-readable storage medium stably stores the computer program corresponding to the image recognition method, ensuring the program's integrity, security, and portability, avoiding the drawbacks of traditional solutions that rely on specific hardware and are difficult to copy and distribute. The computer program in the storage medium can be read and executed by processors of different types of computer devices, enabling cross-device deployment and reuse of the recognition system across multiple platforms such as used car inspection terminals, cloud servers, and mobile evaluation devices, significantly reducing the barriers and costs of system promotion and application. Whether it's the large-scale operation of large used car inspection agencies or the lightweight use of small evaluation shops, a dedicated carpet color-changing recognition system can be quickly deployed through this storage medium, enjoying accurate and efficient recognition services. This step provides a flexible and convenient storage and dissemination carrier for the used car carpet color-changing recognition method, promoting the large-scale popularization of scenario-based intelligent recognition technology, completely changing the status quo of traditional solutions being "narrow in application scope and difficult to promote," allowing more users to easily improve the accuracy and efficiency of used car condition inspection.
[0024] It has the following beneficial effects: (1) By integrating multiple source interfaces and collecting data from all scenarios, the core pain points of incomplete data coverage and poor scenario adaptability in the identification of carpet color change in used cars are completely solved. By calling the image acquisition and historical storage interfaces, panoramic images of the interior of the car body, standard sample images of multiple materials, and scene images with interference factors such as stains and uneven lighting are collected. Simultaneously, the image acquisition environment parameters and basic information of carpet material are obtained, realizing the comprehensiveness of data and the diversity of scene coverage. Compared with the shortcomings of similar patents that focus on general target recognition and lack the support of interference scene and material information, the full data set generated in this step includes carpet images of different materials and different color change states, as well as interference scenes and key auxiliary information in various practical applications, providing rich materials for the model to learn material differences, interference characteristics and color change rules. By classifying and associating image data with auxiliary information, the correlation and effectiveness of data are ensured, completely changing the status quo of traditional solutions with single data and difficulty in dealing with complex actual scenarios, laying a solid data foundation for subsequent accurate identification.
[0025] (2) Through multi-stage refined purification processing, the technical defects of traditional solutions, such as difficulty in eliminating environmental interference and inaccurate extraction of carpet areas, are accurately solved. A filtering algorithm with a fusion texture preservation mechanism is used for image denoising, which removes noise while preserving the details of carpet fiber texture, avoiding feature loss caused by simple denoising. Based on the collected ambient lighting parameters, the interference of lighting differences under different collection environments is eliminated through lighting component decomposition and dynamic compensation adjustment, solving the problem of color misjudgment caused by uneven lighting. The improved semantic segmentation model strengthens the feature differences between the carpet area and other parts of the vehicle body through the attention gate mechanism, generates accurate carpet area masks, and optimizes the segmentation boundary by combining material texture features to ensure the complete extraction of the effective carpet area. The "denoising-lighting normalization-semantic segmentation" full-process purification system constructed in this step completely eliminates multiple interferences such as noise, lighting, and background, and generates standardized image data containing only the effective carpet area, providing high-purity and high-quality input for subsequent feature extraction and recognition, and greatly improving the anti-interference ability of the recognition model.
[0026] (3) By combining multi-dimensional feature extraction with dynamic attention fusion, the core problems of traditional solutions—namely, single feature representation and difficulty in distinguishing between genuine color changes and interfering factors—are comprehensively solved. Texture features and deep learning features of the carpet material are extracted separately. Texture features capture detailed information such as fiber arrangement and texture on the carpet surface, while deep learning features uncover the deep semantic relationships in the color-changing areas. The two types of features complement each other to form a comprehensive feature representation. A dynamic attention fusion strategy is adopted, adjusting the fusion weights of the two types of features in real time based on the carpet material auxiliary information and preliminary texture analysis results. This strengthens key features related to color change recognition, suppresses irrelevant interfering features, and generates a unified dimensional fusion feature vector with strong representational capabilities. This step overcomes the limitations of traditional single feature extraction, effectively distinguishing between genuine carpet color changes and color differences caused by stains, wear, and changes in lighting. It compensates for the lack of material adaptation and interference differentiation mechanisms in similar patents, providing high-quality feature support for subsequent accurate recognition.
[0027] (4) Integrated recognition is achieved through a joint task recognition model, which completely solves the problems of single recognition dimension and low efficiency in traditional solutions. The carpet fusion feature vector is input into the preset joint task recognition model, which simultaneously completes the carpet material type determination, color change state classification and color change area location, and generates preliminary recognition results including material identification, color change label, area mask and confidence level. It realizes the integrated processing of "material-color change-location" and greatly improves the recognition efficiency. Compared with the limitation of similar patents that can only complete single-category recognition, this model is optimized for the scenario characteristics of used car carpet color change recognition. Through multi-task collaborative training, the accuracy of each recognition task is improved, which can accurately determine the color change state of carpets of different materials and accurately delineate the boundary of the color change area. The generated recognition confidence parameters provide a quantitative basis for subsequent validity verification, ensure the reliability of recognition results, and lay the foundation for subsequent manual correction and accurate application.
[0028] (5) By employing a confidence level verification and manual correction mechanism, the shortcomings of traditional schemes in terms of insufficient reliability and lack of error correction mechanisms are precisely addressed. Preliminary identification results are screened using a pre-set confidence threshold, and low-confidence results trigger a manual interactive correction process. This manual intervention corrects model misjudgments and omissions, ensuring the accuracy of the identification results. This closed-loop error correction system, consisting of "machine recognition - confidence level screening - manual correction," leverages the efficiency of machine recognition while mitigating the model's shortcomings in complex and extreme scenarios through manual intervention. This effectively solves the problem of accurate identification caused by complex carpet materials and diverse interference factors. The manually corrected identification results not only improve the accuracy of single-time identification but also provide high-quality labeled samples for subsequent model iterations, completely changing the traditional scheme's "one-size-fits-all" approach and lack of optimization space, thus ensuring the continuous accuracy of the identification system.
[0029] (6) Through standardized output and closed-loop iterative optimization, the actual application needs of the used car condition inspection scenario are fully met. The recognition results are converted into a standardized format that includes color change judgment, degree classification, range boundary, material type and final confidence level, generating recognition report data that can be directly connected to the vehicle condition inspection system. This achieves seamless connection between the recognition results and the business system, improving the intelligence and efficiency of vehicle condition inspection. At the same time, manually corrected data and recognition feedback information are sent back to the data layer for incremental updates of the dataset and iterative optimization of the recognition model, forming a virtuous cycle of "data collection-recognition-feedback-optimization". This allows the model to continuously learn new material features, interference scenarios and color change rules, and continuously improve recognition accuracy and scenario adaptability. This step not only solves the problem of inconsistent recognition result formats and difficulty in application of traditional solutions, but also ensures the long-term stable recognition performance of the system through iterative optimization mechanism, fully meeting the core needs of the used car evaluation scenario for the accuracy, practicality and sustainability of carpet color change recognition. Attached Figure Description
[0030] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a schematic diagram of the steps of the image recognition method of the present invention; Figure 2 This is a schematic diagram of the overall architecture of the image recognition device of the present invention. Detailed Implementation
[0031] The present invention will be further described below with reference to the accompanying drawings and embodiments, but this should not be construed as limiting the present invention.
[0032] To achieve the above objectives, please refer to Figure 1 Embodiment 1 of the present invention provides an image recognition method, comprising the following steps: S01: Call the image acquisition interface and historical data storage interface to collect full image data and auxiliary information for carpet color change recognition. The full image data includes panoramic images of the vehicle interior, standard sample images of carpets of different materials, and carpet images under various interference scenarios. The auxiliary information includes image acquisition environment parameters and basic information of carpet material. In this embodiment of the invention, panoramic images of the carpet areas inside the vehicle (front, rear, and trunk) in 1920×1080 resolution JPG format are acquired by calling the real-time acquisition interface of the image acquisition device. Simultaneously, ambient lighting parameters (irradiance 300-800 lux, color temperature 4500-6500K) and shooting distance (45-55cm) are recorded. Historical data storage interfaces are used to extract standard sample images of four types of materials: sponge, recycled cotton, regenerated cotton, and non-woven fabric. Each material type covers five states: no discoloration, slight discoloration, moderate discoloration, severe discoloration, and mildew discoloration, and includes complete texture features. Carpet images with stains, wear, uneven lighting, and component obstruction are acquired, and the type and degree of interference are recorded. Material information management interfaces are used to obtain the composition descriptions, texture structure characteristics, and physical property parameters of various carpet types. The image data and auxiliary information are categorized and associated according to material type and acquisition parameters to generate a complete set of image data and auxiliary information, containing 20,000 images and corresponding associated information.
[0033] S02: The full image data is processed through a preprocessing layer to perform multi-stage purification, sequentially completing image denoising, illumination normalization adjustment and carpet area semantic segmentation, generating purified image data containing only the effective area of the carpet. In this embodiment of the invention, multi-stage purification processing is performed on the full image data. A bilateral filtering algorithm with a texture preservation mechanism is used for noise reduction, with a kernel size of 3×3, spatial standard deviation of 5, and grayscale standard deviation of 10, removing noise while preserving fiber texture details. Based on the ambient lighting parameters in the auxiliary information, the Retinex algorithm is used to decompose the lighting and reflection components, generating a set of lighting influence parameters. The average image brightness is uniformly corrected to 128 to eliminate lighting difference interference. The light-normalized image is input into an improved U-Net model, and the carpet region features are enhanced through attention gates, outputting a preliminary mask image. Morphological algorithms are used to optimize edges and correct segmentation deviations by combining material texture features. The light-normalized image and the mask image are matched pixel-level to extract the region within the mask coverage area, removing non-carpet parts, generating purified image data containing only the effective carpet area. The processing time for a single image is ≤0.2 seconds.
[0034] S03: Multi-dimensional feature extraction is performed on the purified image data through the feature extraction layer. The texture features of the carpet material and the deep features based on deep learning are extracted respectively. The dynamic attention fusion strategy is used to fuse the two types of features to generate a carpet fusion feature vector with unified dimensions. In this embodiment of the invention, multi-dimensional features are extracted from the purified image data. The image is divided into local image blocks using a 32×32 grid. A 32-dimensional structural feature descriptor is extracted using the LBP algorithm, and a 16-dimensional grayscale distribution correlation parameter is calculated using the GLCM algorithm. Effective features are selected using a material texture template, and a 256-dimensional structured texture feature vector is generated through bag-of-words encoding. The image is input into an improved ResNet50 model, and the SE attention module enhances the feature response of the color-changing region, generating a 512-dimensional depth feature vector. Dimensionality consistency mapping is performed on the two types of features, extending the texture features to 512 dimensions. The feature contribution under different materials is calculated based on a random forest model, and the fusion weights are dynamically adjusted. A weighted sum is then used to generate a preliminary fusion vector. Redundant information is removed using L1 regularization, and core features are enhanced using the ReLU activation function, generating a 512-dimensional carpet fusion feature vector with unified dimensions.
[0035] S04: The carpet fusion feature vector is input into the preset joint task recognition model through the recognition layer to sequentially complete the carpet material type determination, color change state classification and color change area location, and generate preliminary recognition results. The preliminary recognition results include material type identifier, color change state label, color change area mask and recognition confidence. In this embodiment of the invention, the carpet fusion feature vector is input into a joint "classification + segmentation" task recognition model. The classification branch outputs four material type identifiers (sponge 001, recycled cotton 002, regenerated cotton 003, non-woven fabric 004) and five discoloration status labels (no discoloration 01, slight discoloration 02, moderate discoloration 03, severe discoloration 04, mildew discoloration 05) through a fully connected layer and a Softmax function. The segmentation branch outputs a 1920×1080 resolution discoloration area mask image through transposed convolution, marking the location of discoloration pixels. The model calculates the recognition confidence score, combines the material determination accuracy with the discoloration area segmentation IoU value, and generates a preliminary recognition result, including material type identifiers, discoloration status labels, discoloration area masks, and recognition confidence scores in the 0-100% range. The recognition time for a single image is ≤0.15 seconds.
[0036] S05: Verify the validity of the preliminary identification results, filter low-confidence identification results by combining the preset confidence threshold, trigger the manual interactive correction process, and obtain the manually corrected identification results. In this embodiment of the invention, the validity of the preliminary identification results is verified by setting a confidence threshold of 70%. Low-confidence results (<70%) are filtered out, triggering a manual correction process. Human inspectors view the original image, the cleaned image, and the preliminary identification results through a web interface, correcting material misjudgments, discoloration level deviations, and missed area labeling issues. For example, misidentifying "recycled cotton" as "reclaimed cotton" and supplementing missed local discoloration areas. The system records the manual corrections, generates a correction log, marks the manually corrected identification results as accurate identification results, and simultaneously calculates the final confidence level after correction.
[0037] S06: The recognition results are converted into a standardized data format through the application layer, including the color change judgment result, color change degree classification, color change range boundary information, material type and final confidence level, to generate recognition report data that can be connected to the vehicle condition detection system; the recognition report data is pushed to the target vehicle condition detection system, and the manually corrected data and recognition feedback information are sent back to the data layer for incremental updates of the dataset and iterative optimization of the recognition model.
[0038] In this embodiment of the invention, the accurate recognition results are converted into standardized JSON format data through the application layer. This data includes the color change determination result (Boolean value), color change degree classification (corresponding to 5 levels of labels), color change range boundary information (rectangle coordinates and mask image URL), material type (Chinese name and identification code), and final confidence level. Recognition report data that can be integrated with a vehicle condition inspection system is generated and pushed to the target system via API, automatically written into the used car condition inspection report. Simultaneously, manually corrected data and user feedback (such as evaluations of recognition accuracy) are fed back to the data layer to expand the labeled dataset, providing data support for incremental training of the recognition model and enabling iterative optimization of the model.
[0039] Furthermore, the step of calling the image acquisition interface and historical data storage interface to collect full image data and auxiliary information for carpet color change recognition includes the following steps: Call the real-time acquisition interface of the image acquisition device to obtain panoramic images of the vehicle interior from different angles, and simultaneously record the ambient lighting parameters, shooting distance parameters and device model information during image acquisition, and generate a real-time image dataset with acquisition parameter tags; Call the historical image storage database interface to extract labeled standard sample images of carpets of different materials. The standard sample images cover different discoloration states and complete texture features of carpets of various materials, and generate a set of standard sample images of carpets. Call the interference scene image acquisition interface to acquire carpet images containing interference factors such as stains, wear, uneven lighting, and component occlusion, record the type identification and interference degree description of each interference scene, and generate an interference scene image dataset; Call the material information management interface to obtain the material composition description, texture structure characteristics and physical property parameters of various carpets, and generate a carpet material auxiliary information set; Based on the real-time image dataset, carpet standard sample image set, interference scene image dataset, and carpet material auxiliary information set, the data is classified and associated according to data type. Corresponding material auxiliary information and acquisition parameters are bound to each type of image data to generate an integrated set of full image data and auxiliary information.
[0040] In this embodiment of the invention, the real-time acquisition interface of the image acquisition device installed at the used car inspection station is invoked. The device's shooting angle covers the front carpet, rear carpet, and trunk carpet areas inside the vehicle, acquiring panoramic images in 1920×1080 resolution JPG format. Ambient lighting parameters (e.g., indoor natural light intensity 500 lux, color temperature 5500K), shooting distance parameters (lens distance from carpet surface 50cm), and device model information are recorded simultaneously, generating a real-time image dataset of 2000 images with acquisition parameter labels. The historical image storage database interface is invoked to extract standard sample images of four types of carpet materials—sponge, recycled cotton, regenerated cotton, and non-woven fabric—that have been manually labeled. Each material type includes five states: no discoloration, slight discoloration, moderate discoloration, severe discoloration, and mildew discoloration, covering complete fiber texture features. For example, the undiscolored sponge sample image shows a uniform light gray texture, while the moderately discolored recycled cotton sample image shows a localized yellowish texture, generating a standard carpet sample image set containing 15000 images. The system calls the interference scene image acquisition interface to collect carpet images containing interference factors such as beverage stains, shoe sole wear marks, uneven lighting caused by unilateral strong light, and occlusion by seat bottom parts. It records interference type identifiers (stain 001, wear 002, uneven lighting 003, occlusion 004) and interference severity descriptions (mild / moderate / severe), such as "occlusion 004 - severe - rear carpet occluded by a toolbox with 30% coverage," generating a dataset of 5000 interference scene images. The system then calls the material information management interface to obtain material composition descriptions for four types of carpets (e.g., sponge material contains 80% polyurethane fiber, non-woven fabric contains 75% polyester fiber), texture structure characteristics (dense texture of sponge, sparse mesh texture of non-woven fabric), and physical property parameters (e.g., water absorption performance, color fastness grade), generating a carpet material auxiliary information set. Based on the real-time image dataset, the standard carpet sample image dataset, the interference scene image dataset, and the carpet material auxiliary information dataset, the data is classified and associated according to "image type-material type-acquisition parameters". The real-time image data is bound to the corresponding material components and lighting parameters, the standard sample images are bound to the corresponding texture structure features, and the interference scene images are bound to the corresponding interference types and material attributes. This generates an integrated set of full image data and auxiliary information, containing 22,000 images and associated auxiliary information.
[0041] Furthermore, the multi-stage purification process performed on the full image data through the preprocessing layer, sequentially completing image denoising, illumination normalization adjustment, and semantic segmentation of the carpet region, includes the following steps: Adaptive denoising processing is performed on various types of images in the full image data. A filtering algorithm with a fusion texture preservation mechanism is used to extract carpet fiber texture details while removing image noise, generating a denoised texture-enhanced image. Based on the denoised texture enhancement image and the ambient lighting parameters in the auxiliary information, the lighting component decomposition algorithm is used to separate the lighting influence component and the reflection feature component of the image to generate a set of lighting influence parameters. Based on the set of illumination influence parameters, dynamic illumination compensation and adjustment are performed on the reflection feature components to eliminate the interference of illumination differences under different acquisition environments and generate an illumination-standardized image. The illumination-normalized image is input into the improved semantic segmentation model, which enhances the feature differences between the carpet area and other parts of the vehicle body through an attention gate mechanism, and outputs a preliminary mask image of the carpet area. Based on the texture structure features in the basic information of carpet material, the initial mask image is subjected to edge optimization processing to correct the deviation area of the segmentation boundary and generate a carpet area mask image. The illumination-normalized image is matched pixel-level with the carpet area mask image to extract the image area within the mask coverage area, generating purified image data containing only the effective area of the carpet.
[0042] In this embodiment of the invention, adaptive denoising processing is performed on various types of images in the full image data. A bilateral filtering algorithm with a fusion texture preservation mechanism is adopted, with a filter kernel size of 3×3, spatial standard deviation σd=5, and grayscale standard deviation σr=10. While removing Gaussian noise and environmental particle noise generated by image compression, a texture enhancement algorithm is used to extract the subtle texture features of carpet fibers, such as the dense pore texture of sponge material and the strip fiber texture of recycled cotton, to generate a denoised texture-enhanced image. Based on the denoised texture-enhanced image and the ambient lighting parameters in the auxiliary information, the Retinex illumination component decomposition algorithm is used to decompose the image into illumination influence components and reflection feature components. By calculating the brightness difference of different pixel regions, an illumination influence parameter set is generated (such as a brightness offset value of +30 in strong light areas and a brightness offset value of -25 in shadow areas). Based on the illumination influence parameter set, dynamic illumination compensation adjustment is performed on the reflection feature components. A histogram equalization algorithm is used to uniformly correct the average brightness of images acquired under different environments to 128 (grayscale range 0-255), eliminating interference from uneven brightness caused by unilateral illumination and generating an illumination-standardized image. This ensures that the brightness distribution deviation of images of carpets of the same material without color change is controlled within ±5. The illumination-standardized image is input into an improved U-Net semantic segmentation model. This model adds an attention gate mechanism to the encoder, calculating the texture difference weights between the carpet area and other vehicle body parts such as seats and floors (carpet area feature weights are increased by 30%). This strengthens the edge and texture feature representation of the carpet area, suppresses feature interference from non-carpet areas, and outputs a preliminary mask image of the carpet area. Based on the texture structure features in the carpet material auxiliary information, morphological dilation and erosion algorithms are used to perform edge optimization processing on the preliminary mask image, correcting jagged deviation areas at the segmentation boundaries. For example, for boundary blurring caused by sparse texture of non-woven fabric, the deviation is corrected by shrinking by 0.5 pixels through erosion, generating a carpet area mask image. The illumination-normalized image and the carpet area mask image are matched pixel by pixel. The mask coverage area is compared pixel by pixel (the area with a mask value of 1 is determined as the effective area of the carpet). The image area within the mask coverage area is extracted, and non-carpet areas such as seats and obstructions are removed to generate purified image data containing only the effective area of the carpet. The purification processing time for a single image is controlled within 0.15 seconds.
[0043] Furthermore, the step of performing pixel-level matching between the illumination-normalized image and the carpet area mask image to extract the image region within the mask coverage area includes the following steps: A pixel coordinate system is constructed for the illumination-normalized image, and a unique spatial coordinate identifier is assigned to each pixel to generate a normalized image with coordinate labels; The masked image of the carpet area is parsed to extract the pixel status identifiers and spatial distribution features of the effective mask area, and a mask area attribute dataset is generated. Based on a standardized image and mask region attribute dataset with coordinate labels, a pixel coordinate association mapping is established to generate an image-mask coordinate matching table. According to the image-mask coordinate matching table, the set of target pixel coordinates corresponding to the effective mask region is selected to generate a list of pixel coordinates of the carpet region. Based on the list of pixel coordinates of the carpet area, the pixel value information corresponding to the coordinates is extracted from the standardized image with coordinate labels to generate the original carpet area pixel dataset; edge pixel smoothing processing is performed on the original carpet area pixel dataset, and pixel deviation in the edge transition area is corrected through pixel neighborhood association analysis to generate the smoothed carpet pixel dataset. By combining the texture feature parameters in the basic information of carpet material, the texture consistency of the smoothed carpet pixel dataset is checked, abnormal pixels that do not conform to the material texture features are removed, and a texture-compliant carpet pixel dataset is generated. Based on a texture-compliant carpet pixel dataset, the image data is reconstructed according to the spatial coordinate order of the original image to generate cleaned image data that contains only the effective area of the carpet and has complete texture features.
[0044] In this embodiment of the invention, a pixel coordinate system is constructed from the illumination-normalized image (1920×1080 resolution). A two-dimensional Cartesian coordinate system is used, with the upper left corner of the image as the origin (0,0), the horizontal axis to the right as the x-axis, and the vertical axis downward as the y-axis. Each pixel is assigned a unique spatial coordinate identifier (x∈0-1919, y∈0-1079). For example, the coordinates of the first pixel in the upper left corner of the image are (0,0), and the coordinates of the pixel in the lower right corner are (1919,1079), generating a normalized image with coordinate labels. The masked image of the carpet region is parsed for mask pixel attributes. The masked image has the same resolution as the normalized image, and the pixel status identifier is set to 1 (valid region) or 0 (invalid region). The spatial distribution features of pixels with status identifier 1 (such as the length, width, and area parameters of continuous regions) are extracted to generate a mask region attribute dataset, which includes information such as the coordinate range of valid pixels and the number of regions. Based on a standardized image and mask region attribute dataset with coordinate labels, a pixel coordinate association mapping is established. This binds the coordinate identifier of each pixel in the standardized image to the state identifier of the corresponding coordinate in the mask image, generating an image-mask coordinate matching table. Each record in the table contains a field of "pixel coordinate (x, y) - mask state - association confidence". Based on the image-mask coordinate matching table, a set of target pixel coordinates with a mask state of 1 and an association confidence ≥ 0.95 is selected, generating a list of carpet region pixel coordinates, arranged in ascending order along the x-axis. Based on this coordinate list, the RGB pixel values corresponding to the coordinates are extracted from the standardized image with coordinate labels (e.g., the pixel value at coordinate (100, 200) is (245, 245, 243)), generating the original carpet region pixel dataset. Edge pixel smoothing is performed on the original dataset using a 3×3 neighborhood mean filtering algorithm. The RGB mean of the edge pixel and its eight neighboring pixels is calculated to correct pixel deviations in transition areas. For example, an edge pixel at coordinates (150, 300) has its RGB value corrected from (230, 230, 228) to (235, 235, 233) using neighborhood mean filtering, generating a smoothed carpet pixel dataset. Texture feature parameters from the carpet material's basic information (such as the texture density threshold for sponge materials and the texture gap range for non-woven fabrics) are combined to perform texture consistency verification on the smoothed dataset. The gray-level co-occurrence matrix is used to calculate the texture correlation of pixels, and abnormal pixels with correlation below the threshold (such as isolated high-brightness pixels caused by stains) are removed, generating a texture-compliant carpet pixel dataset. Based on this dataset, image data is reconstructed according to the spatial coordinate order of the original image, ensuring that the spatial position of the pixels is consistent with the original image. This generates cleaned image data containing only the effective area of the carpet and complete texture features, with the reconstruction time for a single image controlled within 0.08 seconds.
[0045] Furthermore, the step of filtering the set of target pixel coordinates corresponding to the effective mask region based on the image-mask coordinate matching table includes the following steps: The image-mask coordinate matching table is structured and parsed to extract pixel coordinate identifiers, mask status markers, and coordinate association confidence parameters to generate a coordinate-mask attribute mapping dataset. Based on the coordinate-mask attribute mapping dataset, the mask status filtering rule engine is called to set the mask valid status judgment conditions and generate valid status filtering parameters. Based on the valid state filtering parameters, the mask state markers in the coordinate-mask attribute mapping dataset are verified one by one to filter out candidate coordinate records that meet the valid state and generate a candidate coordinate dataset; spatial continuity analysis is performed on the candidate coordinate dataset to calculate the spatial distance parameters and connectivity feature values of adjacent coordinate points and generate a coordinate space association parameter set. Based on a coordinate space association parameter set, a region growing algorithm is used to mine connected coordinate regions, generating connected coordinate region clusters and region boundary feature parameters. Specifically, the generation process of the connected coordinate region clusters involves: extracting spatial location features and neighborhood association strength parameters of coordinate points from the coordinate space association parameter set to generate a coordinate point neighborhood association dataset; selecting unlabeled coordinate points as initial growth seed points and extracting the neighborhood connectivity threshold parameter of these seed points; determining the connectivity of neighboring coordinate points based on the neighborhood connectivity threshold parameter, filtering out neighboring coordinate points that meet the connectivity conditions and marking them as members of the same region, generating a temporary region growing set; using the coordinate points in the temporary region growing set as new seed points, iteratively performing neighborhood connectivity determination and region expansion operations until no new coordinate points can be added, generating the final connected coordinate region cluster. By combining the preset shape features and size thresholds of the carpet area, the validity of the connected coordinate region clusters is verified, and invalid region clusters with abnormal area or mismatched shape are removed to generate a set of valid coordinate region clusters. Extract all contained pixel coordinates from the set of valid coordinate region clusters and integrate them to generate an initial list of pixel coordinates for the carpet region. Redundancy is eliminated and the order is optimized from the initial list of pixel coordinates for the carpet area. The coordinate points are then reordered according to the spatial distribution of the image to generate the final list of pixel coordinates for the carpet area.
[0046] In this embodiment of the invention, the image-mask coordinate matching table is structured and parsed to extract the fields "pixel coordinate identifier (x, y) - mask state flag (0 / 1) - coordinate association confidence parameter (0-1)" to generate a coordinate-mask attribute mapping dataset. The dataset is sorted in descending order of coordinate association confidence. Based on this dataset, the mask state filtering rule engine is invoked, and the valid mask state judgment condition is set as "mask state = 1 and association confidence ≥ 0.95". Valid state filtering parameters are generated, clarifying the core threshold and logical relationship for filtering. According to the valid state filtering parameters, each of the 1920×1080 records in the coordinate-mask attribute mapping dataset is verified, and records with a mask state of 0 or a confidence level below 0.95 are removed. Candidate coordinate records that meet the conditions are filtered out, generating a candidate coordinate dataset. For example, the original matching table contains 2,073,600 records, and after filtering, the candidate dataset contains 856,000 records. Spatial continuity analysis is performed on the candidate coordinate dataset. The Euclidean distance parameter (distance ≤ 1 indicates connectivity) and connectivity feature value (number of continuously connected coordinate points) between adjacent coordinate points are calculated to generate a coordinate spatial association parameter set. For example, the Euclidean distance between coordinates (200, 400) and (200, 401) is 1, and the connectivity feature value is marked as "continuous". Based on this parameter set, a region growing algorithm is used to mine connected coordinate regions. Spatial location features and neighborhood association strength parameters (≥0.9 for strong association) of coordinate points are extracted from the parameter set to generate a coordinate point neighborhood association dataset. Unlabeled coordinate points with a neighborhood association strength ≥0.95 (e.g., (100,100)) are selected as initial growth seed points, and the neighborhood connectivity threshold parameter (Euclidean distance ≤1) of the seed point is extracted. Based on this threshold, the connectivity of the seed point's 8 neighboring coordinate points is determined, and neighboring coordinate points that meet the distance condition are selected and marked as members of the same region, generating a temporary set of region growth. The coordinate points in the temporary set are used as new seed points, and the neighborhood connectivity determination and region expansion operation are iteratively executed. The expansion radius is increased by 1 pixel in each iteration until no new coordinate points can be added, generating the final connected coordinate region cluster. Each region cluster contains attributes such as region number, coordinate range, and area. Combining the preset shape characteristics of the carpet area (rectangle or irregular polygon, aspect ratio between 1:3 and 3:1) and size threshold (area ≥ 500 pixels), the validity of connected coordinate region clusters is verified. Small region clusters with an area of 300 pixels (possibly occlusion residue) and abnormally shaped region clusters with an aspect ratio of 1:5 are removed, generating a set of valid coordinate region clusters. All contained pixel coordinates are extracted from this set and categorized and integrated according to "region number - coordinates (x, y)" to generate an initial list of carpet area pixel coordinates. This list includes the boundary coordinates and internal coordinates of the region clusters.Redundancy in the initial list is eliminated by removing duplicate records (such as duplicate coordinates caused by overlapping areas). The coordinate points are then reordered according to the spatial distribution pattern of "increasing x-axis - increasing y-axis under the same x-axis" to ensure the spatial continuity and order of the coordinates. The final list of pixel coordinates for the carpet area is generated in the form of a structured array, which facilitates subsequent pixel extraction and image reconstruction.
[0047] Furthermore, the step of extracting multi-dimensional features from the purified image data through a feature extraction layer, extracting texture features of the carpet material and deep features based on deep learning, and then fusing the two types of features using a dynamic attention fusion strategy includes the following steps: The purified image data is divided into local regions, and the image is segmented into multiple non-overlapping local image blocks according to a preset grid size, generating a set of local image blocks. Local structural features are extracted from each local image block, and a texture pattern description algorithm is used to capture the spatial distribution relationship of pixels within the image block, generating a local structural feature descriptor. Gray-level distribution analysis is performed on the set of local image blocks, calculating the correlation statistical features of gray-level values within the image blocks, generating gray-level distribution correlation feature parameters. Based on the texture feature template corresponding to the carpet material type, the local structural feature descriptors and gray-level distribution correlation feature parameters of all local image blocks are filtered, retaining effective features highly correlated with the material texture. The filtered effective features are arranged in order according to the spatial position of the local image blocks, generating a global texture feature sequence. The global texture feature sequence is converted into a fixed-dimensional structured texture feature vector using a feature quantization encoding algorithm. The purified image data is input into an improved deep learning feature extraction model. The model strengthens the feature response of the discolored area through an attention module, suppresses invalid features in the normal texture area, and generates a deep feature vector containing semantic information. The structured texture feature vector and the depth feature vector are mapped to the same dimension, and the two types of features are transformed into the same feature space to generate feature pairs of the same dimension. Based on carpet material auxiliary information and preliminary texture analysis results, a feature importance evaluation model is constructed to calculate the feature contribution parameters of the two types of features in different material scenarios. Based on the feature contribution parameter, the attention fusion weight is dynamically adjusted, and the same-dimensional feature pairs are weighted and fused to generate a preliminary fused feature vector. The feature optimization model is invoked to remove redundant information and enhance core features from the preliminary fused feature vector, generating a carpet fusion feature vector with unified dimensions and optimized representation capabilities.
[0048] In this embodiment of the invention, the purified image data (1920×1080 resolution) is divided into local regions. The image is segmented into 60×33=1980 non-overlapping local image blocks according to a preset grid size of 32×32 pixels, generating a set of local image blocks, each containing 1024 pixels. Local structural features are extracted from each local image block using the LBP (Local Binary Pattern) texture description algorithm. The sampling radius is set to 1, and the number of neighboring pixels is set to 8. Each pixel is compared with its neighboring pixels to generate a binary code. The frequency of the code is statistically analyzed as a structural feature, generating a 32-dimensional local structural feature descriptor. Gray-level distribution analysis is performed on the set of local image blocks. The GLCM (Gray-Level Co-occurrence Matrix) algorithm is used to calculate four types of correlation statistical features of gray-level values within the image blocks: contrast, correlation, energy, and entropy. The distance d=1 and the angle θ=0° / 45° / 90° / 135° are set to generate 16-dimensional gray-level distribution correlation feature parameters. Based on texture feature templates corresponding to carpet material types (e.g., texture density threshold ≥0.8 for sponge material, texture gap range 0.3-0.5 for non-woven fabric material), features of all local image patches are filtered, retaining valid features with a texture matching degree ≥0.9 and removing invalid features due to interference. The filtered valid features are arranged in order according to the spatial position of local image patches (from left to right, from top to bottom) to generate a global texture feature sequence. The sequence length is the number of valid image patches × 48 dimensions (32+16). The global texture feature sequence is mapped to a 256-dimensional structured texture feature vector using a bag-of-words (BoW) feature quantization encoding algorithm, ensuring that the feature dimension is fixed and the representational ability is consistent. The purified image data is input into an improved ResNet50 deep learning feature extraction model. The model inserts SE attention modules into the residual blocks in stages 3 and 4. Feature dimensions are compressed using global average pooling, and feature weights are calculated using fully connected layers and the Sigmoid activation function. Feature responses in discolored areas (such as yellowing and mold) are enhanced (weights increased by 30%), while invalid features in normal texture areas are suppressed, generating a 512-dimensional deep feature vector containing semantic information. A dimensionality consistency mapping is performed between the 256-dimensional structured texture feature vector and the 512-dimensional deep feature vector, expanding the texture feature vector to 512 dimensions while maintaining the same dimension for the deep feature vector, generating feature pairs of the same dimension. Based on carpet material auxiliary information (such as four types of material attributes including sponge and recycled cotton) and preliminary texture analysis results, a feature importance evaluation model based on random forest is constructed to calculate the feature contribution parameters of the two types of features in different material scenarios (e.g., sponge material texture feature contribution 0.4, deep feature contribution 0.6; non-woven fabric material texture feature contribution 0.5, deep feature contribution 0.5). The attention fusion weights are dynamically adjusted based on the contribution parameter, and the same-dimensional feature pairs are weighted and fused to generate a preliminary 512-dimensional fusion feature vector.The L1 regularization-based feature optimization model is invoked to remove redundant information with feature variance below 0.01. The core feature response is enhanced by the ReLU activation function, generating a carpet fusion feature vector with uniform 512 dimensions and optimized representation capabilities. The time for feature extraction and fusion of a single image is controlled within 0.12 seconds.
[0049] Furthermore, the step of performing dimensionality-consistent mapping on the structured texture feature vector and the depth feature vector to transform the two types of features into the same feature space includes the following steps: The feature dimension identifiers, feature distribution ranges, and semantic association attributes of the structured texture feature vectors and depth feature vectors are extracted respectively to generate a feature attribute description dataset; based on the feature attribute description dataset, a feature space mapping benchmark model is constructed to determine the feature space transformation anchor point parameters of the two types of feature vectors. The feature dimension expansion algorithm is invoked to perform feature interpolation on the feature vector with low dimension, supplement the semantic association of derived feature dimensions, and generate a dimension pre-expanded feature vector. For a pre-expanded feature vector and another feature vector, a feature semantic alignment algorithm is used to mine the semantic mapping relationship between the features and generate a semantic mapping correlation matrix. Based on the semantic mapping correlation matrix, a feature space distortion transformation algorithm is used to adjust the distribution of the feature vectors and generate a space-adapted feature vector. Extract the feature variance parameter and semantic contribution coefficient of the spatially adapted feature vector, and calculate the feature space transformation weight by combining the anchor point parameter of the feature space mapping benchmark model. Based on the feature space transformation weight, perform feature projection transformation on the two types of feature vectors, map them to the preset unified feature space, and generate preliminary same-dimensional feature vector pairs. The initial same-dimensional feature vector pairs are subjected to feature orthogonalization to eliminate redundant feature components between vectors and generate same-dimensional feature pairs with consistent dimensions and independent features.
[0050] In this embodiment of the invention, feature dimension identifiers (texture features D1-D256, depth features F1-F512), feature distribution ranges (texture feature values 0-1, depth feature values 0-2), and semantic association attributes (texture features are associated with "fiber arrangement" and "roughness", depth features are associated with "color deviation" and "regional mold") are extracted from the 256-dimensional structured texture feature vector and the 512-dimensional depth feature vector, respectively, to generate a feature attribute description dataset. Based on this dataset, a feature space mapping benchmark model based on principal component analysis (PCA) is constructed. 100 feature points with high semantic correlation between the two types of features (such as "fiber gap" in texture features and "regional color difference" in depth features) are selected as spatial transformation anchor point parameters to determine the core correspondence of the feature mapping. A cubic polynomial interpolation feature dimension expansion algorithm is called to perform feature interpolation on the 256-dimensional structured texture feature vector. For each original feature dimension, a derived feature dimension is added based on semantic association attributes (such as "density uniformity" derived from "fiber density"), expanding the texture feature vector to 512 dimensions and generating a dimension-pre-expanded feature vector. For a 512-dimensional pre-expanded feature vector and a 512-dimensional deep feature vector, cosine similarity is used to mine the semantic mapping relationship between features, generating a 512×512-dimensional semantic mapping association matrix. The matrix element values represent the semantic similarity (range 0-1) of the corresponding feature dimensions. Based on this association matrix, a thin-plate spline interpolation feature space distortion transformation algorithm is used to adjust the distribution of the pre-expanded feature vector to make it consistent with the distribution of the deep feature vector, generating spatially adapted feature vectors. The feature variance parameters (target variance 0.5-1.5) and semantic contribution coefficients (≥0.3 for effective contribution) of the spatially adapted feature vector and the deep feature vector are extracted. Combined with the anchor point parameters of the feature space mapping benchmark model, the feature space transformation weights are calculated using the least squares method (anchor point feature weight 0.8, non-anchor point feature weight 0.2). Based on the transformation weights, orthogonal projection transformation is performed on the two types of feature vectors to map them to a preset 512-dimensional unified feature space, ensuring that the feature distribution range is uniformly 0-1, generating preliminary same-dimensional feature vector pairs. Gram-Schmidt orthogonalization is performed on the initial same-dimensional feature vector pairs. The covariance matrix between the vectors is calculated, and redundant feature components with an absolute covariance value ≥ 0.7 are removed to generate 512-dimensional feature pairs with consistent dimensions and independent features. The linear correlation between features is reduced to below 0.1.
[0051] Furthermore, embodiment two of the present invention also provides an image recognition device, such as... Figure 2As shown, the image recognition system used to execute the image recognition method described above includes a data layer module, a preprocessing layer module, a feature extraction layer module, a recognition layer module, and an application layer module. Each module interacts with the other via a data bus and interface. The data layer module responds to image recognition trigger operations, calls relevant interfaces to collect full image data and auxiliary information, including panoramic images of the vehicle interior, standard sample images, images of interference scenes, and basic material information, and simultaneously receives manually corrected data for dataset updates. The preprocessing layer module performs denoising, illumination normalization, and semantic segmentation of the carpet area on the full image data to generate purified image data. The feature extraction layer module extracts texture features and deep learning features from the purified image data, generating a carpet fusion feature vector through a dynamic attention fusion strategy. The recognition layer module inputs the fused feature vector into a joint task recognition model to complete material determination, color change classification, and region localization, generating preliminary recognition results and supporting manual correction. The application layer module converts the accurate recognition results into a standardized format, generates recognition report data, pushes it to the target system, and synchronously feeds back iterative data.
[0052] In this embodiment of the invention, the image recognition device includes a data layer module, a preprocessing layer module, a feature extraction layer module, a recognition layer module, and an application layer module. Each module achieves high-speed data interaction (transmission latency ≤10ms) through a PCIe data bus and a RESTful API interface. The data layer module responds to image recognition trigger operations at the used car inspection station (such as the inspector pressing the acquisition button), calling the real-time acquisition interface of the image acquisition device, the historical image storage database interface, the interference scene image acquisition interface, and the material information management interface to acquire panoramic images of the vehicle interior, standard carpet sample images, interference scene images, and basic material information, forming a complete set of image data and auxiliary information. Simultaneously, it receives manually corrected data (such as manually labeled information for low-confidence results) from the application layer module for incremental updates of the dataset. The preprocessing layer module receives the full image data transmitted from the data layer module and sequentially performs bilateral filtering denoising (kernel size 3×3, σd=5, σr=10) with a texture preservation mechanism, Retinex illumination normalization adjustment (brightness mean is unified to 128), improved U-Net semantic segmentation (attention gate enhances carpet region features), and pixel-level matching extraction operations to generate purified image data containing only the effective carpet region. This data is then pushed to the feature extraction layer module via the data bus. The feature extraction layer module receives the purified image data and performs local region segmentation, texture feature extraction (LBP+GLCM), depth feature extraction (improved ResNet50+SE), feature dimension consistency mapping (step S16), and dynamic attention fusion operations according to step S15. This generates a 512-dimensional carpet fusion feature vector, which is then pushed to the recognition layer module. The recognition layer module integrates feature vector inputs into a joint "classification + segmentation" recognition model. The classification branch outputs material type (4 categories) and color change level (5 levels) through a fully connected layer + Softmax, while the segmentation branch outputs a color change area mask image through transposed convolution, generating preliminary recognition results. If the recognition confidence is <70%, the results are pushed to the application layer module for manual correction. The manually corrected data is synchronously sent back to the data layer module and the feature extraction layer module for incremental model training. The application layer module receives the accurate recognition results from the recognition layer module, converts them into a standardized JSON format, including fields such as "material type," "color change," "color change level," "color change area boundary coordinates," and "confidence," and generates recognition report data. This data is pushed to the used car condition inspection system via API and automatically written into the inspection report. Simultaneously, customer feedback data (such as "accurate recognition" and "missed area markings") and manually corrected content are recorded and fed back to the data layer module via a data bus for iterative optimization of the dataset and model parameters, achieving a closed-loop iteration of "data-model-result."
[0053] Furthermore, Embodiment 3 of the present invention also provides a computer device, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the image recognition method described above.
[0054] Furthermore, Embodiment 4 of the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the image recognition method described above.
[0055] Therefore, the embodiments should be considered as exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of the equivalents of the application are intended to be included within the invention.
[0056] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features of the invention herein.
Claims
1. An image recognition method, characterized in that, Includes the following steps: The image acquisition interface and historical data storage interface are called to collect full image data and auxiliary information for carpet color change recognition. The full image data includes panoramic images of the vehicle interior, standard sample images of carpets of different materials, and carpet images under various interference scenarios. The auxiliary information includes image acquisition environment parameters and basic carpet material information. The full image data is processed through a preprocessing layer to perform multi-stage purification, including image denoising, illumination normalization adjustment and carpet area semantic segmentation, generating purified image data containing only the effective area of the carpet. Multi-dimensional feature extraction is performed on the purified image data through the feature extraction layer, extracting the texture features of the carpet material and the deep features based on deep learning respectively. A dynamic attention fusion strategy is used to fuse the two types of features to generate a carpet fusion feature vector with unified dimensions. The carpet's fused feature vector is input into a preset joint task recognition model through the recognition layer, and the carpet material type determination, discoloration state classification, and discoloration area location are completed in sequence to generate preliminary recognition results. The preliminary recognition results include material type identifier, discoloration state label, discoloration area mask, and recognition confidence. The initial identification results are validated, and low-confidence identification results are filtered out by combining the preset confidence threshold. The manual interactive correction process is triggered to obtain the manually corrected identification results. The recognition results are converted into a standardized data format through the application layer, including color change judgment results, color change degree classification, color change range boundary information, material type and final confidence level, and generate recognition report data that can be connected to the vehicle condition detection system. The identification report data is pushed to the target vehicle condition detection system, while the manually corrected data and identification feedback information are sent back to the data layer for incremental updates of the dataset and iterative optimization of the identification model.
2. The image recognition method according to claim 1, characterized in that, The process of calling the image acquisition interface and historical data storage interface to collect full image data and auxiliary information for carpet color change recognition includes the following steps: Call the real-time acquisition interface of the image acquisition device to obtain panoramic images of the vehicle interior from different angles, and simultaneously record the ambient lighting parameters, shooting distance parameters and device model information during image acquisition, and generate a real-time image dataset with acquisition parameter tags; Call the historical image storage database interface to extract labeled standard sample images of carpets of different materials. The standard sample images cover different discoloration states and complete texture features of carpets of various materials, and generate a set of standard sample images of carpets. Call the interference scene image acquisition interface to acquire carpet images containing interference factors such as stains, wear, uneven lighting, and component occlusion, record the type identification and interference degree description of each interference scene, and generate an interference scene image dataset; Call the material information management interface to obtain the material composition description, texture structure characteristics and physical property parameters of various carpets, and generate a carpet material auxiliary information set; Based on the real-time image dataset, carpet standard sample image set, interference scene image dataset, and carpet material auxiliary information set, the data is classified and associated according to data type. Corresponding material auxiliary information and acquisition parameters are bound to each type of image data to generate an integrated set of full image data and auxiliary information.
3. The image recognition method according to claim 1, characterized in that, The process of performing multi-stage purification on the full image data through a preprocessing layer, sequentially completing image denoising, illumination normalization adjustment, and semantic segmentation of the carpet region, includes the following steps: Adaptive denoising processing is performed on various types of images in the full image data. A filtering algorithm with a fusion texture preservation mechanism is used to extract carpet fiber texture details while removing image noise, generating a denoised texture-enhanced image. Based on the denoised texture enhancement image and the ambient lighting parameters in the auxiliary information, the lighting component decomposition algorithm is used to separate the lighting influence component and the reflection feature component of the image to generate a set of lighting influence parameters. Based on the set of illumination influence parameters, dynamic illumination compensation and adjustment are performed on the reflection feature components to eliminate the interference of illumination differences under different acquisition environments and generate an illumination-standardized image. The illumination-normalized image is input into the improved semantic segmentation model, which enhances the feature differences between the carpet area and other parts of the vehicle body through an attention gate mechanism, and outputs a preliminary mask image of the carpet area. Based on the texture structure features in the basic information of carpet material, the initial mask image is subjected to edge optimization processing to correct the deviation area of the segmentation boundary and generate a carpet area mask image. The illumination-normalized image is matched pixel-level with the carpet area mask image to extract the image area within the mask coverage area, generating purified image data containing only the effective area of the carpet.
4. The image recognition method according to claim 3, characterized in that, The step of performing pixel-level matching between the illumination-normalized image and the carpet area mask image to extract the image region within the mask coverage area includes the following steps: A pixel coordinate system is constructed for the illumination-normalized image, and a unique spatial coordinate identifier is assigned to each pixel to generate a normalized image with coordinate labels; The masked image of the carpet area is parsed to extract the pixel status identifiers and spatial distribution features of the effective mask area, and a mask area attribute dataset is generated. Based on a standardized image and mask region attribute dataset with coordinate labels, a pixel coordinate association mapping is established to generate an image-mask coordinate matching table. According to the image-mask coordinate matching table, the set of target pixel coordinates corresponding to the effective mask region is selected to generate a list of pixel coordinates of the carpet region. Based on the list of pixel coordinates of the carpet area, the pixel value information corresponding to the coordinates is extracted from the standardized image with coordinate labels to generate the original carpet area pixel dataset; edge pixel smoothing processing is performed on the original carpet area pixel dataset, and pixel deviation in the edge transition area is corrected through pixel neighborhood association analysis to generate the smoothed carpet pixel dataset. By combining the texture feature parameters in the basic information of carpet material, the texture consistency of the smoothed carpet pixel dataset is checked, abnormal pixels that do not conform to the material texture features are removed, and a texture-compliant carpet pixel dataset is generated. Based on a texture-compliant carpet pixel dataset, the image data is reconstructed according to the spatial coordinate order of the original image to generate cleaned image data that contains only the effective area of the carpet and has complete texture features.
5. The image recognition method according to claim 4, characterized in that, The step of filtering the set of target pixel coordinates corresponding to the effective mask region based on the image-mask coordinate matching table includes the following steps: The image-mask coordinate matching table is structured and parsed to extract pixel coordinate identifiers, mask status markers, and coordinate association confidence parameters to generate a coordinate-mask attribute mapping dataset. Based on the coordinate-mask attribute mapping dataset, the mask status filtering rule engine is called to set the mask valid status judgment conditions and generate valid status filtering parameters. Based on the valid state filtering parameters, the mask state markers in the coordinate-mask attribute mapping dataset are verified one by one to filter out candidate coordinate records that meet the valid state and generate a candidate coordinate dataset; spatial continuity analysis is performed on the candidate coordinate dataset to calculate the spatial distance parameters and connectivity feature values of adjacent coordinate points and generate a coordinate space association parameter set. Based on a coordinate space association parameter set, a region growing algorithm is used to mine connected coordinate regions, generating connected coordinate region clusters and region boundary feature parameters. Specifically, the generation process of the connected coordinate region clusters involves: extracting spatial location features and neighborhood association strength parameters of coordinate points from the coordinate space association parameter set to generate a coordinate point neighborhood association dataset; selecting unlabeled coordinate points as initial growth seed points and extracting the neighborhood connectivity threshold parameter of these seed points; determining the connectivity of neighboring coordinate points based on the neighborhood connectivity threshold parameter, filtering out neighboring coordinate points that meet the connectivity conditions and marking them as members of the same region, generating a temporary region growing set; using the coordinate points in the temporary region growing set as new seed points, iteratively performing neighborhood connectivity determination and region expansion operations until no new coordinate points can be added, generating the final connected coordinate region cluster. By combining the preset shape features and size thresholds of the carpet area, the validity of the connected coordinate region clusters is verified, and invalid region clusters with abnormal area or mismatched shape are removed to generate a set of valid coordinate region clusters. Extract all contained pixel coordinates from the set of valid coordinate region clusters and integrate them to generate an initial list of pixel coordinates for the carpet region. Redundancy is eliminated and the order is optimized from the initial list of pixel coordinates for the carpet area. The coordinate points are then reordered according to the spatial distribution of the image to generate the final list of pixel coordinates for the carpet area.
6. The image recognition method according to claim 1, characterized in that, The step of extracting multi-dimensional features from the purified image data through a feature extraction layer, extracting texture features of the carpet material and deep features based on deep learning, and then using a dynamic attention fusion strategy to fuse the two types of features includes the following steps: The purified image data is divided into local regions, and the image is segmented into multiple non-overlapping local image blocks according to a preset grid size, generating a set of local image blocks. Local structural features are extracted from each local image block, and a texture pattern description algorithm is used to capture the spatial distribution relationship of pixels within the image block, generating a local structural feature descriptor. Gray-level distribution analysis is performed on the set of local image blocks, calculating the correlation statistical features of gray-level values within the image blocks, generating gray-level distribution correlation feature parameters. Based on the texture feature template corresponding to the carpet material type, the local structural feature descriptors and gray-level distribution correlation feature parameters of all local image blocks are filtered, retaining effective features highly correlated with the material texture. The filtered effective features are arranged in order according to the spatial position of the local image blocks, generating a global texture feature sequence. The global texture feature sequence is converted into a fixed-dimensional structured texture feature vector using a feature quantization encoding algorithm. The purified image data is input into an improved deep learning feature extraction model. The model strengthens the feature response of the discolored area through an attention module, suppresses invalid features in the normal texture area, and generates a deep feature vector containing semantic information. The structured texture feature vector and the depth feature vector are mapped to the same dimension, and the two types of features are transformed into the same feature space to generate feature pairs of the same dimension. Based on carpet material auxiliary information and preliminary texture analysis results, a feature importance evaluation model is constructed to calculate the feature contribution parameters of the two types of features in different material scenarios. Based on the feature contribution parameter, the attention fusion weight is dynamically adjusted, and the same-dimensional feature pairs are weighted and fused to generate a preliminary fused feature vector. The feature optimization model is invoked to remove redundant information and enhance core features from the preliminary fused feature vector, generating a carpet fusion feature vector with unified dimensions and optimized representation capabilities.
7. The image recognition method according to claim 6, characterized in that, The step of performing dimensionality-consistent mapping on the structured texture feature vector and the depth feature vector to transform the two types of features into the same feature space includes the following steps: The feature dimension identifiers, feature distribution ranges, and semantic association attributes of the structured texture feature vectors and depth feature vectors are extracted respectively to generate a feature attribute description dataset; based on the feature attribute description dataset, a feature space mapping benchmark model is constructed to determine the feature space transformation anchor point parameters of the two types of feature vectors. The feature dimension expansion algorithm is invoked to perform feature interpolation on the feature vector with low dimension, supplement the semantic association of derived feature dimensions, and generate a dimension pre-expanded feature vector. For a pre-expanded feature vector and another feature vector, a feature semantic alignment algorithm is used to mine the semantic mapping relationship between the features and generate a semantic mapping correlation matrix. Based on the semantic mapping correlation matrix, a feature space distortion transformation algorithm is used to adjust the distribution of the feature vectors and generate a space-adapted feature vector. Extract the feature variance parameter and semantic contribution coefficient of the spatially adapted feature vector, and calculate the feature space transformation weight by combining the anchor point parameter of the feature space mapping benchmark model. Based on the feature space transformation weight, perform feature projection transformation on the two types of feature vectors, map them to the preset unified feature space, and generate preliminary same-dimensional feature vector pairs. The initial same-dimensional feature vector pairs are subjected to feature orthogonalization to eliminate redundant feature components between vectors and generate same-dimensional feature pairs with consistent dimensions and independent features.
8. An image recognition device, characterized in that, To execute the image recognition method as described in claim 1, the image recognition system includes a data layer module, a preprocessing layer module, a feature extraction layer module, a recognition layer module, and an application layer module. Each module interacts with the other via a data bus and interface. The data layer module responds to image recognition trigger operations, calls relevant interfaces to collect full image data and auxiliary information, including panoramic images of the vehicle interior, standard sample images, images of interfering scenes, and basic material information. It also receives manually corrected data for dataset updates. The preprocessing layer module performs denoising, illumination normalization, and semantic segmentation of the carpet area on the full image data to generate purified image data. The feature extraction layer module extracts texture features and deep learning features from the purified image data, generating a carpet fusion feature vector through a dynamic attention fusion strategy. The recognition layer module inputs the fused feature vector into a joint task recognition model to complete material determination, color change classification, and region localization, generating preliminary recognition results and supporting manual correction. The application layer module is used to convert the accurate recognition results into a standardized format, generate recognition report data and push it to the target system, and synchronously provide feedback on iterative data.
9. A computer device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the image recognition method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the image recognition method as described in any one of claims 1-7.
Citation Information
Patent Citations
Image recognition methods, devices, computer equipment, and storage media
CN112712066B