Target detection method and device, electronic equipment and storage medium

Through shallow convolutional network and edge feature pooling technology, the problems of insufficient accuracy of traditional traffic mark detection methods in complex scenarios and slow model convergence speed are solved, and more efficient traffic mark detection is achieved.

CN119006795APending Publication Date: 2024-11-22ZHIDAO NETWORK TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411198964.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

Traditional traffic sign detection methods are difficult to effectively deal with complex situations such as occlusion, blur, and bending of traffic signs, and deep learning networks are prone to loss of detailed information and are not easy to converge during training.

Method used

A target detection method is designed, using shallow convolutional network as the backbone, combining edge feature extraction module and optimization module, and optimizing model parameters are optimized to improve detection accuracy and convergence speed through multi-scale convolutional features and edge feature pooling.

Benefits of technology

The accuracy of traffic sign detection in complex scenarios and the convergence speed of model are improved, and the loss of detailed information caused by excessive deep network structure is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119006795A_ABST
    Figure CN119006795A_ABST
Patent Text Reader

Abstract

The invention discloses a target detection method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring a to-be-detected image containing a target with a determined edge; performing target detection on the to-be-detected image by using a trained target detection model to obtain a target detection result; wherein the target detection model comprises a shallow convolutional network, a pooling network, an edge feature extraction module and an optimization module, the shallow convolutional network extracts a multi-scale convolutional feature vector of a target through a convolutional layer, and the edge feature extraction module extracts an edge feature vector of the target; the pooling network performs feature pooling processing on the multi-scale convolution feature vector and the edge feature vector, and the optimization module performs model parameter optimization through the feature loss of each convolution layer and the prediction loss of the target detection model. According to the technical scheme, the model convergence speed and the detection precision can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a target detection method, device, electronic device and storage medium. Background Art

[0002] Traffic sign detection and recognition plays a key role in maintaining road safety, improving traffic flow, and developing autonomous driving technology. Traditional solutions generally use edge detection and Hough transform to detect traffic signs on images. However, traditional solutions can only extract features from images in specific situations, and cannot effectively detect complex situations such as traffic sign occlusion, blur, and curvature.

[0003] With the development of deep learning, deep learning network algorithms such as Hr-Net, Bis-Net, Unet, and Deeplab have been introduced one after another. Deep learning networks usually contain many layers. When the network layers are too deep, the network training will lose a lot of detailed information and will not be easy to converge. Summary of the invention

[0004] The embodiments of the present application provide a target detection method, device, electronic device and storage medium to improve model convergence speed and detection accuracy.

[0005] The present application embodiment adopts the following technical solutions:

[0006] In a first aspect, an embodiment of the present application provides a target detection method, the method comprising:

[0007] Acquire an image to be detected containing an object with a determined edge;

[0008] Using the trained target detection model to perform target detection on the image to be detected to obtain a target detection result;

[0009] Among them, the target detection model includes a shallow convolutional network, a pooling network, an edge feature extraction module and an optimization module. The shallow convolutional network extracts the multi-scale convolutional feature vector of the target through a convolutional layer, the edge feature extraction module extracts the edge feature vector of the target, the pooling network performs feature pooling processing on the multi-scale convolutional feature vector and the edge feature vector, and the optimization module optimizes the model parameters through the feature loss of each convolutional layer and the prediction loss of the target detection model.

[0010] In a second aspect, an embodiment of the present application further provides a target detection device, the device comprising:

[0011] An image acquisition unit, used for acquiring an image to be detected containing a target with a certain edge;

[0012] An image detection unit is used to perform target detection on the image to be detected using a trained target detection model to obtain a target detection result;

[0013] Among them, the target detection model includes a shallow convolutional network, a pooling network, an edge feature extraction module and an optimization module. The shallow convolutional network extracts the multi-scale convolutional feature vector of the target through a convolutional layer, the edge feature extraction module extracts the edge feature vector of the target, the pooling network performs feature pooling processing on the multi-scale convolutional feature vector and the edge feature vector, and the optimization module optimizes the model parameters through the feature loss of each convolutional layer and the prediction loss of the target detection model.

