Image object detection method in smart home environment

By using a combination of pre-training model, dilated convolution and C.Relu activation function in the smart home environment, a feature library is formed, which solves the problem of insufficient detection accuracy and speed in the existing technology and achieves efficient target detection in the smart home environment. , which improves small object detection capabilities and data generalization.

CN111476219BActive Publication Date: 2024-09-17SUZHOU UNIV OF SCI & TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010489218.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-02
Publication Date
2024-09-17
Estimated Expiration
2040-06-02

AI Technical Summary

Technical Problem

Existing image target detection methods in smart home environments have shortcomings in detection accuracy and speed. Two-stage detectors have high detection accuracy but low speed, while one-stage detectors have fast detection speed but low accuracy, making it difficult to achieve high efficiency in smart home environments. Target detection.

Method used

ImageNet data is used for model pre-training, random seeds are introduced to fuse multiple image enhancement methods, a lightweight network is used for feature extraction, the model is improved through dilated convolution and C.Relu activation function, and k-means algorithm is combined for cluster analysis. , form a specific target detection feature library, perform feature extraction and regression calculation, and finally output the detection results through non-maximum suppression.

Benefits of technology

It achieves high-precision and high-speed target detection in smart home environments, improves the model's ability to detect small objects, enhances the generalization and robustness of data, reduces the amount of calculation, and meets the needs of smart home robot target detection. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111476219B
    Figure CN111476219B
Patent Text Reader

Abstract

The present invention relates to an image target detection method in a smart home environment. The model is pre-trained by using ImageNet data, and a random seed is used to fuse multiple image enhancement methods to enhance and expand the pre-processing operation of the home data. A feature extraction network is used to introduce a dilated convolution, and the pre-trained model parameters are used to re-train the model on the processed home data set. The second-trained model is saved and encapsulated, and k-means clustering analysis is performed on the images in the image library and the detection library to form a specific target detection feature library. When a single home image is input, the input image is extracted by using a feature extraction network to obtain four coordinates of a predicted border, and the predicted border is regressed and classified, and the detection result is output by non-maximum suppression. The target detection requirements in the smart home environment are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an image target detection method in a smart home environment. Background Art

[0002] Object detection is an important technology in computer vision and is widely used in the fields of autonomous driving, intelligent robotics, and intelligent security. Classic object detection methods include the HOG feature-based detection method proposed by Dalal in 2005 and the Deformable Part Model (DPM) detection method proposed by Felzenswalb et al. in 2008. This method first uses the gradient operator to calculate the HOG features of the target object and uses the sliding window + SVM method for classification, which performs well in object detection.

[0003] In recent years, with the substantial improvement of computing performance, artificial intelligence and neural networks have developed rapidly, and various computer vision processing methods based on deep learning have been widely used. Convolutional neural network is a very important model in computer vision and image processing. It has been widely used in image classification, face recognition, action recognition, image segmentation, target detection, etc., and has achieved great success. Compared with traditional target detection methods, deep neural networks have strong feature extraction capabilities, and detection accuracy and detection speed have been greatly improved. Currently, the widely used target detection methods based on neural networks are mainly divided into two categories: one is the "two-stage detector", which divides target detection into two steps, first determining the candidate box and then identifying the target in the area. This type of method has relatively high detection accuracy and relatively low detection speed, generally only up to 5fps. Typical networks include RCNN, FAST-RCNN, FASTER-RCNN, etc.; the other is the "one-stage detector", which uses regression ideas to simultaneously complete the detection and recognition of the post-selection box to achieve end-to-end detection and recognition. Typical networks include YOLO, SSD, etc. This type of method has extremely fast detection speed, but relatively low detection accuracy. Summary of the invention

[0004] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a method for detecting image objects in a smart home environment.

[0005] The purpose of the present invention is achieved through the following technical solutions:

[0006] The image target detection method in the smart home environment is characterized by:

[0007] First, the model is pre-trained with ImageNet data, and random seeds are used to fuse multiple image enhancement methods to enhance and expand the home data. A lightweight network is used for feature extraction, and hollow convolution is introduced. The pre-trained model parameters are used to re-train the model on the processed home data set. The re-trained model is saved and packaged.

[0008] The images in the image library and target detection library are clustered and analyzed using the k-means algorithm to form a specific target detection feature library. When a single home image is input, the feature extraction network is used to extract features from the input image to obtain the four coordinates of the predicted bounding box, and then the predicted bounding box is regressed and classified, and finally the detection result is output through non-maximum suppression.

