Neural network and method for training same
An end-to-end detection model with optimized feature processing and loss functions enhances accuracy and efficiency for real-time object detection on mobile platforms.
Patent Information
- Application Number
- JP2021034929
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-04-08
- Filing Date
- 2021-03-05
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2041-03-05
AI Technical Summary
Existing detection models for mobile platforms face accuracy issues due to limited hardware processing power, with real-time tasks requiring significant manual work and prior knowledge, and accuracy loss in small models designed for classification tasks.
An end-to-end detection model with a backbone network, feature network, and prediction module, utilizing deconvolution, merging, and varying convolution operations to optimize features of different sizes, trained using a combination of regression and focal losses.
The model achieves improved accuracy and efficiency on resource-limited platforms by balancing precision and computation, suitable for real-time object detection tasks.
Smart Images

Figure 0007563241000004 
Figure 0007563241000005 
Figure 0007563241000006
Abstract
Description
[Technical field]
[0001] The present invention relates to a neural network and a training method thereof, and in particular to a neural network model for object detection and a corresponding training method. [Background technology]
[0002] At present, with the widespread use of smartphones, people are beginning to enjoy the convenience brought by science and technology. This has also stimulated the continuous development of artificial intelligence technology to a certain extent. Artificial intelligence often requires a lot of computing power to achieve certain effects. However, many mature algorithms cannot be deployed and applied on smartphones because the processing power of the hardware of mobile platforms is usually limited.
[0003] Therefore, researchers have begun to explore the realization of small models. In recent years, many efficient architectures have been proposed, such as Pelee described in Non-Patent Document 1, ShuffleNetV2 described in Non-Patent Document 2, and MobileNetV3 described in Non-Patent Document 3. Although these models can meet the real-time requirements of mobile platforms, there is still room for improving accuracy. In particular, for detection tasks, the accuracy loss of small models is much larger than that of classification tasks.
[0004] As is well known, detection tasks are fundamental research in computer vision, which has been widely studied and applied in practice. Most traditional target detection models use networks designed for image classification as their backbone, and developers have developed various feature representations for detectors.
[0005] Generally speaking, traditional detection models usually suffer from the following shortcomings:
[0006] 1) The detection model relies on a large amount of manual effort and prior knowledge, and although good detection accuracy can be obtained, it is not suitable for real-time tasks; 2) Although artificially designed small models or pruned models can address real-time problems, the accuracy is often not high because the backbone of these models is from networks designed for classification tasks. [Prior art documents] [Non-patent literature]
[0007] [Non-Patent Document 1] Wang, RJ, Li, X., Ao, S., Ling, CX: Pelee: A real-time object detection system on mobile devices.arXiv preprint arXiv:1804.06882(2018) [Non-Patent Document 2] Ningning Ma, Xiangyu Zhang, Hai-Tao Zheng, and Jian Sun.Shufflenet v2:Practical guidelines for efficient cnn architecture design.In ECCV, 2018 [Non-Patent Document 3] Howard, A., Sandler, M., Chu, G., Chen, L.-C., Chen, B., Tan, M., Wang, W., Zhu, Y., Pang, R., Vasudevan, V., et al. Searching for mobilenetv3.arXiv preprint arXiv:1905.02244, 2019 Summary of the Invention [Problem to be solved by the invention]
[0008] The inventors of the present invention have found that an end-to-end detection model is necessary and efficient for detection tasks. Based on this, the objective of the present invention is to provide an end-to-end detection model and a corresponding training method suitable for resource-limited platforms. [Means for solving the problem]
[0009] According to one aspect of the present invention, there is provided a method for training a neural network, wherein the neural network is used for detecting an object in an image and includes a backbone network, a feature network and a prediction module, the feature network includes a first module and a second module, and the method includes: The backbone network processes the sample image and outputs N first features of different sizes; A first module of the feature network performs N-1 deconvolution operations based on the smallest first feature output from the backbone network, and outputs N second features of different sizes; A second module of the feature network performs merging on the N first features output from the backbone network, and outputs N third features of different sizes; generating N fourth features of different sizes by combining each of the N second features with a corresponding one of the N third features having the same size, and performing a different number of convolution operations on the N fourth features; the prediction module makes a prediction based on the N fourth features and calculates a first loss; The prediction module makes a prediction based on the features obtained after the convolution operation, and calculates a second loss; and training the neural network by optimizing settings of the backbone network, the feature network and the prediction module based on a combination of the first loss and the second loss.
[0010] According to another aspect of the present invention, a neural network for detecting an object in an image is provided, the neural network including a backbone network, a feature network, and a prediction module. The feature network includes a first module and a second module. The backbone network processes a sample image and outputs N first features of different sizes. The first module of the feature network performs N-1 deconvolution operations based on the smallest first feature output from the backbone network, and outputs N second features of different sizes. The second module of the feature network performs merging on the N first features output from the backbone network, and outputs N third features of different sizes. Each of the N second features is combined with a corresponding one of the N third features having the same size to generate N fourth features of different sizes, and the N fourth features are convolved a different number of times. The prediction module performs prediction based on the N fourth features and calculates a first loss, and performs prediction based on the features obtained after the convolution operations and calculates a second loss. The neural network is trained based on a combination of the first loss and the second loss.
[0011] According to another aspect of the present invention, there is provided an apparatus for training a neural network, the neural network being used for detecting an object in an image, the apparatus including a backbone network, a feature network and a prediction module, the feature network including a first module and a second module. The backbone network performs processing on a sample image and outputs N first features of different sizes. The first module of the feature network performs N-1 deconvolution operations based on the smallest first feature output from the backbone network, and outputs N second features of different sizes. The second module of the feature network performs merging on the N first features output from the backbone network, and outputs N third features of different sizes. Each of the N second features is combined with a corresponding one of the N third features having the same size to generate N fourth features of different sizes, and the N fourth features are convolved a different number of times. The prediction module performs prediction based on the N fourth features and calculates a first loss, and performs prediction based on the feature obtained after the convolution operation and calculates a second loss. The apparatus includes one or more processors configured to train the neural network by optimizing settings of the backbone network, the feature network, and the prediction module based on a combination of the first loss and the second loss.
[0012] According to another aspect of the present invention, a storage medium is provided having a program stored thereon, which, when executed, causes a computer to execute a method for training a neural network, wherein the neural network is used for detecting an object in an image, and includes a backbone network, a feature network, and a prediction module, and the feature network includes a first module and a second module. The backbone network processes a sample image and outputs N first features of different sizes. The first module of the feature network performs N-1 deconvolution operations based on the smallest first feature output from the backbone network, and outputs N second features of different sizes. The second module of the feature network performs merging on the N first features output from the backbone network, and outputs N third features of different sizes. Each of the N second features is combined with a corresponding one of the N third features having the same size to generate N fourth features of different sizes, and different convolution operations are performed on the N fourth features. The prediction module makes a prediction based on the N fourth features and calculates a first loss, and makes a prediction based on features obtained after a convolution operation and calculates a second loss. The method includes training the neural network by optimizing settings of the backbone network, the feature network, and the prediction module based on a combination of the first loss and the second loss. [Brief description of the drawings]
[0013] [Figure 1] FIG. 2 illustrates the architecture of an object detection model according to the present invention. [Diagram 2] A diagram showing the architecture of a backbone network. [Diagram 3] FIG. 2 illustrates a convolution unit. [Figure 4] FIG. 2 illustrates the architecture of the feature network and target prediction module. [Diagram 5] FIG. 13 illustrates the merging process performed by the second module of the feature network. [Figure 6] 2 is a flowchart of a method for training an object detection model according to an embodiment of the present invention. [Figure 7] FIG. 2 is an exemplary block diagram of computer hardware in which the present invention may be implemented. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings. Note that the following embodiments are merely illustrative and do not limit the present invention.
[0015] FIG. 1 is a diagram showing the architecture of an object detection model according to the present invention. The object detection model can be realized by a neural network. As shown in FIG. 1, the object detection model includes a backbone network 110, a feature network 120 and a prediction module 130. The backbone network 110 constitutes the basic network of the detection model, the feature network 120 is used to extract feature representations, and the target prediction module 130 uses the extracted feature representations to perform object detection.
[0016] Also, the images input to the detection model may be scaled to have a uniform size, for example 320 x 320. The prediction module 130 may consist of, for example, a 3 x 3 convolution operation, and finally output an output image with a bounding box and a class label, where the bounding box indicates the location of the detected object and the class label indicates the class to which the object belongs.
[0017] FIG. 2 is an exemplary diagram illustrating the architecture of a backbone network. As shown in FIG. 2, the backbone network according to the present invention includes, for example, 17 layers, but the present invention is not limited thereto. The first layer is a backbone layer, which performs a convolution operation of a predetermined step length, for example, a 3×3 convolution operation with a step length of 2. Each layer among the second layer to the seventeenth layer is composed of the convolution unit shown in FIG. 3, but the second layer to the seventeenth layer may be different from each other in terms of the configuration of the convolution unit.
[0018] As shown in FIG. 3, the current layer receives the output of the previous layer, performs random mixing of channels, and then divides the channels into two equal parts to form two branches. The same processing is performed in these two branches, and the calculations can be performed in parallel, so that the processing time can be saved compared with a single-branch convolutional layer. Each branch sequentially performs the following operations: (1) 1×1 convolution operation, and then increases the number of channels by a certain factor, i.e., performs channel expansion; (2) K×K deep convolution operation; (3) 1×1 convolution operation, and then decreases the number of channels by the same factor, i.e., performs channel reduction, so that the number of channels is the initial number in operation (1). Finally, the outputs of each of the two branches are cascaded and output to the next layer.
[0019] The convolution unit shown in Figure 3 may have different settings in different layers. Specifically, at least one of the following may be set: channel expansion factor, deep convolution kernel size, whether to add processed channels and unprocessed channels, and whether to add a squeeze-and-excitation block. As an example, an optimal combination can be obtained based on prior knowledge.
[0020] For example, the channel expansion factor may be 1, 3, or 6, and the kernel size of the deep convolution may be 3×3 or 5×5. Although not shown in FIG. 3, an SE block may be added to the convolution unit of a certain layer or some layers to obtain higher accuracy. In such a case, an SE block may be added between the deep convolution and the 1×1 convolution (channel reduction).
[0021] Also, as shown in FIG. 3, in each branch, the output of the branch is generated by summing the convoluted channel and the unprocessed channel, as indicated by the arrow with the "shortcut" and the sign (+) indicating "addition" in the figure. However, this setting can be changed. For example, such summation is not performed when there is a change in the channel or the feature size between the current layer and the previous layer. In other words, in such a case, the arrow with the "shortcut" and the sign (+) with the "addition" in FIG. 3 are removed, and only the convoluted channel is used as the output of the corresponding branch.
[0022] The specific parameters of the backbone network are shown in Table 1 below, in which "unit" represents the convolution unit shown in Figure 3, and "Y" represents an additional SE block. [Table 1] TIFF0007563241000002.tif146170
[0023] As shown in Fig. 1, the output of the backbone network 110 is the input of the feature network 120. Since the feature pyramid network (FPN) is suitable for processing objects of different sizes in an image, the present invention uses the FPN as the basic feature structure. Therefore, the present invention generates a first feature based on the output of each layer (layer 1 to layer 17) of the backbone network 110, and the first feature is input to the feature network 120 as the output of the backbone network 110.
[0024] The generation of the first feature will be described below with an example. In this example, features output by the 5th, 12th, and 17th layers of the backbone network 110 are selected, and these features are defined as {f1, f2, f3}. The features f1, f2, and f3 have different sizes, for example, 40×40, 20×20, and 10×10, respectively, among which the size of the feature f3 is the smallest. Then, the feature f3 is subjected to max pooling operations with step lengths of 2 and 4, respectively, to obtain two other features f4 and f5 with smaller sizes. The five obtained features of different sizes {f1, f2, f3, f4, f5} are used to construct a first feature, which is then input to the feature network 120. Note that the present invention is not limited to this example, and other methods can also be used to generate the first feature. For example, features output from layers other than the 5th, 12th, and 17th layers can be selected, or the number of features included in the first feature can be changed.
[0025] 4 is a diagram showing an exemplary architecture of a feature network and a target prediction module. As shown in FIG. 4, the feature network includes a first module 410 and a second module 420, and receives a first feature F1 from a backbone network. The first feature F1 includes N features of different sizes (five are shown in the figure for illustration).
[0026] The first module 410 performs N-1 (four) deconvolution operations based on the feature f5 with the smallest size among the first features F1 to generate a set of new features (represented as second features F2). Specifically, first, perform a first deconvolution operation on feature f5, and then perform a second deconvolution operation on the features obtained after the first deconvolution operation, and perform a total of N-1 deconvolution operations in this manner. For example, the generated second feature F2 includes feature f5 and four features generated by four deconvolution operations.
[0027] The second module 420 performs merging on the features included in the first feature F1 to generate a set of new features (denoted as the third feature F3). FIG. 5 illustrates a method of performing the merging process. As shown in FIG. 5, a merging process is performed between the i+1th feature and the i-th feature, where i=1, 2, ..., N-1, and the size of the i+1th feature is smaller than that of the i-th feature. First, a process including bilinear interpolation and convolution operation is performed on the i+1th feature. The bilinear interpolation is used to change the size of the i+1th feature to be the same as that of the i-th feature by performing upsampling on the i+1th feature. The convolution operation is used to realize channel normalization of the two features. Then, the i-th feature is merged with the processed i+1th feature to obtain a new i-th feature. After that, the new i-th feature is obtained by performing the merging process shown in FIG. 5 on the obtained new i-th feature and the original i-1th feature.
[0028] N-1 new features can be generated through the above-mentioned method. Then, the second module 420 performs a max pooling operation on the N-1th new feature with the smallest size among these new features to obtain an Nth new feature, whose size is smaller than that of the N-1th new feature. Up to now, N new features have been generated, which constitute the output of the second module 420, i.e., the third feature F3.
[0029] The first module 410 and the second module 420 can improve efficiency by performing processes in parallel. Then, the second feature F2 output by the first module 410 and the third feature F3 output by the second module 420 are cascaded to obtain an enhanced multi-scale feature, i.e., a fourth feature F4. More specifically, the fourth feature F4 including N features is generated by cascading each feature included in the second feature F2 with a feature having the same size in the third feature F3.
[0030] 4 shows a fourth feature F4 including five features {p1, p2, p3, p4, p5}. The prediction module 130 performs prediction based on the fourth feature F4 and calculates a first loss. This is well known to those skilled in the art, so the detailed process is omitted in this document.
[0031] Meanwhile, different numbers of convolution operations (e.g., 3×3 convolution) are performed on the features p1, p2, p3, p4, and p5 included in the fourth feature F4, and the prediction module 130 performs prediction based on the features obtained after the convolution operations and calculates the second loss. More specifically, as the size of the feature increases, the number of convolution operations performed on it decreases. In this respect, FIG. 4 exemplarily shows that no convolution operation is performed on the feature p1 with the largest size, and one to four convolutions are performed on the features p2 to p5 with gradually decreasing sizes. Note that the present invention is not limited to the example shown in FIG. 4.
[0032] Performing convolution operations on features with a relatively large scale may result in a relatively large amount of calculations, which may lead to a decrease in efficiency. Therefore, the present invention can achieve a good balance between accuracy and efficiency by performing a relatively small number of convolution calculations on features with a relatively large size and a relatively large number of convolution calculations on features with a relatively small size.
[0033] The obtained first loss and second loss are used to train the object detection model shown in FIG. 1. Specifically, the prediction module 130 calculates the regression representation and the sum classification representation, respectively, using, for example, 3×3 convolution. In terms of model evaluation, for example, the regression loss method and the focus loss method can be adopted. The regression loss (RLOSS) represents the loss related to the detection of the bounding box, and the focus loss (FLOSS) represents the loss related to the class label. Note that the focus loss is one type of classification loss, and although the present invention focuses on the focus loss, other classification losses may be used in the present invention.
[0034] The first loss includes a regression loss RLOSS1 and a focus loss FLOSS1, and the second loss includes a regression loss RLOSS2 and a focus loss FLOSS2. Therefore, when training the detection model m, the loss function expressed by the following equation (1) can be adopted.
number
[0035] By minimizing the loss function LOSS(m), the setting parameters of the detection model of the backbone network 110, the feature network 120 and the prediction module 130 can be optimized to obtain good detection accuracy.
[0036] 6 is a flowchart of a method for training an object detection model according to the present invention. As shown in FIG. 6, in step S610, the backbone network 110 processes an input image to generate and output a first feature F1. The first feature F1 includes N features of different sizes, such as the above-mentioned {f1, f2, f3, f4, f5}.
[0037] In step S620, the first module 410 of the feature network 120 performs N-1 deconvolution operations based on the smallest feature (e.g., feature f5) among the first features F1 output by the backbone network 110 to generate a second feature F2. The second feature F2 includes the smallest feature and the features obtained after performing the deconvolution operations each time.
[0038] In step S630, the second module 420 of the feature network 120 performs merging on the N features among the first features F1 output by the backbone network 110 to generate a third feature F3. For the method of the merging process, see the description of FIG. 5 above.
[0039] In step S640, the second feature F2 and the third feature F3 are combined according to the size grade to generate a fourth feature F4, which includes N features of different sizes, such as {p1, p2, p3, p4, p5} as mentioned above.
[0040] In step S650, each feature in the fourth feature set F4 is subjected to a different number of convolution operations, in particular, as the size of a feature increases, the number of convolution operations performed thereon decreases.
[0041] In step S660, the prediction module 130 makes a prediction based on the fourth feature F4 that has not undergone the convolution operation and calculates a first loss, and the prediction module 130 further makes a prediction based on the features obtained after the convolution operation and calculates a second loss.
[0042] In step S670, an object detection model is trained based on the loss function shown in equation (1) above, and the settings of the backbone network 110, the feature network 120 and the prediction module 130 are optimized.
[0043] Above, the end-to-end object detection model and its training method proposed in the present invention have been described with the aid of specific embodiments. Compared with the conventional models, the detection model according to the present invention has at least the following advantages:
[0044] This detection model is specially designed for detection tasks on small platforms; The model architecture design takes into account the parallel processing capabilities of the device and can process data streams simultaneously; In each layer of the backbone network (each layer other than the backbone layer), the size of the convolution kernel and the number of channels are flexibly set. This results in higher accuracy than models that use fixed convolution kernel sizes and fixed numbers of channels in all layers; A good balance between precision and efficiency can be achieved.
[0045] The methods described in the above-mentioned embodiments can be realized by software, hardware, or a combination of software and hardware. The programs included in the software can be stored in advance in a storage medium installed inside or outside the device. As an example, at the time of execution, these programs can be written into a ROM and executed by a processor (e.g., a CPU) to realize various methods and processes described herein.
[0046] 7 is a block diagram of computer hardware (general-purpose PC 700) that executes the method according to the present invention based on a program. The computer hardware is an example of an apparatus for training a detection model according to the present invention. The backbone network, feature network, and prediction module in the detection model of the present invention can also be realized using the computer hardware.
[0047] The general-purpose PC 700 may be, for example, a computer system. Note that the general-purpose PC 700 is merely an example, and the scope or functionality of the method and apparatus according to the present invention is not limited thereto. Furthermore, the general-purpose PC 700 does not depend on any module, assembly, or combination thereof in the above-mentioned method and apparatus.
[0048] 7, a central processing unit (CPU) 701 can perform various processes based on a program stored in a ROM 702 or a program loaded from a storage unit 708 to a RAM 703. The RAM 703 can also store data required when the CPU 701 performs various processes, depending on the needs. The CPU 701, the ROM 702, and the RAM 703 can be connected to each other via a bus 704. An input / output interface 705 can also be connected to the bus 704.
[0049] Further, the following components are connected to the input / output interface 705: an input unit 706 including a keyboard, an output unit 707 including a display such as a liquid crystal display (LCD) and a speaker, a storage unit 708 including a hard disk, and a communication unit 709 including a network interface card such as a LAN card and a modem. The communication unit 709 performs communication processing via a network such as the Internet or a LAN. A drive 710 may be connected to the input / output interface 705 according to needs. A removable medium 711, such as a semiconductor memory, can be set in the drive 710 as necessary, and a computer program read from the removable medium 711 can be installed in the storage unit 708.
[0050] The present invention further provides a program product including a machine-readable instruction code, which, when read and executed by a machine, can execute the method in the above-mentioned embodiment of the present invention. Accordingly, various storage media, such as magnetic disks (including floppy disks (registered trademark)), optical disks (including CD-ROMs and DVDs), magneto-optical disks (including MDs (registered trademark)), and semiconductor storage devices, that carry such a program product are also included in the present invention.
[0051] The above-mentioned storage medium may include, for example, a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory device, and the like, but is not limited to these.
[0052] Additionally, each operation (process) in the above-described methods may be implemented in the form of a computer-executable program stored in various machine-readable storage media.
[0053] Furthermore, the above-mentioned embodiments are further disclosed as supplementary notes as follows.
[0054] (Appendix 1) 1. A method for training a neural network, comprising: The neural network is used for detecting an object in an image, and includes a backbone network, a feature network, and a prediction module, the feature network includes a first module and a second module, and the method includes: The backbone network processes the sample image and outputs N first features of different sizes; A first module of the feature network performs N-1 deconvolution operations based on the smallest first feature output from the backbone network, and outputs N second features of different sizes; A second module of the feature network performs merging on the N first features output from the backbone network, and outputs N third features of different sizes; generating N fourth features of different sizes by combining each of the N second features with a corresponding one of the N third features having the same size, and performing a different number of convolution operations on the N fourth features; the prediction module makes a prediction based on the N fourth features and calculates a first loss; The prediction module makes a prediction based on the features obtained after the convolution operation, and calculates a second loss; and training the neural network by optimizing settings of the backbone network, the feature network, and the prediction module based on a combination of the first loss and the second loss.
[0055] (Appendix 2) 2. The method according to claim 1, comprising: The N second features output by the first module of the feature network include the first feature with the smallest size and a feature obtained after performing a deconvolution operation each time.
[0056] (Appendix 3) The method according to claim 1, further comprising: A second module of the feature network performs processing on the (i+1)th first feature, including bilinear interpolation and convolution operations, and merges the (i)th first feature with the processed (i+1)th first feature; Among them, the method where i=1, 2, ..., N-1.
[0057] (Appendix 4) The method according to claim 1, further comprising: A second module of the feature network performs processing on the i+1th first feature, including bilinear interpolation and convolution operations, and merges the ith first feature with the processed i+1th first feature to obtain an ith third feature, where i=1, 2, ..., N-1; and The method, wherein the second module includes performing a max pooling operation on the N-1th third feature to obtain an Nth third feature.
[0058] (Appendix 5) 2. The method according to claim 1, comprising: A method wherein as the size of the fourth feature increases, the number of convolution operations performed thereon decreases.
[0059] (Appendix 6) 2. The method according to claim 1, comprising: wherein each of the first loss and the second loss comprises a regression loss and a classification loss.
[0060] (Appendix 7) 2. The method according to claim 1, comprising: the backbone network includes multiple layers, and the channels of each layer are divided into two equal parts; The method further comprises: performing processing including convolution, channel expansion, and channel reduction on channels of each of the two parts, and combining the processed channels of the two parts for input to a next layer.
[0061] (Appendix 8) The method according to claim 7, further comprising: For each partial channel of each layer, sum the processed channel with the unprocessed channel to obtain the output of the partial; and combining the outputs of the two parts and inputting them into the next layer.
[0062] (Appendix 9) 9. The method according to claim 8, comprising: The method, wherein the processing performed on the channels of each of the two portions further comprises adding SE blocks.
[0063] (Appendix 10) 10. The method according to claim 9, The method includes configuring at least one of a channel expansion factor, a convolution kernel size, whether to sum processed and unprocessed channels, and whether to add SE blocks for each layer of the backbone network.
[0064] (Appendix 11) The method according to claim 7, further comprising: generating a plurality of features of different sizes through a plurality of layers of the backbone network; selecting a subset of the plurality of features, and determining a particular feature within the subset that is smallest in size; performing a process on the particular feature to generate one or more features that are smaller in size than the particular feature; and constructing N first features output from the backbone network from features in the subset and the one or more features smaller in size than the particular feature.
[0065] (Appendix 12) 1. A neural network for use in detecting objects in an image, comprising: The neural network comprises: a backbone network, the backbone network operating on a sample image and outputting N first features of different sizes; A feature network, the feature network including a first module and a second module, the first module performing N-1 deconvolution operations based on a first feature with a smallest size output from the backbone network, and outputting N second features with different sizes, the second module performing a merge on the N first features output from the backbone network, and outputting N third features with different sizes, in which each of the N second features is combined with a corresponding one of the N third features having the same size to generate N fourth features with different sizes, and the N fourth features are subjected to different convolution operations; and a prediction module, the prediction module making a prediction based on the N fourth features and calculating a first loss, and making a prediction based on features obtained after a convolution operation and calculating a second loss; Wherein, the neural network is trained based on a combination of the first loss and the second loss.
[0066] (Appendix 13) 1. An apparatus for training a neural network, comprising: The neural network is used for detecting an object in an image, and includes a backbone network, a feature network, and a prediction module, and the feature network includes a first module and a second module; The backbone network processes the sample image and outputs N first features of different sizes; The first module of the feature network performs N-1 deconvolution operations based on the smallest first feature output from the backbone network, and outputs N second features of different sizes; A second module of the feature network performs merging on the N first features output from the backbone network, and outputs N third features of different sizes; combining each of the N second features with a corresponding one of the N third features having the same size to generate N fourth features of different sizes, and performing a different number of convolution operations on each of the N fourth features; The prediction module performs prediction based on the N fourth features and calculates a first loss; and performs prediction based on features obtained after the convolution operation and calculates a second loss; The apparatus includes one or more processors configured to train the neural network by optimizing settings of the backbone network, the feature network, and the prediction module based on a combination of the first loss and the second loss.
[0067] (Appendix 14) A storage medium storing a program, The program, when executed, causes a computer to perform a method for training a neural network, Wherein, the neural network is used for detecting an object in an image, and includes a backbone network, a feature network and a prediction module; the feature network includes a first module and a second module; The backbone network processes the sample image and outputs N first features of different sizes; The first module of the feature network performs N-1 deconvolution operations based on the smallest first feature output from the backbone network, and outputs N second features of different sizes; A second module of the feature network performs merging on the N first features output from the backbone network, and outputs N third features of different sizes; each of the N second features is combined with a corresponding one of the N third features having the same size to generate N fourth features of different sizes, and the N fourth features are convolved a different number of times; The prediction module performs prediction based on the N fourth features and calculates a first loss; and performs prediction based on features obtained after the convolution operation and calculates a second loss; wherein the method includes training the neural network by optimizing settings of the backbone network, the feature network, and the prediction module based on a combination of the first loss and the second loss.
[0068] Although the preferred embodiment of the present invention has been described above, the present invention is not limited to this embodiment, and any modification to the present invention falls within the technical scope of the present invention as long as it does not depart from the spirit of the present invention.
Claims
1. 1. A method for training a neural network, comprising: The neural network is used for detecting an object in an image, and includes a backbone network, a feature network, and a prediction module; the feature network includes a first module and a second module; The method comprises: The backbone network processes the sample image and outputs N first features of different sizes; A first module of the feature network performs N-1 deconvolution operations based on the smallest first feature output from the backbone network, and outputs N second features of different sizes; A second module of the feature network performs a merging process on the N first features output from the backbone network, and outputs N third features of different sizes; combining each of the N second features with a corresponding one of the N third features having the same size to generate N fourth features of different sizes, and performing a different number of convolution operations on the N fourth features; the prediction module makes a prediction based on the N fourth features and calculates a first loss; The prediction module makes a prediction based on the features obtained after the convolution operation and calculates a second loss; and training the neural network by optimizing settings of the backbone network, the feature network, and the prediction module based on a combination of the first loss and the second loss.
2. 2. The method of claim 1 , The N second features output by the first module of the feature network include the first feature with the smallest size and a feature obtained after performing a deconvolution operation each time.
3. 2. The method of claim 1 , The second module of the feature network further includes performing a process on the i+1th first feature, including a bilinear interpolation and a convolution operation, and performing a merge process on the i-th first feature and the processed i+1th first feature; The method, where i=1, 2, . . . , N-1.
4. 2. The method of claim 1 , The method, wherein the number of convolution operations performed on the fourth feature decreases as the size of the fourth feature increases.
5. 2. The method of claim 1 , wherein each of the first loss and the second loss comprises a regression loss and a classification loss.
6. 2. The method of claim 1 , the backbone network includes a plurality of layers, and the channels of each layer are divided into two equal parts; The method comprises: The method further comprises performing processing on the channels of each of the two parts, including a convolution operation, a channel expansion, and a channel reduction, and combining the processed channels of the two parts for input to a next layer.
7. 7. The method of claim 6, For each partial channel of each layer, sum the processed channel with the unprocessed channel to obtain the partial output; and The method further comprising combining the outputs of the two parts and inputting them into the next one layer.
8. 8. The method of claim 7, The method, wherein the processing performed on the channels of each of the two portions further comprises the addition of a Squeeze-and-Excitation block (SE block).
9. 9. The method of claim 8, For each layer of the backbone network, Channel expansion factor, convolution kernel size, whether to sum processed and unprocessed channels, and whether to add SE blocks A method for setting at least one of
10. 7. The method of claim 6, generating a plurality of features of different sizes through a plurality of layers of the backbone network; selecting a subset of the plurality of features and determining a particular feature from the subset that is smallest in size; performing a process on the particular feature to generate one or more features whose size is smaller than the size of the particular feature; and The method further includes constructing N first features output from the backbone network from features in the subset and the one or more features whose size is smaller than a size of the particular feature.
Citation Information
Patent Citations
Rapid optical remote sensing target identification method based on depth feature recombination
CN110807372A
Pedestrian detection network structure based on mixed feature pyramid and mixed expansion convolution
CN110929685A
Pulmonary nodule automatic detection method based on CT image
CN110942446A
Learning method and learning device for improving performance of CNN by using fun, and testing method and testing device using the same
JP2019067407A
Target detection method, system, and non-volatile storage medium
US20190347828A1