[0014] In a third aspect, an embodiment of the present application further provides an electronic device, including:

[0015] A processor; and a memory arranged to store computer executable instructions, which when executed cause the processor to perform a target detection method.

[0016] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores one or more programs, and when the one or more programs are executed by an electronic device including multiple application programs, the electronic device performs a target detection method.

[0017] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects:

[0018] The embodiment of the present application designs a target detection model with a shallow convolutional layer as the backbone network. On the one hand, the multi-scale convolutional feature vector of the target is extracted through the shallow convolutional network, and on the other hand, the edge feature vector of the target is extracted through the edge feature extraction module, so that the pooling network can pool the multi-scale convolutional feature vector with the edge feature vector as a constraint, and extract the features of different regions in the image to be detected in a more delicate manner, thereby improving the detection accuracy; in addition, compared with the prior art that only uses the prediction loss of the model to optimize the model parameters, the embodiment of the present application also calculates the feature loss of each convolution layer through the optimization module, and optimizes the model parameters by combining the feature loss of each convolution layer and the prediction loss of the model, thereby improving the model convergence speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0020] Figure 1 A schematic diagram of a target detection method in an embodiment of the present application;

[0021] Figure 2 A schematic diagram of a network structure of a vehicle stop line detection model in an embodiment of the present application;

[0022] Figure 3 This is a schematic diagram of the structure of a target detection device in an embodiment of the present application;

[0023] Figure 4 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0025] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0026] The embodiment of the present application provides a target detection method, and the following embodiment of the present application uses a computing device as an example of the execution subject of the target detection method. It is understandable that the execution subject of the embodiment of the present application may also be other devices or systems, such as an edge computing system or a chip system, and the chip system includes at least one processor, and a communication interface or memory, wherein the memory is used to store programs or instructions, and the communication interface is used to provide the processor with information or data input and output functions. The execution subject of the embodiment of the present application may also be executed by the cloud. Alternatively, the execution subject of the target detection method of the embodiment of the present application may also be software or hardware, and different execution steps may be centralized or distributed.

[0027] like Figure 1 As shown, a flow chart of a target detection method in an embodiment of the present application is provided, and the target detection method at least includes the following steps S110 to S120:

[0028] Step S110, acquiring an image to be detected containing an object with a certain edge.

[0029] The target of this embodiment has a definite edge. Optionally, the target of this embodiment is a traffic sign, which includes a road sign with a definite edge and a road sign with a definite edge. The road sign includes a road stop line, various lane lines (lane dividing lines, road boundary lines, guide lines), V-shaped lines, parking lines, zebra crossings, etc. The road sign includes a prohibition sign, a warning sign, an instruction sign, etc. Of course, the target of this embodiment can also be other signs such as safety signs.

[0030] The image to be detected in this embodiment can be the original image collected by the camera, or it can be an image after image preprocessing. The image to be detected can be a color image or a grayscale image. The embodiment of the present application does not limit the data source of the image to be detected. Taking traffic signs as an example, this embodiment can obtain the image to be detected through roadside equipment, or through an automatic driving system, or through data sources such as drones and various application platforms.

[0031] Step S120: Use the trained target detection model to perform target detection on the image to be detected to obtain a target detection result.

[0032] Among them, the target detection model includes a shallow convolutional network, a pooling network, an edge feature extraction module and an optimization module. The shallow convolutional network extracts the multi-scale convolutional feature vector of the target through a convolutional layer. The shallow convolutional network in this embodiment refers to a network structure with a small number of convolutional layers, for example, the number of convolutional layers is limited to less than 10 layers. The edge feature extraction module extracts the edge feature vector of the target, and the pooling network performs feature pooling processing on the multi-scale convolutional feature vector and the edge feature vector. The optimization module optimizes the model parameters through the feature loss of each convolutional layer and the prediction loss of the target detection model.