[0009] Furthermore, the above-mentioned method for detecting an image target in a smart home environment includes the following steps:

[0010] a) First, data screening, labeling and preprocessing

[0011] Filter out images that meet the smart home environment from a massive image library; then label the filtered images to generate a target detection dataset; perform data preprocessing on the generated dataset;

[0012] b) Then, use the feature extraction network to extract features and train the model

[0013] A 16-layer VGG16 is used as the feature extraction network. VGG16 is a series of convolutional layers connected in stages, which forms a feature map with reduced spatial resolution and increased receptive field, losing information and details. Dilated convolution is introduced to simulate different receptive field structures in human vision through convolution kernels. The convolution kernels accept dilated convolutions with different expansion rates to simulate the relationship between receptive field and eccentricity. For the feature extraction network, the pre-processed images are trained using the parameters trained on ImageNet.

[0014] c) Then, the images in the image library and the target detection library are clustered using the k-means algorithm to generate three prior frames at three different scales with three channels. The subsequent frame sizes will be fine-tuned based on the nine prior frames.

[0015] d) Finally, the target detection result is output through regression and classification calculation;

[0016] The features of the image are extracted through a neural network to form a corresponding predicted bounding box, which is then regressed and classified, and the final result is output through non-maximum suppression.

[0017] Furthermore, in the above-mentioned image target detection method in the smart home environment, in step a), the home data set is 8,000 images selected from more than 100,000 images, each image is manually taken, and various objects under different backgrounds at different angles, different distances, different occlusion conditions, and different complex stacking conditions. The data set meets the generalization and robustness requirements of network training, and the data set contains 23 categories, covering all categories in common home environments.

[0018] Furthermore, in the above-mentioned method for detecting target images in a smart home environment, in step a), the screened data set is labeled using labellmg, and an XML file corresponding to the labeled image is generated, each XML file records the image name, the labeled object category and its corresponding pixel coordinate information.

[0019] Furthermore, in the above-mentioned method for detecting target images in a smart home environment, in step a), a random seed is used to randomly combine data enhancement methods of rotation transformation, flip transformation, scaling transformation, translation transformation, size transformation, color transformation, noise disturbance, and elastic distortion to enhance and expand the data.

[0020] Furthermore, in the above-mentioned method for detecting target in an image in a smart home environment, in step b), full convolution processing is used for images with inconsistent sizes to make them adaptive to images of various aspect ratios.

[0021] Furthermore, in the above-mentioned method for detecting target images in a smart home environment, in step b), C.Relu is introduced as an activation function, that is, it allows simultaneous activation in the positive and negative directions while maintaining the same degree of non-saturation and nonlinearity, thereby reducing redundancy during activation.

[0022] Furthermore, in the above-mentioned method for detecting an image target in a smart home environment, in step b), during the training process, a total of 40,000 to 60,000 batches are trained, the batch_size is 8 to 32, and the Adam algorithm is used for optimization based on the ImageNet pre-training parameters; the Adam algorithm is used for optimization based on the ImageNet pre-training parameters, and the first-order matrix estimation and the second-order matrix estimation of the gradient are dynamically adjusted;

[0023] Use an exponentially decaying learning rate, that is, the learning rate will adjust itself according to the speed of training decline. The formula for the exponentially decaying learning rate is:

[0024]

[0025] Among them, lr is the current learning rate, lr0 is the initial learning rate, gamma is the learning rate decay coefficient, globalstep is the current number of iterations, decaysteps is the decay speed, * is the multiplication sign, and ^ is the power operation.

[0026] Furthermore, in the above-mentioned method for detecting an object in an image in a smart home environment, in step c), clustering analysis is performed on the data set samples by the K-means algorithm, and three prior frames of 13×13, 26×26, and 52×52 are generated at three different scales, with the number of channels being 3. The size of the subsequent bounding boxes will be fine-tuned based on the nine prior frames; for an input image, feature extraction is performed through the basic network, and the image is input into the FPN structure, and finally a feature map of three scales is generated as a prediction; the feature map is divided into grid areas, and three bounding boxes are predicted on each grid, for a total of:

[0027] 1×(3×(13×13+26×26+52×52))×(5+k)=1×10647×(5+k) bounding boxes, where k represents the number of categories.

