Intelligent sound box assembly defect intelligent identification system and identification method
By employing a closed-loop process involving image acquisition and a lightweight convolutional neural network, the problems of low detection efficiency and insufficient accuracy during the assembly of smart speakers are solved, achieving efficient and low-cost defect identification, which is suitable for compact electronic products such as smart speakers.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-24
- Publication Date
- 2026-04-10
AI Technical Summary
Existing technologies suffer from low detection efficiency, insufficient accuracy, and high cost during the assembly of smart speakers, especially in the case of complex lighting conditions where it is difficult to accurately identify minute defects.
By adopting a closed-loop process of image acquisition, target localization, AI defect detection, defect information labeling, storage and alarm, combined with template matching algorithm and lightweight convolutional neural network, the system can automatically identify and provide real-time feedback on various defects during the assembly of smart speakers.
It achieves high-precision, low-cost automated quality inspection with an identification accuracy rate of 99.2% and a single-piece inspection time of less than 300ms, meeting production line requirements and significantly reducing hardware costs.
Smart Images

Figure CN121837733A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of intelligent manufacturing and machine vision detection, and particularly relates to an intelligent identification system and method for assembly defects of an intelligent sound box. BACKGROUND
[0002] With the continuous enrichment of the functions of intelligent sound boxes, the internal structure and assembly process thereof are increasingly complex, and a large number of manual operation links are involved in the production process, such as attaching components, locking screws, welding sequences, inserting wire harnesses and buckling buckles, etc. In the actual assembly process, the operators often cause assembly defects such as missing labels, missing screws, wrong sequence welding, wire harnesses not inserted in place, buckles not buckled, etc. due to fatigue, negligence or experience differences. At present, such defects are mainly identified by manual visual inspection, but this method has problems such as low detection efficiency, poor consistency, and easy interference by subjective factors, which is difficult to meet the needs of modern intelligent manufacturing with high rhythm and high quality. The resulting defective products not only cause customer complaints, but also seriously damage the brand image and economic benefits of the enterprise.
[0003] In order to improve the automation level of detection, industrial vision technology has been gradually introduced into the field of assembly quality detection. The existing visual detection methods mainly include traditional image processing technology and intelligent recognition technology based on deep learning. The traditional visual method relies on high-precision optical imaging systems, extracts defect features through customized light sources, high-resolution cameras and complex image preprocessing algorithms, and although it has high detection accuracy in specific scenarios, it is difficult to adapt to the actual working conditions of complex internal structure of sound boxes, uneven lighting, small and diverse target objects, and the high hardware cost is not conducive to large-scale deployment. On the other hand, although the deep learning method has strong adaptability to imaging environment and can handle target recognition tasks in complex backgrounds, it is often difficult to ensure sufficient recognition accuracy and stability due to the limitations of training data volume, model generalization ability and labeling precision, especially in the context of sound box assembly with multiple components, high density and low contrast. Direct end-to-end training of the entire image may lead to insufficient effective feature information due to the small proportion of target regions, making the model difficult to converge or having a high false detection rate.
[0004] Therefore, an intelligent recognition scheme that takes into account detection accuracy, system cost and running efficiency can accurately locate and identify various small defects in the assembly process of sound boxes without relying on complex optical systems, realize real-time interception and feedback of defective products, and thus improve the product quality control level and support the efficient and stable operation of intelligent manufacturing lines. SUMMARY
[0005] The present application aims at the problems of high missing rate, low detection efficiency and poor consistency caused by relying on manual visual inspection in the existing smart speaker assembly process, and overcomes the technical defects of traditional machine vision detection which has strict requirements on optical environment and the insufficient recognition accuracy of end-to-end deep learning model in complex small target scene, and provides a smart speaker assembly defect intelligent identification system and method. The system realizes automatic identification, accurate positioning and real-time feedback of various defects in the smart speaker assembly process by building a closed-loop process of "image acquisition-target positioning-AI defect detection-defect information labeling-storage and alarm", which meets the needs of low-cost, high-precision and high-efficiency automatic quality inspection of production line.
[0006] The present application also provides a smart speaker assembly defect intelligent identification method, which comprises the following steps: obtaining the original image of the smart speaker to be detected; target region rough positioning and target segmentation; inputting each target sub-image into a lightweight convolutional neural network model pre-trained for each target object to obtain the defect judgment result of each target object; mapping the defect judgment result of each target object back to the coordinate system of the original image, and generating a labeled image containing the defect position and type on the original image; performing image classification storage, detection data statistics according to the defect judgment result, and triggering the alarm mechanism when defects are found; wherein the target region rough positioning and target segmentation comprises: based on the template matching algorithm, using the stable product geometric features in the original image to globally position the whole machine product, and establishing a product coordinate system; determining the rough coordinate range of each target object in the original image according to the relative position relationship between the pre-calibrated product coordinate system and each target to be detected; according to the rough coordinate range, cutting out the corresponding target sub-image from the original image.
[0007] Further, the template matching algorithm is used to globally position the whole machine product based on the stable product geometric features in the original image, and a product coordinate system is established, comprising: template preparation: selecting a qualified reference product for assembly, and selecting one or more regions with significant and stable geometric features in the original image I of the reference product as a template T; matching search: for each frame of collected original image I to be detected, a normalized cross-correlation algorithm is used to search for the most similar region to the template T in the original image I; position and angle solving: rotating the template T by θ to obtain T θRecalculate its NCC map with image I; find the parameter combination that makes the NCC value R θ (x, y) globally maximum The point is the positioning result of the product in the image, and a product coordinate system with the origin at and the angle of is established.
[0008] Further, the construction of the lightweight convolutional neural network model includes the following steps: Select a lightweight backbone network, remove its original classification head and replace it with a structure containing global average pooling and two-dimensional fully connected layer, modify it into a binary classifier, and use the pre-trained weights on the ImageNet dataset for transfer learning; Each target subgraph is labeled with a binary label y∈{0,1}, where 0 represents a good product and 1 represents a bad product; during training, the input subgraph batch is subjected to online augmentation transformation in real time; Use the cross-entropy loss function, use the Adam optimizer for training, and use the cosine annealing strategy to decay the learning rate during training; after each training round, evaluate the model performance on an independent validation set, and the main monitoring indicators are accuracy and loss value; when the validation set accuracy no longer significantly improves, save the model weight file with the best performance on the validation set and stop training in advance; Perform dynamic quantization or post-training static quantization on the trained floating-point model, convert the quantized PyTorch or TensorFlow model to an intermediate format or engine file suitable for the target deployment platform using the inference framework, and perform synchronous parallel inference on the multiple subgraphs obtained by cropping according to the target type corresponding to the subgraph.
[0009] Further, the calculation formula of the cross-entropy loss function L is: ; Where y c is the one-hot encoding true label of the sample belonging to class c, and p c is the Softmax probability of the model predicting that the sample belongs to class c.
[0010] Further, the learning rate is decayed using the cosine annealing strategy during training, and the decay formula is: ; Where, is the learning rate of the current training round, is the initial learning rate, t is the current training round, and T max is the total training round.
[0011] Further, the mapping of the defect determination result of each target object back into the coordinate system of the original image and the generation of a labeled image containing defect positions and types on the original image include: An initial list containing determination results of all target objects is received, and each element in the initial list corresponds to a target object. Each element in the initial list is traversed to filter out all target items with a determination state of “defective product” to form a defect list to be labeled. The defect positions in the defect list are mapped from the sub-image to the original image. The coordinates and type information of all defects are obtained, and a label layer is superimposed on the original image to generate a visual label.
[0012] Further, the initial list contains a preset field. The preset field includes a target unique identifier, a determination state, a confidence score, and the cropping coordinates of the target sub-image in the original image.
[0013] Further, the mapping of the defect positions in the defect list from the sub-image to the original image includes: For a single target, the defect is assumed to be located in the center region of the sub-image, and the center coordinates of the defect after mapping to the original image are : ; ; wherein, is the coordinate of the upper left corner of the sub-image in the original image, and w and h are the width and height of the sub-image, respectively. For a multi-target combination, a local coordinate mapping table inside the sub-image is defined in advance, and when the multi-target combination is determined to be “defective product”, the coordinates of each sub-target in the original image are calculated according to the local coordinate mapping table : ; ; wherein, is the center coordinate of the sub-image in the original image, is the local offset of the preset center point of the kth sub-target relative to the center of the sub-image.
[0014] Further, the execution of image classification storage, detection data statistics, and triggering of an alarm mechanism when a defect is determined to exist according to the defect determination result includes: The defect determination result and the labeled image are received, and automatic archiving is performed. The detection results are continuously aggregated to generate production quality data: When there is a defect in the defect judgment result, an alarm process is triggered.
[0015] Another object of the present application is to provide an intelligent speaker assembly defect intelligent identification system for executing the intelligent speaker assembly defect intelligent identification method as described above, the system comprising: An image acquisition module for acquiring an original image of a smart speaker semi-finished product to be detected; A detection target positioning module for performing product global positioning, target area coarse positioning and target segmentation; an AI defect detection module comprising a plurality of lightweight convolutional neural network models for defect identification on a target subgraph; An image defect information calibration module for visualizing and labeling the identification result on the original image; A storage control and alarm module for data storage, statistics and alarm response.
[0016] Compared with the prior art, the intelligent speaker assembly defect intelligent identification system and identification method of the present application has the beneficial effects that: through the technical path of "spatial decoupling + modular identification + result fusion", the complex defect detection problem at the whole machine level is decomposed into multiple independent and focused subtasks. Each subtask corresponds to a physical target and its specific defect mode, the input data is a small graph with high signal-to-noise ratio, the model structure is lightweight, and the inference is efficient. This scheme avoids the gradient sparsity and feature flooding problems caused by the low target pixel ratio of the full-image deep learning model, and at the same time, it gets rid of the dependence of traditional visual methods on high-contrast images. The system has an identification accuracy of more than 99.2% for key defects such as presence or absence of screws, buckle state, and wire insertion in a typical production line environment, and the single-piece detection time is less than 300ms, meeting the assembly line requirement of a 2-second beat time. The hardware configuration only needs an ordinary industrial camera, a ring LED light source and a mid-end industrial computer, without the need for a high-frame-rate camera, a precision light source controller or a special AI acceleration card, significantly reducing the deployment cost. The system only needs to supplement the corresponding subgraph samples and train a new model when a new detection target is added, without changing the original module, and has good scalability and engineering practicability, and is suitable for automatic quality inspection scenes of electronic products such as smart speakers, Bluetooth earphones, smart home central control panels and other compact and complex assembly processes. BRIEF DESCRIPTION OF DRAWINGS
[0017] Fig. 1 The flowchart of the embodiment of the present application; Fig. 2 The flowchart of the target area coarse positioning and target segmentation in the embodiment of the present application; Fig. 3 The system block diagram of the identification system in the embodiment of the present application. DETAILED DESCRIPTION
[0018] Embodiment one: In order to make the above objects, features and advantages of the present application more apparent, the specific embodiments of the present application will be described in detail below with reference to the accompanying drawings. In the following description, a large number of specific details are set forth in order to provide a thorough understanding of the present application. However, the present application can be practiced in many different ways from those described herein, and one of skill in the art can make similar improvements without departing from the scope of the present application, so the present application is not limited to the specific embodiments disclosed below.
[0019] Reference should be made to Figs. 1-3 The embodiment provides a kind of smart speaker assembly defect intelligent identification system, including the image acquisition module, detection target positioning module, AI defect detection module, image bad information calibration module and storage control and alarm module connected in sequence.The system is deployed in the final inspection station of smart speaker assembly production line, for after product completes key assembly step (such as screw lock, wire insertion, buckle closure, welding point welding etc.), it is automatically detected whether there is missing, wrong installation, not in place etc. Human defects are fed back to operating personnel in real time for intervention.
[0020] The identification method realized based on the above-mentioned intelligent smart speaker assembly defect intelligent system, comprising the following steps: Step S1, the original image of the smart speaker to be detected is acquired by using the image acquisition module. The image acquisition module is composed of an industrial camera, a lens, a simple light source and a processing terminal; the industrial camera is fixed above the production line station for shooting the top view or side view image of the semi-finished product to be detected; the lens is a fixed focus lens, and the focal length is matched according to the detection distance and the target size; the simple light source adopts a ring-shaped LED light source, which is arranged around the camera lens for providing uniform illumination to make the target component have clear outline and identifiable features in the image; the processing terminal is an industrial computer or PC, which is configured with an image acquisition card and image processing software for receiving and caching original image data. This module does not require high contrast, no reflection or special lighting conditions, only the target area in the image must have basic identifiable geometric features (such as screw holes, buckle seats, circuit board edges, etc.), so as to reduce the hardware cost and improve the adaptability of on-site deployment.
[0021] Step S2, the detection target positioning module executes three-stage positioning strategy of product global positioning, target area rough positioning and target segmentation. Specifically, it includes: Step S21, product global positioning: based on template matching algorithm, the stable product geometric features in the original image are used to globally position the whole machine product, and the product coordinate system is established.
[0022] Specifically, during system initialization, several completed standard assembly speaker samples are selected, and several stable and less likely to be blocked geometric feature points are labeled in the original image, such as the positioning holes at the four corners of the main control board, the metal card slots on both sides of the power interface, or the right-angle edges of the loudspeaker fixing frame. These feature points form a reference template, and the normalized cross correlation (NCC) algorithm is used to calculate the best matching position of the reference template in the current image. To cope with the possible rotation deviation of the product on the conveyor belt, the system uses the image pyramid strategy to search at three scales of 1 / 2, 1 / 4, and 1 / 8, and performs angle compensation within a range of ±10° with a step size of 1°. Finally, the center coordinates of the product in the image and the rotation angle are output and the rotation angle , a local coordinate system centered on the product is established.
[0023] Step S22, coarse positioning of the target: according to the relative positional relationship between the pre-calibrated product coordinate system and each target to be detected, the coarse coordinate range of each target in the original image is determined.
[0024] The coordinate offset of each target to be detected (such as a screw mounting position, a wire harness interface, a buckle, etc.) relative to the product center is recorded in the reference template in advance; after the product is positioned, the coarse positioning coordinate range of each target in the real-time image is calculated according to the product center coordinates and the preset offset (unit: pixel), i.e., the coarse positioning region of each target in the real-time image. For example, a key screw is located 32.5 mm to the right and 18.3 mm to the front of the product center, corresponding to an offset of (Δx=156 pixels, Δy=88 pixels) in the image pixel coordinate system. This offset is stored in the system configuration file together with information such as the number of targets of the same type and the detection sequence.
[0025] Step S23, target segmentation: according to the coarse coordinate range, the corresponding target sub-image is cropped from the original image.
[0026] An adaptive threshold segmentation algorithm (OTSU algorithm) is used to perform image cutting on the coarse positioning region to extract a pure target image. For the image region corresponding to the coarse positioning coordinate range, the gray histogram is calculated, and the threshold value is automatically determined by the OTSU algorithm to divide the image into foreground (target) and background (non-target region). After removing the background interference, a segmentation image containing only a single target or a combination of targets is obtained (the image resolution is uniformly adjusted to 128x128 pixels), and the segmented target image is transmitted to the AI defect detection module. For example, for an M2 screw with a diameter of about 3 mm, it occupies about 20x20 pixels in the 128x128 sub-image, accounting for 2.4%, which is much higher than the less than 0.01% in the original image (2448x2048), thereby greatly improving the effective information density of the subsequent AI model.
[0027] Since the target object occupies a very small proportion in the original image (usually ≤5%), if direct labeling and training are performed based on the original image, the effective feature information of the target object will be too low to cause insufficient model training accuracy. The detection target positioning module of the embodiment extracts a single target object through segmentation, which is equivalent to converting "multi-target recognition in a complex scene" into "single-target recognition in a simple scene", thereby improving the accuracy of model training and reducing the model operation amount, and the detection efficiency is improved by more than 30%.
[0028] In step S3, each target sub-image is input into an AI defect detection module. The AI defect detection module includes a plurality of lightweight convolutional neural network models pre-trained for each target object to be detected. After each target sub-image is input into the AI defect detection module, the defect determination result of each target object is output. The AI defect detection module loads a plurality of lightweight convolutional neural network models to perform parallel reasoning on each sub-image. Each model is dedicated to a specific defect detection task, for example, model A is used to determine whether a screw is present or not, model B is used to identify whether a wire is completely inserted or not, and model C is used to detect whether a buckle is closed in place. All models use MobileNetV2 as the backbone network, the input size is 128x128x3, and the output is a binary classification result (OK / NG). The model parameter amount is controlled to be less than 0.8 MB. The training data set is composed of the sub-images obtained by the aforementioned cropping. Each type of defect collects not less than 5000 real samples, covers different light intensities, slight occlusions, and assembly angle variations, and is expanded to more than 20000 through online data enhancement (including random rotation ±5°, brightness adjustment ±20%, addition of Gaussian noise, etc.). The training process uses a cross-entropy loss function and an Adam optimizer, the initial learning rate is set to 0.001, and the verification set accuracy is stable at more than 99.5% after 100 rounds of training. In the reasoning stage, the industrial computer uses GPU acceleration to simultaneously send N sub-images (N is usually 8-15) into the corresponding model. The single reasoning time is not more than 20 ms, the total detection time (including image acquisition and positioning) is controlled to be less than 300 ms, and the production line demand of 2 seconds of beat time is met.
[0029] Specifically, it includes: Step S31, model training: a target defect sample library is constructed, the sample library contains standard samples (no defects) and defect samples (such as missing screws, wrong line sequences, buckles not buckled, etc.) of each target to be detected, the number of samples of each target is ≥500 (of which the proportion of defect samples is ≥30%); the segmented target image is input into the Mobile-NetV2 or Shuffle-NetV2 network for training, the training parameters are set as: learning rate 0.001, batch size 32, iteration number 1000 times, the cross-entropy loss function is used to calculate the training error, when the loss function value ≤0.05, the training is stopped, and a special AI detection model (i.e. a lightweight convolutional neural network model) for each target is obtained.
[0030] Step S32, multi-model loading and reasoning: for different types of target to be detected (such as screws, wire harnesses, buckles, etc.), the corresponding special AI detection model is loaded; the segmented target subgraph transmitted by the detection target positioning module is input into the corresponding model one by one for reasoning, the feature vector of the target is extracted, and the feature vector of the standard sample in the model is compared to calculate the feature similarity; a feature similarity threshold is set (adjusted according to the type of the target, such as a screw detection threshold of 0.9 and a wire harness detection threshold of 0.88), when the feature similarity < the threshold, it is determined that the target has a defect; when the feature similarity ≥ the threshold, it is determined that the target has no defect, and the defect determination result (including the defect type and the similarity value) of each target and the corresponding segmented image coordinates are output.
[0031] Step S4, the image defect information labeling module maps the defect determination result of each target back to the coordinate system of the original image, and generates a labeled image containing the defect position and type on the original image.
[0032] Specifically includes: Step S41, target recognition information extraction: for some closely positioned targets (such as densely installed screw positions), in order to improve the training efficiency, the strategy of “overall training of multiple targets and extraction of single target defects” is adopted. When the overall detection result is “defect exists”, the feature information of the single target is further extracted through pixel-level semantic segmentation (U-Net network) to determine the specific defect target number and type.
[0033] Step S42, target precise positioning: combined with the target subgraph output by the detection target positioning module and the defect determination result output by the AI defect detection module, the precise positioning of the defect target is realized. The target coordinates (i.e. target subgraph) in the segmented image are mapped back to the pixel coordinate system of the original image (through the preset coordinate mapping relationship between the segmented image and the original image), and the accurate coordinate range of the defect target in the original image is obtained.
[0034] Step S43, target judgment identification: using visual marking method to identify the target, on the original collected image, mark each target to be detected by rectangular frame, for example: mark the non-defective target as a green rectangular frame, and mark the defective target as a red rectangular frame, and mark the defect type (such as “missing screw”, “line sequence error”) and characteristic similarity value below the rectangular frame; the image after marking is transmitted to the storage control and alarm module, and is displayed in real time on the display interface of the industrial control computer.
[0035] The image defect information calibration module parses the output of the detection target positioning module and the AI defect detection module, extracts the target category judged as NG and its confidence (such as “screw missing, confidence 98.7%”). According to the upper left corner coordinates of each sub-image recorded by the detection target positioning module in the original image, the judgment result of the NG target is accurately mapped back to the absolute pixel position of the original large image. For example, if a screw sub-image is cropped from the original image (1000, 800) to (1128, 928) region, and the model judges that the screw is missing, then the center coordinates of the marking box are (1064, 864). Superimpose a rectangular marking box on the original image: draw a green border for OK targets, and draw a red border for NG targets, and add Chinese text labels such as “missing screw”, “wire not inserted”, “clasp not closed” beside the box. In particular, when two adjacent targets (such as two screws side by side) are merged into one detection area due to too close distance, the AI model outputs “double screw missing”, and the image defect information calibration module maps the missing state to two independent pixel points according to the pre-set local coordinate system (for example, taking the center of the sub-image as the origin, shifting 15 pixels to the left and right to correspond to the positions of the two screws) in the sub-image, and draws a red box respectively, avoiding misjudgment of multiple target defects as single point defects, and ensuring the fine granularity and accuracy of defect positioning.
[0036] Step S5, the storage control and alarm module executes image classification storage, detection data statistics according to the defect judgment result, and triggers the alarm mechanism when the defect exists. This module realizes the functions of image storage, data statistics and sound and light alarm, guarantees the traceability of the detection process and the timely intervention of the defect, and is specifically implemented as follows: Step S51, image storage: using “hierarchical storage” strategy, the marked original image, segmented target image and defect judgment result are stored in the local hard disk and remote server of the industrial control computer. The storage path is divided according to the levels of “date-shift-station-product number”, and the image file naming format is “product number_detection time (year-month-day-hour-minute-second).bmp”, and the corresponding detection data (including defect type, judgment time, detection personnel) are recorded, the storage retention period is ≥1 year, which is convenient for subsequent quality traceability and problem troubleshooting.
[0037] Step S52, data statistics: real-time statistics of detection data, including the total number of detection, good product number, defective product number, proportion of each defect type, yield, etc. in the day / shift; the statistical data is updated every hour, and a visual statistical report (bar chart+line chart) is generated, which is displayed in real time on the industrial control computer interface, and the statistical data is exported as an Excel file after the end of each day for subsequent process improvement analysis (such as optimizing the assembly process for the defect type with the highest proportion).
[0038] Step S53, alarm prompt: when the AI defect detection module determines that there is a defect, trigger the sound and light alarm mechanism. On the hardware level, the red alarm light of the work station flashes (frequency 2Hz), and at the same time, the preset alarm voice (“defect detected, please handle in time”) is played through the industrial control computer’s speaker; on the software level, a defect prompt window is popped up on the display interface, marking the defect location and type; the alarm continues until the employee clicks the “confirm processing” button, and then stops, while recording the processing time and processing personnel information.
[0039] In summary, the present application solves the problem of complex whole machine defect detection by Fig. 3 The five modules shown in the above-mentioned embodiments work together to divide the complex whole machine defect detection problem into multiple small target recognition tasks with high signal-to-noise ratio. This scheme not only avoids the dependence of traditional visual methods on high-contrast images, but also overcomes the precision bottleneck of end-to-end deep learning models in small target scenarios. In the actual deployment of a certain intelligent speaker manufacturing enterprise, the system has a comprehensive recognition accuracy of 99.2% for key defects such as screw presence / absence, buckle state, and wire insertion, with a single piece detection time of 280ms, and a hardware cost of only 1 / 3 of that of traditional high-precision visual systems. Moreover, it supports rapid expansion of detection projects by adding sub-sample images, and has good engineering practicability and promotional value.
[0040] The technical features of the above-mentioned embodiments can be combined in any way. To make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described, but as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.
[0041] The above-mentioned embodiments only express several implementation ways of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent. It should be noted that for ordinary skilled persons in the art, without departing from the concept of the present application, some modifications and improvements can be made, which are within the scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A method for intelligent identification of assembly defects in smart speakers, characterized in that, The method comprises the following steps: obtaining an original image of a smart speaker to be detected; target region rough positioning and target segmentation; inputting each target sub-image into a pre-trained lightweight convolutional neural network model for each target to be detected to obtain a defect determination result of each target; mapping the defect determination result of each target back to the coordinate system of the original image and generating a labeled image containing the defect position and type on the original image; performing image classification storage, detection data statistics, and triggering an alarm mechanism when a defect is determined to exist according to the defect determination result; The target region rough positioning and target segmentation comprise: establishing a product coordinate system by using stable product geometric features in the original image to globally locate the whole product based on a template matching algorithm; determining the rough coordinate range of each target in the original image according to the relative position relationship between the pre-calibrated product coordinate system and each target to be detected; cropping the corresponding target sub-image from the original image according to the rough coordinate range. 2.The smart speaker assembly defect intelligent identification method of claim 1, wherein, The method of establishing a product coordinate system by using stable product geometric features in the original image to globally locate the whole product based on a template matching algorithm comprises: template preparation: selecting a qualified reference product, and selecting one or more regions with significant and stable geometric features in the original image I of the reference product as a template T; matching search: for each frame of the collected original image I to be detected, a normalized cross-correlation algorithm is used to search for the region most similar to the template T in the original image I. Position and angle solving: rotate the template T by θ to get T θ , and calculate its NCC map with image I; find the parameter combination that makes NCC value R θ (x, y) globally maximum , which is the positioning result of the product in the image, and thus establish the product coordinate system with as the origin and angle 3.The smart speaker assembly defect intelligent identification method of claim 1, wherein, The construction of the lightweight convolutional neural network model comprises the following steps: selecting a lightweight backbone network, removing its original classification head and replacing it with a structure comprising a global average pooling and a two-dimensional fully connected layer to transform it into a binary classifier, and performing transfer learning using pre-trained weights on an ImageNet dataset; performing binary classification labeling on each target sub-image, with the label being y∈{0,1}, wherein 0 represents a good product and 1 represents a defective product; performing online enhancement transformation on the input sub-image batch in real time during the training process; using a cross-entropy loss function and an Adam optimizer to perform training, and using a cosine annealing strategy to decay the learning rate during the training process; after each training round, the model performance is evaluated on an independent validation set, and the main monitoring indicators are accuracy and loss value; when the validation set accuracy no longer significantly improves, the model weight file with the best performance on the validation set is saved, and the training is stopped in advance; performing dynamic quantization or training-based static quantization on the trained floating-point model, converting the quantized PyTorch or TensorFlow model into an intermediate format or engine file suitable for the target deployment platform using an inference framework, and performing synchronous parallel inference on the multiple sub-images obtained by cropping according to the target type corresponding to each sub-image. 4.The smart speaker assembly defect intelligent identification method of claim 3, wherein, The calculation formula of the cross-entropy loss function L is: ; where y c is the one-hot encoded true label of the sample belonging to class c, p c is the Softmax probability predicted by the model that the sample belongs to class c. 5.The smart speaker assembly defect intelligent identification method of claim 3, wherein, The learning rate is decayed using a cosine annealing strategy during the training process, and the decay formula is: ; wherein, is the learning rate for the current training epoch, is the initial learning rate, t is the current training epoch, T max is the total number of training epochs. 6.The smart speaker assembly defect intelligent identification method of claim 1, wherein, The defect determination result of each target object is mapped back to the coordinate system of the original image, and a labeled image containing defect position and type is generated on the original image, comprising: An initial list containing the determination results of all target objects is received, and each element in the initial list corresponds to a target object; each element in the initial list is traversed to filter out all target items with a "defective" determination state to form a defect list to be labeled; The defect positions in the defect list are mapped from the sub-image to the original image; The coordinates and type information of all defects are obtained, and a label layer is superimposed on the original image to generate a visual label. 7.The smart identification method of smart speaker assembly defects, according to claim 6, wherein, The initial list contains a preset field; the preset field includes a target unique identifier, a determination state, a confidence score, and the cropping coordinates of the target sub-image in the original image. 8.The smart identification method of smart speaker assembly defects, according to claim 1, wherein, The defect positions in the defect list are mapped from the sub-image to the original image, comprising: For a single object, the default is that the defect is located in the center region of the sub-image, then the defect center coordinates after mapping to the original image is: ; ; wherein, is the coordinate of the upper left corner of the subgraph in the original image, and w and h are the width and height of the subgraph, respectively. For the multi-target combination, a local coordinate mapping table within the subgraph is defined in advance, and when the multi-target combination is determined as "defective product", the coordinates of each sub-target in the original image are calculated according to the local coordinate mapping table : ; ; wherein, is the center coordinate of the subgraph in the original image, is the local offset of the preset center point of the kth sub-target relative to the center of the subgraph. 9.The smart speaker assembly defect intelligent identification method of claim 1, wherein, The image classification storage, detection data statistics, and alarm mechanism triggered when a defect is determined are performed according to the defect determination result, comprising: The defect determination result and the labeled image are received, and automatic archiving is performed; The detection results are continuously aggregated to generate production quality data: When there is a defect in the defect determination result, an alarm process is triggered.
10. An intelligent identification system for smart speaker assembly defects, comprising: A system for performing the intelligent identification method of smart speaker assembly defects as claimed in any one of claims 1 to 9, comprising: An image acquisition module for acquiring an original image of a smart speaker semi-finished product to be detected; A detection target positioning module for performing product global positioning, target area coarse positioning, and target segmentation; an AI defect detection module containing multiple lightweight convolutional neural network models for defect identification of target sub-images; An image defect information labeling module for visualizing the identification results on the original image; A storage control and alarm module for performing data storage, statistics, and alarm response.