[0033] like Figure 1 From the target detection method shown, it can be seen that the embodiment of the present application designs a target detection model with a shallow convolutional layer as the backbone network. On the one hand, the multi-scale convolutional feature vector of the target is extracted through the shallow convolutional network, and on the other hand, the edge feature vector of the target is extracted through the edge feature extraction module, so that the pooling network can pool the multi-scale convolutional feature vector with the edge feature vector as a constraint, and extract the features of different areas in the image to be detected in a more delicate way, thereby improving the detection accuracy; in addition, compared with the prior art that only uses the prediction loss of the model to optimize the model parameters, the embodiment of the present application also calculates the feature loss of each convolution layer through the optimization module, and optimizes the model parameters by combining the feature loss of each convolution layer and the prediction loss of the model, thereby improving the model convergence speed.

[0034] In some embodiments of the present application, the target detection model is trained by the following steps:

[0035] Obtaining a training set having a plurality of sample data, wherein the sample data includes labeled data corresponding to a target;

[0036] Inputting the sample data into the initial target detection model, and obtaining the feature loss of each convolutional layer and the prediction loss of the target detection model through the optimization module;

[0037] Calculate the loss function based on the feature loss of each convolutional layer and the prediction loss of the object detection model;

[0038] Based on the calculated loss function and using the back-propagation algorithm, the model parameters are updated.

[0039] Taking the vehicle stop line in the road marking as an example, this embodiment can obtain a vehicle stop line data set and randomly divide the data set into a training set and a test set. The training set is used to train the model, that is, to determine the model parameters such as the weight, bias, and learning rate of the model; the test set is used to evaluate the final model after the training is completed. The test set does not participate in the parameter learning process and is only used for model evaluation.

[0040] The training set of this embodiment includes sample data of a certain type of target in various scenarios, such as image data of vehicle stop lines collected under different lighting conditions, different weather conditions, different viewing angles, and different motion states. The sample data includes various forms of vehicle stop lines, such as partial occlusion, morphological distortion, blur, etc. In addition, in order to ensure the generalization ability of the final model, this embodiment can perform data enhancement and other processing on the sample images, and the data enhancement includes, for example, random sampling, random lighting, random inversion and other enhancement methods.

[0041] It should be noted that different targets in the embodiments of the present application correspond to different target detection models. Therefore, in the training set construction stage, corresponding training sets should be constructed for various types of targets, that is, each training set is used to train a detection model with corresponding target detection capabilities. For example, the model trained using the vehicle stop line training set is only used for vehicle stop line detection, and the model trained using the zebra crossing training set is only used for zebra crossing detection. Therefore, when constructing the target data set, the acquired data set should be pre-classified, for example, divided into a vehicle stop line data set, a zebra crossing data set, etc., and then the training set and the test set are divided, such as the vehicle stop line data set is divided into a vehicle stop line training set and a vehicle stop line test set, and the zebra crossing data set is divided into a zebra crossing training set and a zebra crossing test set.

[0042] After obtaining the sample image, the sample image can be annotated by an annotation tool to obtain the annotation data Label in json format or other data format, that is, each sample data in the training set is set with corresponding annotation data. Optionally, the sample data can also be subjected to normative testing, such as verifying the accuracy of the label, processing the consistency of the sample size, and other normative testing to obtain sample data that meets the specifications.

[0043] After the training set is constructed, the model is trained using the training set. Specifically, the convolution feature vector of each convolution layer is resized so that the size information of the transformed convolution feature vector is the same as the size of the labeled data; the difference between the transformed convolution feature vector of each convolution layer and the target in the labeled data is obtained; and the feature loss of each convolution layer is obtained based on the difference.