[0028] Furthermore, in the above-mentioned method for detecting an object in an image in a smart home environment, in step d), feature extraction is performed through a neural network to obtain four coordinates predicted for each bounding box: t x , t y , t w , t h , the distance from the target network to the upper left corner is (c x , c y ), the corresponding bounding box width and height are p w , p h , the corresponding prediction relationship is as follows:

[0029] b x =σ(t x )+c x , b y =δ(t y )+c y

[0030] b w =p w e tw , b h =p h e th

[0031] Among them, t x , t y is the network prediction value, σ is the sigmoid function, t w , t h is the coordinate, p w , p hThe width and height of the bounding box corresponding to the Cell;

[0032] The probability P of each grid object being in the prediction box r (Object), and score using the following formula:

[0033]

[0034] in, is the intersection-over-union ratio of the predicted box and the ground truth, conf(Object) is the confidence, and P is the confidence level when there is an object in the current grid. r (Object) = 1, otherwise it is 0, and the prediction box finally obtains the final result through non-maximum suppression.

[0035] Compared with the prior art, the present invention has significant advantages and beneficial effects, which are specifically embodied in the following aspects:

[0036] ① The object detection method for smart home environment images based on transfer learning of the present invention is an integrated deep neural network method, which is used for object detection in smart home images. It uses a lightweight neural network to reduce the number of neural network layers and the amount of calculation. Secondly, the model is pre-trained using transfer learning, so that it has good performance on smart home data sets with smaller data volumes.

[0037] ② The data screening is more targeted. The screened data is under different weather, different lighting, different backgrounds, different optimal angles, different distances, different occlusion conditions, and different complex stacking conditions of various objects. The data can meet the generalization and robustness requirements of network training; data enhancement and expansion do not use a single data enhancement method, but through random seeds, multiple data enhancement methods are integrated with a certain probability to form a new data enhancement method, which further increases the generalization and robustness of the data;

[0038] ③Introduce dilated convolution to replace the convolution and pooling operations of traditional neural networks. By simulating different receptive field structures in human vision, the convolution kernel accepts dilated convolution with different expansion rates to simulate the relationship between receptive field and eccentricity. This improves the cascade network VGG16, which will form a series of feature maps with decreasing spatial resolution and increasing receptive field, resulting in the loss of some important information and details, thereby improving the model's ability to detect small objects.

[0039] ④ The C.Relu activation function is introduced, which allows simultaneous activation in the positive and negative directions while maintaining the same degree of non-saturation and nonlinearity. It can save both positive and negative linear responses after convolution, reduce the redundancy of convolution learning caused by traditional activation functions, and make more effective use of trainable parameters.

[0040] ⑤Through data screening, labeling and preprocessing, model transfer learning and feature extraction network improvement and secondary training, the requirements of target detection in actual smart home environments can be met; the network design has a certain degree of pertinence, which can enhance the target detection capabilities of smart home robots, provide a certain impetus for the development of smart home robots, and promote the development of smart home robots.

[0041] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or be understood by practicing the specific embodiments of the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures specifically pointed out in the written description and claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 : Schematic diagram of the process of the present invention;

[0043] Figure 2 : Schematic diagram of the dilated convolution module;

[0044] Figure 3 : Schematic diagram of feature extraction network structure. DETAILED DESCRIPTION

[0045] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, a specific implementation scheme is now described in detail.

[0046] like Figure 1 As shown in the figure, the method for detecting target images in a smart home environment first pre-trains the model through ImageNet data, and uses random seeds to fuse multiple image enhancement methods to enhance and expand the home data to ensure the balance of each type of enhanced data. The feature extraction network of the model is replaced with a lighter network, and the convolution and pooling layers of the traditional neural network are replaced by holes. The pre-trained model parameters are used to re-train the model on the processed home data set; then, the second-trained model is saved and packaged;

[0047] The images in the image library and the target detection library are clustered using the k-means algorithm to form a specific target detection feature library. When a single home image is input, the input image is subjected to feature extraction using the replaced feature extraction network to obtain the four coordinates of the predicted bounding box. Each bounding box is then regressed and classified, and the detection result is finally output through non-maximum suppression.

[0048] The specific steps include:

[0049] a) First, data screening, labeling and preprocessing;

