WO2021036013A1 - 检测器的配置方法及装置、电子设备和存储介质 - Google Patents

检测器的配置方法及装置、电子设备和存储介质 Download PDF

Info

Publication number
WO2021036013A1
WO2021036013A1 PCT/CN2019/119161 CN2019119161W WO2021036013A1 WO 2021036013 A1 WO2021036013 A1 WO 2021036013A1 CN 2019119161 W CN2019119161 W CN 2019119161W WO 2021036013 A1 WO2021036013 A1 WO 2021036013A1
Authority
WO
WIPO (PCT)
Prior art keywords
expansion rate
convolution operation
convolution
detector
fixed
Prior art date
Application number
PCT/CN2019/119161
Other languages
English (en)
French (fr)
Inventor
彭君然
孙明
Original Assignee
北京市商汤科技开发有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京市商汤科技开发有限公司 filed Critical 北京市商汤科技开发有限公司
Priority to JP2021537166A priority Critical patent/JP2022515274A/ja
Priority to SG11202106971YA priority patent/SG11202106971YA/en
Priority to KR1020217023154A priority patent/KR20210113242A/ko
Publication of WO2021036013A1 publication Critical patent/WO2021036013A1/zh
Priority to US17/360,000 priority patent/US20210326649A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/255Detecting or recognising potential candidate objects based on visual cues, e.g. shapes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/217Validation; Performance evaluation; Active pattern learning techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection

Definitions

  • the present disclosure relates to the field of computer vision technology, and in particular to a method and device for configuring a detector, a method and device for detecting a target, electronic equipment, and a storage medium.
  • Target detection is a very important and basic technology in computer vision, which aims to detect the location and category of the target in the image.
  • Target detection technology plays a vital role in a large number of fields, such as pedestrian and vehicle detection in autonomous driving, living body detection in smart homes, and pedestrian detection in security monitoring.
  • target detection is also an indispensable link in order to lock a target or provide an initial frame.
  • the scale of the target varies and varies in size.
  • the present disclosure proposes a technical solution for target detection.
  • a method for configuring a detector including:
  • the convolution operation is decomposed into a first sub-convolution operation and a second sub-convolution operation.
  • Two subconvolution operations and determine the upper limit expansion rate and the lower limit expansion rate corresponding to the fixed expansion rate of the convolution operation, use the upper limit expansion rate as the expansion rate of the first subconvolution operation, and set the lower limit The expansion rate is used as the expansion rate of the second subconvolution operation;
  • the number of output channels of the convolution operation and the fixed expansion rate of the convolution operation are determined.
  • the convolution operation by decomposing the convolution operation into a first subconvolution operation and a second subconvolution operation when the fixed expansion ratio of the convolution operation satisfies the decomposition condition, for example, in When the fixed expansion rate of the convolution operation is a decimal number, the convolution operation is decomposed into a first subconvolution operation and a second subconvolution operation with integer expansion ratios, which can be calculated in the convolution In the process, the introduction of bilinear interpolation operation is reduced, so that the calculation speed can be improved.
  • the detector includes a main body network
  • the convolution operation of the dilated convolution in the detector includes:
  • the size of the original convolution kernel in the subject network of the detector is one or more convolution operations of a specified size.
  • the detector further includes an expansion learner
  • the determining the fixed expansion rate of the convolution operation of the expansion convolution in the detector includes:
  • a fixed expansion rate of the convolution operation is determined.
  • the fixed expansion rate of the convolution operation is determined according to the first expansion rate of the multiple training images according to the convolution operation, and the accuracy of the fixed expansion rate thus determined is high, thereby ensuring that The accuracy of the target detection by the detector.
  • the expansion rate learner includes a global average pooling layer and a fully connected layer.
  • the obtaining, by the expansion rate learner, the first expansion rate of the convolution operation for a plurality of training images includes:
  • the first expansion rate of the convolution operation for the training image is obtained by the expansion rate learner after the parameter update.
  • multiple rounds of learning are performed by the expansion rate learner, which can improve the accuracy of the first expansion rate used to determine the fixed expansion rate, and thus can improve the accuracy of the determined fixed expansion rate. It can ensure the accuracy of target detection by the detector.
  • the determining the fixed expansion rate of the convolution operation according to the first expansion rate includes:
  • the average value of the first expansion rate is determined as the fixed expansion rate of the convolution operation.
  • that the fixed expansion ratio of the convolution operation satisfies the decomposition condition includes any one of the following:
  • the fixed expansion rate of the convolution operation is a decimal number
  • the minimum distance between the fixed expansion rate of the convolution operation and the integer is greater than the first threshold, wherein the minimum distance between the fixed expansion rate of the convolution operation and the integer represents the fixed expansion rate of the convolution operation and the minimum distance between the fixed expansion rate of the convolution operation and the convolution The distance between the nearest integers for the fixed expansion rate of the product operation.
  • the item when the minimum distance between one of the vertical fixed expansion rate and the horizontal fixed expansion rate of the convolution operation and the integer is less than or equal to the first threshold, the item may not be decomposed, thereby reducing the detection rate.
  • the calculation amount of the configuration of the device when the minimum distance between one of the vertical fixed expansion rate and the horizontal fixed expansion rate of the convolution operation and the integer is less than or equal to the first threshold, the item may not be decomposed, thereby reducing the detection rate.
  • the determining the upper limit expansion rate and the lower limit expansion rate corresponding to the fixed expansion rate of the convolution operation includes:
  • An integer smaller than the fixed expansion rate of the convolution operation and closest to the fixed expansion rate of the convolution operation is determined as the lower limit expansion rate corresponding to the fixed expansion rate of the convolution operation.
  • the number of output channels corresponding to the first subconvolution operation and the number of output channels corresponding to the first subconvolution operation and the first subconvolution operation are determined according to the number of output channels of the convolution operation and the fixed expansion rate of the convolution operation.
  • the number of output channels corresponding to the two-subconvolution operation including:
  • the method further includes:
  • the target training image set is used to train the detector to optimize the parameters of the detector.
  • a target detection method including:
  • the detector trained by the above-mentioned detector configuration method performs target detection on the to-be-detected image, and obtains a target detection result corresponding to the to-be-detected image.
  • a detector configuration device including:
  • the first determination module is used to determine the fixed expansion rate of the convolution operation of the expansion convolution in the detector
  • the second determining module is configured to perform a convolution operation of dilated convolution on any one of the detectors, and decompose the convolution operation into the first when the fixed expansion ratio of the convolution operation satisfies the decomposition condition.
  • a subconvolution operation and a second subconvolution operation and determine the upper limit expansion rate and the lower limit expansion rate corresponding to the fixed expansion rate of the convolution operation, and use the upper limit expansion rate as the first subconvolution operation Expansion rate, using the lower limit expansion rate as the expansion rate of the second subconvolution operation;
  • the third determining module is configured to determine the number of output channels corresponding to the first subconvolution operation and the second subconvolution according to the number of output channels of the convolution operation and the fixed expansion rate of the convolution operation The number of output channels corresponding to the operation.
  • the detector includes a main body network
  • the convolution operation of the dilated convolution in the detector includes:
  • the size of the original convolution kernel in the subject network of the detector is one or more convolution operations of a specified size.
  • the detector further includes an expansion learner
  • the first determining module includes:
  • a first determining submodule configured to obtain the first expansion ratio of the convolution operation for a plurality of training images through the expansion learner
  • the second determining sub-module is configured to determine the fixed expansion rate of the convolution operation according to the first expansion rate.
  • the expansion rate learner includes a global average pooling layer and a fully connected layer.
  • the first determining submodule is used to:
  • the first expansion rate of the convolution operation for the training image is obtained by the expansion rate learner after the parameter update.
  • the second determining submodule is used to:
  • the average value of the first expansion rate is determined as the fixed expansion rate of the convolution operation.
  • that the fixed expansion ratio of the convolution operation satisfies the decomposition condition includes any one of the following:
  • the fixed expansion rate of the convolution operation is a decimal number
  • the minimum distance between the fixed expansion rate of the convolution operation and the integer is greater than the first threshold, wherein the minimum distance between the fixed expansion rate of the convolution operation and the integer represents the fixed expansion rate of the convolution operation and the minimum distance between the fixed expansion rate of the convolution operation and the convolution The distance between the nearest integers for the fixed expansion rate of the product operation.
  • the second determining module includes:
  • the third determining sub-module is configured to determine an integer greater than the fixed expansion rate of the convolution operation and closest to the fixed expansion rate of the convolution operation as the upper limit expansion rate corresponding to the fixed expansion rate of the convolution operation ;
  • the fourth determining sub-module is configured to determine an integer smaller than the fixed expansion rate of the convolution operation and closest to the fixed expansion rate of the convolution operation as the lower limit expansion rate corresponding to the fixed expansion rate of the convolution operation .
  • the third determining module includes:
  • a fifth determining sub-module configured to determine the overall difference coefficient corresponding to the convolution operation according to the difference between the fixed expansion rate of the convolution operation and the lower limit expansion rate;
  • the sixth determining submodule is configured to determine the number of output channels corresponding to the first subconvolution operation and the second subconvolution operation according to the number of output channels of the convolution operation and the overall difference coefficient corresponding to the convolution operation. The number of output channels corresponding to the subconvolution operation.
  • it also includes:
  • the training module is used to train the detector by using the target training image set to optimize the parameters of the detector.
  • a target detection device including:
  • the acquisition module is used to acquire the image to be detected
  • the target detection module is configured to perform target detection on the image to be detected by using the detector trained by the above-mentioned detector configuration device to obtain a target detection result corresponding to the image to be detected.
  • an electronic device including:
  • One or more processors are One or more processors;
  • a memory associated with the one or more processors where the memory is used to store executable instructions that, when read and executed by the one or more processors, execute the above-mentioned detector configuration method .
  • a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the above-mentioned configuration method of the detector is realized.
  • a computer program including computer readable code, and when the computer readable code is executed in an electronic device, a processor in the electronic device executes for realizing the above method.
  • the convolution operation of dilated convolution is performed on any one of the detectors, and the convolution operation is fixed in the convolution operation.
  • the convolution operation When the expansion rate satisfies the decomposition condition, the convolution operation is decomposed into a first subconvolution operation and a second subconvolution operation, and the upper limit expansion rate and the lower limit expansion rate corresponding to the fixed expansion rate of the convolution operation are determined ,
  • the upper limit expansion rate is used as the expansion rate of the first subconvolution operation
  • the lower limit expansion rate is used as the expansion rate of the second subconvolution operation
  • the number of output channels is based on the convolution operation
  • the fixed expansion rate of the convolution operation the number of output channels corresponding to the first subconvolution operation and the number of output channels corresponding to the second subconvolution operation are determined, thereby by performing the expansion convolution on the detector
  • the decomposition of the convolution operation of the product can reduce the introduction of relatively time-consuming bilinear interpolation operations in the process of convolution calculation, thereby improving the calculation speed and reducing the time required for target detection, so that it can be applied to real-time scenes.
  • Fig. 1 shows a flowchart of a method for configuring a detector provided by an embodiment of the present disclosure.
  • Fig. 2 shows a schematic diagram of an expansion rate learner in a detector configuration method provided by an embodiment of the present disclosure.
  • FIG. 3 shows a schematic diagram of the number of output channels corresponding to the first subconvolution operation Conv u and the number of output channels corresponding to the second subconvolution operation Conv l in the detector configuration method provided by an embodiment of the present disclosure.
  • FIG. 4 shows a schematic diagram of decomposing the convolution operation of dilated convolution in the detector into two sub-convolution operations Conv u and Conv l in the detector configuration method provided by the embodiment of the present disclosure.
  • Fig. 5 shows a schematic diagram of a method for configuring a detector provided by an embodiment of the present disclosure.
  • Fig. 6 shows a block diagram of a detector configuration device provided by an embodiment of the present disclosure.
  • FIG. 7 shows a block diagram of an electronic device 800 provided by an embodiment of the present disclosure.
  • FIG. 8 shows a block diagram of an electronic device 1900 provided by an embodiment of the present disclosure.
  • embodiments of the present disclosure provide a detector configuration method and device, target detection method and device, electronic equipment, and storage medium to reduce the time required for target detection, thereby enabling Suitable for real-time scenarios.
  • Fig. 1 shows a flowchart of a method for configuring a detector provided by an embodiment of the present disclosure.
  • the execution subject of the detector configuration method may be a detector configuration device.
  • the configuration method of the detector can be executed by a terminal device or a server or other processing device.
  • the terminal device can be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, or a portable device. Wearable equipment, etc.
  • the configuration method of the detector may be implemented by a processor invoking computer-readable instructions stored in the memory. As shown in Fig. 1, the configuration method of the detector includes step S11 to step S13.
  • the detector type of the detector and the main network of the detector can be determined first.
  • the detector type of the detector can be Faster-RCNN, RFCN, RetinaNet, or SSD, etc.
  • the main network of the detector can be VGG, ResNet, ResNeXt, etc.
  • step S11 the fixed expansion rate of the convolution operation in which the expansion convolution is performed in the detector is determined.
  • the number of convolution operations for dilation convolution in the detector may be one or more.
  • the convolution operation for dilation convolution in the detector may be part or all of the convolution operation in the detector. That is, the detector may include a convolution operation that performs dilation convolution, or may include a convolution operation that does not perform dilation convolution.
  • the expansion rate of the same convolution operation of the detector for different training images may be different or the same.
  • the expansion rate of different convolution operations of the detector for the same training image can be different or the same.
  • the expansion rate of the convolution operation may include a longitudinal expansion rate and a lateral expansion rate.
  • the longitudinal expansion rate and the lateral expansion rate of the convolution operation may be different or the same.
  • the fixed expansion rate may include a longitudinal fixed expansion rate and a lateral fixed expansion rate.
  • the first expansion rate hereinafter may include a first longitudinal expansion rate and a first lateral expansion rate
  • the second expansion rate may include a second longitudinal expansion rate and a second lateral expansion rate.
  • the expansion rate of the convolution operation may not be divided into the longitudinal expansion rate and the lateral expansion rate.
  • the expanded convolution kernel size expansion rate ⁇ (original convolution kernel size-1)+1.
  • the longitudinal size of the expanded convolution kernel the longitudinal expansion rate ⁇ (the original convolution kernel longitudinal size-1) + 1
  • the lateral size of the expanded convolution kernel lateral expansion rate ⁇ (the lateral size of the original convolution kernel-1)+1.
  • the detector includes a subject network; the convolution operation of the dilated convolution in the detector includes: the size of the original convolution kernel in the subject network of the detector is a specified size One or more convolution operations.
  • the designated size may include 3 ⁇ 3, or the designated size may include 5 ⁇ 5, 7 ⁇ 7, and so on.
  • the convolution operation of dilated convolution in the detector includes: all convolution operations in the main network of the detector whose original convolution kernel size is a specified size.
  • the main body network is ResNet
  • the convolution operation for dilated convolution in the detector may include all 3 ⁇ 3 convolution operations in conv2, conv3, conv4, and conv5 of ResNet.
  • the convolution operation of performing dilation convolution in the detector includes: a partial convolution operation whose original convolution kernel size in the main network of the detector is a specified size.
  • the convolution operation of dilated convolution in the detector may include: one or more convolution operations in which the original convolution kernel size in the specified convolution layer of the subject network of the detector is a specified size.
  • the main network is ResNet, and the designated convolutional layers can be conv3, conv4, and conv5.
  • the convolution operation for dilated convolution in the detector can include all 3 ⁇ 3 convolution operations in conv3, conv4, and conv5 of ResNet. .
  • the convolution operation of dilation convolution in the detector may not include the 3 ⁇ 3 convolution operation in conv2.
  • the convolution operation of performing dilated convolution in the detector may include: a convolution operation in a designated convolution layer in the main network of the detector.
  • the subject network is ResNet
  • the convolution operation for dilation convolution in the detector may include conv2, conv3, conv4, and conv5.
  • the convolution operation of performing dilation convolution in the detector may further include: a convolution operation outside the main network in the detector.
  • the convolution operation of dilated convolution in the detector may also include a convolution operation in which the size of the original convolution kernel outside the main network in the detector is a specified size.
  • the detector further includes an expansion learner; the determining the fixed expansion rate of the convolution operation of the expansion convolution in the detector includes: obtaining the volume through the expansion learner The product operation is directed to the first expansion rate of a plurality of training images; according to the first expansion rate, the fixed expansion rate of the convolution operation is determined.
  • the fixed expansion rate of the convolution operation is determined according to the first expansion rate of the multiple training images according to the convolution operation, and the accuracy of the fixed expansion rate thus determined is high, thereby ensuring that The accuracy of the target detection by the detector.
  • the expansion rate learner may be used to learn the expansion rate of the convolution operation for the training image.
  • the expansion rate learner may have a one-to-one correspondence with the convolution operation of the expansion convolution in the detector. That is, an expansion rate learner can be used to learn the expansion rate of a convolution operation that performs expansion convolution.
  • the expansion rate learner may be set between the convolution operation that performs the expansion convolution and the previous operation of the convolution operation that performs the expansion convolution.
  • the expansion rate learner includes a global average pooling layer and a fully connected layer.
  • the inflation rate learner can include a global average pooling layer and a fully connected layer.
  • the first expansion rate of the convolution operation for multiple training images can be obtained through a global average pooling operation and a fully connected operation.
  • the feature before the convolution operation that is, the input feature map of the convolution operation in the initial structure of the detector
  • the operation and the fully connected operation predict the expansion rate of the convolution operation for the training image.
  • the expansion rate learner may include a Global Average Pooling (GAP, Global Average Pooling) layer and a fully connected layer.
  • GAP Global Average Pooling
  • the fully connected layer may be a linear layer.
  • the global average pooling layer and the fully connected layer can be connected respectively before the convolution operation, and the convolution operation can be replaced with Deformable convolution, using the predicted expansion rate to perform convolution operations.
  • the obtaining the first expansion rate of the convolution operation for a plurality of training images by the expansion rate learner includes: for any training image of the plurality of training images, Obtain the second expansion rate of the convolution operation for the training image through the expansion rate learner; obtain the target detection result corresponding to the training image based on the second expansion rate; obtain the target detection result corresponding to the training image according to the training image As a result of the target detection, the parameter of the expansion rate learner is updated; the first expansion rate of the convolution operation for the training image is obtained by the expansion rate learner after the parameter update.
  • the second expansion rate of the training image may be determined according to the convolution operation of each expansion convolution in the detector. Perform the expanded convolution kernel size corresponding to the expanded convolution operation, and obtain the target detection result corresponding to the training image based on the expanded detector.
  • the target detection result corresponding to the training image may include the position information of the target detection frame in the training image and the probability that the training image belongs to each category. According to the target detection result corresponding to the training image and the true value of the training image, the value of the loss function of the detector can be obtained, so that the parameters of the expansion rate learner can be updated according to the value of the loss function of the detector.
  • the number of times of training the expansion rate for any training image may be a preset value, for example, the preset value may be 13; or, for any training image, training may be performed until the expansion rate converges.
  • the accuracy of the first expansion rate used to determine the fixed expansion rate can be improved, and thus the accuracy of the determined fixed expansion rate can be improved. Ensure the accuracy of target detection by the detector.
  • the convolution operation is directed to the first expansion rate of the training image, which may refer to the expansion rate of the training image after the training of the training image is completed. That is, the convolution operation is directed to the first expansion rate of the training image, which may indicate that the convolution operation is directed to the expansion rate of the training image after the number of times the training image is trained on the expansion rate reaches a preset value, Or it may refer to the convergent expansion rate of the convolution operation with respect to the training image.
  • the detector trains the expansion rate separately for different training images, so that for any convolutional layer that is dilated and convolved on the detector, multiple first expansion rates corresponding to multiple training images can be obtained .
  • the determining the fixed expansion rate of the convolution operation according to the first expansion rate includes: determining the average value of the first expansion rate as the fixed expansion rate of the convolution operation Expansion rate. For example, if the fixed expansion rate of the convolution operation includes a vertical fixed expansion rate and a horizontal fixed expansion rate, the average value of the first vertical expansion rate of the convolution operation for a plurality of training images may be determined as the volume The vertical fixed expansion rate of the product operation is determined, and the average value of the first lateral expansion rate of the convolution operation for a plurality of training images is determined as the horizontal fixed expansion rate of the convolution operation. For example, the vertical fixed expansion rate is 1.7, and the horizontal fixed expansion rate is 2.9.
  • the convolution operation can be determined according to the first dilation rate of the convolution operation for part of the training images (for example, 1000 training images) The fixed expansion rate.
  • the fixed expansion rate of the convolution operation can be determined according to the first expansion rate of the convolution operation for 1000 training images.
  • the fixed dilation rate of the convolution operation may be determined according to the first dilation rate of the convolution operation for all training images.
  • step S12 perform a convolution operation of dilated convolution for any one of the detectors, and if the fixed expansion ratio of the convolution operation satisfies the decomposition condition, the convolution operation is decomposed into the first sub-convolution operation.
  • Convolution operation and the second subconvolution operation and determine the upper limit expansion rate and the lower limit expansion rate corresponding to the fixed expansion rate of the convolution operation, and use the upper limit expansion rate as the expansion rate of the first subconvolution operation , And use the lower limit expansion rate as the expansion rate of the second subconvolution operation.
  • the fixed expansion rate of the convolution operation is D
  • the upper expansion rate corresponding to the fixed expansion rate of the convolution operation is Du
  • the lower expansion rate corresponding to the fixed expansion rate of the convolution operation is Dl.
  • the fixed expansion rate of the convolution operation satisfies the decomposition condition including any one of the following: the fixed expansion rate of the convolution operation is a decimal; the fixed expansion rate of the convolution operation is an integer The minimum distance of is greater than the first threshold, where the minimum distance between the fixed expansion rate of the convolution operation and an integer represents the fixed expansion rate of the convolution operation and the integer closest to the fixed expansion rate of the convolution operation The distance between.
  • the fixed expansion rate of the convolution operation may be a decimal number: At least one of the longitudinal fixed expansion rate and the lateral fixed expansion rate is a decimal.
  • the minimum distance between the fixed expansion rate of the convolution operation and an integer greater than the first threshold may be : The minimum distance between at least one of the vertical fixed expansion rate and the horizontal fixed expansion rate of the convolution operation and the integer is greater than the first threshold.
  • the first threshold is 0.05
  • the vertical fixed expansion rate of a certain convolution operation is 2.02
  • the horizontal fixed expansion rate is 1.7
  • the minimum distance between the vertical fixed expansion rate of the convolution operation and the integer is 0.02, which is less than the first Threshold
  • the minimum distance between the horizontal fixed expansion rate of the convolution operation and the integer is 0.3, which is greater than the first threshold. Therefore, it can be determined that the convolution operation satisfies the decomposition condition.
  • the minimum distance between one of the vertical fixed expansion rate and the horizontal fixed expansion rate of the convolution operation and the integer is less than or equal to the first threshold, the minimum distance between the other item and the integer is greater than the first threshold, Then it can be decomposed according to this other item.
  • the vertical fixed expansion rate of the convolution operation is 2.02 and the horizontal fixed expansion rate is 1.7
  • the vertical expansion rate of the first subconvolution operation is 2 and the horizontal expansion rate is 2, and the second subconvolution operation
  • the longitudinal expansion rate is 2 and the lateral expansion rate is 1.
  • the item when the minimum distance between one item of the vertical fixed expansion rate and the horizontal fixed expansion rate of the convolution operation and the integer is less than or equal to the first threshold, the item may not be decomposed, so that the detector can be reduced.
  • the amount of calculation configured.
  • the determining the upper limit expansion rate and the lower limit expansion rate corresponding to the fixed expansion rate of the convolution operation includes: combining the fixed expansion rate greater than the fixed expansion rate of the convolution operation and the same as the fixed expansion rate of the convolution operation.
  • the integer closest to the fixed expansion rate of the operation is determined as the upper limit expansion rate corresponding to the fixed expansion rate of the convolution operation; it will be less than the fixed expansion rate of the convolution operation and closest to the fixed expansion rate of the convolution operation
  • the integer of is determined as the lower limit expansion rate corresponding to the fixed expansion rate of the convolution operation.
  • the upper longitudinal expansion rate can be determined as 2, the lower longitudinal expansion rate as 1, the upper lateral expansion rate as 3, and the lower lateral expansion rate as 2 .
  • the vertical upper limit expansion rate 2 and the horizontal upper limit expansion rate 3 can be determined as the expansion rate of the first subconvolution operation, and the vertical lower limit expansion rate 1 and the lateral lower limit expansion rate 2 can be determined as the second subconvolution operation. The expansion rate.
  • the convolution operation by decomposing the convolution operation into a first subconvolution operation and a second subconvolution operation when the fixed expansion ratio of the convolution operation satisfies the decomposition condition, for example, in When the fixed expansion rate of the convolution operation is a decimal number, the convolution operation is decomposed into a first subconvolution operation and a second subconvolution operation with integer expansion ratios, which can be calculated in the convolution In the process, the introduction of bilinear interpolation operation is reduced, so that the calculation speed can be improved.
  • step S13 according to the number of output channels of the convolution operation and the fixed expansion rate of the convolution operation, it is determined that the number of output channels corresponding to the first subconvolution operation corresponds to the second subconvolution operation.
  • the number of output channels is determined that the number of output channels corresponding to the first subconvolution operation corresponds to the second subconvolution operation.
  • the number of output channels of the convolution operation is C
  • the number of output channels corresponding to the first sub-convolution operation is Cu
  • the number of output channels corresponding to the second sub-convolution operation is Cl.
  • the number of output channels corresponding to the first subconvolution operation and the number of output channels corresponding to the first subconvolution operation and the first subconvolution operation are determined according to the number of output channels of the convolution operation and the fixed expansion rate of the convolution operation.
  • the number of output channels corresponding to the two-subconvolution operation includes: determining the overall difference coefficient corresponding to the convolution operation according to the difference between the fixed expansion rate of the convolution operation and the lower limit expansion rate; The number of output channels of the product operation and the overall difference coefficient corresponding to the convolution operation are determined, and the number of output channels corresponding to the first subconvolution operation and the number of output channels corresponding to the second subconvolution operation are determined.
  • the overall difference coefficient corresponding to the convolution operation may be determined according to the difference D-D1 between the fixed expansion ratio D of the convolution operation and the lower limit expansion ratio D1.
  • the first of the longitudinal fixed expansion rate and the longitudinal lower limit expansion rate of the convolution operation can be determined. Difference, determining the second difference between the lateral fixed expansion rate and the lower lateral expansion rate of the convolution operation, and use the average of the first difference and the second difference as the overall difference corresponding to the convolution operation coefficient.
  • the fixed expansion rate of the convolution operation includes a longitudinal fixed expansion rate of 1.7 and a lateral fixed expansion rate of 2.9
  • the overall difference coefficient a 0.8 corresponding to the convolution operation.
  • the number of output channels corresponding to the first sub-convolution operation Cu aC
  • the number of output channels corresponding to the second sub-convolution operation Cl (1-a)C.
  • FIG. 3 shows a schematic diagram of the number of output channels corresponding to the first subconvolution operation Conv u and the number of output channels corresponding to the second subconvolution operation Conv l in the detector configuration method provided by an embodiment of the present disclosure.
  • the longitudinal expansion rate of the first subconvolution operation Conv u is 2 and the lateral expansion rate is 3
  • the longitudinal expansion rate of the second subconvolution operation Conv 1 is 1 and the lateral expansion rate is 2.
  • H ⁇ W ⁇ C in represents the height, width and number of channels of the input feature map of the convolution operation.
  • the height, width and channel number of the input feature map of the first subconvolution operation Conv u and the second subconvolution operation Conv l The width and the number of channels are also H ⁇ W ⁇ C in .
  • C out represents the number of output channels of the convolution operation, and the vertical fixed expansion rate of the convolution operation is 1.7 and the horizontal fixed expansion rate is 2.9.
  • the number of output channels corresponding to the first subconvolution operation Conv u is 0.8
  • the number of output channels corresponding to the second subconvolution operation Conv l is 0.2.
  • the overall difference coefficient corresponding to the convolution operation may also be determined according to the difference between the fixed expansion rate of the convolution operation and the upper limit expansion rate.
  • the time-consuming bilinear interpolation operation can be reduced during the convolution calculation process, thereby improving the calculation speed. , Reduce the time required for target detection, which can be applied to real-time scenes.
  • the method further includes: adopting a target training image set Training the detector to optimize the parameters of the detector.
  • the detector may no longer include an expansion rate learner, and detecting The convolution operation of dilation convolution in the device can be decomposed into two subconvolution operations.
  • FIG. 4 shows a schematic diagram of decomposing the convolution operation of dilated convolution in the detector into two sub-convolution operations Conv u and Conv l in the detector configuration method provided by the embodiment of the present disclosure.
  • Fig. 5 shows a schematic diagram of a method for configuring a detector provided by an embodiment of the present disclosure.
  • the main network of the detector is ResNet, which decomposes the 3 ⁇ 3 convolution operations in Res2, Res3, Res4, and Res5, and decomposes each of the 3 ⁇ 3 convolutions in Res2, Res3, Res4, and Res5.
  • the operation is divided into two sub-convolution operations.
  • the momentum is 0.9
  • the weight decay rate is set to 0.0001
  • the initial learning rate is 0.00125 per training image.
  • the training time can be set to 13 cycles, and the learning rate can be reduced after the 8th cycle and the 11th cycle, and the reduction rate is 10 times.
  • the detector configuration method provided in the embodiments of the present disclosure can be applied to scenes that need to be hard-coded. Under the premise of ensuring that multi-scale targets can be processed, the adaptive module is removed, and the effect of reducing time consumption and improving detection speed is achieved.
  • the hard coding method provided by the embodiments of the present disclosure can accelerate the compatibility with hardware compared with the adaptive method, which is beneficial to practical applications.
  • the embodiment of the present disclosure also provides a target detection method, the target detection method includes: acquiring a to-be-detected image; using the detector trained by the above-mentioned detector configuration method to perform target detection on the to-be-detected image to obtain The target detection result corresponding to the image to be detected.
  • the embodiments of the present disclosure use a deep learning network with an expansion ratio structure to perform target detection, which can accurately detect targets of multiple scales at the same time, and can reduce the time required for multi-scale target detection on the premise of ensuring the accuracy of target detection. It can be applied to real-time scenes of multi-scale target detection. For example, the embodiments of the present disclosure can be applied to the detection of vehicles and pedestrians of different sizes and distances in automatic driving, key frame detection in real-time intelligent video analysis, pedestrian detection in security monitoring, and living body detection in smart homes.
  • the writing order of the steps does not mean a strict execution order but constitutes any limitation on the implementation process.
  • the specific execution order of each step should be based on its function and possibility.
  • the inner logic is determined.
  • the present disclosure also provides a detector configuration device, a target detection device, an electronic device, a computer-readable storage medium, and a program.
  • a detector configuration device for detecting a target of a target detection device.
  • an electronic device for detecting a target of a target detection device.
  • a computer-readable storage medium for storing program code.
  • Fig. 6 shows a block diagram of a detector configuration device provided by an embodiment of the present disclosure.
  • the configuration device of the detector includes: a first determining module 21 for determining the fixed expansion rate of the convolution operation of the dilated convolution in the detector; and a second determining module 22 for determining the Any one of the detectors performs a convolution operation of dilated convolution, and when the fixed dilation rate of the convolution operation satisfies the decomposition condition, the convolution operation is decomposed into a first sub-convolution operation and a second sub-convolution operation.
  • a third determining module 23 configured to determine the first subconvolution based on the number of output channels of the convolution operation and the fixed expansion rate of the convolution operation The number of output channels corresponding to the operation and the number of output channels corresponding to the second subconvolution operation.
  • the detector includes a subject network
  • the convolution operation of the dilated convolution in the detector includes: the size of the original convolution kernel in the subject network of the detector is a specified size One or more convolution operations.
  • the detector further includes an expansion learner;
  • the first determining module 21 includes: a first determining sub-module, configured to obtain the convolution operation target through the expansion learner. A first expansion rate of each training image; a second determining sub-module for determining a fixed expansion rate of the convolution operation according to the first expansion rate.
  • the expansion rate learner includes a global average pooling layer and a fully connected layer.
  • the first determining submodule is configured to: for any training image among the multiple training images, obtain the convolution operation for the training image through the expansion rate learner The second expansion rate of the image; based on the second expansion rate, the target detection result corresponding to the training image is obtained; the parameter of the expansion rate learner is updated according to the target detection result corresponding to the training image; through parameter update The latter expansion rate learner obtains the first expansion rate of the convolution operation for the training image.
  • the second determining submodule is configured to determine the average value of the first expansion rate as the fixed expansion rate of the convolution operation.
  • the fixed expansion rate of the convolution operation satisfies the decomposition condition including any one of the following: the fixed expansion rate of the convolution operation is a decimal; the fixed expansion rate of the convolution operation is an integer The minimum distance of is greater than the first threshold, where the minimum distance between the fixed expansion rate of the convolution operation and an integer represents the fixed expansion rate of the convolution operation and the integer closest to the fixed expansion rate of the convolution operation The distance between.
  • the second determining module 22 includes: a third determining sub-module, configured to determine the fixed expansion rate greater than and closest to the fixed expansion rate of the convolution operation The integer of is determined as the upper limit expansion rate corresponding to the fixed expansion rate of the convolution operation; the fourth determining sub-module is used to determine the maximum expansion rate that is less than the fixed expansion rate of the convolution operation and is the same as the fixed expansion rate of the convolution operation. The close integer is determined as the lower limit expansion rate corresponding to the fixed expansion rate of the convolution operation.
  • the third determining module 23 includes: a fifth determining sub-module, configured to determine the volume according to the difference between the fixed expansion rate of the convolution operation and the lower limit expansion rate The overall difference coefficient corresponding to the product operation; a sixth determining sub-module, configured to determine the first sub-convolution operation corresponding to the first sub-convolution operation according to the number of output channels of the convolution operation and the overall difference coefficient corresponding to the convolution operation The number of output channels and the number of output channels corresponding to the second subconvolution operation.
  • a training module configured to train the detector by using the target training image set to optimize the parameters of the detector.
  • the embodiment of the present disclosure also provides a target detection device, including: an acquisition module for acquiring an image to be detected; a target detection module for using the detector trained by the above-mentioned detector configuration device to detect the image to be detected The image performs target detection, and the target detection result corresponding to the image to be detected is obtained.
  • the functions or modules contained in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
  • the functions or modules contained in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
  • the embodiments of the present disclosure also provide a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above-mentioned method when executed by a processor.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium, or may be a volatile computer-readable storage medium.
  • the embodiment of the present disclosure also proposes a computer program, including computer readable code, when the computer readable code is executed in an electronic device, the processor in the electronic device executes to implement the above method.
  • An embodiment of the present disclosure also provides an electronic device, including: one or more processors; a memory associated with the one or more processors, the memory is used to store executable instructions, the executable instructions being When the one or more processors are read and executed, the foregoing method is executed.
  • the electronic device can be provided as a terminal, server or other form of device.
  • FIG. 7 shows a block diagram of an electronic device 800 provided by an embodiment of the present disclosure.
  • the electronic device 800 may be a mobile phone, a computer, a digital broadcasting terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and other terminals.
  • the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, and a sensor component 814 , And communication component 816.
  • the processing component 802 generally controls the overall operations of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • the processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the foregoing method.
  • the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components.
  • the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
  • the memory 804 is configured to store various types of data to support operations in the electronic device 800. Examples of these data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc.
  • the memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable and Programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read-only memory
  • EPROM erasable and Programmable read only memory
  • PROM programmable read only memory
  • ROM read only memory
  • magnetic memory flash memory
  • flash memory magnetic disk or optical disk.
  • the power supply component 806 provides power for various components of the electronic device 800.
  • the power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
  • the multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user.
  • the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure related to the touch or slide operation.
  • the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 810 is configured to output and/or input audio signals.
  • the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal.
  • the received audio signal may be further stored in the memory 804 or transmitted via the communication component 816.
  • the audio component 810 further includes a speaker for outputting audio signals.
  • the I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module.
  • the above-mentioned peripheral interface module may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: home button, volume button, start button, and lock button.
  • the sensor component 814 includes one or more sensors for providing the electronic device 800 with various aspects of state evaluation.
  • the sensor component 814 can detect the on/off status of the electronic device 800 and the relative positioning of the components.
  • the component is the display and the keypad of the electronic device 800.
  • the sensor component 814 can also detect the electronic device 800 or the electronic device 800.
  • the position of the component changes, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration/deceleration of the electronic device 800, and the temperature change of the electronic device 800.
  • the sensor component 814 may include a proximity sensor configured to detect the presence of nearby objects when there is no physical contact.
  • the sensor component 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • the communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices.
  • the electronic device 800 can access a wireless network based on a communication standard, such as Wi-Fi, 2G, 3G, 4G/LTE, 5G, or a combination thereof.
  • the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 816 further includes a near field communication (NFC) module to facilitate short-range communication.
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field-available A programmable gate array (FPGA), controller, microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
  • ASIC application-specific integrated circuits
  • DSP digital signal processors
  • DSPD digital signal processing devices
  • PLD programmable logic devices
  • FPGA field-available A programmable gate array
  • controller microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
  • a non-volatile computer-readable storage medium such as the memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to complete the foregoing method.
  • FIG. 8 shows a block diagram of an electronic device 1900 provided by an embodiment of the present disclosure.
  • the electronic device 1900 may be provided as a server.
  • the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as application programs.
  • the application program stored in the memory 1932 may include one or more modules each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above-described methods.
  • the electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input output (I/O) interface 1958 .
  • the electronic device 1900 can operate based on an operating system stored in the memory 1932, such as Windows Mac OS Or similar.
  • a non-volatile computer-readable storage medium is also provided, such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to complete the foregoing method.
  • the present disclosure may be a system, method and/or computer program product.
  • the computer program product may include a computer-readable storage medium loaded with computer-readable program instructions for enabling a processor to implement various aspects of the present disclosure.
  • the computer-readable storage medium may be a tangible device that can hold and store instructions used by the instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Non-exhaustive list of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) Or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as a printer with instructions stored thereon
  • RAM random access memory
  • ROM read-only memory
  • EPROM erasable programmable read-only memory
  • flash memory flash memory
  • SRAM static random access memory
  • CD-ROM compact disk read-only memory
  • DVD digital versatile disk
  • memory stick floppy disk
  • mechanical encoding device such as a printer with instructions stored thereon
  • the computer-readable storage medium used here is not interpreted as the instantaneous signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (for example, light pulses through fiber optic cables), or through wires Transmission of electrical signals.
  • the computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing/processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • the network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network, and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing/processing device .
  • the computer program instructions used to perform the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or in one or more programming languages.
  • Source code or object code written in any combination, the programming language includes object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages.
  • Computer-readable program instructions can be executed entirely on the user's computer, partly on the user's computer, executed as a stand-alone software package, partly on the user's computer and partly executed on a remote computer, or entirely on the remote computer or server carried out.
  • the remote computer can be connected to the user's computer through any kind of network-including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to connect to the user's computer) connection).
  • LAN local area network
  • WAN wide area network
  • an electronic circuit such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), can be customized by using the status information of the computer-readable program instructions.
  • FPGA field programmable gate array
  • PDA programmable logic array
  • the computer-readable program instructions are executed to realize various aspects of the present disclosure.
  • These computer-readable program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine that makes these instructions when executed by the processor of the computer or other programmable data processing device , A device that implements the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams is produced. It is also possible to store these computer-readable program instructions in a computer-readable storage medium. These instructions make computers, programmable data processing apparatuses, and/or other devices work in a specific manner. Thus, the computer-readable medium storing the instructions includes An article of manufacture, which includes instructions for implementing various aspects of the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.
  • each block in the flowchart or block diagram may represent a module, program segment, or part of an instruction, and the module, program segment, or part of an instruction contains one or more components for realizing the specified logical function.
  • Executable instructions may also occur in a different order than the order marked in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, or they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or actions Or it can be realized by a combination of dedicated hardware and computer instructions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Multimedia (AREA)
  • Mathematical Physics (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Human Computer Interaction (AREA)
  • Image Analysis (AREA)
  • Apparatus For Radiation Diagnosis (AREA)
  • Image Processing (AREA)
  • Electrically Operated Instructional Devices (AREA)

Abstract

一种检测器的配置方法及装置、电子设备和存储介质。所述方法包括:确定检测器中进行膨胀卷积的卷积操作的固定膨胀率(S11);对于所述检测器中任一进行膨胀卷积的卷积操作,在所述卷积操作的固定膨胀率满足分解条件的情况下,将所述卷积操作分解为第一子卷积操作和第二子卷积操作,并确定所述卷积操作的固定膨胀率对应的上限膨胀率和下限膨胀率,将所述上限膨胀率作为所述第一子卷积操作的膨胀率,将所述下限膨胀率作为所述第二子卷积操作的膨胀率(S12);根据所述卷积操作的输出通道数以及所述卷积操作的固定膨胀率,确定所述第一子卷积操作对应的输出通道数和所述第二子卷积操作对应的输出通道数(S13)。该方法得到的检测器能够减少目标检测所需时间,从而能够适用于实时场景。

Description

检测器的配置方法及装置、电子设备和存储介质
本申请要求在2019年8月30日提交中国专利局、申请号为201910816321.1、申请名称为“检测器的配置方法及装置、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本公开涉及计算机视觉技术领域,尤其涉及一种检测器的配置方法及装置、目标检测方法及装置、电子设备和存储介质。
背景技术
目标检测是计算机视觉中十分重要和基础的一项技术,旨在图像中检测出目标的位置和类别。目标检测技术在大量领域中有至关重要的作用,如自动驾驶中的行人和车辆检测、智能家居中的活体检测、安防监控中的行人检测等。在人脸识别、身份识别、目标跟踪等任务中,为了锁定目标或提供初始帧,目标检测也是必不可少的环节。在实际应用场景中,目标的尺度变化多样、大小不一。
发明内容
本公开提出了一种目标检测技术方案。
根据本公开的一方面,提供了一种检测器的配置方法,包括:
确定检测器中进行膨胀卷积的卷积操作的固定膨胀率;
对于所述检测器中任一进行膨胀卷积的卷积操作,在所述卷积操作的固定膨胀率满足分解条件的情况下,将所述卷积操作分解为第一子卷积操作和第二子卷积操作,并确定所述卷积操作的固定膨胀率对应的上限膨胀率和下限膨胀率,将所述上限膨胀率作为所述第一子卷积操作的膨胀率,将所述下限膨胀率作为所述第二子卷积操作的膨胀率;
根据所述卷积操作的输出通道数以及所述卷积操作的固定膨胀率,确定所述第一子卷积操作对应的输出通道数和所述第二子卷积操作对应的输出通道数。
在本公开实施例中,通过在所述卷积操作的固定膨胀率满足分解条件的情况下,将所述卷积操作分解为第一子卷积操作和第二子卷积操作,例如,在所述卷积操作的固定膨胀率为小数的情况下,将所述卷积操作分解为具有整数膨胀率的第一子卷积操作和第二子卷积操作,由此能够在卷积计算的过程中减少引入双线性插值操作,从而能够提高计算速度。
在一种可能的实现方式中,所述检测器包括主体网络,所述检测器中进行膨胀卷积的卷积操作包括:
所述检测器的所述主体网络中原始卷积核尺寸为指定尺寸的一个或多个卷积操作。
在一种可能的实现方式中,所述检测器还包括膨胀学习器;
所述确定检测器中进行膨胀卷积的卷积操作的固定膨胀率,包括:
通过所述膨胀学习器获得所述卷积操作针对多个训练图像的第一膨胀率;
根据所述第一膨胀率,确定所述卷积操作的固定膨胀率。
在该实现方式中,通过根据所述卷积操作针对多个训练图像的第一膨胀率确定所述卷积操作的固定膨胀率,由此确定的固定膨胀率的准确性较高,从而能够保证检测器进行目标检测的准确性。
在一种可能的实现方式中,所述膨胀率学习器包括全局平均池化层和全连接层。
在一种可能的实现方式中,所述通过所述膨胀率学习器获得所述卷积操作针对多个训练图像的第一膨胀率,包括:
对于所述多个训练图像中的任一训练图像,通过所述膨胀率学习器获得所述卷积操作针对所述训练图像的第二膨胀率;
基于所述第二膨胀率,获得所述训练图像对应的目标检测结果;
根据所述训练图像对应的目标检测结果,更新所述膨胀率学习器的参数;
通过参数更新后的所述膨胀率学习器获得所述卷积操作针对所述训练图像的第一膨胀率。
在该实现方式中,通过膨胀率学习器进行多轮学习,能够提高用于确定固定膨胀率的第一膨胀率的准确性,由此能够提高所确定的固定膨胀率的准确性较高,从而能够保证检测器进行目标检测的准确性。
在一种可能的实现方式中,所述根据所述第一膨胀率,确定所述卷积操作的固定膨胀率,包括:
将所述第一膨胀率的平均值确定为所述卷积操作的固定膨胀率。
在一种可能的实现方式中,所述卷积操作的固定膨胀率满足分解条件包括以下任意一项:
所述卷积操作的固定膨胀率为小数;
所述卷积操作的固定膨胀率与整数的最小距离大于第一阈值,其中,所述卷积操作的固定膨胀率与整数的最小距离表示所述卷积操作的固定膨胀率和与所述卷积操作的固定膨胀率最接近的整数之间的距离。
根据该实现方式,在所述卷积操作的纵向固定膨胀率和横向固定膨胀率中的一项与整数的最小距离小于或等于第一阈值时,可以不对该项进行分解,由此能够降低检测器配置的计算量。
在一种可能的实现方式中,所述确定所述卷积操作的固定膨胀率对应的上限膨胀率和下限膨胀率,包括:
将大于所述卷积操作的固定膨胀率且与所述卷积操作的固定膨胀率最接近的整数确定为所述卷积操作的固定膨胀率对应的上限膨胀率;
将小于所述卷积操作的固定膨胀率且与所述卷积操作的固定膨胀率最接近的整数确定为所述卷积操作的固定膨胀率对应的下限膨胀率。
在一种可能的实现方式中,所述根据所述卷积操作的输出通道数以及所述卷积操作的固定膨胀率,确定所述第一子卷积操作对应的输出通道数和所述第二子卷积操作对应的输出通道数,包括:
根据所述卷积操作的固定膨胀率与所述下限膨胀率的差值,确定所述卷积操作对应的整体差值系数;
根据所述卷积操作的输出通道数以及所述卷积操作对应的整体差值系数,确定所述第一子卷积操作对应的输出通道数和所述第二子卷积操作对应的输出通道数。
在一种可能的实现方式中,在所述确定所述第一子卷积操作对应的输出通道数和所述第二子卷积 操作对应的输出通道数之后,还包括:
采用目标训练图像集训练所述检测器,以优化所述检测器的参数。
根据本公开的一方面,提供了一种目标检测方法,包括:
获取待检测图像;
采用上述检测器的配置方法训练得到的所述检测器对所述待检测图像进行目标检测,获得所述待检测图像对应的目标检测结果。
根据本公开的一方面,提供了一种检测器的配置装置,包括:
第一确定模块,用于确定检测器中进行膨胀卷积的卷积操作的固定膨胀率;
第二确定模块,用于对于所述检测器中任一进行膨胀卷积的卷积操作,在所述卷积操作的固定膨胀率满足分解条件的情况下,将所述卷积操作分解为第一子卷积操作和第二子卷积操作,并确定所述卷积操作的固定膨胀率对应的上限膨胀率和下限膨胀率,将所述上限膨胀率作为所述第一子卷积操作的膨胀率,将所述下限膨胀率作为所述第二子卷积操作的膨胀率;
第三确定模块,用于根据所述卷积操作的输出通道数以及所述卷积操作的固定膨胀率,确定所述第一子卷积操作对应的输出通道数和所述第二子卷积操作对应的输出通道数。
在一种可能的实现方式中,所述检测器包括主体网络,所述检测器中进行膨胀卷积的卷积操作包括:
所述检测器的所述主体网络中原始卷积核尺寸为指定尺寸的一个或多个卷积操作。
在一种可能的实现方式中,所述检测器还包括膨胀学习器;
所述第一确定模块包括:
第一确定子模块,用于通过所述膨胀学习器获得所述卷积操作针对多个训练图像的第一膨胀率;
第二确定子模块,用于根据所述第一膨胀率,确定所述卷积操作的固定膨胀率。
在一种可能的实现方式中,所述膨胀率学习器包括全局平均池化层和全连接层。
在一种可能的实现方式中,所述第一确定子模块用于:
对于所述多个训练图像中的任一训练图像,通过所述膨胀率学习器获得所述卷积操作针对所述训练图像的第二膨胀率;
基于所述第二膨胀率,获得所述训练图像对应的目标检测结果;
根据所述训练图像对应的目标检测结果,更新所述膨胀率学习器的参数;
通过参数更新后的所述膨胀率学习器获得所述卷积操作针对所述训练图像的第一膨胀率。
在一种可能的实现方式中,所述第二确定子模块用于:
将所述第一膨胀率的平均值确定为所述卷积操作的固定膨胀率。
在一种可能的实现方式中,所述卷积操作的固定膨胀率满足分解条件包括以下任意一项:
所述卷积操作的固定膨胀率为小数;
所述卷积操作的固定膨胀率与整数的最小距离大于第一阈值,其中,所述卷积操作的固定膨胀率与整数的最小距离表示所述卷积操作的固定膨胀率和与所述卷积操作的固定膨胀率最接近的整数之间的距离。
在一种可能的实现方式中,所述第二确定模块包括:
第三确定子模块,用于将大于所述卷积操作的固定膨胀率且与所述卷积操作的固定膨胀率最接近的整数确定为所述卷积操作的固定膨胀率对应的上限膨胀率;
第四确定子模块,用于将小于所述卷积操作的固定膨胀率且与所述卷积操作的固定膨胀率最接近的整数确定为所述卷积操作的固定膨胀率对应的下限膨胀率。
在一种可能的实现方式中,所述第三确定模块包括:
第五确定子模块,用于根据所述卷积操作的固定膨胀率与所述下限膨胀率的差值,确定所述卷积操作对应的整体差值系数;
第六确定子模块,用于根据所述卷积操作的输出通道数以及所述卷积操作对应的整体差值系数,确定所述第一子卷积操作对应的输出通道数和所述第二子卷积操作对应的输出通道数。
在一种可能的实现方式中,还包括:
训练模块,用于采用目标训练图像集训练所述检测器,以优化所述检测器的参数。
根据本公开的一方面,提供了一种目标检测装置,包括:
获取模块,用于获取待检测图像;
目标检测模块,用于采用上述检测器的配置装置训练得到的所述检测器对所述待检测图像进行目标检测,获得所述待检测图像对应的目标检测结果。
根据本公开的一方面,提供了一种电子设备,包括:
一个或多个处理器;
与所述一个或多个处理器关联的存储器,所述存储器用于存储可执行指令,所述可执行指令在被所述一个或多个处理器读取执行时,执行上述检测器的配置方法。
根据本公开的一方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述检测器的配置方法。
根据本公开的一方面,提供了一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现上述方法。
在本公开实施例中,通过确定检测器中进行膨胀卷积的卷积操作的固定膨胀率,对于所述检测器中任一进行膨胀卷积的卷积操作,在所述卷积操作的固定膨胀率满足分解条件的情况下,将所述卷积操作分解为第一子卷积操作和第二子卷积操作,确定所述卷积操作的固定膨胀率对应的上限膨胀率和下限膨胀率,将所述上限膨胀率作为所述第一子卷积操作的膨胀率,将所述下限膨胀率作为所述第二子卷积操作的膨胀率,并根据所述卷积操作的输出通道数以及所述卷积操作的固定膨胀率,确定所述第一子卷积操作对应的输出通道数和所述第二子卷积操作对应的输出通道数,由此通过对检测器中进行膨胀卷积的卷积操作进行分解,能够在卷积计算的过程中减少引入较为耗时的双线性插值操作,从而能够提高计算速度,减少目标检测所需时间,从而能够适用于实时场景。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。
根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并 与说明书一起用于说明本公开的技术方案。
图1示出本公开实施例提供的检测器的配置方法的流程图。
图2示出本公开实施例提供的检测器的配置方法中的膨胀率学习器的示意图。
图3示出本公开实施例提供的检测器的配置方法中第一子卷积操作Conv u对应的输出通道数和第二子卷积操作Conv l对应的输出通道数的示意图。
图4示出本公开实施例提供的检测器的配置方法中检测器中进行膨胀卷积的卷积操作分解为两个子卷积操作Conv u和Conv l的示意图。
图5示出本公开实施例提供的检测器的配置方法的示意图。
图6示出本公开实施例提供的检测器的配置装置的框图。
图7示出本公开实施例提供的一种电子设备800的框图。
图8示出本公开实施例提供的一种电子设备1900的框图。
具体实施方式
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。
另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。
为了解决类似于上文所述的技术问题,本公开实施例提供了一种检测器的配置方法及装置、目标检测方法及装置、电子设备和存储介质,以减少目标检测所需时间,从而能够适用于实时场景。
图1示出本公开实施例提供的检测器的配置方法的流程图。所述检测器的配置方法的执行主体可以是检测器的配置装置。例如,所述检测器的配置方法可以由终端设备或服务器或其它处理设备执行。其中,终端设备可以是用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字助理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备或者可穿戴设备等。在一些可能的实现方式中,所述检测器的配置方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。如图1所示,所述检测器的配置方法包括步骤S11至步骤S13。
其中,在步骤S11之前,可以先确定检测器的检测器类型和检测器的主体网络。例如,检测器的检测器类型可以为Faster-RCNN、RFCN、RetinaNet或者SSD等,检测器的主体网络可以为VGG、ResNet、ResNeXt等。
在步骤S11中,确定检测器中进行膨胀卷积的卷积操作的固定膨胀率。
在本公开实施例中,所述检测器中进行膨胀卷积的卷积操作的数量可以为一个或多个。例如,所述检测器中进行膨胀卷积的卷积操作可以为所述检测器中的部分或全部卷积操作。即,所述检测器可以包括进行膨胀卷积的卷积操作,也可以包括不进行膨胀卷积的卷积操作。
在本公开实施例中,检测器的同一卷积操作针对不同训练图像的膨胀率可以不同,也可以相同。检测器的不同卷积操作针对同一训练图像的膨胀率可以不同,也可以相同。
在一种可能的实现方式中,若所述卷积操作的卷积核包括两个维度,则所述卷积操作的膨胀率可以包括纵向膨胀率和横向膨胀率。其中,所述卷积操作的纵向膨胀率和横向膨胀率可以不同,也可以相同。例如,固定膨胀率可以包括纵向固定膨胀率和横向固定膨胀率。相应地,下文中的第一膨胀率可以包括第一纵向膨胀率和第一横向膨胀率,第二膨胀率可以包括第二纵向膨胀率和第二横向膨胀率。通过配置卷积操作的不同维度对应的膨胀率,能够使检测器中卷积操作的卷积核尺寸更为灵活,由此得到的检测器能够进一步提高目标检测的准确性。
在另一种可能的实现方式中,所述卷积操作的膨胀率可以不分纵向膨胀率和横向膨胀率。在该实现方式中,可以默认所述卷积操作的纵向膨胀率和横向膨胀率相同,即,可以默认所述卷积操作的不同维度的膨胀率相同。
在一种可能的实现方式中,膨胀的卷积核尺寸=膨胀率×(原始卷积核尺寸-1)+1。例如,若所述卷积操作针对所述训练图像的膨胀率包括纵向膨胀率和横向膨胀率,则膨胀的卷积核纵向尺寸=纵向膨胀率×(原始卷积核纵向尺寸-1)+1,膨胀的卷积核横向尺寸=横向膨胀率×(原始卷积核横向尺寸-1)+1。
在一种可能的实现方式中,所述检测器包括主体网络;所述检测器中进行膨胀卷积的卷积操作包括:所述检测器的所述主体网络中原始卷积核尺寸为指定尺寸的一个或多个卷积操作。例如,指定尺寸可以包括3×3,或者,指定尺寸可以包括5×5、7×7等。
作为该实现方式的一个示例,所述检测器中进行膨胀卷积的卷积操作包括:所述检测器的主体网络中原始卷积核尺寸为指定尺寸的所有卷积操作。例如,主体网络为ResNet,所述检测器中进行膨胀卷积的卷积操作可以包括ResNet的conv2、conv3、conv4和conv5中的所有3×3卷积操作。
作为该实现方式的另一个示例,所述检测器中进行膨胀卷积的卷积操作包括:所述检测器的主体网络中原始卷积核尺寸为指定尺寸的部分卷积操作。例如,所述检测器中进行膨胀卷积的卷积操作可以包括:所述检测器的所述主体网络的指定卷积层中原始卷积核尺寸为指定尺寸的一个或多个卷积操作。例如,主体网络为ResNet,指定卷积层可以为conv3、conv4和conv5,所述检测器中进行膨胀卷积的卷积操作可以包括ResNet的conv3、conv4和conv5中的所有3×3卷积操作。在这个例子中,所述检测器中进行膨胀卷积的卷积操作可以不包括conv2中的3×3卷积操作。
在另一种可能的实现方式中,所述检测器中进行膨胀卷积的卷积操作可以包括:所述检测器的主体网络中的指定卷积层中的卷积操作。例如,主体网络为ResNet,所述检测器中进行膨胀卷积的卷积操作可以包括conv2、conv3、conv4和conv5中的卷积操作。
在另一种可能的实现方式中,所述检测器中进行膨胀卷积的卷积操作还可以包括:所述检测器中主体网络以外的卷积操作。例如,所述检测器中进行膨胀卷积的卷积操作还可以包括所述检测器中主 体网络以外的原始卷积核尺寸为指定尺寸的卷积操作。
在一种可能的实现方式中,所述检测器还包括膨胀学习器;所述确定检测器中进行膨胀卷积的卷积操作的固定膨胀率,包括:通过所述膨胀学习器获得所述卷积操作针对多个训练图像的第一膨胀率;根据所述第一膨胀率,确定所述卷积操作的固定膨胀率。在该实现方式中,通过根据所述卷积操作针对多个训练图像的第一膨胀率确定所述卷积操作的固定膨胀率,由此确定的固定膨胀率的准确性较高,从而能够保证检测器进行目标检测的准确性。
在该实现方式中,膨胀率学习器可以用于学习所述卷积操作针对训练图像的膨胀率。膨胀率学习器可以与所述检测器中进行膨胀卷积的卷积操作一一对应。即,一个膨胀率学习器可以用于学习一个进行膨胀卷积的卷积操作的膨胀率。在该实现方式中,膨胀率学习器可以设置在进行膨胀卷积的卷积操作与该进行膨胀卷积的卷积操作的上一个操作之间。
作为该实现方式的一个示例,所述膨胀率学习器包括全局平均池化层和全连接层。例如,膨胀率学习器可以包括一个全局平均池化层和一个全连接层。在该示例中,可以通过全局平均池化操作和全连接操作,获得所述卷积操作针对多个训练图像的第一膨胀率。例如,对于检测器中任一进行膨胀卷积的卷积操作,可以将所述卷积操作之前的特征(即检测器的初始结构中所述卷积操作的输入特征图)经过全局平均池化操作和全连接操作预测出所述卷积操作针对所述训练图像的膨胀率。图2示出本公开实施例提供的检测器的配置方法中的膨胀率学习器的示意图。如图2所示,膨胀率学习器可以包括全局平均池化(GAP,Global Average Pooling)层和全连接层。其中,全连接层可以为线性(Linear)层。如图2所示,对于检测器中任一进行膨胀卷积的卷积操作,可以在所述卷积操作之前分别连接全局平均池化层和全连接层,并将所述卷积操作替换为可变形卷积,使用预测出的膨胀率进行卷积操作。
作为该实现方式的一个示例,所述通过所述膨胀率学习器获得所述卷积操作针对多个训练图像的第一膨胀率,包括:对于所述多个训练图像中的任一训练图像,通过所述膨胀率学习器获得所述卷积操作针对所述训练图像的第二膨胀率;基于所述第二膨胀率,获得所述训练图像对应的目标检测结果;根据所述训练图像对应的目标检测结果,更新所述膨胀率学习器的参数;通过参数更新后的所述膨胀率学习器获得所述卷积操作针对所述训练图像的第一膨胀率。
在该示例中,对于所述多个训练图像中的任一训练图像,可以根据所述检测器中各个进行膨胀卷积的卷积操作针对所述训练图像的第二膨胀率,确定所述各个进行膨胀卷积的卷积操作对应的膨胀的卷积核尺寸,并基于膨胀后的检测器,获得所述训练图像对应的目标检测结果。其中,所述训练图像对应的目标检测结果可以包括所述训练图像中的目标检测框的位置信息和所述训练图像属于各个分类的概率。根据所述训练图像对应的目标检测结果以及所述训练图像的真实值,可以得到检测器的损失函数的值,从而可以根据检测器的损失函数的值,更新所述膨胀率学习器的参数。其中,针对任一训练图像训练膨胀率的次数可以为预设值,例如,预设值可以为13;或者,针对任一训练图像可以训练至膨胀率收敛为止。在该示例中,通过膨胀率学习器进行多轮学习,能够提高用于确定固定膨胀率的第一膨胀率的准确性,由此能够提高所确定的固定膨胀率的准确性较高,从而能够保证检测器进行目标检测的准确性。
在该示例中,所述卷积操作针对所述训练图像的第一膨胀率,可以指针对所述训练图像训练完成后,所述卷积操作针对所述训练图像的膨胀率。即,所述卷积操作针对所述训练图像的第一膨胀率, 可以指针对所述训练图像训练膨胀率的次数达到预设值后,所述卷积操作针对所述训练图像的膨胀率,或者可以指所述卷积操作针对所述训练图像的收敛的膨胀率。
在该示例中,检测器针对不同的训练图像分别训练膨胀率,由此对于检测器的任一进行膨胀卷积的卷积层,均能获得与多个训练图像对应的多个第一膨胀率。
作为该实现方式的一个示例,所述根据所述第一膨胀率,确定所述卷积操作的固定膨胀率,包括:将所述第一膨胀率的平均值确定为所述卷积操作的固定膨胀率。例如,若所述卷积操作的固定膨胀率包括纵向固定膨胀率和横向固定膨胀率,则可以将所述卷积操作针对多个训练图像的第一纵向膨胀率的平均值确定为所述卷积操作的纵向固定膨胀率,将所述卷积操作针对多个训练图像的第一横向膨胀率的平均值确定为所述卷积操作的横向固定膨胀率。例如,纵向固定膨胀率为1.7,横向固定膨胀率2.9。
在该示例中,对于检测器中进行膨胀卷积的任一卷积操作,可以根据所述卷积操作针对部分训练图像(例如1000张训练图像)的第一膨胀率,确定所述卷积操作的固定膨胀率。例如,对于检测器的conv3的第一个3×3卷积操作,可以根据所述卷积操作针对1000张训练图像的第一膨胀率,确定所述卷积操作的固定膨胀率。或者,对于检测器中进行膨胀卷积的任一卷积操作,可以根据所述卷积操作针对全部训练图像的第一膨胀率,确定所述卷积操作的固定膨胀率。
在步骤S12中,对于所述检测器中任一进行膨胀卷积的卷积操作,在所述卷积操作的固定膨胀率满足分解条件的情况下,将所述卷积操作分解为第一子卷积操作和第二子卷积操作,并确定所述卷积操作的固定膨胀率对应的上限膨胀率和下限膨胀率,将所述上限膨胀率作为所述第一子卷积操作的膨胀率,将所述下限膨胀率作为所述第二子卷积操作的膨胀率。
例如,所述卷积操作的固定膨胀率为D,所述卷积操作的固定膨胀率对应的上限膨胀率为Du,所述卷积操作的固定膨胀率对应的下限膨胀率为Dl。
在一种可能的实现方式中,所述卷积操作的固定膨胀率满足分解条件包括以下任意一项:所述卷积操作的固定膨胀率为小数;所述卷积操作的固定膨胀率与整数的最小距离大于第一阈值,其中,所述卷积操作的固定膨胀率与整数的最小距离表示所述卷积操作的固定膨胀率和与所述卷积操作的固定膨胀率最接近的整数之间的距离。
作为该实现方式的一个示例,若所述卷积操作的固定膨胀率包括纵向固定膨胀率和横向固定膨胀率,则所述卷积操作的固定膨胀率为小数可以为:所述卷积操作的纵向固定膨胀率和横向固定膨胀率中的至少一项为小数。
作为该实现方式的一个示例,若所述卷积操作的固定膨胀率包括纵向固定膨胀率和横向固定膨胀率,则所述卷积操作的固定膨胀率与整数的最小距离大于第一阈值可以为:所述卷积操作的纵向固定膨胀率和横向固定膨胀率中的至少一项与整数的最小距离大于第一阈值。例如,第一阈值为0.05,某一卷积操作的纵向固定膨胀率为2.02,横向固定膨胀率为1.7,则所述卷积操作的纵向固定膨胀率与整数的最小距离为0.02,小于第一阈值,所述卷积操作的横向固定膨胀率与整数的最小距离为0.3,大于第一阈值,因此,可以判定所述卷积操作满足分解条件。
在一个示例中,若所述卷积操作的纵向固定膨胀率和横向固定膨胀率中的一项与整数的最小距离小于或等于第一阈值,另一项与整数的最小距离大于第一阈值,则可以根据该另一项进行分解。例如, 所述卷积操作的纵向固定膨胀率为2.02、横向固定膨胀率为1.7,则可以得到第一子卷积操作的纵向膨胀率为2、横向膨胀率为2,第二子卷积操作的纵向膨胀率为2、横向膨胀率为1。根据该示例,在所述卷积操作的纵向固定膨胀率和横向固定膨胀率中的一项与整数的最小距离小于或等于第一阈值时,可以不对该项进行分解,由此能够降低检测器配置的计算量。
在一种可能的实现方式中,所述确定所述卷积操作的固定膨胀率对应的上限膨胀率和下限膨胀率,包括:将大于所述卷积操作的固定膨胀率且与所述卷积操作的固定膨胀率最接近的整数确定为所述卷积操作的固定膨胀率对应的上限膨胀率;将小于所述卷积操作的固定膨胀率且与所述卷积操作的固定膨胀率最接近的整数确定为所述卷积操作的固定膨胀率对应的下限膨胀率。例如。纵向固定膨胀率为1.7,横向固定膨胀率2.9,则可以将纵向上限膨胀率确定为2,将纵向下限膨胀率确定为1,将横向上限膨胀率确定为3,将横向下限膨胀率确定为2。在这个例子中,可以将纵向上限膨胀率2、横向上限膨胀率3确定为第一子卷积操作的膨胀率,将纵向下限膨胀率1、横向下限膨胀率2确定为第二子卷积操作的膨胀率。
在本公开实施例中,通过在所述卷积操作的固定膨胀率满足分解条件的情况下,将所述卷积操作分解为第一子卷积操作和第二子卷积操作,例如,在所述卷积操作的固定膨胀率为小数的情况下,将所述卷积操作分解为具有整数膨胀率的第一子卷积操作和第二子卷积操作,由此能够在卷积计算的过程中减少引入双线性插值操作,从而能够提高计算速度。
在步骤S13中,根据所述卷积操作的输出通道数以及所述卷积操作的固定膨胀率,确定所述第一子卷积操作对应的输出通道数和所述第二子卷积操作对应的输出通道数。
例如,所述卷积操作的输出通道数为C,第一子卷积操作对应的输出通道数为Cu,所述第二子卷积操作对应的输出通道数Cl。
在一种可能的实现方式中,所述根据所述卷积操作的输出通道数以及所述卷积操作的固定膨胀率,确定所述第一子卷积操作对应的输出通道数和所述第二子卷积操作对应的输出通道数,包括:根据所述卷积操作的固定膨胀率与所述下限膨胀率的差值,确定所述卷积操作对应的整体差值系数;根据所述卷积操作的输出通道数以及所述卷积操作对应的整体差值系数,确定所述第一子卷积操作对应的输出通道数和所述第二子卷积操作对应的输出通道数。
在该实现方式中,可以根据所述卷积操作的固定膨胀率D与所述下限膨胀率Dl的差值D-Dl,确定所述卷积操作对应的整体差值系数。
作为该实现方式的一个示例,若所述卷积操作的固定膨胀率包括纵向固定膨胀率和横向固定膨胀率,则可以确定所述卷积操作的纵向固定膨胀率与纵向下限膨胀率的第一差值,确定所述卷积操作的横向固定膨胀率与横向下限膨胀率的第二差值,并将第一差值与第二差值的平均值作为所述卷积操作对应的整体差值系数。例如,所述卷积操作的固定膨胀率包括纵向固定膨胀率1.7和横向固定膨胀率2.9,所述卷积操作的纵向固定膨胀率1.7与纵向下限膨胀率1的第一差值a =0.7,所述卷积操作的横向固定膨胀率2.9与横向下限膨胀率2的第二差值a =0.9,则所述卷积操作对应的整体差值系数a=0.8。
例如,第一子卷积操作对应的输出通道数Cu=aC,第二子卷积操作对应的输出通道数Cl=(1-a)C。
图3示出本公开实施例提供的检测器的配置方法中第一子卷积操作Conv u对应的输出通道数和第 二子卷积操作Conv l对应的输出通道数的示意图。在图3中,第一子卷积操作Conv u的纵向膨胀率为2、横向膨胀率为3,第二子卷积操作Conv l的纵向膨胀率为1、横向膨胀率为2。H×W×C in表示所述卷积操作的输入特征图的高、宽和通道数,因此,第一子卷积操作Conv u和第二子卷积操作Conv l的输入特征图的高、宽和通道数也为H×W×C in。C out表示所述卷积操作的输出通道数,所述卷积操作的纵向固定膨胀率为1.7、横向固定膨胀率为2.9。第一子卷积操作Conv u对应的输出通道数为0.8,第二子卷积操作Conv l对应的输出通道数为0.2。
当然,在另一种可能的实现方式中,也可以根据所述卷积操作的固定膨胀率与所述上限膨胀率的差值,确定所述卷积操作对应的整体差值系数。
在本公开实施例中,通过对检测器中进行膨胀卷积的卷积操作进行分解,由此能够在卷积计算的过程中减少引入较为耗时的双线性插值操作,从而能够提高计算速度,减少目标检测所需时间,从而能够适用于实时场景。
在一种可能的实现方式中,在所述确定所述第一子卷积操作对应的输出通道数和所述第二子卷积操作对应的输出通道数之后,还包括:采用目标训练图像集训练所述检测器,以优化所述检测器的参数。
在该实现方式中,在确定所述第一子卷积操作对应的输出通道数和所述第二子卷积操作对应的输出通道数之后,检测器中可以不再包括膨胀率学习器,检测器中进行膨胀卷积的卷积操作可以分解为两个子卷积操作。图4示出本公开实施例提供的检测器的配置方法中检测器中进行膨胀卷积的卷积操作分解为两个子卷积操作Conv u和Conv l的示意图。
图5示出本公开实施例提供的检测器的配置方法的示意图。如图5所示,检测器的主体网络为ResNet,对Res2、Res3、Res4和Res5中的3×3卷积操作进行分解,将Res2、Res3、Res4和Res5中的每个3×3卷积操作分别分解为两个子卷积操作。
在一种可能的实现方式中,在训练检测器时,可以使用SGD作为学习优化器,动量为0.9,权重衰退率设置为0.0001,初始学习率为0.00125每张训练图像。训练时间可以设置为13个周期,在第8个周期和第11个周期之后可以进行学习率下降,下降比率为10倍。
本公开实施例提供的检测器的配置方法能够适用于需要硬编码的场景,在保证能处理多尺度目标的前提下,去除了自适应模块,达到了减小耗时、提高检测速度的效果。另外,本公开实施例提供的硬编码方法相比于自适应方法能够加速与硬件兼容,有利于实际应用。
本公开实施例还提供了一种目标检测方法,所述目标检测方法包括:获取待检测图像;采用上述检测器的配置方法训练得到的所述检测器对所述待检测图像进行目标检测,获得所述待检测图像对应的目标检测结果。
本公开实施例利用带有膨胀率结构的深度学习网络进行目标检测,能够同时准确地检测多种尺度的目标,且能够在保证目标检测准确性的前提下,减少多尺度目标检测所需时间,从而能够适用于多尺度目标检测的实时场景。例如,本公开实施例能够适用于自动驾驶中针对大小远近不同的车辆和行人的检测、实时智能视频分析中的关键帧检测、安防监控中的行人检测、智能家居中的活体检测等。
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
此外,本公开还提供了检测器的配置装置、目标检测装置、电子设备、计算机可读存储介质、程序,相应技术方案和描述和参见方法部分的相应记载,不再赘述。
图6示出本公开实施例提供的检测器的配置装置的框图。如图6所示,所述检测器的配置装置包括:第一确定模块21,用于确定检测器中进行膨胀卷积的卷积操作的固定膨胀率;第二确定模块22,用于对于所述检测器中任一进行膨胀卷积的卷积操作,在所述卷积操作的固定膨胀率满足分解条件的情况下,将所述卷积操作分解为第一子卷积操作和第二子卷积操作,并确定所述卷积操作的固定膨胀率对应的上限膨胀率和下限膨胀率,将所述上限膨胀率作为所述第一子卷积操作的膨胀率,将所述下限膨胀率作为所述第二子卷积操作的膨胀率;第三确定模块23,用于根据所述卷积操作的输出通道数以及所述卷积操作的固定膨胀率,确定所述第一子卷积操作对应的输出通道数和所述第二子卷积操作对应的输出通道数。
在一种可能的实现方式中,所述检测器包括主体网络,所述检测器中进行膨胀卷积的卷积操作包括:所述检测器的所述主体网络中原始卷积核尺寸为指定尺寸的一个或多个卷积操作。
在一种可能的实现方式中,所述检测器还包括膨胀学习器;所述第一确定模块21包括:第一确定子模块,用于通过所述膨胀学习器获得所述卷积操作针对多个训练图像的第一膨胀率;第二确定子模块,用于根据所述第一膨胀率,确定所述卷积操作的固定膨胀率。
在一种可能的实现方式中,所述膨胀率学习器包括全局平均池化层和全连接层。
在一种可能的实现方式中,所述第一确定子模块用于:对于所述多个训练图像中的任一训练图像,通过所述膨胀率学习器获得所述卷积操作针对所述训练图像的第二膨胀率;基于所述第二膨胀率,获得所述训练图像对应的目标检测结果;根据所述训练图像对应的目标检测结果,更新所述膨胀率学习器的参数;通过参数更新后的所述膨胀率学习器获得所述卷积操作针对所述训练图像的第一膨胀率。
在一种可能的实现方式中,所述第二确定子模块用于:将所述第一膨胀率的平均值确定为所述卷积操作的固定膨胀率。
在一种可能的实现方式中,所述卷积操作的固定膨胀率满足分解条件包括以下任意一项:所述卷积操作的固定膨胀率为小数;所述卷积操作的固定膨胀率与整数的最小距离大于第一阈值,其中,所述卷积操作的固定膨胀率与整数的最小距离表示所述卷积操作的固定膨胀率和与所述卷积操作的固定膨胀率最接近的整数之间的距离。
在一种可能的实现方式中,所述第二确定模块22包括:第三确定子模块,用于将大于所述卷积操作的固定膨胀率且与所述卷积操作的固定膨胀率最接近的整数确定为所述卷积操作的固定膨胀率对应的上限膨胀率;第四确定子模块,用于将小于所述卷积操作的固定膨胀率且与所述卷积操作的固定膨胀率最接近的整数确定为所述卷积操作的固定膨胀率对应的下限膨胀率。
在一种可能的实现方式中,所述第三确定模块23包括:第五确定子模块,用于根据所述卷积操作的固定膨胀率与所述下限膨胀率的差值,确定所述卷积操作对应的整体差值系数;第六确定子模块,用于根据所述卷积操作的输出通道数以及所述卷积操作对应的整体差值系数,确定所述第一子卷积操 作对应的输出通道数和所述第二子卷积操作对应的输出通道数。
在一种可能的实现方式中,还包括:训练模块,用于采用目标训练图像集训练所述检测器,以优化所述检测器的参数。
本公开实施例还提供了一种目标检测装置,包括:获取模块,用于获取待检测图像;目标检测模块,用于采用上述检测器的配置装置训练得到的所述检测器对所述待检测图像进行目标检测,获得所述待检测图像对应的目标检测结果。
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。其中,所述计算机可读存储介质可以是非易失性计算机可读存储介质,也可以是易失性计算机可读存储介质。
本公开实施例还提出一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现上述方法。
本公开实施例还提出一种电子设备,包括:一个或多个处理器;与所述一个或多个处理器关联的存储器,所述存储器用于存储可执行指令,所述可执行指令在被所述一个或多个处理器读取执行时,执行上述方法。
电子设备可以被提供为终端、服务器或其它形态的设备。
图7示出本公开实施例提供的一种电子设备800的框图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。
参照图7,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触 摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如Wi-Fi、2G、3G、4G/LTE、5G或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。
图8示出本公开实施例提供的一种电子设备1900的框图。例如,电子设备1900可以被提供为一服务器。参照图8,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或 无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如Windows
Figure PCTCN2019119161-appb-000001
Mac OS
Figure PCTCN2019119161-appb-000002
Figure PCTCN2019119161-appb-000003
或类似。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时, 产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。

Claims (25)

  1. 一种检测器的配置方法,其特征在于,包括:
    确定检测器中进行膨胀卷积的卷积操作的固定膨胀率;
    对于所述检测器中任一进行膨胀卷积的卷积操作,在所述卷积操作的固定膨胀率满足分解条件的情况下,将所述卷积操作分解为第一子卷积操作和第二子卷积操作,并确定所述卷积操作的固定膨胀率对应的上限膨胀率和下限膨胀率,将所述上限膨胀率作为所述第一子卷积操作的膨胀率,将所述下限膨胀率作为所述第二子卷积操作的膨胀率;
    根据所述卷积操作的输出通道数以及所述卷积操作的固定膨胀率,确定所述第一子卷积操作对应的输出通道数和所述第二子卷积操作对应的输出通道数。
  2. 根据权利要求1所述的方法,其特征在于,所述检测器包括主体网络,所述检测器中进行膨胀卷积的卷积操作包括:
    所述检测器的所述主体网络中原始卷积核尺寸为指定尺寸的一个或多个卷积操作。
  3. 根据权利要求1或2所述的方法,其特征在于,所述检测器还包括膨胀学习器;
    所述确定检测器中进行膨胀卷积的卷积操作的固定膨胀率,包括:
    通过所述膨胀学习器获得所述卷积操作针对多个训练图像的第一膨胀率;
    根据所述第一膨胀率,确定所述卷积操作的固定膨胀率。
  4. 根据权利要求3所述的方法,其特征在于,所述膨胀率学习器包括全局平均池化层和全连接层。
  5. 根据权利要求3或4所述的方法,其特征在于,所述通过所述膨胀率学习器获得所述卷积操作针对多个训练图像的第一膨胀率,包括:
    对于所述多个训练图像中的任一训练图像,通过所述膨胀率学习器获得所述卷积操作针对所述训练图像的第二膨胀率;
    基于所述第二膨胀率,获得所述训练图像对应的目标检测结果;
    根据所述训练图像对应的目标检测结果,更新所述膨胀率学习器的参数;
    通过参数更新后的所述膨胀率学习器获得所述卷积操作针对所述训练图像的第一膨胀率。
  6. 根据权利要求3至5中任意一项所述的方法,其特征在于,所述根据所述第一膨胀率,确定所述卷积操作的固定膨胀率,包括:
    将所述第一膨胀率的平均值确定为所述卷积操作的固定膨胀率。
  7. 根据权利要求1至6中任意一项所述的方法,其特征在于,所述卷积操作的固定膨胀率满足分解条件包括以下任意一项:
    所述卷积操作的固定膨胀率为小数;
    所述卷积操作的固定膨胀率与整数的最小距离大于第一阈值,其中,所述卷积操作的固定膨胀率与整数的最小距离表示所述卷积操作的固定膨胀率和与所述卷积操作的固定膨胀率最接近的整数之间的距离。
  8. 根据权利要求1至7中任意一项所述的方法,其特征在于,所述确定所述卷积操作的固定膨胀率对应的上限膨胀率和下限膨胀率,包括:
    将大于所述卷积操作的固定膨胀率且与所述卷积操作的固定膨胀率最接近的整数确定为所述卷积操作的固定膨胀率对应的上限膨胀率;
    将小于所述卷积操作的固定膨胀率且与所述卷积操作的固定膨胀率最接近的整数确定为所述卷积操作的固定膨胀率对应的下限膨胀率。
  9. 根据权利要求1至8中任意一项所述的方法,其特征在于,所述根据所述卷积操作的输出通道数以及所述卷积操作的固定膨胀率,确定所述第一子卷积操作对应的输出通道数和所述第二子卷积操作对应的输出通道数,包括:
    根据所述卷积操作的固定膨胀率与所述下限膨胀率的差值,确定所述卷积操作对应的整体差值系数;
    根据所述卷积操作的输出通道数以及所述卷积操作对应的整体差值系数,确定所述第一子卷积操作对应的输出通道数和所述第二子卷积操作对应的输出通道数。
  10. 根据权利要求1至9中任意一项所述的方法,其特征在于,在所述确定所述第一子卷积操作对应的输出通道数和所述第二子卷积操作对应的输出通道数之后,还包括:
    采用目标训练图像集训练所述检测器,以优化所述检测器的参数。
  11. 一种目标检测方法,其特征在于,包括:
    获取待检测图像;
    采用权利要求10训练得到的所述检测器对所述待检测图像进行目标检测,获得所述待检测图像对应的目标检测结果。
  12. 一种检测器的配置装置,其特征在于,包括:
    第一确定模块,用于确定检测器中进行膨胀卷积的卷积操作的固定膨胀率;
    第二确定模块,用于对于所述检测器中任一进行膨胀卷积的卷积操作,在所述卷积操作的固定膨胀率满足分解条件的情况下,将所述卷积操作分解为第一子卷积操作和第二子卷积操作,并确定所述卷积操作的固定膨胀率对应的上限膨胀率和下限膨胀率,将所述上限膨胀率作为所述第一子卷积操作的膨胀率,将所述下限膨胀率作为所述第二子卷积操作的膨胀率;
    第三确定模块,用于根据所述卷积操作的输出通道数以及所述卷积操作的固定膨胀率,确定所述第一子卷积操作对应的输出通道数和所述第二子卷积操作对应的输出通道数。
  13. 根据权利要求12所述的装置,其特征在于,所述检测器包括主体网络,所述检测器中进行膨胀卷积的卷积操作包括:
    所述检测器的所述主体网络中原始卷积核尺寸为指定尺寸的一个或多个卷积操作。
  14. 根据权利要求12或13所述的装置,其特征在于,所述检测器还包括膨胀学习器;
    所述第一确定模块包括:
    第一确定子模块,用于通过所述膨胀学习器获得所述卷积操作针对多个训练图像的第一膨胀率;
    第二确定子模块,用于根据所述第一膨胀率,确定所述卷积操作的固定膨胀率。
  15. 根据权利要求14所述的装置,其特征在于,所述膨胀率学习器包括全局平均池化层和全连接层。
  16. 根据权利要求14或15所述的装置,其特征在于,所述第一确定子模块用于:
    对于所述多个训练图像中的任一训练图像,通过所述膨胀率学习器获得所述卷积操作针对所述训练图像的第二膨胀率;
    基于所述第二膨胀率,获得所述训练图像对应的目标检测结果;
    根据所述训练图像对应的目标检测结果,更新所述膨胀率学习器的参数;
    通过参数更新后的所述膨胀率学习器获得所述卷积操作针对所述训练图像的第一膨胀率。
  17. 根据权利要求14至16中任意一项所述的装置,其特征在于,所述第二确定子模块用于:
    将所述第一膨胀率的平均值确定为所述卷积操作的固定膨胀率。
  18. 根据权利要求12至17中任意一项所述的装置,其特征在于,所述卷积操作的固定膨胀率满足分解条件包括以下任意一项:
    所述卷积操作的固定膨胀率为小数;
    所述卷积操作的固定膨胀率与整数的最小距离大于第一阈值,其中,所述卷积操作的固定膨胀率与整数的最小距离表示所述卷积操作的固定膨胀率和与所述卷积操作的固定膨胀率最接近的整数之间的距离。
  19. 根据权利要求12至18中任意一项所述的装置,其特征在于,所述第二确定模块包括:
    第三确定子模块,用于将大于所述卷积操作的固定膨胀率且与所述卷积操作的固定膨胀率最接近的整数确定为所述卷积操作的固定膨胀率对应的上限膨胀率;
    第四确定子模块,用于将小于所述卷积操作的固定膨胀率且与所述卷积操作的固定膨胀率最接近的整数确定为所述卷积操作的固定膨胀率对应的下限膨胀率。
  20. 根据权利要求12至19中任意一项所述的装置,其特征在于,所述第三确定模块包括:
    第五确定子模块,用于根据所述卷积操作的固定膨胀率与所述下限膨胀率的差值,确定所述卷积操作对应的整体差值系数;
    第六确定子模块,用于根据所述卷积操作的输出通道数以及所述卷积操作对应的整体差值系数,确定所述第一子卷积操作对应的输出通道数和所述第二子卷积操作对应的输出通道数。
  21. 根据权利要求12至20中任意一项所述的装置,其特征在于,还包括:
    训练模块,用于采用目标训练图像集训练所述检测器,以优化所述检测器的参数。
  22. 一种目标检测装置,其特征在于,包括:
    获取模块,用于获取待检测图像;
    目标检测模块,用于采用权利要求21训练得到的所述检测器对所述待检测图像进行目标检测,获得所述待检测图像对应的目标检测结果。
  23. 一种电子设备,其特征在于,包括:
    一个或多个处理器;
    与所述一个或多个处理器关联的存储器,所述存储器用于存储可执行指令,所述可执行指令在被所述一个或多个处理器读取执行时,执行权利要求1至11中任意一项所述的方法。
  24. 一种计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器执行时实现权利要求1至11中任意一项所述的方法。
  25. 一种计算机程序,包括计算机可读代码,其特征在于,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现权利要求1至11中的任意权利要求所述的方法。
PCT/CN2019/119161 2019-08-30 2019-11-18 检测器的配置方法及装置、电子设备和存储介质 WO2021036013A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2021537166A JP2022515274A (ja) 2019-08-30 2019-11-18 検出器の配置方法、検出器の配置装置及び非一時的コンピュータ可読記憶媒体
SG11202106971YA SG11202106971YA (en) 2019-08-30 2019-11-18 Configuration method and apparatus for detector, electronic device, and storage medium
KR1020217023154A KR20210113242A (ko) 2019-08-30 2019-11-18 검출기의 배치 방법 및 장치, 전자 기기 및 기억 매체
US17/360,000 US20210326649A1 (en) 2019-08-30 2021-06-28 Configuration method and apparatus for detector, storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910816321.1A CN110543849B (zh) 2019-08-30 2019-08-30 检测器的配置方法及装置、电子设备和存储介质
CN201910816321.1 2019-08-30

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/360,000 Continuation US20210326649A1 (en) 2019-08-30 2021-06-28 Configuration method and apparatus for detector, storage medium

Publications (1)

Publication Number Publication Date
WO2021036013A1 true WO2021036013A1 (zh) 2021-03-04

Family

ID=68711000

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/119161 WO2021036013A1 (zh) 2019-08-30 2019-11-18 检测器的配置方法及装置、电子设备和存储介质

Country Status (7)

Country Link
US (1) US20210326649A1 (zh)
JP (1) JP2022515274A (zh)
KR (1) KR20210113242A (zh)
CN (1) CN110543849B (zh)
SG (1) SG11202106971YA (zh)
TW (1) TWI733276B (zh)
WO (1) WO2021036013A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113989169A (zh) * 2020-07-08 2022-01-28 嘉楠明芯(北京)科技有限公司 一种膨胀卷积加速计算方法及装置
CN112101374B (zh) * 2020-08-01 2022-05-24 西南交通大学 基于surf特征检测和isodata聚类算法的无人机障碍物检测方法
CN112037157A (zh) * 2020-09-14 2020-12-04 Oppo广东移动通信有限公司 数据处理方法及装置、计算机可读介质及电子设备
CN111951269B (zh) * 2020-10-16 2021-01-05 深圳云天励飞技术股份有限公司 图像处理方法及相关设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6151682A (en) * 1997-09-08 2000-11-21 Sarnoff Corporation Digital signal processing circuitry having integrated timing information
CN107742150A (zh) * 2016-10-31 2018-02-27 腾讯科技(深圳)有限公司 一种卷积神经网络的数据处理方法和装置
CN108960069A (zh) * 2018-06-05 2018-12-07 天津大学 一种用于单阶段物体检测器的增强上下文的方法
US20190147318A1 (en) * 2017-11-14 2019-05-16 Google Llc Highly Efficient Convolutional Neural Networks

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108229478B (zh) * 2017-06-30 2020-12-29 深圳市商汤科技有限公司 图像语义分割及训练方法和装置、电子设备、存储介质和程序
SG10202108020VA (en) * 2017-10-16 2021-09-29 Illumina Inc Deep learning-based techniques for training deep convolutional neural networks
CN108197606A (zh) * 2018-01-31 2018-06-22 浙江大学 一种基于多尺度膨胀卷积的病理切片中异常细胞的识别方法
CN108364061B (zh) * 2018-02-13 2020-05-05 北京旷视科技有限公司 运算装置、运算执行设备及运算执行方法
CN108647776A (zh) * 2018-05-08 2018-10-12 济南浪潮高新科技投资发展有限公司 一种卷积神经网络卷积膨胀处理电路及方法
CN109598269A (zh) * 2018-11-14 2019-04-09 天津大学 一种基于多分辨率输入与金字塔膨胀卷积的语义分割方法
CN109886090B (zh) * 2019-01-07 2020-12-04 北京大学 一种基于多时间尺度卷积神经网络的视频行人再识别方法
CN109829863B (zh) * 2019-01-22 2021-06-25 深圳市商汤科技有限公司 图像处理方法及装置、电子设备和存储介质
CN110009095B (zh) * 2019-03-04 2022-07-29 东南大学 基于深度特征压缩卷积网络的道路行驶区域高效分割方法
CN110009648B (zh) * 2019-03-04 2023-02-24 东南大学 基于深浅特征融合卷积神经网络的路侧图像车辆分割方法
CN110047069B (zh) * 2019-04-22 2021-06-04 北京青燕祥云科技有限公司 一种图像检测装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6151682A (en) * 1997-09-08 2000-11-21 Sarnoff Corporation Digital signal processing circuitry having integrated timing information
CN107742150A (zh) * 2016-10-31 2018-02-27 腾讯科技(深圳)有限公司 一种卷积神经网络的数据处理方法和装置
US20190147318A1 (en) * 2017-11-14 2019-05-16 Google Llc Highly Efficient Convolutional Neural Networks
CN108960069A (zh) * 2018-06-05 2018-12-07 天津大学 一种用于单阶段物体检测器的增强上下文的方法

Also Published As

Publication number Publication date
KR20210113242A (ko) 2021-09-15
CN110543849A (zh) 2019-12-06
TW202109365A (zh) 2021-03-01
SG11202106971YA (en) 2021-07-29
TWI733276B (zh) 2021-07-11
CN110543849B (zh) 2022-10-04
JP2022515274A (ja) 2022-02-17
US20210326649A1 (en) 2021-10-21

Similar Documents

Publication Publication Date Title
TWI747325B (zh) 目標對象匹配方法及目標對象匹配裝置、電子設備和電腦可讀儲存媒介
WO2021036013A1 (zh) 检测器的配置方法及装置、电子设备和存储介质
US20210012523A1 (en) Pose Estimation Method and Device and Storage Medium
WO2021155632A1 (zh) 图像处理方法及装置、电子设备和存储介质
CN113538519B (zh) 目标追踪方法及装置、电子设备和存储介质
WO2021051650A1 (zh) 人脸和人手关联检测方法及装置、电子设备和存储介质
US11301726B2 (en) Anchor determination method and apparatus, electronic device, and storage medium
WO2020134866A1 (zh) 关键点检测方法及装置、电子设备和存储介质
WO2020155609A1 (zh) 一种目标对象处理方法、装置、电子设备及存储介质
WO2021036382A1 (zh) 图像处理方法及装置、电子设备和存储介质
US11216904B2 (en) Image processing method and apparatus, electronic device, and storage medium
CN110458218B (zh) 图像分类方法及装置、分类网络训练方法及装置
WO2021208666A1 (zh) 字符识别方法及装置、电子设备和存储介质
KR20210090238A (ko) 비디오 처리 방법 및 장치, 전자 기기, 및 기억 매체
CN110532956B (zh) 图像处理方法及装置、电子设备和存储介质
CN111259967B (zh) 图像分类及神经网络训练方法、装置、设备及存储介质
TW202127369A (zh) 網路訓練方法、圖像生成方法、電子設備及電腦可讀儲存介質
CN113065591B (zh) 目标检测方法及装置、电子设备和存储介质
CN111242303A (zh) 网络训练方法及装置、图像处理方法及装置
TW202044068A (zh) 訊息處理方法及其裝置、電子設備和儲存媒體
CN108984628B (zh) 内容描述生成模型的损失值获取方法及装置
CN111027617A (zh) 神经网络训练及图像识别方法、装置、设备和存储介质
WO2022141969A1 (zh) 图像分割方法及装置、电子设备、存储介质和程序
CN111988622B (zh) 视频预测方法及装置、电子设备和存储介质
KR20210054522A (ko) 얼굴 인식 방법 및 장치, 전자 기기 및 저장 매체

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19943267

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021537166

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20217023154

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 24.06.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19943267

Country of ref document: EP

Kind code of ref document: A1