[0044] by Figure 2 Taking the vehicle stop line detection model shown as an example, the backbone network includes four shallow convolutional layers. The optimization module transforms the convolution feature vector output by each convolutional layer into a convolution feature vector of the same size as the Label through an interpolation method (such as a bilinear interpolation method), so as to facilitate comparison with the vehicle stop line marked by the Label. By comparison, the difference between the vehicle stop line represented by the convolution feature vector output by each convolutional layer and the vehicle stop line marked by the Label can be obtained. In practical applications, the difference between the convolution feature vector of each convolutional layer and the vehicle stop line marked by the Label can be calculated through a cross entropy loss function, and the cross entropy loss function value can be used as the feature loss of each convolutional layer, so that the feature loss corresponding to each convolutional layer can be obtained.

[0045] The prediction loss of this embodiment refers to the difference between the final prediction value of the model and the true value (i.e., the relevant information about the vehicle stop line in the Label). Optionally, the prediction loss can be calculated by a cross entropy loss function, and then a combined loss function is constructed by combining the feature loss corresponding to each convolutional layer and the prediction loss of the model. For example, the prediction loss function is added to the feature loss function corresponding to each convolutional layer for model parameters. When the combined loss function reaches the minimum value, the model training is stopped.

[0046] It should be noted that in practical applications, the model is generally also equipped with an input network Input, which also convolves the input image through the convolution kernel so that the image input to the backbone network has a specified size. Therefore, if the convolution layer of the input network is used as a convolution layer, then Figure 2 The vehicle stop line detection model shown has five shallow convolutional layers. At this time, the optimization module will calculate the feature loss of the convolutional feature vectors of these five layers.

[0047] In some embodiments of the present application, the step S120 of performing target detection on the image to be detected using the trained target detection model includes:

[0048] Performing multi-scale convolution feature extraction on the image to be detected through the shallow convolution network to obtain a multi-scale convolution feature vector;

[0049] Performing edge detection on the image to be detected by the edge feature extraction module to obtain the edge feature vector;

[0050] The multi-scale convolutional feature vector and the edge feature vector are subjected to feature pooling processing through the pooling network to obtain a feature pooling result.

[0051] In some possible implementation schemes of this embodiment, the pooling network includes an ASPP (Atrous Spatial Pyramid Pooling) network, which uses the ASPP network to combine feature information of different receptive fields without losing information, thereby improving feature accuracy.

[0052] Correspondingly, feature pooling processing is performed on the multi-scale convolution feature vector and the edge feature vector through the pooling network, specifically including:

[0053] Performing channel number transformation and convolution feature fusion on the multi-scale convolution feature vector through a 1×1 convolution kernel and a Concat operation to obtain a fused convolution feature vector;

[0054] Transforming the number of channels of the edge feature vector by using a 1×1 convolution kernel;

[0055] The ASPP network performs feature pooling processing on the fused convolution feature vector and the edge feature vector after the channel number transformation.

[0056] Among them, the number of channels of each scale convolution feature vector is transformed respectively through a 1×1 convolution kernel (conv1×1), and the multi-scale convolution feature vector after the channel number transformation is subjected to a Concat operation and a convolution operation to obtain the fused convolution feature vector.

[0057] Combination Figure 2 As shown in the figure, the vehicle stop line detection model also includes an input network Input and an output network Output. Generally, the input network Input is a convolutional layer, which is used to convert the image size of the input image to the size required by the model, such as converting the 1080*1920 size to 520*520 size. The input image after size conversion is then input into the shallow convolutional layer and the Canny detection operator respectively. The output network Output is a fully connected layer for classification detection.

[0058] Figure 2 The backbone network of the vehicle stop line detection model includes four shallow convolutional layers. Each convolutional layer extracts convolutional features through a 3×3 convolution kernel to obtain convolutional feature vectors at four different scales. The convolutional feature vectors after the first convolution layer, the second convolution layer, and the third convolution layer are respectively transformed in terms of the number of channels using a 1×1 convolution kernel, and the edge feature vector output by the Canny detection operator is transformed in terms of the number of channels using a 1×1 convolution, so that each feature vector input into the ASPP network has the same number of channels.