[0050] There is no existing large-scale data set for home data. We need to select some images that meet the smart home environment from the massive image library. We select 8,000 images from more than 100,000 images, each of which is manually taken. The data set contains rich information about various objects under different backgrounds at different angles, different distances, different occlusion conditions, and different complex stacking conditions, which can meet the generalization and robustness requirements of network training. The data set contains 23 categories, covering all categories in common home environments.

[0051] The selected data sets are labeled using labellmg. For the labeled images, corresponding xml files will be generated. Each xml file records the image name, the labeled object category and its corresponding pixel coordinates. Random seeds are used to randomly combine data enhancement methods such as rotation, flipping, scaling, translation, size, color, noise disturbance, and elastic distortion with a certain probability to enhance and expand the data. Finally, the enhanced and expanded data set reaches 12,000 images.

[0052] b) Then, replace the model’s feature extraction network and train the model;

[0053] Introducing dilated convolution, such as Figure 2 As shown in the figure, (a) and (b) represent two different dilated convolution modules, which simulate different receptive field structures in human vision through convolution kernels such as 1*1, 3*3, and 5*5. The convolution kernel accepts dilated convolution with different expansion rates to simulate the relationship between receptive field and eccentricity. (a) and (b) represent different simulation structures. The difference between the two is whether to replace the large convolution kernel with a smaller convolution kernel to reduce the amount of calculation. The traditional convolution and pooling method loses some information due to the pooling operation, while the dilated convolution increases the field of view of the convolution while keeping the convolution kernel size parameters unchanged, extracts more global information, and enhances the ability to extract small object information.

[0054] VGG16 is used as the feature extraction network. VGG16 is a pipeline feature extraction network. The original VGG16 is a series of cascaded convolutional layers, forming a series of feature maps with decreasing spatial resolution and increasing receptive field, which loses some important information and details. The model retains the same cascade structure as VGG16. In the feature layer with relatively large resolution, the RFB-s module is used to replace the traditional convolutional pooling layer. For the feature layer with relatively small resolution, RFB is used to replace the convolutional pooling layer. The first, second and third layers are replaced by RFB-s modules, and the fourth and fifth layers are replaced by RFB. The first fusion layer is replaced by RFB-s, and the second and third fusion layers are replaced by RFB. In addition, the expansion rate and the size of the standard convolution kernel are flexibly set to simulate the relationship between the receptive field and eccentricity of the human eye. RFB and RFB-s modules are used to reduce network parameters and reduce the amount of calculation. The network is more lightweight and the ability to extract small object features is improved.

[0055] Since the parameter distribution learned by the convolution kernel has a strong positive and negative correlation, the Relu activation function is used in the convolutional neural network. Relu clears negative values ​​and produces sparse activation, so it is necessary to learn two linearly related positive and negative phase parameters. The learning of redundant parameters invisibly increases the computational consumption of the network. The C.Relu (Concatenated Rectified Linear Units) function is introduced. Its basic principle is to allow simultaneous activation in the positive and negative directions while maintaining the same degree of non-saturation and nonlinearity. Therefore, positive and negative linear responses can be saved at the same time after convolution, reducing the redundancy of convolution learning caused by the Relu activation function, and more effectively utilizing trainable parameters. The function expression of C.Relu is

[0056]

[0057] In the low convolution layer of the feature extraction network, C.Relu is used for nonlinear processing. The implementation process of C.Relu in the convolutional neural network is: directly negate the features obtained by convolution, then connect them with the original convolution features, and then pass through a Relu activation function;

[0058] During the training process, the parameters pre-trained by ImageNet were used, and the improved model was used for training. A total of 60,000 batches were trained, and the batch_size was 8. Adam was used for optimization, and no pooling operation was required during the training process.

[0059] Use an exponentially decaying learning rate, that is, the learning rate will adjust itself according to the speed of training decline to prevent oscillation and speed up convergence; the formula for exponentially decaying learning rate is:

[0060]

[0061] Among them, lr is the current learning rate, lr0 is the initial learning rate, gamma is the learning rate decay coefficient (generally between 0 and 1), globalstep is the current number of iterations, decaysteps is the decay speed, * is the multiplication sign, and ^ is the power operation.

[0062] c) Then, the k-means algorithm is used to perform cluster analysis on the images in the image library and the target detection library, and three prior frames are generated at three different scales with three channels. The subsequent encoding size will be fine-tuned based on the nine prior frames;