[0059] Continue to refer to Figure 2 After the number of channels of the convolution feature vectors of the above three scales are transformed, the convolution feature vectors of the three scales are fused. Specifically, the convolution feature vector after the first layer of convolution and the convolution feature vector after the second layer of convolution are concat-operated and convolution-operated based on a 3×3 convolution kernel in turn to obtain the fusion result of the convolution feature vectors of the two scales, and then the fusion result is concat-operated with the convolution feature vector after the third layer of convolution to complete the feature fusion of the convolution feature vectors of the three scales.

[0060] It should be noted that, in this embodiment, when fusing features, the convolution feature vectors at the intermediate scale are mainly fused. This is because the convolution feature vectors of the input part have been subjected to edge feature detection by the Canny detection operator and input into the ASPP, and the convolution feature vectors of the last convolution layer in the backbone network are also input into the ASPP. Therefore, in the feature fusion stage, only the convolution feature vectors at the intermediate scale need to be fused.

[0061] In some embodiments of the present application, the above step S110 also includes obtaining a target type.

[0062] For example, the target type is obtained according to the description information of the image to be detected. Alternatively, when the target is a traffic sign, the target type can also be obtained according to the road position where the target is located. It should be understood that this embodiment does not limit the method for obtaining the target type.

[0063] Different targets have different target detection models. Accordingly, in the above step S120, target detection is performed on the image to be detected using the trained target detection model, which specifically includes:

[0064] Performing target detection on the image to be detected using a target detection model corresponding to the target type.

[0065] It should be noted that in other embodiments of the present application, the image to be detected may also be input into each target detection model for target detection. Those skilled in the art may reasonably design it according to actual needs.

[0066] The target detection method in the above embodiment of the present application has at least the following advantages:

[0067] First, by designing a shallow convolutional network as the backbone network of the model, we can avoid losing a lot of detailed information due to the network structure being too deep, thereby improving the detection accuracy of various forms of targets in different scenarios;

[0068] Second, in the feature pooling stage, an edge feature extraction module is designed to extract edge feature vectors as constraints for multi-scale convolution feature vectors, so as to extract features of different image regions in a more delicate way and improve detection accuracy.

[0069] Third, by designing an optimization module, the feature loss of each convolutional layer of the backbone network is constrained to improve the model convergence speed.

[0070] The present application also provides a target detection device 300, such as Figure 3 As shown, a schematic diagram of the structure of a target detection device in an embodiment of the present application is provided, wherein the device 300 includes: an image acquisition unit 310 and an image detection unit 320, wherein:

[0071] The image acquisition unit 310 is used to acquire an image to be detected containing an object with a certain edge;

[0072] The image detection unit 320 is used to perform target detection on the image to be detected using the trained target detection model to obtain a target detection result;

[0073] Among them, the target detection model includes a shallow convolutional network, a pooling network, an edge feature extraction module and an optimization module. The shallow convolutional network extracts the multi-scale convolutional feature vector of the target through a convolutional layer, the edge feature extraction module extracts the edge feature vector of the target, the pooling network performs feature pooling processing on the multi-scale convolutional feature vector and the edge feature vector, and the optimization module optimizes the model parameters through the feature loss of each convolutional layer and the prediction loss of the target detection model.

[0074] In some embodiments of the present application, the image detection unit 320 is specifically used to perform multi-scale convolution feature extraction on the image to be detected through the shallow convolutional network to obtain a multi-scale convolution feature vector; perform edge detection on the image to be detected through the edge feature extraction module to obtain the edge feature vector; perform feature pooling processing on the multi-scale convolution feature vector and the edge feature vector through the pooling network to obtain a feature pooling result.

[0075] In some embodiments of the present application, the pooling network includes an ASPP network, an image detection unit 320, which is specifically used to perform channel number transformation and convolution feature fusion on the multi-scale convolution feature vector through a 1×1 convolution kernel and a Concat operation to obtain a fused convolution feature vector; perform channel number transformation on the edge feature vector through a 1×1 convolution kernel; and perform feature pooling processing on the fused convolution feature vector and the edge feature vector after channel number transformation through the ASPP network.