[0063] For an input image, the basic network performs feature extraction and inputs it into the FPN structure, finally generating feature maps of three scales as predictions; these feature maps are divided into grid areas, and three bounding boxes are predicted on each grid, resulting in a total of 1×(3×(13×13+26×26+52×52))×(5+k)=1×10647×(5+k) bounding boxes, where k represents the number of categories;

[0064] d) Finally, the target detection result is output through regression and classification calculation;

[0065] The improved neural network is used to extract features and predict four coordinates for each bounding box: t x , t y , t w , t h , the distance from the target network to the upper left corner is (c x , c y ) and its corresponding bounding box width and height are p w , p h , the corresponding prediction relationship is as follows

[0066] b x =σ(t x )+c x , b y =δ(t y )+c y

[0067] b w =p w e tw , b h =p h e th

[0068] Each grid also predicts the probability P of the object in the prediction box r (Object), and score it using the following formula:

[0069]

[0070] in, is the intersection-over-union ratio of the predicted box and the ground truth, conf(Object) is the confidence, and P is the confidence level when there is an object in the current grid. r (Object) = 1, otherwise 0; the prediction box is finally obtained through non-maximum suppression.

[0071] The performance of the original model and the present invention are evaluated by combining four mainstream evaluation indicators, which are recall rate, precision rate, average precision mean and Frame. Compared with the original model, the precision rate of the present invention is improved to 72.84%, an increase of 4.71 percentage points; the recall rate is improved to 73.4%, an increase of 2.2 percentage points; the average precision mean and detection speed are improved by 1.2% and 27FPS respectively; and the present invention improves the detection accuracy of small objects.

[0072] The present invention adopts a shallower and lighter network to extract features, introduces dilated convolution for extracting features of home images, and further optimizes by introducing C.Relu function to reduce the amount of calculation; a good and faster home target detection method can be obtained; secondly, the model is pre-trained using transfer learning, so that it has good performance on smart home datasets with smaller data volumes.

[0073] In summary, the object detection method for smart home environment images based on transfer learning of the present invention is an integrated deep neural network method, which is used for object detection in smart home images. It uses a lightweight neural network to reduce the number of neural network layers and the amount of calculation. Secondly, the model is pre-trained using transfer learning, so that it has good performance on smart home data sets with smaller data volumes.

[0074] The data screening is more targeted. The screened data are under different weather, different lighting, different backgrounds, different optimal angles, different distances, different occlusion conditions, and different complex stacking conditions of various objects. The data can ensure the generalization and robustness requirements of network training. The data enhancement and expansion does not use a single data enhancement method, but through random seeds, multiple data enhancement methods are integrated with a certain probability to form a new data enhancement method, which further increases the generalization and robustness of the data.

[0075] The introduction of dilated convolution simulates the different receptive field structures in human vision, and makes the convolution kernel accept dilated convolution with different expansion rates to simulate the relationship between the receptive field and eccentricity. This improves the problem that the cascade network VGG16 will form a series of feature maps with decreasing spatial resolution and increasing receptive field, resulting in the loss of some important information and details, and improves the model's ability to detect small objects.

[0076] The C.Relu activation function is introduced, which allows simultaneous activation in the positive and negative directions while maintaining the same degree of non-saturation and nonlinearity. It can save both positive and negative linear responses after convolution, reduce the redundancy of convolution learning caused by traditional activation functions, and make more effective use of trainable parameters.

[0077] Through data screening, labeling and preprocessing, model transfer learning and feature extraction network improvement and secondary training, the requirements of target detection in actual smart home environments are met; the network design is targeted and can enhance the target detection capabilities of smart home robots, providing a certain impetus for the development of smart home robots and promoting the development of smart home robots.

[0078] It should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the scope of rights of the present invention. At the same time, the above description should be understandable and implementable for professionals in the relevant technical field. Therefore, other equivalent changes or modifications that do not deviate from the spirit disclosed by the present invention should be included in the scope of the patent application.

Claims

1. A method for detecting an image target in a smart home environment, characterized in that: The following steps are involved: a) First, data screening, labeling and preprocessing Filter out images that match the smart home environment from a massive image library; then label the filtered images to generate an object detection dataset; Use random seeds to fuse multiple image enhancement methods to enhance and expand home data; b) Then, use the feature extraction network to extract features and train the model A 16-layer VGG16 is used as the feature extraction network. VGG16 is a series of convolutional layers connected in stages, which forms a feature map with reduced spatial resolution and increased receptive field, losing information and details. Atrous convolution is introduced to simulate different receptive field structures in human vision through convolution kernels. The convolution kernels accept atrous convolutions with different expansion rates to simulate the relationship between receptive field and eccentricity. For the feature extraction network, use the parameters trained on ImageNet to train the preprocessed images; c) Then, the images in the image library and the target detection library are clustered using the k-means algorithm to generate three prior frames at three different scales with three channels. The subsequent frame sizes will be fine-tuned based on the nine prior frames. d) Finally, the target detection result is output through regression and classification calculation; The features of the image are extracted through a neural network to form a corresponding prediction bounding box, and regression and classification calculations are performed on the prediction bounding box, and the final result is output through non-maximum suppression; Step b), during the training process, a total of 40,000 to 60,000 batches are trained, the batch_size is 8 to 32, and the Adam algorithm is used for optimization based on the ImageNet pre-training parameters; the Adam algorithm is used for optimization based on the ImageNet pre-training parameters, and the first-order matrix estimation and the second-order matrix estimation of the gradient are dynamically adjusted; Use an exponentially decaying learning rate, that is, the learning rate will adjust itself according to the speed of training decline. The formula for the exponentially decaying learning rate is: Among them, lr is the current learning rate, lr0 is the initial learning rate, gamma is the learning rate decay coefficient, globalstep is the current number of iterations, decaysteps is the decay speed, * is the multiplication sign, and ^ is the power operation.

2. The method for detecting an image target in a smart home environment according to claim 1, characterized in that: Step a), the home dataset is 8,000 images selected from more than 100,000 images. Each image is manually taken, with various objects under different backgrounds at different angles, different distances, different occlusion conditions, and different complex stacking conditions. The dataset meets the generalization and robustness requirements of network training. The dataset contains 23 categories, covering all categories in common home environments.

3. The method for detecting an image target in a smart home environment according to claim 1, characterized in that: Step a), label the selected data set using labellmg, and generate corresponding XML files for the labeled images. Each XML file records the image name, the labeled object category and its corresponding pixel coordinate information.

4. The method for detecting an image target in a smart home environment according to claim 1, characterized in that: In step a), random seeds are used to randomly combine data enhancement methods such as rotation transformation, flip transformation, scaling transformation, translation transformation, size transformation, color transformation, noise disturbance, and elastic distortion to enhance and expand the data.

5. The method for detecting an image target in a smart home environment according to claim 1, characterized in that: Step b), for images with inconsistent sizes, full convolution processing is used to make it adaptive to images of various aspect ratios.

6. The method for detecting an image target in a smart home environment according to claim 1, characterized in that: In step b), C.Relu is introduced as the activation function, which allows simultaneous activation in the positive and negative directions while maintaining the same degree of non-saturation and nonlinearity, reducing redundancy during activation.

7. The method for detecting an image target in a smart home environment according to claim 1, characterized in that: Step c), cluster analysis is performed on the data set samples through the K-means algorithm, and three prior boxes of 13×13, 26×26, and 52×52 are generated at three different scales, with 3 channels. The size of the subsequent bounding box will be fine-tuned based on the 9 prior boxes; for an input image, feature extraction is performed through the basic network, input into the FPN structure, and finally feature maps of three scales are generated as predictions; The feature map is divided into grid regions, and three bounding boxes are predicted on each grid, for a total of: 1×(3×(13×13+26+26+52×52))×(5+k)=1×10647×(5+k) bounding boxes, where k represents the number of categories.

8. The method for detecting an image target in a smart home environment according to claim 1, characterized in that: Step d), extract features through a neural network to obtain four coordinates for each bounding box prediction: t x , t y , t w , t h , the distance from the target network to the upper left corner is (c x , c y ), the corresponding bounding box width and height are p w , p h , the corresponding prediction relationship is as follows: b x =σ(t x )+c x ,b y =δ(t y )+c y b w =p w e tw ,b h =p h e th Among them, t x , t y is the network prediction value, σ is the sigmoid function, t w , t h is the coordinate, p w , p h The width and height of the bounding box corresponding to the Cell; The probability P of each grid object being in the prediction box r (Object), and score using the following formula: in, is the intersection-over-union ratio of the predicted box and the ground truth, conf(Obkect) is the confidence, and P is the confidence level when there is an object in the current grid. r (Object) = 1, otherwise it is 0, and the prediction box finally obtains the final result through non-maximum suppression.