[0076] In some embodiments of the present application, the image detection unit 320 is specifically used to transform the number of channels of each scale convolution feature vector through a 1×1 convolution kernel; perform Concat operation and convolution operation on the multi-scale convolution feature vector after the channel number transformation to obtain the fused convolution feature vector.

[0077] In some embodiments of the present application, different targets have different target detection models;

[0078] The image acquisition unit 310 is also used to acquire the target type;

[0079] The image detection unit 320 is further configured to perform target detection on the image to be detected using a target detection model corresponding to the target type.

[0080] In some embodiments of the present application, the road marking line detection device 300 further includes a model training unit;

[0081] The model training unit is used to obtain a training set with multiple sample data, where the sample data includes labeled data corresponding to the target; input the sample data into the initial target detection model, and obtain the feature loss of each convolution layer and the prediction loss of the target detection model through the optimization module; calculate the loss function according to the feature loss of each convolution layer and the prediction loss of the target detection model; and update the model parameters according to the calculated loss function and using the back propagation algorithm.

[0082] In some embodiments of the present application, the model training unit is specifically used to perform size transformation processing on the convolution feature vector of each convolution layer so that the size information of the transformed convolution feature vector is the same as the size of the labeled data; obtain the difference between the transformed convolution feature vector of each convolution layer and the target in the labeled data; and obtain the feature loss of each convolution layer based on the difference.

[0083] It can be understood that the above-mentioned target detection device can implement each step of the target detection method provided in the above-mentioned embodiment, and the relevant explanations about the target detection method are applicable to the target detection device and will not be repeated here.

[0084] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 4 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.

[0085] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0086] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.

[0087] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a target detection device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:

[0088] Acquire an image to be detected containing an object with a determined edge;

[0089] Using the trained target detection model to perform target detection on the image to be detected to obtain a target detection result;

[0090] Among them, the target detection model includes a shallow convolutional network, a pooling network, an edge feature extraction module and an optimization module. The shallow convolutional network extracts the multi-scale convolutional feature vector of the target through a convolutional layer, the edge feature extraction module extracts the edge feature vector of the target, the pooling network performs feature pooling processing on the multi-scale convolutional feature vector and the edge feature vector, and the optimization module optimizes the model parameters through the feature loss of each convolutional layer and the prediction loss of the target detection model.

[0091] The above application Figure 1 The method performed by the target detection device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in a decoding processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the target detection method in combination with its hardware.

[0092] The electronic device may also perform Figure 1 The method is performed by the target detection device in Figure 1 The functions of the illustrated embodiment will not be described in detail in the embodiments of the present application.

[0093] The present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by an electronic device including multiple application programs, enable the electronic device to execute Figure 1 The method performed by the target detection device in the illustrated embodiment is specifically used to perform:

[0094] Acquire an image to be detected containing an object with a determined edge;

[0095] Using the trained target detection model to perform target detection on the image to be detected to obtain a target detection result;

[0096] Among them, the target detection model includes a shallow convolutional network, a pooling network, an edge feature extraction module and an optimization module. The shallow convolutional network extracts the multi-scale convolutional feature vector of the target through a convolutional layer, the edge feature extraction module extracts the edge feature vector of the target, the pooling network performs feature pooling processing on the multi-scale convolutional feature vector and the edge feature vector, and the optimization module optimizes the model parameters through the feature loss of each convolutional layer and the prediction loss of the target detection model.

[0097] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0098] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0099] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0100] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0101] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0102] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0103] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0104] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0105] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0106] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A target detection method, characterized in that: The target detection method comprises: Acquire an image to be detected containing an object with a determined edge; Using the trained target detection model to perform target detection on the image to be detected to obtain a target detection result; Among them, the target detection model includes a shallow convolutional network, a pooling network, an edge feature extraction module and an optimization module. The shallow convolutional network extracts the multi-scale convolutional feature vector of the target through a convolutional layer, the edge feature extraction module extracts the edge feature vector of the target, the pooling network performs feature pooling processing on the multi-scale convolutional feature vector and the edge feature vector, and the optimization module optimizes the model parameters through the feature loss of each convolutional layer and the prediction loss of the target detection model.

2. The target detection method according to claim 1, characterized in that: The performing target detection on the image to be detected by using the trained target detection model includes: Performing multi-scale convolution feature extraction on the image to be detected through the shallow convolution network to obtain a multi-scale convolution feature vector; Performing edge detection on the image to be detected by the edge feature extraction module to obtain the edge feature vector; The multi-scale convolutional feature vector and the edge feature vector are subjected to feature pooling processing through the pooling network to obtain a feature pooling result.

3. The target detection method according to claim 2, characterized in that: The pooling network includes an ASPP network, and the performing feature pooling processing on the multi-scale convolution feature vector and the edge feature vector through the pooling network includes: Performing channel number transformation and convolution feature fusion on the multi-scale convolution feature vector through a 1×1 convolution kernel and a Concat operation to obtain a fused convolution feature vector; Transforming the number of channels of the edge feature vector by using a 1×1 convolution kernel; The ASPP network performs feature pooling processing on the fused convolution feature vector and the edge feature vector after the channel number transformation.

4. The target detection method according to claim 3, characterized in that: The method of performing channel number transformation and convolution feature fusion on the multi-scale convolution feature vector by using a 1×1 convolution kernel and a Concat operation to obtain a fused convolution feature vector includes: The number of channels of each scale convolution feature vector is transformed through a 1×1 convolution kernel; The multi-scale convolution feature vector after the channel number transformation is subjected to a Concat operation and a convolution operation to obtain the fused convolution feature vector.

5. The target detection method according to claim 1, characterized in that: Different targets have different target detection models, and the method further includes: Get the target type; The performing target detection on the image to be detected by using the trained target detection model includes: Performing target detection on the image to be detected using a target detection model corresponding to the target type.

6. The target detection method according to claim 1, characterized in that: Train the object detection model through the following steps: Obtaining a training set having a plurality of sample data, wherein the sample data includes labeled data corresponding to a target; Inputting the sample data into the initial target detection model, and obtaining the feature loss of each convolutional layer and the prediction loss of the target detection model through the optimization module; Calculate the loss function based on the feature loss of each convolutional layer and the prediction loss of the object detection model; Based on the calculated loss function and using the back-propagation algorithm, the model parameters are updated.

7. The target detection method according to claim 6, characterized in that: The step of obtaining the feature loss of each convolutional layer through the optimization module includes: The convolution feature vector of each convolution layer is resized so that the size information of the transformed convolution feature vector is the same as the size of the labeled data; Obtain the difference between the transformed convolution feature vector of each convolution layer and the target in the labeled data; The feature loss of each convolutional layer is obtained according to the difference.

8. A target detection device, characterized in that: The target detection device comprises: An image acquisition unit, used for acquiring an image to be detected containing a target with a certain edge; An image detection unit is used to perform target detection on the image to be detected using a trained target detection model to obtain a target detection result; Among them, the target detection model includes a shallow convolutional network, a pooling network, an edge feature extraction module and an optimization module. The shallow convolutional network extracts the multi-scale convolutional feature vector of the target through a convolutional layer, the edge feature extraction module extracts the edge feature vector of the target, the pooling network performs feature pooling processing on the multi-scale convolutional feature vector and the edge feature vector, and the optimization module optimizes the model parameters through the feature loss of each convolutional layer and the prediction loss of the target detection model.

9. An electronic device, comprising: processor; as well as A memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor performs the target detection method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including a plurality of application programs, enables the electronic device to execute the target detection method according to any one of claims 1 to 7.