WO2021005776A1 - 物体検知装置、学習方法、及び、記録媒体 - Google Patents

物体検知装置、学習方法、及び、記録媒体 Download PDF

Info

Publication number
WO2021005776A1
WO2021005776A1 PCT/JP2019/027483 JP2019027483W WO2021005776A1 WO 2021005776 A1 WO2021005776 A1 WO 2021005776A1 JP 2019027483 W JP2019027483 W JP 2019027483W WO 2021005776 A1 WO2021005776 A1 WO 2021005776A1
Authority
WO
WIPO (PCT)
Prior art keywords
object detection
unit
output
loss
image data
Prior art date
Application number
PCT/JP2019/027483
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 JP2021530447A priority Critical patent/JP7164049B2/ja
Priority to US17/624,913 priority patent/US20220277553A1/en
Priority to PCT/JP2019/027483 priority patent/WO2021005776A1/ja
Publication of WO2021005776A1 publication Critical patent/WO2021005776A1/ja

Links

Images

Classifications

    • 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/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • G06V10/809Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of classification results, e.g. where the classifiers operate on the same input data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • G06V10/225Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition based on a marking or identifier characterising the area
    • 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/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • G06V10/7753Incorporation of unlabelled data, e.g. multiple instance learning [MIL]
    • 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/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/776Validation; Performance evaluation
    • 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 invention relates to a technique for detecting an object included in an image.
  • Patent Document 1 describes a pattern recognition device that performs recognition processing according to the environment in which characters are written. In this pattern recognition device, one or a plurality of registered recognizers are called to perform recognition processing according to the state of the processing target extracted from the input image.
  • Patent Document 2 describes an obstacle detection device that makes a final determination based on the determination results of a plurality of determination units that determine the presence or absence of an obstacle.
  • the above method since the recognition performance is improved by using a plurality of recognizers, the device is inevitably large-scale. For this reason, the above method is not suitable when deploying an object detection device used for video surveillance or the like in the field.
  • One object of the present invention is to provide an object detection device capable of constructing a small-scale target model for a new field by using a model learned in various field environments.
  • the object detection device is A plurality of object detection units that output a score indicating the certainty that a predetermined object exists for each partial area set for the input image data, and Based on the image data, the weight calculation unit that calculates the weight when fusing the scores output by the plurality of object detection units using the weight calculation parameter, A fusion unit that fuses the scores output by the plurality of object detection units with the weights calculated by the weight calculation unit for each partial region.
  • An object detection unit of a target model that outputs a score indicating the certainty that a predetermined object exists for each partial area set for the image data.
  • a first loss calculation unit that calculates a first loss indicating a difference between the output of the object detection unit of the target model and the correct label of the image data and the score obtained by the fusion unit.
  • a first parameter correction unit for modifying the parameters of the object detection unit of the target model is provided so that the first loss is reduced.
  • the learning method of the object detection device is For each partial area set for the input image data, a score indicating the certainty that a predetermined object exists is output from a plurality of object detection units. Based on the image data, the weight at the time of fusing the scores output by the plurality of object detection units is calculated by using the weight calculation parameter. With the weight calculated by the weight calculation unit, the scores output by the plurality of object detection units are fused for each partial region. For each partial area set for the image data, a score indicating the certainty that a predetermined object exists is output from the object detection unit of the target model. The first loss indicating the difference between the output of the object detection unit of the target model and the correct label of the image data and the fused score is calculated. The parameters of the object detection unit of the target model are modified so that the first loss is reduced.
  • the recording medium is: For each partial area set for the input image data, a score indicating the certainty that a predetermined object exists is output from a plurality of object detection units. Based on the image data, the weight at the time of fusing the scores output by the plurality of object detection units is calculated by using the weight calculation parameter. With the weight calculated by the weight calculation unit, the scores output by the plurality of object detection units are fused for each partial region. For each partial area set for the image data, a score indicating the certainty that a predetermined object exists is output from the object detection unit of the target model. The first loss indicating the difference between the output of the object detection unit of the target model and the correct label of the image data and the fused score is calculated.
  • the configuration for constructing a large-scale model using multiple trained models is shown.
  • An example of the process of constructing a large-scale model is schematically shown. It is a figure explaining the concept of an anchor box.
  • the configuration for constructing a target model using a large-scale model is shown.
  • An example of the process of constructing the target model is schematically shown. It is a block diagram which shows the hardware structure of the object detection device.
  • the functional configuration of the object detection device for learning according to the first embodiment is shown. It is a flowchart of the learning process by the object detection device of 1st Embodiment.
  • the functional configuration of the object detection device for inference of the first embodiment is shown.
  • the functional configuration of the object detection device for learning according to the second embodiment is shown. It is a flowchart of the learning process by the object detection device of 2nd Embodiment.
  • the functional configuration of the object detection device for learning according to the third embodiment is shown.
  • FIG. 1 shows a configuration for constructing a large-scale model using a plurality of trained models.
  • the large-scale model 1 includes a plurality of trained models 2 (three in the example of FIG. 1), a gating network 3, and a calculation unit 4.
  • the trained model 2 is a source model that has been trained in different environments, and here, it is a model that detects an object from image data.
  • the image data collected at the new site is input to the plurality of trained models 2 and the gating network 3 as training data.
  • the correct answer value of the class and the correct answer value of the coordinates are prepared as the corresponding correct answer labels in advance.
  • Each trained model 2 performs object detection based on the input training data, and for each subregion set in the middle stage of object detection, class information regarding the class of the detected object and the position of the subregion. Outputs the coordinate information indicating.
  • the class information includes a class code indicating the type of the object and a score indicating the certainty that the object indicated by the class code exists.
  • the gating network 3 outputs weights for the information output by each trained model 2.
  • the calculation unit 4 fuses the information output by each trained model 2 by using the weight output by the gating network 3.
  • the calculation unit 4 outputs the class information obtained by fusing the class information output by each trained model 2 by using weights. Further, the calculation unit 4 outputs the coordinate information output by each trained model 2 as coordinate information obtained by fusing the coordinate information using weights.
  • the class information and coordinate information output from the calculation unit 4 are compared with the correct answer value of the class and the correct answer value of the coordinates prepared in advance, respectively, and the error is calculated. Then, the gating network 3 is learned so as to minimize those errors. Specifically, the parameters of the gating network 3 are modified so that those errors are reduced.
  • the gating network 3 estimates the strengths and weaknesses of each trained model 2 for each input image data, and learns the value of the weight indicating the optimum fusion ratio of each trained model 2.
  • the training of the large-scale model 1 is performed until a certain degree of accuracy is obtained. In this way, a high-precision large-scale model is constructed using a plurality of trained source models.
  • FIG. 2 schematically shows an example of the process of constructing the large-scale model 1.
  • the number of trained models 2 is two.
  • the trained model 2 is configured by RetinaNet.
  • the class information is used among the information output by each trained model 2.
  • the trained model 2 generates a feature pyramid net (feature pyramid net) composed of a plurality of feature maps having different sizes from the input image data by ResNet (Resual Network: residual network).
  • An anchor box is set in each feature map, and the trained model 2 detects an object for each anchor box.
  • the trained model 2 performs up to the maximum value selection process that outputs the detected object and its score and coordinate information in a list format, specifically, the NMS (Non Maximum Support) process. Instead, the class information and coordinate information of the recognition target object calculated for each anchor box before NMS processing are output as they are.
  • all the partial areas that verify the presence or absence of the recognition target object are called “anchor boxes”.
  • FIG. 3 is a diagram for explaining the concept of the anchor box.
  • a sliding window is set on a feature map obtained by convolution of a CNN (Convolutional Neural Network).
  • CNN Convolutional Neural Network
  • anchor boxes having different sizes in k ways hereinafter, also simply referred to as “anchors” are set for one sliding window, and the presence or absence of a recognition target object is verified for each anchor.
  • each anchor refers to a subregion set in k ways for all sliding windows.
  • the number of anchors depends on the structure and size of the neural network.
  • the upper row of the output network 70 stores class information 71 (K dimension, that is, K type recognition target) for W ⁇ H ⁇ A anchors
  • the lower row stores W ⁇ H ⁇ A anchors.
  • W indicates the number of variations in the horizontal direction of the anchor center
  • H indicates the number of variations in the vertical direction of the anchor center
  • A indicates the number of variations in the vertical and horizontal sizes of the anchor.
  • the coordinate information may represent the coordinate information of the left, right, upper and lower four sides of the rectangular area where the recognition target exists as an absolute value or a relative position from the reference position uniquely determined for the anchor, and the upper and lower four sides may be represented. It may be expressed in terms of left side and top side and width and height.
  • the output network 70 shown in FIG. 2 is set for one layer of the feature pyramid net, and similarly, K-dimensional score information and four-dimensional coordinate information are output to another layer of the feature pyramid net. Will be done.
  • the number of anchors set for all layers of the feature pyramid net will be referred to as "Na”. Since the score information and the coordinate information for the same anchor are stored in a predetermined memory position of the memory for storing the information, they can be easily associated with each other.
  • Each trained model 2 outputs class information 71 for the number of anchors x the number of classes.
  • the gating network 3 outputs the weight determined for each trained model 2.
  • the calculation unit 4 calculates the weighted sum for each of the same anchors for the class information output from each trained model 2, and outputs the class information 72.
  • the sum of squares of the difference between the class information 72 and the correct answer value (teacher data) 73 of the class prepared in advance is defined as a loss, and the weight output by the gating network 3 is learned so as to minimize this loss. .. In this way, the large-scale model 1 is constructed.
  • FIG. 4 shows a configuration for constructing a target model using the large-scale model 1.
  • the learning of the gating network 3 is completed, and here, the learning of the target model 5 is performed.
  • Learning data is input to the target model 5.
  • the target model 5 is composed of the same model as the trained model 2.
  • the information output by the large-scale model 1 is used as the teacher data.
  • the class information and the coordinate information output by the target model 5 based on the input learning data are compared with the correct answer value of the class and the correct answer value of the coordinates prepared in advance for the learning data, and the error a is calculated.
  • the target model 5 is trained so as to be minimized.
  • the class information and coordinate information output by the target model 5 are compared with the class information and coordinate information output by the large-scale model 1 based on the same learning data, and the target is so as to minimize the error b.
  • Model 5 is trained.
  • the error of the coordinate information is calculated only for the anchor at the position where the object exists on the correct label, and the error of the coordinate information is set to "0" for the anchor at the position where the object does not exist.
  • FIG. 5 schematically shows a specific example of the process of constructing the target model using the large-scale model for which learning has been completed.
  • the trained model 2 is configured by RetinaNet.
  • the large-scale model 1 calculates the weighted sum of the class information 71 output by each trained model 2 and the weight output by the gating network 3, and outputs the class information 76.
  • the target model 5 outputs the class information 74 based on the learning data.
  • a plurality of source models that have been learned in various environments are fused to construct a large-scale model that is robust against environmental changes. Then, the inference result of the large-scale model is used as teacher data, and the target model is trained using the learning data collected at a new site. This makes it possible to build a small-scale, highly accurate target model suitable for the new site environment.
  • FIG. 6 is a block diagram showing a hardware configuration of the object detection device.
  • the object detection device 10 includes an interface (IF) 12, a processor 13, a memory 14, a recording medium 15, and a database (DB) 16.
  • IF interface
  • DB database
  • Interface 12 communicates with an external device. Specifically, the interface 12 is used when the image data to be the object detection target or the image data for learning is input from the outside, or the result of the object detection is output to the external device.
  • the processor 13 is a computer such as a CPU (Central Processing Unit) or a CPU and a GPU (Graphics Processing Unit), and controls the entire object detection device 10 by executing a program prepared in advance.
  • the memory 14 is composed of a ROM (Read Only Memory), a RAM (Random Access Memory), and the like.
  • the memory 14 stores various programs executed by the processor 13.
  • the memory 14 is also used as a working memory during execution of various processes by the processor 13.
  • the recording medium 15 is a non-volatile, non-temporary recording medium such as a disk-shaped recording medium or a semiconductor memory, and is configured to be removable from the object detection device 10.
  • the recording medium 15 records various programs executed by the processor 13. When the object detection device 10 executes the learning process, the program recorded in the recording medium 15 is loaded into the memory 14 and executed by the processor 13.
  • the database 16 stores image data for learning used in the learning process of the object detection device 10.
  • the image data for learning includes the correct answer label.
  • the object detection device 10 may include an input device such as a keyboard and a mouse, a display device, and the like.
  • FIG. 7 is a block diagram showing a functional configuration of the object detection device 10 for learning.
  • the object detection device 10 first executes a step of learning a large-scale model including a plurality of object detection units (hereinafter, referred to as a “large-scale model learning step”), and then uses the trained large-scale model.
  • the step of learning the target model (hereinafter, referred to as "target model learning step”) is executed.
  • the object detection device 10 is roughly classified into a large-scale model unit 20 and a target model unit 30.
  • the large-scale model unit 20 includes an image input unit 21, a weight calculation unit 22, a first object detection unit 23, a second object detection unit 24, a product-sum unit 25, a parameter correction unit 26, and a loss.
  • a calculation unit 17 and a correct label storage unit 28 are provided.
  • the target model unit 30 includes a target model object detection unit 31, a loss calculation unit 32, and a parameter correction unit 33.
  • the first object detection unit 23 and the second object detection unit 24 have been learned in advance, and are not learned in the processing described below.
  • the image input unit 21 is realized by the interface 12 shown in FIG. 6,
  • the correct label storage unit 28 is realized by the database 16 shown in FIG. 6, and the other components are realized by the processor 13 shown in FIG. To.
  • Image data is input to the image input unit 21.
  • the image data is image data for learning, and is taken in an area to be detected by an object. As described above, for each image data, a correct label indicating an object included in the image is prepared in advance.
  • the first object detection unit 23 has a configuration similar to a neural network for object detection by deep learning such as SSD (Single Shot Multibox Detector), RetinaNet, and Faster-RCNN (Regional Convolutional Neural Network). However, as described above, the first object detection unit 23 outputs the score information and the coordinate information of the recognition target object calculated for each anchor box before the NMS processing as they are. As described above, the first object detection unit 23 has been learned in advance, and its parameters are fixed.
  • SSD Single Shot Multibox Detector
  • RetinaNet RetinaNet
  • Faster-RCNN Registered Convolutional Neural Network
  • the second object detection unit 24 is the same as the first object detection unit 23, and the structure of the model is also the same. However, the first object detection unit 23 and the second object detection unit 24 have one network parameter internally due to factors such as different learning data or different initial values of parameters at the time of learning. It is not done, and the recognition characteristics are different.
  • the weight calculation unit 22 optimizes the internal parameters for weight calculation (hereinafter, referred to as "weight calculation parameters").
  • the weight calculation unit 22 is composed of a deep neural network or the like applicable to a regression problem such as ResNet.
  • the weight calculation unit 22 calculates the weight at the time of fusing the score information and the coordinate information output by the first object detection unit 23 and the second object detection unit 24 based on the image data input to the image input unit 21. It is determined, and the information indicating each weight is output to the product-sum unit 25. Basically, the number of dimensions of the weight is equal to the number of object detectors used.
  • the weight calculation unit 22 preferably calculates the weight so that the sum of the weights for the first object detection unit 23 and the weights for the second object detection unit 24 is “1”.
  • the weight calculation unit 22 may set the weight for the first object detection unit 23 to be “ ⁇ ” and the weight for the second object detection unit 24 to be “1- ⁇ ”.
  • the average value calculation process in the product-sum unit 25 can be simplified.
  • the object detection unit has two parameters related to one object (for example, a parameter indicating that it seems to be an object and a parameter indicating that it does not seem to be an object)
  • the number of dimensions of the weight is the number of object detection units to be used. It will be twice as much as.
  • the product-sum unit 25 sums the score information and coordinate information output by the first object detection unit 23 and the second object detection unit 24 based on the weights output by the weight calculation unit 22 between the corresponding anchors. After that, find the average value.
  • the product-sum calculation of the coordinate information is performed only on the anchors whose existence of the recognition target object is indicated on the correct label, and the calculation is not required for the other anchors.
  • the average value is calculated for each anchor and each object to be recognized, and has a Na ⁇ (k + 4) dimension.
  • the sum-of-products portion 25 is an example of a fusion portion of the present invention.
  • the correct answer label storage unit 28 stores the correct answer label for the image data for learning. Specifically, the correct answer label storage unit 28 stores the score information and the coordinate information of the recognition target object existing in each anchor as the correct answer label in an array for each anchor. The correct answer label storage unit 28 stores score information and coordinate information indicating that the recognition target object does not exist in the storage area corresponding to the anchor in which the recognition target object does not exist.
  • the original correct answer information for the image data for learning is often text information indicating the type of the recognition target object and its rectangular area in the input image, but is stored in the correct answer label storage unit 28.
  • the correct answer label is data obtained by converting the correct answer information into score information and coordinate information for each anchor.
  • the correct answer label storage unit 28 sets the score of the object as score information at the position of the correct answer label representing the score of the object for the anchor having the overlap of the rectangular area in which the object is shown and the predetermined threshold or more.
  • the value 1.0 indicating is stored, and the relative amount of the position of the rectangular area where the object is reflected with respect to the standard rectangular position of the anchor (the amount of deviation of the left end x coordinate, the amount of deviation of the upper end y coordinate, and the width) The amount of deviation and the amount of deviation of height) are stored.
  • the correct answer label storage unit 28 stores a value indicating that no object exists at the position of the correct answer label representing the score of another object.
  • the correct answer label storage unit 28 places the object at the position of the correct answer label that stores the score and coordinate information of the object. Stores a value indicating that does not exist.
  • the score information is k-dimensional and the coordinate information is four-dimensional.
  • the score information is Na ⁇ k dimensions and the coordinate information is Na ⁇ 4 dimensions.
  • the loss calculation unit 27 calculates the loss by collating the Na ⁇ (k + 4) -dimensional score information and coordinate information output by the product-sum unit 25 with the correct label stored in the correct label storage unit 28. Specifically, the loss calculation unit 27 calculates the identification loss related to the score information and the regression loss (Regression loss) related to the coordinate information.
  • the average value of the Na ⁇ (k + 4) dimension output by the product-sum unit 25 is synonymous with the score information and the coordinate information output by the first object detection unit 23 for each anchor and each recognition target object. Therefore, the loss calculation unit 27 can calculate the value of the identification loss by a method that is exactly the same as the method of calculating the identification loss for the output of the first object detection unit 23.
  • the loss calculation unit 27 calculates the identification loss by accumulating the differences in the score information for all the anchors. Regarding the regression loss, the loss calculation unit 27 accumulates the difference in coordinate information only for the anchor in which any object exists, and considers the difference in coordinate information for the anchor in which no object exists. do not do.
  • the loss calculated by the loss calculation unit 27 is also referred to as “large-scale model loss”.
  • the loss calculation unit 27 corresponds to the second loss calculation unit of the present invention, and the large-scale model loss corresponds to the second loss of the present invention.
  • the parameter correction unit 26 corrects the network parameters inherent in the weight calculation unit 22 so as to reduce the loss calculated by the loss calculation unit 27. At this time, the parameter correction unit 26 fixes the network parameters of the first object detection unit 23 and the second object detection unit 24, and corrects only the parameters of the weight calculation unit 22. The parameter correction unit 26 can obtain the correction amount of the parameter by a normal error back propagation method.
  • the weight calculation unit 22 predicts the strengths and weaknesses of each object detection unit for the input image and optimizes the weights, and the product-sum unit 25 multiplies the weights by the output of each object detection unit and averages them. Therefore, the final determination can be made with higher accuracy than the single object detection unit. For example, when the first object detection unit 23 is good at detecting pedestrians walking alone and the second object detection unit 24 is good at detecting pedestrians walking in a group, a person who happens to walk alone in the input image. If is reflected, the weight calculation unit 22 assigns a larger weight to the first object detection unit 23.
  • the parameter correction unit 26 corrects the parameters of the weight calculation unit 22 so that the weight calculation unit 22 calculates a large weight for the object detection unit that is good at recognizing the image data for learning.
  • the outputs of the first object detection unit 23 and the second object detection unit 24 can be optimally producted and summed, and a comprehensive determination can be made. It is possible to build a scale model.
  • the target model object detection unit 31 is an object detection unit of a newly constructed target model.
  • the target model object detection unit 31 has the same configuration as the first object detection unit 23 and the second object detection unit 24, similar to a neural network for object detection.
  • the target model object detection unit 31 outputs score information and coordinate information of the recognition target object to the loss calculation unit 32 based on the learning image data input to the image input unit 21.
  • the loss calculation unit 32 collates the score information and the coordinate information output by the target model object detection unit 31 with the correct label stored in the correct label storage unit 28 in the same manner as the loss calculation unit 27, and collates the identification loss and regression. Calculate the loss. Further, the loss calculation unit 33 collates the score information and the coordinate information output by the target model object detection unit 31 with the score information and the coordinate information output by the product-sum unit 25 to calculate the identification loss and the regression loss. The score information and coordinate information output by the product-sum unit 25 correspond to the score information and coordinate information obtained by the large-scale model. Then, the loss calculation unit 32 supplies the calculated loss to the parameter correction unit 33.
  • the image data for learning may include image data that does not have a correct label (referred to as "unlabeled image data").
  • the loss calculation unit 32 collates the score information and the coordinate information output by the target model object detection unit 31 with the score information and the coordinate information output by the product-sum unit 25, and the identification loss and the identification loss generated. Only the regression loss needs to be output to the parameter correction unit 33.
  • the loss calculated by the loss calculation unit 32 is also referred to as “target model loss”.
  • the loss calculation unit 32 corresponds to the first loss calculation unit of the present invention, and the target model loss corresponds to the first loss of the present invention.
  • the parameter correction unit 33 corrects the network parameters inherent in the target model object detection unit 31 so as to reduce the loss calculated by the loss calculation unit 32.
  • the parameter correction unit 33 can obtain the correction amount of the parameter by a normal error back propagation method.
  • FIG. 8 is a flowchart of the learning process by the object detection device 10. This process is realized by the processor 13 shown in FIG. 6 executing a program prepared in advance.
  • steps S11 to S18 correspond to large-scale model learning steps
  • steps S19 to S24 correspond to target model learning steps.
  • the target model object detection unit 31, the loss calculation unit 32, and the parameter correction unit 33 do not operate during the execution of the large-scale model learning step.
  • image data for learning is input to the image input unit 21 (step S11).
  • the first object detection unit 23 performs object detection using image data, and outputs score information and coordinate information of the recognition target object in the image for each anchor and for each recognition target object (step S12).
  • the second object detection unit 24 detects the object using the image data, and outputs the score information and the coordinate information of the recognition target object in the image for each anchor and each recognition target object (step S13).
  • the weight calculation unit 22 reads the image data and calculates the weights for the outputs of the first object detection unit 23 and the second object detection unit 24 (step S14).
  • the product-sum unit 25 includes the score information and coordinate information of the recognition target object output by the first object detection unit 23, and the score of the recognition target object output by the second object detection unit 24 for each anchor.
  • the information and the coordinate information are multiplied by the weights calculated by the weight calculation unit 22 and added to each other, and the average value thereof is output (step S15).
  • the loss calculation unit 27 collates the difference between the obtained average value and the correct label, and calculates the large-scale model loss (step S16).
  • the parameter correction unit 26 corrects the weight calculation parameter inherent in the weight calculation unit 22 so that the value of the large-scale model loss is reduced (step S17).
  • the object detection device 10 repeats the above steps S11 to S17 only for a predetermined condition, and ends the process.
  • the "predetermined condition” is a condition related to the number of repetitions, the degree of change in the loss value, and the like, and any of the methods adopted as many deep learning learning procedures can be used. In this way, a large-scale model is built.
  • step S18 Yes
  • the target model learning step is then performed.
  • the internal parameters of the weight calculation unit 22 are fixed to the values learned in the large-scale model learning step.
  • the internal parameters of the first object detection unit 23 and the second object detection unit 24 are also fixed to the values learned in advance.
  • the large-scale model unit 20 performs object detection using the input image data, and together with the score information of the object to be recognized in the image.
  • the coordinate information is output to the loss calculation unit 32 for each anchor and each recognition target object (step S20).
  • the target model object detection unit 31 performs object detection using the input image data, and outputs score information and coordinate information of the recognition target object in the image to the loss calculation unit 32 for each anchor and each recognition target object.
  • the loss calculation unit 32 uses the score information and coordinate information output by the target model object detection unit 31 as the correct label stored in the correct label storage unit 28 and the score information and coordinates output by the large-scale model unit 20.
  • the target model loss is calculated by comparing with the information (step S22). Then, the parameter correction unit 33 corrects the parameters inherent in the target model object detection unit 31 so that the value of the target model loss is reduced (step S23).
  • the object detection device 10 repeats the above steps S19 to S24 only for a predetermined condition, and ends the process.
  • a large-scale model is learned using a plurality of learned object detection units, and then a target model is used using the large-scale model. To learn. Therefore, it is possible to construct a small-scale and highly accurate target model suitable for a new site environment.
  • FIG. 9 is a block diagram showing a functional configuration of the object detection device 40 for inference.
  • the object detection device 40 for inference is also basically realized by the hardware configuration shown in FIG.
  • the object detection device 40 for inference includes an image input unit 21, a target model object detection unit 31, and a maximum value selection unit 41.
  • the image input unit 21 and the target model object detection unit 31 are the same as the object detection device 10 for learning shown in FIG. 7.
  • the target model object detection unit 31 uses the one that has been learned by the target model learning step described above.
  • the target model object detection unit 31 detects the object using the learned internal parameters, and obtains the score information and the coordinate information of the recognition target object for each anchor. And it is output for each recognition target object.
  • the maximum value selection unit 41 performs NMS processing on the Na ⁇ k-dimensional score information output by the target model object detection unit 31 to identify the type of the object to be recognized, and identifies the position from the coordinate information corresponding to the anchor. And output the object detection result.
  • the object detection result includes the type and position of each object to be recognized. As a result, it is possible to obtain an object detection result using the target model object detection unit 31 learned by using the large-scale model.
  • Modification example 1 The following modifications can be applied to the above first embodiment. (1) In the above first embodiment, learning is performed using the score information and coordinate information output by each object detection unit, but learning is performed using only the score information without using the coordinate information. May be good.
  • the dimension number (number) of the weight output by the weight calculation unit 22 may be equal to the number of the object detection unit.
  • the weight calculation unit 22 is not limited to deep learning for regression problems, but may be a function that can be learned by the error back propagation method, in other words, a function that can partially differentiate the error function with the parameters of the function that calculates the weight. Anything can be used.
  • the device is not limited to the detection of an object, and may be an event detection device that outputs event information occurring in an image and its coordinate information.
  • the "event” refers to, for example, a predetermined behavior or movement of a person, a gesture, or a natural phenomenon such as a landslide, an avalanche, or a rise in the water level of a river.
  • the first object detection unit 23 and the second object detection unit 24 use the same model structure, but different models may be used. .. However, in that case, it is necessary to devise the association of both anchors corresponding to substantially equal positions in the sum-of-products portion 25. This is because the anchors between different models do not exactly match.
  • each anchor set by the second object detection unit 24 corresponds to any one of the anchors set by the first object detection unit 23, and the first object detection unit 23
  • the weighted average may be calculated for each anchor to be set, and the score information and the coordinate information for each anchor and each recognition target object set by the first object detection unit 23 may be output.
  • an image area (rectangular area where an object exists) corresponding to the anchor may be obtained, and anchors whose image areas overlap most just enough may be associated with each other.
  • the weight calculation unit 22 of the first embodiment sets one weight for the entire image, but instead, the weight calculation unit 22 sets each weight for each anchor of the image, that is, for each partial area.
  • the weight for the output of the object detection unit may be calculated. Assuming that the number of anchors set in the image data is Na and the number of object detection units is Nf, the number of dimensions of the information indicating the magnification output by the weight calculation unit 22 is Na ⁇ Nf.
  • the weight calculation unit 22 can be configured by a deep neural network or the like that can be applied to a multidimensional regression problem. Further, the weight calculation unit 22 may include a network having a structure that averages the weights corresponding to the anchors in the vicinity so that the anchors in the vicinity with respect to the object detection units have the weights as close as possible.
  • the weight calculation unit 22 may be able to change the weight for each class instead of for each anchor.
  • the weight calculation unit 22 may calculate the weight for each class, and the parameter correction unit 26 may correct the parameters for each class.
  • the number of anchors set in the image data is Na and the number of object detection units is Nf
  • the number of dimensions of the weight output by the weight calculation unit 22 is Na ⁇ Nf dimension.
  • the number of classes is Nc dimension
  • the number of dimensions of the weight output by the weight calculation unit 22 is Nc ⁇ Nf dimension.
  • backpropagation may be applied so as to minimize the loss from the output layer neuron side as usual.
  • backpropagation may be applied so as to minimize the loss from the output layer neuron side as usual.
  • the object detection device 10x for learning described below is realized by the hardware configuration shown in FIG.
  • a large-scale model is trained, and then a target model is trained using the large-scale model.
  • the learning of the large-scale model and the learning of the target model are performed at the same time.
  • FIG. 10 is a block diagram showing a functional configuration of the object detection device 10x for learning according to the second embodiment.
  • the output of the loss calculation unit 32 is also supplied to the parameter correction unit 26.
  • the object detection device 10x for learning according to the second embodiment is the same as the object detection device 10 of the first embodiment shown in FIG. 7, and each element is basically the same as that of the first embodiment. It works in the same way.
  • the loss calculation unit 32 supplies the target model loss not only to the parameter correction unit 33 but also to the parameter correction unit 26.
  • the parameter correction unit 26 corrects the weight calculation parameter of the weight calculation unit 22 in consideration of the target model loss. Specifically, the parameter correction unit 26 corrects the weight calculation parameter so that the large-scale model loss and the target model loss are reduced.
  • FIG. 11 is a flowchart of the learning process by the object detection device 10x. This process is realized by the processor 13 shown in FIG. 6 executing a program prepared in advance.
  • steps S41 to S46 are the same as steps S11 to S16 of the learning process by the object detection device 10 of the first embodiment shown in FIG. 8, and thus the description thereof will be omitted.
  • the target model object detection unit 31 performs object detection using the input image data, and obtains score information and coordinate information of the recognition target object in the image. Output for each anchor and each recognition target object (step S47).
  • the loss calculation unit 32 compares the score information and coordinate information output by the target model object detection unit 31 with the correct label and the score information and coordinate information output by the large-scale model unit 20 to calculate the target model loss. Then, it is supplied to the parameter correction unit 26 and the parameter correction unit 33 (step S48).
  • the parameter correction unit 26 corrects the weight calculation parameter of the weight calculation unit 22 so that the large-scale model loss and the target model loss are reduced (step S49). Further, the parameter correction unit 33 corrects the parameters inherent in the target model object detection unit 31 so that the target model loss is reduced (step S50).
  • the object detection device 10x repeats the above steps S41 to S50 only for a predetermined condition, and ends the process.
  • the learning step of the large-scale model and the learning step of the target model can be executed at the same time. Therefore, it is possible to efficiently construct a target model suitable for a new site environment.
  • the object detection device for inference according to the second embodiment is the same as the object detection device 40 for inference according to the first embodiment shown in FIG. 9, and operates in the same manner. Therefore, description thereof will be omitted.
  • Modifications (1) to (7) in the first embodiment can be similarly applied to the second embodiment.
  • FIG. 12 shows the functional configuration of the object detection device 40 for learning according to the third embodiment.
  • the object detection device 40 is realized by the hardware configuration shown in FIG.
  • the object detection device 50 includes a plurality of object detection units 51, a weight calculation unit 52, a fusion unit 53, a target model object detection unit 54, a loss calculation unit 55, and a parameter correction unit 56.
  • the plurality of object detection units 51 output scores indicating the certainty that a predetermined object exists for each partial area set for the input image data.
  • the weight calculation unit 52 calculates the weight at the time of fusing the scores output by the plurality of object detection units 51 based on the image data by using the weight calculation parameter.
  • the fusion unit 53 fuses the scores output by the plurality of object detection units 51 for each partial region with the weights calculated by the weight calculation unit 52.
  • the object detection unit 54 of the target model outputs a score indicating the certainty that a predetermined object exists for each partial area set for the image data.
  • the loss calculation unit 55 calculates a loss indicating the difference between the output of the object detection unit 54 of the target model and the correct label of the image data and the score fused by the fusion unit 53. Then, the parameter correction unit 56 corrects the parameters of the object detection unit 54 of the target model so that the loss is reduced.
  • a plurality of object detection units that output a score indicating the certainty that a predetermined object exists for each partial area set for the input image data, and Based on the image data, the weight calculation unit that calculates the weight when fusing the scores output by the plurality of object detection units using the weight calculation parameter, A fusion unit that fuses the scores output by the plurality of object detection units with the weights calculated by the weight calculation unit for each partial region.
  • An object detection unit of a target model that outputs a score indicating the certainty that a predetermined object exists for each partial area set for the image data.
  • a first loss calculation unit that calculates a first loss indicating a difference between the output of the object detection unit of the target model and the correct label of the image data and the score obtained by the fusion unit.
  • a first parameter correction unit that modifies the parameters of the object detection unit of the target model so that the first loss is reduced.
  • Appendix 2 A second loss calculation unit that calculates a second loss indicating the difference between the correct label and the score fused by the fusion unit, A second parameter correction unit that corrects the weight calculation parameter so that the second loss is reduced, The object detection device according to Appendix 1.
  • Appendix 3 The object detection device according to Appendix 2, wherein the second parameter correction unit corrects the weight calculation parameter based on the first loss and the second loss.
  • the image data includes unlabeled image data that does not have a corresponding correct label.
  • the first loss calculation unit calculates, for the unlabeled image data, the difference between the score output by the object detection unit of the target model and the score output by the fusion unit as the first loss.
  • the object detection device according to any one of 1 to 3.
  • the weight calculation unit calculates one weight for the image data, The object detection device according to any one of Supplementary note 1 to 4, wherein the fusion unit fuses scores output by the plurality of object detection units with the one weight.
  • the weight calculation unit calculates the weight for each of the partial regions.
  • the object detection device according to any one of Supplementary note 1 to 4, wherein the fusion unit fuses scores output by the plurality of object detection units with weights calculated for each partial region.
  • the weight calculation unit calculates the weight for each class indicating the object.
  • the object detection device according to any one of Supplementary note 1 to 4, wherein the fusion unit fuses scores output by the plurality of object detection units with weights calculated for each class.
  • the fusion unit is added by multiplying the scores output by the plurality of object detection units by the weights of the respective object detection units calculated by the weight calculation unit, and then the average value is obtained.
  • the object detection device according to paragraph 1.
  • Each of the plurality of object detection units and the object detection unit of the target model output coordinate information of a rectangular region in which the object exists for each partial region.
  • the fusion unit fuses the coordinate information with the weight calculated by the weight calculation unit.
  • the first loss calculation unit calculates the first loss indicating the difference between the output of the object detection unit of the target model and the score obtained by fusing the correct label and the fusion unit.
  • the object detection device according to Appendix 2, wherein the second loss calculation unit calculates a loss including a difference between the coordinate information fused by the fusion unit and the correct label.
  • Appendix 10 The fusion unit is described in Appendix 9 for obtaining an average value after multiplying the coordinate information output by the plurality of object detection units by the weights of the respective object detection units calculated by the weight calculation unit and adding them.
  • Object detection device The fusion unit is described in Appendix 9 for obtaining an average value after multiplying the coordinate information output by the plurality of object detection units by the weights of the respective object detection units calculated by the weight calculation unit and adding them.
  • a score indicating the certainty that a predetermined object exists is output from a plurality of object detection units. Based on the image data, the weight at the time of fusing the scores output by the plurality of object detection units is calculated by using the weight calculation parameter. With the weight calculated by the weight calculation unit, the scores output by the plurality of object detection units are fused for each partial region. For each partial area set for the image data, a score indicating the certainty that a predetermined object exists is output from the object detection unit of the target model. The first loss indicating the difference between the output of the object detection unit of the target model and the correct label of the image data and the fused score is calculated. A learning method of an object detection device that modifies the parameters of the object detection unit of the target model so that the first loss is reduced.
  • a score indicating the certainty that a predetermined object exists is output from a plurality of object detection units. Based on the image data, the weight at the time of fusing the scores output by the plurality of object detection units is calculated by using the weight calculation parameter. With the weight calculated by the weight calculation unit, the scores output by the plurality of object detection units are fused for each partial region. For each partial area set for the image data, a score indicating the certainty that a predetermined object exists is output from the object detection unit of the target model. The first loss indicating the difference between the output of the object detection unit of the target model and the correct label of the image data and the fused score is calculated.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Databases & Information Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Image Analysis (AREA)

Abstract

物体検知装置において、複数の物体検知部は、入力された画像データに対して設定される部分領域毎に、予め定めた物体が存在する確からしさを示すスコアを出力する。重み算出部は、画像データに基づいて、複数の物体検知部が出力するスコアを融合する際の重みを、重み算出パラメータを用いて算出する。融合部は、重み算出部が算出した重みで、複数の物体検知部が出力するスコアを部分領域毎に融合する。ターゲットモデルの物体検知部は、部分領域毎に、予め定めた物体が存在する確からしさを示すスコアを出力する。ロス算出部は、ターゲットモデルの物体検知部の出力と、画像データの正解ラベルおよび融合部が融合したスコアとの差異を示すロスを算出する。パラメータ修正部は、そのロスが減少するように、ターゲットモデルの物体検知部のパラメータを修正する。

Description

物体検知装置、学習方法、及び、記録媒体
 本発明は、画像に含まれる物体を検知する技術に関する。
 多くのパターンデータを用いて学習を行うことで、認識器の性能を向上できることが知られている。基礎となる認識器から各環境に適合させた認識器にチューニングすることも行われている。また、異なる環境に応じて認識精度を向上させる方法も各種提案されている。例えば、特許文献1には、文字の書かれている環境に応じた認識処理を行うパターン認識装置が記載されている。このパターン認識装置では、入力画像から抽出された処理対象の状態に応じて、複数登録されている認識器の中のいずれか1つ又は複数を呼び出して認識処理を行わせる。
 また、認識器の性能を向上する別の方策として、特性の異なる複数の認識器を構築して、それらの出力に基づいて総合判断する方式が提案されている。例えば、特許文献2には、障害物の有無を判定する複数の判定部の判定結果に基づいて最終判定を行う障害物検出装置が記載されている。
特開2007-058882号公報 特開2019-036240号公報
 上記の手法では、複数の認識器を用いて認識性能を向上させているため、必然的に装置が大規模となる。このため、映像監視などの用途で使用する物体検出装置を現場にデプロイするような場合には、上記の手法は適当とは言えない。
 本発明の1つの目的は、さまざまな現場環境で学習したモデルを用いて、新たな現場向けの小規模なターゲットモデルを構築することが可能な物体検知装置を提供することにある。
 上記の課題を解決するため、本発明の一つの観点では、物体検知装置は、
 入力された画像データに対して設定される部分領域毎に、予め定めた物体が存在する確からしさを示すスコアを出力する複数の物体検知部と、
 前記画像データに基づいて、前記複数の物体検知部が出力するスコアを融合する際の重みを、重み算出パラメータを用いて算出する重み算出部と、
 前記重み算出部が算出した重みで、前記複数の物体検知部が出力するスコアを前記部分領域毎に融合する融合部と、
 前記画像データに対して設定される部分領域毎に、予め定めた物体が存在する確からしさを示すスコアを出力するターゲットモデルの物体検知部と、
 前記ターゲットモデルの物体検知部の出力と、前記画像データの正解ラベルおよび前記融合部が融合したスコアとの差異を示す第1のロスを算出する第1のロス算出部と、
 前記第1のロスが減少するように、前記ターゲットモデルの物体検知部のパラメータを修正する第1のパラメータ修正部と、を備える。
 本発明の他の観点では、物体検知装置の学習方法は、
 入力された画像データに対して設定される部分領域毎に、予め定めた物体が存在する確からしさを示すスコアを複数の物体検知部から出力し、
 前記画像データに基づいて、前記複数の物体検知部が出力するスコアを融合する際の重みを、重み算出パラメータを用いて算出し、
 前記重み算出部が算出した重みで、前記複数の物体検知部が出力するスコアを前記部分領域毎に融合し、
 前記画像データに対して設定される部分領域毎に、予め定めた物体が存在する確からしさを示すスコアをターゲットモデルの物体検知部から出力し、
 前記ターゲットモデルの物体検知部の出力と、前記画像データの正解ラベルおよび融合したスコアとの差異を示す第1のロスを算出し、
 前記第1のロスが減少するように、前記ターゲットモデルの物体検知部のパラメータを修正する。
 本発明のさらに他の観点では、記録媒体は、
 入力された画像データに対して設定される部分領域毎に、予め定めた物体が存在する確からしさを示すスコアを複数の物体検知部から出力し、
 前記画像データに基づいて、前記複数の物体検知部が出力するスコアを融合する際の重みを、重み算出パラメータを用いて算出し、
 前記重み算出部が算出した重みで、前記複数の物体検知部が出力するスコアを前記部分領域毎に融合し、
 前記画像データに対して設定される部分領域毎に、予め定めた物体が存在する確からしさを示すスコアをターゲットモデルの物体検知部から出力し、
 前記ターゲットモデルの物体検知部の出力と、前記画像データの正解ラベルおよび融合したスコアとの差異を示す第1のロスを算出し、
 前記第1のロスが減少するように、前記ターゲットモデルの物体検知部のパラメータを修正する、物体検知装置の学習処理をコンピュータに実行させるプログラムを記録する。
 本発明によれば、さまざまな現場環境で学習したモデルを用いて、新たな現場向けの小規模なターゲットモデルを構築することが可能となる。
複数の学習済みモデルを用いて大規模モデルを構築する構成を示す。 大規模モデルを構築する処理の一例を模式的に示す。 アンカーボックスの概念を説明する図である。 大規模モデルを用いてターゲットモデルを構築する構成を示す。 ターゲットモデルを構築する処理の一例を模式的に示す。 物体検知装置のハードウェア構成を示すブロック図である。 第1実施形態に係る学習のための物体検知装置の機能構成を示す。 第1実施形態の物体検知装置による学習処理のフローチャートである。 第1実施形態の推論のための物体検知装置の機能構成を示す。 第2実施形態に係る学習のための物体検知装置の機能構成を示す。 第2実施形態の物体検知装置による学習処理のフローチャートである。 第3実施形態に係る学習のための物体検知装置の機能構成を示す。
 [原理説明]
 まず、本発明の実施形態における基本原理について説明する。一般的に、映像監視向けAI(Artificial Intelligence)モデルを現場にデプロイする際、その認識精度不足により、現場毎にモデルの再構築(現場での画像の収集、正解付け、学習など)のためのシステムインテグレーション作業が必要となることが多い。本実施形態では、システムインテグレーションのコストを低減するために、まず、さまざまな現場環境で学習済みのソースモデルを収集し、融合することにより、環境変動に頑健な大規模モデルを構築する。そして、この大規模モデルをベースとして、新たな現場向けの小規模モデル、即ち、ターゲットモデルを構築する。
 図1は、複数の学習済みモデルを用いて大規模モデルを構築するための構成を示す。図1に示すように、大規模モデル1は、複数(図1の例では3つ)の学習済みモデル2と、ゲーティングネットワーク3と、演算部4とを備える。学習済みモデル2は、それぞれが異なる環境で学習されたソースモデルであり、ここでは画像データから物体検知を行うモデルである。新規の現場で収集された画像データは、学習データとして複数の学習済みモデル2およびゲーティングネットワーク3に入力される。なお、学習データには、予め対応する正解ラベルとして、クラスの正解値と座標の正解値が用意されている。
 各学習済みモデル2は、入力された学習データに基づいて物体検知を行い、物体検知の途中段階で設定される部分領域毎に、検出された物体のクラスに関するクラス情報と、その部分領域の位置を示す座標情報とを出力する。クラス情報は、物体の種類を示すクラスコードと、そのクラスコードが示す物体が存在する確からしさを示すスコアとを含む。
 ゲーティングネットワーク3は、各学習済みモデル2が出力する情報に対する重みを出力する。演算部4は、各学習済みモデル2が出力する情報を、ゲーティングネットワーク3が出力する重みを用いて融合する。演算部4は、各学習済みモデル2が出力するクラス情報を、重みを用いて融合して得られるクラス情報を出力する。また、演算部4は、各学習済みモデル2が出力する座標情報を、重みを用いて融合して得られる座標情報として出力する。
 演算部4から出力されたクラス情報および座標情報は、それぞれ予め用意されたクラスの正解値および座標の正解値と比較され、誤差が算出される。そして、それらの誤差を最小化するように、ゲーティングネットワーク3を学習する。具体的には、それらの誤差が減少するように、ゲーティングネットワーク3のパラメータを修正する。ゲーティングネットワーク3は、入力される画像データ毎に、各学習済みモデル2の得手不得手を推定して、各学習済みモデル2の最適な融合割合を示す重みの値を学習する。大規模モデル1の学習は、一定の精度が得られるまで行われる。こうして、複数の学習済みのソースモデルを用いて、高精度な大規模モデルが構築される。
 次に、大規模モデルを構築する具体例を説明する。図2は、大規模モデル1を構築する処理の一例を模式的に示す。なお、図2では、学習済みモデル2の数を2つとしている。図2の例では、学習済みモデル2をRetinaNetにより構成している。なお、図2の例では、説明の便宜上、各学習済みモデル2が出力する情報のうち、クラス情報のみを使用するものとする。
 学習済みモデル2は、ResNet(Residual Network:残差ネットワーク)により、入力された画像データから、サイズの異なる複数の特徴マップからなるfeature pyramid net(特徴ピラミッドネット)を生成する。各特徴マップには、アンカーボックスが設定され、学習済みモデル2は、アンカーボックス毎に物体の検出を行う。但し、大規模モデル1においては、学習済みモデル2は、検知した物体とそのスコアおよび座標情報をリスト形式などで出力する極大値選択処理、具体的にはNMS(Non Maximum Suppression)処理までは行わず、NMS処理前のアンカーボックス毎に算出された認識対象物体のクラス情報および座標情報をそのまま出力する。ここでは、認識対象物体の有無を検証する、すべての部分領域のことを「アンカーボックス」と呼ぶ。
 図3は、アンカーボックスの概念を説明する図である。図示のように、CNN(Convolutional Neural Network)の畳み込みにより得られた特徴マップ上に、スライディングウィンドウ(sliding window)が設定される。図3の例では、1つのスライディングウィンドウに対してk通りの大きさの異なるアンカーボックス(以下、単に「アンカー」とも呼ぶ。)が設定され、各アンカーに対して認識対象物体の有無が検証される。即ち、各アンカーは、すべてのスライディングウィンドウに対してk通りずつ設定される部分領域を指す。
 アンカーの数はニューラルネットワークの構造やサイズに依存する。図2において、出力ネットワーク70の上段は、W×H×A個のアンカーに対するクラス情報71(K次元。つまり、K種類の認識対象)を記憶しており、下段はW×H×A個のアンカーに対する座標情報(4次元)を記憶する。ここで、「W」はアンカー中心の横方向のバリエーション数、「H」はアンカー中心の縦方向バリエーション数、「A」はアンカーの縦横サイズのバリエーション数を示す。座標情報は、認識対象物が存在する矩形領域の左右、上下4辺の座標情報を絶対値もしくはアンカーに対して一意に定められる基準位置からの相対位置で表してもよいし、上下4辺ではなく左辺と上辺および幅と高さの観点で表してもよい。
 図2に示す出力ネットワーク70はfeature pyramid netの1層分に対して設定されたもので、feature pyramid netの別の階層に対しても同様にK次元のスコア情報と4次元の座標情報が出力される。以下、feature pyramid netのすべての階層に対して設定されるアンカーの数を「Na」と記すこととする。同一のアンカーに対するスコア情報と座標情報は、それらの情報を記憶するためのメモリの予め定められたメモリ位置に保存されるので、それらを容易に対応づけることができる。
 各学習済みモデル2は、アンカー数×クラス数分のクラス情報71を出力する。ゲーティングネットワーク3は、学習済みモデル2毎に決定した重みを出力する。演算部4は、各学習済みモデル2から出力されるクラス情報に対して、同一アンカー毎に重み付け和を計算し、クラス情報72を出力する。クラス情報72と、予め用意されたクラスの正解値(教師データ)73との差の二乗和をロスとして定義し、このロスを最小化するように、ゲーティングネットワーク3が出力する重みを学習する。こうして、大規模モデル1が構築される。
 次に、学習が完了した大規模モデル1を用いて、ターゲットモデルを構築する。図4は、大規模モデル1を用いてターゲットモデルを構築するための構成を示す。大規模モデル1は、ゲーティングネットワーク3の学習が完了したものとなっており、ここではターゲットモデル5の学習を行う。ターゲットモデル5には、学習データが入力される。なお、ターゲットモデル5は、学習済みモデル2と同一のモデルで構成する。ターゲットモデル5の学習では、教師データとして、予め用意された正解ラベルに加えて、大規模モデル1が出力する情報が使用される。具体的に、入力された学習データに基づいてターゲットモデル5が出力したクラス情報および座標情報は、その学習データについて予め用意されたクラスの正解値および座標の正解値と比較され、その誤差aを最小化するようにターゲットモデル5の学習が行われる。これに加えて、ターゲットモデル5が出力したクラス情報および座標情報は、同じ学習データに基づいて大規模モデル1が出力したクラス情報および座標情報と比較され、その誤差bを最小化するようにターゲットモデル5の学習が行われる。但し、座標情報の誤差を計算するのは、正解ラベルにおいて物体が存在する位置のアンカーについてのみであり、物体が存在しない位置のアンカーについては座標情報の誤差は「0」とする。
 図5は、学習が完了した大規模モデルを用いて、ターゲットモデルを構築する処理の具体例を模式的に示す。図5の例では、学習済みモデル2をRetinaNetにより構成している。なお、図5では、説明の便宜上、クラス情報のみを用いた学習を行うものとする。大規模モデル1は、各学習済みモデル2が出力したクラス情報71と、ゲーティングネットワーク3が出力した重みとの重み付け和を計算し、クラス情報76を出力する。一方、ターゲットモデル5は、学習データに基づいてクラス情報74を出力する。ターゲットモデル5が出力したクラス情報74と予め用意されたクラスの正解値75との誤差a、および、ターゲットモデルが出力したクラス情報74と大規模モデル1が出力したクラス情報76との誤差bをロスとし、このロスを最小化するようにターゲットモデル5の学習が行われる。
 このように、本発明の実施形態では、さまざまな環境で学習済みの複数のソースモデルを融合して、環境変動に頑健な大規模モデルを構築する。そして、その大規模モデルの推論結果を教師データとし、新たな現場で収集した学習データを用いてターゲットモデルを学習する。これにより、新たな現場の環境に適した小規模で高精度なターゲットモデルを構築することが可能となる。
 [第1実施形態]
 次に、本発明の第1実施形態について説明する。
 (ハードウェア構成)
 図6は、物体検知装置のハードウェア構成を示すブロック図である。図示のように、物体検知装置10は、インタフェース(IF)12と、プロセッサ13と、メモリ14と、記録媒体15と、データベース(DB)16と、を備える。
 インタフェース12は、外部装置との通信を行う。具体的に、インタフェース12は、物体検知の対象となる画像データや学習用の画像データを外部から入力したり、物体検知の結果を外部装置へ出力する際に使用される。
 プロセッサ13は、CPU(Central Processing Unit)、又はCPUとGPU(Graphics Processing Uit)などのコンピュータであり、予め用意されたプログラムを実行することにより、物体検知装置10の全体を制御する。メモリ14は、ROM(Read Only Memory)、RAM(Random Access Memory)などにより構成される。メモリ14は、プロセッサ13により実行される各種のプログラムを記憶する。また、メモリ14は、プロセッサ13による各種の処理の実行中に作業メモリとしても使用される。
 記録媒体15は、ディスク状記録媒体、半導体メモリなどの不揮発性で非一時的な記録媒体であり、物体検知装置10に対して着脱可能に構成される。記録媒体15は、プロセッサ13が実行する各種のプログラムを記録している。物体検知装置10が学習処理を実行する際には、記録媒体15に記録されているプログラムがメモリ14にロードされ、プロセッサ13により実行される。
 データベース16は、物体検知装置10の学習処理において使用される、学習用の画像データを記憶する。学習用の画像データは、正解ラベルを含む。なお、上記に加えて、物体検知装置10は、キーボード、マウスなどの入力機器や、表示装置などを備えていても良い。
 (学習のための機能構成)
 次に、学習のための物体検知装置の機能構成について説明する。図7は、学習のための物体検知装置10の機能構成を示すブロック図である。物体検知装置10は、まず複数の物体検知部を含む大規模モデルを学習するステップ(以下、「大規模モデル学習ステップ」と呼ぶ。)を実行し、次に学習済みの大規模モデルを用いてターゲットモデルを学習するステップ(以下、「ターゲットモデル学習ステップ」と呼ぶ。)を実行する。
 図示のように、物体検知装置10は、大別して、大規模モデル部20と、ターゲットモデル部30とを備える。大規模モデル部20は、画像入力部21と、重み算出部22と、第1の物体検知部23と、第2の物体検知部24と、積和部25と、パラメータ修正部26と、ロス算出部17と、正解ラベル記憶部28とを備える。また、ターゲットモデル部30は、ターゲットモデル物体検知部31と、ロス算出部32と、パラメータ修正部33とを備える。なお、第1の物体検知部23及び第2の物体検知部24は、事前に学習済みであり、以下に説明する処理において学習は行わない。上記の構成において、画像入力部21は図6に示すインタフェース12により実現され、正解ラベル記憶部28は図6に示すデータベース16により実現され、その他の構成要素は図6に示すプロセッサ13により実現される。
 画像入力部21には、画像データが入力される。画像データは、学習用の画像データであり、物体検知の対象となるエリアで撮影されたものである。前述のように、各画像データに対しては、その画像に含まれる物体を示す正解ラベルが予め用意されている。
 第1の物体検知部23は、例えばSSD(Single Shot Multibox Detector)、RetinaNet、Faster-RCNN(Regional Convolutional Neural Network)などのディープラーニングによる物体検知用のニューラルネットワークに類似する構成を有する。但し、先にも述べたように、第1の物体検知部23は、NMS処理前のアンカーボックス毎に算出された認識対象物体のスコア情報および座標情報をそのまま出力する。なお、前述のように、第1の物体検知部23は事前に学習済みで、そのパラメータは固定されている。
 第2の物体検知部24は、第1の物体検知部23と同様であり、モデルの構造も同一とする。ただし、第1の物体検知部23と第2の物体検知部24とは、学習データが異なるか、もしくは学習時のパラメータの初期値が異なるなどの要因により、内部に所持するネットワークのパラメータは一致しておらず、認識特性も異なるものとする。
 重み算出部22は、内部に有する重み算出のためのパラメータ(以下、「重み算出パラメータ」と呼ぶ。)を最適化する。重み算出部22は、ResNetなどの回帰問題に適用可能なディープニューラルネットワークなどによって構成される。重み算出部22は、画像入力部21に入力された画像データに基づいて、第1の物体検知部23と第2の物体検知部24が出力するスコア情報および座標情報を融合する際の重みを決定し、それぞれの重みを示す情報を積和部25へ出力する。基本的に、重みの次元数は用いる物体検知部の数に等しい。この場合、重み算出部22は、第1の物体検知部23に対する重みと第2の物体検知部24に対する重みの総和が「1」になるように重みを算出することが好ましい。例えば、重み算出部22は、第1の物体検知部23に対する重みを「α」とし、第2の物体検知部24に対する重みを「1-α」とすればよい。これにより、積和部25における平均値算出処理を簡略化することができる。なお、物体検知部において、1つの物体に関するパラメータが2つある場合(例えば、ある物体らしいことを示すパラメータと、ある物体らしくないことを示すパラメータ)、重みの次元数は用いる物体検知部の数の2倍となる。
 積和部25は、第1の物体検知部23および第2の物体検知部24が出力するスコア情報および座標情報を、それぞれ対応するアンカー同士で、重み算出部22が出力する重みに基づき積和した後に平均値を求める。なお、座標情報の積和演算は、正解ラベルに認識対象物体の存在が示されているアンカーに対してのみ行い、それ以外のアンカーに対しては計算不要である。平均値はアンカー毎かつ認識対象物体毎に算出され、Na×(k+4)次元となる。積和部25は、本発明の融合部の一例である。
 正解ラベル記憶部28は、学習用の画像データに対する正解ラベルを記憶している。具体的に、正解ラベル記憶部28は、正解ラベルとして、各アンカーに存在する認識対象物体のスコア情報、および、座標情報をアンカー毎に配列状に記憶する。正解ラベル記憶部28は、認識対象物体が存在しないアンカーに対応する記憶エリアには、認識対象物体が存在しない旨を示すスコア情報、および座標情報を記憶する。なお、学習用の画像データに対するもともとの正解情報は、入力画像に写っている認識対象物体の種類とその矩形領域を示すテキスト情報である場合が多いが、正解ラベル記憶部28に記憶されている正解ラベルは、その正解情報をアンカー毎のスコア情報および座標情報に変換したデータとなっている。
 例えば、正解ラベル記憶部28は、ある物体が写っている矩形領域とあらかじめ定めた閾値以上の重複を有するアンカーについては、当該物体のスコアを表す正解ラベルの位置に、スコア情報として当該物体のスコアを示す値1.0を格納し、座標情報として当該アンカーの標準矩形位置に対する当該物体が写っている矩形領域の位置の相対量(左端x座標のずれ量、上端y座標のずれ量、幅のずれ量、高さのずれ量)を格納する。また、正解ラベル記憶部28は、他の物体のスコアを表す正解ラベルの位置には物体が存在しない旨を示す値を格納する。また、ある物体が写っている矩形領域とあらかじめ定めた閾値以上の重複を有さないアンカーに対しては、正解ラベル記憶部28は、物体のスコアおよび座標情報を格納する正解ラベルの位置に物体が存在しない旨を示す値を格納する。1つのアンカーに対し、スコア情報はk次元、座標情報は4次元となる。すべてのアンカーに対しては、スコア情報はNa×k次元、座標情報はNa×4次元となる。この変換には、広く一般に公開されている物体検知課題向けのディープニューラルネットワークプログラムで使われている手法を適用することができる。
 ロス算出部27は、積和部25が出力するNa×(k+4)次元のスコア情報および座標情報と、正解ラベル記憶部28に記憶されている正解ラベルとを照合してロスを算出する。具体的には、ロス算出部27は、スコア情報に関する識別ロス、および、座標情報に関する回帰ロス(Regression loss)を算出する。積和部25が出力するNa×(k+4)次元の平均値は、第1の物体検知部23がアンカー毎かつ認識対象物体毎に出力するスコア情報および座標情報と同義である。したがって、ロス算出部27は、第1の物体検知部23の出力に対する識別ロスの算出方法と全く等しい方法で識別ロスの値を算出することができる。ロス算出部27は、すべてのアンカーに対するスコア情報の差分を累積して識別ロスを算出する。また、回帰ロスについては、ロス算出部27は、いずれかの物体が存在するアンカーに対してのみ座標情報の差分を累積し、いずれの物体も存在しないアンカーに対しては座標情報の差分を考慮しない。
 なお、識別ロスと回帰ロスを用いたディープニューラルネットワークの学習については以下の文献に記載されており、これを参考文献として取り込む。
  ”Learning Efficient Object Detection Models with Knowledge Distillation”,NeurIPS2017
 以下、ロス算出部27が算出するロスを「大規模モデルロス」とも呼ぶ。なお、ロス算出部27は本発明の第2のロス算出部に相当し、大規模モデルロスは本発明の第2のロスに相当する。
 パラメータ修正部26は、ロス算出部27が算出したロスを減少させるように、重み算出部22に内在するネットワークのパラメータを修正する。この時、パラメータ修正部26は、第1の物体検知部23および第2の物体検知部24のネットワークのパラメータを固定し、重み算出部22のパラメータのみを修正する。パラメータ修正部26は、パラメータの修正量を通常の誤差逆伝搬法により求めることができる。
 重み算出部22は、入力画像に対する各物体検知部の得手・不得手を予測して重みを最適化し、積和部25は、その重みを各物体検知部の出力に乗じて平均する。よって、単体の物体検知部に比べて高精度な最終判定を行うことができる。例えば、第1の物体検知部23は単独で歩く歩行者の検知を得意とし、第2の物体検知部24は集団で歩く歩行者の検知を得意としている場合、入力画像にたまたま単独で歩く人が映っていたならば、重み算出部22は第1の物体検知部23により大きな重みを割り当てる。また、パラメータ修正部26は、学習用の画像データの認識を得意とする物体検知部に対して重み算出部22が大きな重みを算出するように、重み算出部22のパラメータを修正する。このようにして重み算出部22のパラメータを学習することで、第1の物体検知部23および第2の物体検知部24の出力を最適に積和し、総合的に判定を行うことができる大規模モデルを構築することが可能となる。
 ターゲットモデル物体検知部31は、新規に構築されるターゲットモデルの物体検知部である。ターゲットモデル物体検知部31は、第1の物体検知部23および第2の物体検知部24と同一の、物体検知用のニューラルネットワークに類似した構成を有する。ターゲットモデル物体検知部31は、画像入力部21に入力された学習用の画像データに基づいて、認識対象物体のスコア情報および座標情報をロス算出部32に出力する。
 ロス算出部32は、ターゲットモデル物体検知部31が出力したスコア情報および座標情報を、ロス算出部27と同様に、正解ラベル記憶部28に記憶されている正解ラベルと照合して識別ロスおよび回帰ロスを算出する。さらに、ロス算出部33は、ターゲットモデル物体検知部31が出力したスコア情報および座標情報を、積和部25が出力するスコア情報および座標情報と照合して識別ロスおよび回帰ロスを算出する。積和部25が出力するスコア情報および座標情報は、大規模モデルによるスコア情報および座標情報に相当する。そして、ロス算出部32は、算出したロスをパラメータ修正部33に供給する。
 なお、学習用の画像データは、正解ラベルを有しない画像データ(「ラベルなし画像データ」と呼ぶ。)を含んでいてもよい。ラベルなし画像データについては、ロス算出部32は、ターゲットモデル物体検知部31が出力したスコア情報および座標情報を、積和部25が出力するスコア情報および座標情報と照合して生成した識別ロスおよび回帰ロスのみをパラメータ修正部33に出力すればよい。以下、ロス算出部32が算出するロスを「ターゲットモデルロス」とも呼ぶ。なお、ロス算出部32は本発明の第1のロス算出部に相当し、ターゲットモデルロスは本発明の第1のロスに相当する。
 パラメータ修正部33は、ロス算出部32が算出したロスを減少させるように、ターゲットモデル物体検知部31に内在するネットワークのパラメータを修正する。パラメータ修正部33は、パラメータの修正量を通常の誤差逆伝搬法により求めることができる。
 次に、学習のための物体検知装置10の動作について説明する。図8は、物体検知装置10による学習処理のフローチャートである。この処理は、図6に示すプロセッサ13が予め用意されたプログラムを実行することにより実現される。図8において、ステップS11~S18は大規模モデル学習ステップに相当し、ステップS19~S24はターゲットモデル学習ステップに相当する。なお、大規模モデル学習ステップの実行中には、ターゲットモデル物体検知部31、ロス算出部32およびパラメータ修正部33は動作しない。
 まず、画像入力部21に学習用の画像データが入力される(ステップS11)。第1の物体検知部23は、画像データを用いて物体検知を行い、画像中の認識対象物体のスコア情報と座標情報をアンカー毎かつ認識対象物体毎に出力する(ステップS12)。同様に、第2の物体検知部24は、画像データを用いて物体検知を行い、画像中の認識対象物体のスコア情報と座標情報をアンカー毎かつ認識対象物体毎に出力する(ステップS13)。また、重み算出部22は、画像データを読み込み、第1の物体検知部23および第2の物体検知部24の出力それぞれに対する重みを算出する(ステップS14)。
 次に、積和部25は、アンカー毎に、第1の物体検知部23が出力した認識対象物体のスコア情報と座標情報、並びに、第2の物体検知部24が出力した認識対象物体のスコア情報と座標情報に、重み算出部22が算出したそれぞれに対する重みを掛け合わせて加算し、それらの平均値を出力する(ステップS15)。次に、ロス算出部27は、得られた平均値と正解ラベルとの差を照合し、大規模モデルロスを算出する(ステップS16)。そして、パラメータ修正部26は、大規模モデルロスの値が減少するように、重み算出部22に内在する重み算出パラメータを修正する(ステップS17)。
 物体検知装置10は、上記のステップS11~S17を所定の条件の間だけ繰返し、処理を終了する。なお、「所定の条件」とは、繰返しの回数やロスの値の変化度合いなどに関する条件であり、多くのディープラーニングの学習手順として採用されている方法のいずれかを使用することができる。こうして、大規模モデルが構築される。
 こうして、大規模モデル学習ステップが終了すると(ステップS18:Yes)、次に、ターゲットモデル学習ステップが行われる。ターゲットモデル学習ステップでは、重み算出部22の内部パラメータは、大規模モデル学習ステップで学習された値に固定される。なお、第1の物体検知部23および第2の物体検知部24の内部パラメータも事前に学習済みの値に固定されている。
 画像入力部21に学習用の画像データが入力されると(ステップS19)、大規模モデル部20は、入力された画像データを用いて物体検知を行い、画像中の認識対象物体のスコア情報と座標情報をアンカー毎かつ認識対象物体毎にロス算出部32に出力する(ステップS20)。また、ターゲットモデル物体検知部31は、入力された画像データを用いて物体検知を行い、画像中の認識対象物体のスコア情報と座標情報をアンカー毎かつ認識対象物体毎にロス算出部32に出力する(ステップS21)。次に、ロス算出部32は、ターゲットモデル物体検知部31が出力したスコア情報および座標情報を、正解ラベル記憶部28に記憶されている正解ラベル並びに大規模モデル部20が出力したスコア情報および座標情報と比較してターゲットモデルロスを算出する(ステップS22)。そして、パラメータ修正部33は、ターゲットモデルロスの値が減少するように、ターゲットモデル物体検知部31に内在するパラメータを修正する(ステップS23)。物体検知装置10は、上記のステップS19~S24を所定の条件の間だけ繰返し、処理を終了する。
 以上のように、第1実施形態の物体検知装置10によれば、まず、複数の学習済みの物体検知部を用いて大規模モデルを学習し、次に、その大規模モデルを用いてターゲットモデルを学習する。よって、新たな現場の環境に適した小規模で高精度なターゲットモデルを構築することが可能となる。
 (推論のための機能構成)
 次に、推論のための物体検知装置の機能構成について説明する。図9は、推論のための物体検知装置40の機能構成を示すブロック図である。なお、推論のための物体検知装置40も、基本的に図1に示すハードウェア構成で実現される。
 図9に示すように、推論のための物体検知装置40は、画像入力部21と、ターゲットモデル物体検知部31と、極大値選択部41と、を備える。ここで、画像入力部21およびターゲットモデル物体検知部31は、図7に示す学習のための物体検知装置10と同様である。なお、ターゲットモデル物体検知部31は、上記のターゲットモデル学習ステップにより学習済みのものを使用する。
 推論のための画像データが画像入力部21に入力されると、ターゲットモデル物体検知部31は、学習済みの内部パラメータを用いて物体検知を行い、認識対象物体のスコア情報と座標情報をアンカー毎かつ認識対象物体毎に出力する。極大値選択部41は、ターゲットモデル物体検知部31が出力するNa×k次元のスコア情報にNMS処理を施して認識対象物体の種類を同定し、そのアンカーに対応する座標情報からその位置を特定して物体検知結果を出力する。物体検知結果は、認識対象物体毎に、その種類と位置とを含む。これにより、大規模モデルを利用して学習したターゲットモデル物体検知部31を使用した物体検知結果を得ることができる。
 (変形例1)
 上記の第1実施形態については、以下の変形例を適用することができる。
(1)上記の第1実施形態では、各物体検知部が出力するスコア情報および座標情報を用いて学習を行っているが、座標情報は用いず、スコア情報のみを用いて学習を行うこととしてもよい。
(2)上記の第1実施形態では、第1の物体検知部23および第2の物体検知部24の2つの物体検知部を用いたが、物体検知部は原理上3つ以上でも全く問題ない。その場合は、重み算出部22が出力する重みの次元数(数)を、物体検知部の数と等しくすればよい。
(3)第1の物体検知部23および第2の物体検知部24を構成する具体的なアルゴリズムとしては、物体検知のためのディープラーニング手法であれば何を用いてもよい。また、重み算出部22としては、回帰問題向けのディープラーニングに限らず、誤差逆伝搬法で学習できる関数、いいかえると、重みを算出する関数のパラメータで誤差関数を偏微分可能な関数、であれば何を用いても構わない。
(4)また、上記の第1実施形態は物体検知装置としたが、物体の検知に限らず、映像中で起きている事象情報とその座標情報を出力する事象検知装置としてもよい。「事象」とは、例えばあらかじめ定めた人物の振る舞いや動作、ジェスチャーのようなものや、土砂崩れや雪崩、河川の水位上昇といった自然現象などを指す。
(5)また、上記の第1実施形態では、第1の物体検知部23と第2の物体検知部24とはモデルの構造の等しいものを用いるものとしているが、異なるモデルを用いてもよい。ただし、その場合は、積和部25にて、略等しい位置に対応する双方のアンカーの対応づけを工夫する必要がある。これは、異なるモデル間のアンカーは、完全一致しないためである。現実的な実装としては、第2の物体検知部24で設定される各アンカーを第1の物体検知部23で設定されるアンカーのいずれか1つに対応させ、第1の物体検知部23で設定されるアンカー毎に重み付け平均を計算し、第1の物体検知部23で設定されるアンカー毎かつ認識対象物体毎のスコア情報および座標情報を出力するようにすればよい。アンカーの対応の決め方としては、アンカーに対応する画像領域(物体が存在する矩形領域)を求め、その画像領域がもっとも過不足なく重複するアンカー同士を対応付ければよい。
(6)第1実施形態の重み算出部22は画像全体に対して1通りの重みを設定しているが、その代わりに、重み算出部22が画像のアンカー毎、即ち部分領域毎に、各物体検知部の出力に対する重みを算出することとしても良い。画像データに設定されるアンカー数をNa、物体検知部の数をNfとすると、重み算出部22が出力する倍率を示す情報の次元数はNa×Nf次元となる。重み算出部22は、多次元の回帰問題に適用できるディープニューラルネットワークなどで構成することができる。また、重み算出部22は、それぞれの物体検知部に対する近傍のアンカー同士ができるだけ近い重みを持つように、近傍のアンカーに対応する重みを平均化するような構造のネットワークを含んでもよい。
(7)重み算出部22が、例えばRetinaNetのように各物体検知部がクラス毎に異なるバイナリ識別器を持っているならば、アンカー毎ではなくクラス毎に重みを変えられるようにしてもよい。この場合は、重み算出部22がクラス毎に重みを算出し、パラメータ修正部26がクラス毎にパラメータを修正すればよい。画像データに設定されるアンカー数をNa、物体検知部の数をNfとすると、重み算出部22が出力する重みの次元数はNa×Nf次元である。これに対し、クラス数をNc次元とすると、クラス毎に重みを算出する場合、重み算出部22が出力する重みの次元数はNc×Nf次元となる。パラメータ修正部によるクラス毎の重み算出パラメータの学習は、通常のように出力層ニューロン側からロスを最小化するようにバックプロパゲーションを適用すればよい。この構成によれば、例えば、物体検知部毎に検知が得意なクラスが異なる場合、クラス毎に異なる最適な重み付けを行うことが可能となる。
 [第2実施形態]
 次に、本発明の第2実施形態について説明する。なお、以下に説明する学習のための物体検知装置10xは、図6に示すハードウェア構成により実現される。第1実施形態では、まず、大規模モデルを学習し、その後に大規模モデルを用いてターゲットモデルを学習している。これに対し、第2実施形態では、大規模モデルの学習とターゲットモデルの学習を同時に行う。
 (学習のための機能構成)
 図10は、第2実施形態に係る学習のための物体検知装置10xの機能構成を示すブロック図である。図示のように、第2実施形態に係る学習のための物体検知装置10xでは、ロス算出部32の出力がパラメータ修正部26にも供給されている。この点以外は、第2実施形態に係る学習のための物体検知装置10xは、図7に示す第1実施形態の物体検知装置10と同一であり、各要素は基本的に第1実施形態と同様に動作する。
 第2実施形態では、ロス算出部32は、ターゲットモデルロスをパラメータ修正部33のみならず、パラメータ修正部26にも供給する。パラメータ修正部26は、ターゲットモデルロスも考慮して、重み算出部22の重み算出パラメータを修正する。具体的には、パラメータ修正部26は、大規模モデルロス及びターゲットモデルロスが減少するように、重み算出パラメータを修正する。
 次に、学習のための物体検知装置10xの動作について説明する。図11は、物体検知装置10xによる学習処理のフローチャートである。この処理は、図6に示すプロセッサ13が予め用意されたプログラムを実行することにより実現される。図11に示す学習処理において、ステップS41~S46は、図8に示す第1実施形態の物体検知装置10による学習処理のステップS11~S16と同様であるので説明を省略する。
 ステップS46でロス算出部27が大規模モデルロスを算出すると、ターゲットモデル物体検知部31は、入力された画像データを用いて物体検知を行い、画像中の認識対象物体のスコア情報と座標情報をアンカー毎かつ認識対象物体毎に出力する(ステップS47)。次に、ロス算出部32は、ターゲットモデル物体検知部31が出力したスコア情報および座標情報を、正解ラベル並びに大規模モデル部20が出力したスコア情報および座標情報と比較してターゲットモデルロスを算出し、パラメータ修正部26及びパラメータ修正部33に供給する(ステップS48)。
 パラメータ修正部26は、大規模モデルロスおよびターゲットモデルロスが減少するように、重み算出部22の重み算出パラメータを修正する(ステップS49)。また、パラメータ修正部33は、ターゲットモデルロスが減少するように、ターゲットモデル物体検知部31に内在するパラメータを修正する(ステップS50)。物体検知装置10xは、上記のステップS41~S50を所定の条件の間だけ繰返し、処理を終了する。
 以上のように、第2実施形態の物体検知装置10によれば、大規模モデルの学習ステップと、ターゲットモデルの学習ステップを同時に実行することができる。よって、新たな現場の環境に適したターゲットモデルを効率的に構築することが可能となる。
 (推論のための機能構成)
 第2実施形態に係る推論のための物体検知装置は、図9に示す第1実施形態に係る推論のための物体検知装置40と同一であり、同様に動作するので、説明を省略する。
 (変形例)
 第1実施形態における変形例(1)~(7)は、第2実施形態においても同様に適用することができる。
 [第3実施形態]
 次に、本発明の第3実施形態について説明する。図12は、第3実施形態による、学習のための物体検知装置40の機能構成を示す。なお、物体検知装置40は、図1に示すハードウェア構成により実現される。
 物体検知装置50は、複数の物体検知部51と、重み算出部52と、融合部53と、ターゲットモデルの物体検知部54と、ロス算出部55と、パラメータ修正部56とを備える。複数の物体検知部51は、入力された画像データに対して設定される部分領域毎に、予め定めた物体が存在する確からしさを示すスコアを出力する。重み算出部52は、画像データに基づいて、複数の物体検知部51が出力するスコアを融合する際の重みを、重み算出パラメータを用いて算出する。融合部53は、重み算出部52が算出した重みで、複数の物体検知部51が出力するスコアを部分領域毎に融合する。
 ターゲットモデルの物体検知部54は、画像データに対して設定される部分領域毎に、予め定めた物体が存在する確からしさを示すスコアを出力する。ロス算出部55は、ターゲットモデルの物体検知部54の出力と、画像データの正解ラベルおよび融合部53が融合したスコアとの差異を示すロスを算出する。そして、パラメータ修正部56は、そのロスが減少するように、ターゲットモデルの物体検知部54のパラメータを修正する。
 上記の実施形態の一部又は全部は、以下の付記のようにも記載されうるが、以下には限られない。
 (付記1)
 入力された画像データに対して設定される部分領域毎に、予め定めた物体が存在する確からしさを示すスコアを出力する複数の物体検知部と、
 前記画像データに基づいて、前記複数の物体検知部が出力するスコアを融合する際の重みを、重み算出パラメータを用いて算出する重み算出部と、
 前記重み算出部が算出した重みで、前記複数の物体検知部が出力するスコアを前記部分領域毎に融合する融合部と、
 前記画像データに対して設定される部分領域毎に、予め定めた物体が存在する確からしさを示すスコアを出力するターゲットモデルの物体検知部と、
 前記ターゲットモデルの物体検知部の出力と、前記画像データの正解ラベルおよび前記融合部が融合したスコアとの差異を示す第1のロスを算出する第1のロス算出部と、
 前記第1のロスが減少するように、前記ターゲットモデルの物体検知部のパラメータを修正する第1のパラメータ修正部と、
 を備える物体検知装置。
 (付記2)
 前記正解ラベルと、前記融合部が融合したスコアとの差異を示す第2のロスを算出する第2のロス算出部と、
 前記第2のロスが減少するように、前記重み算出パラメータを修正する第2のパラメータ修正部と、
 を備える付記1に記載の物体検知装置。
 (付記3)
 前記第2のパラメータ修正部は、前記第1のロス及び前記第2のロスに基づいて、前記重み算出パラメータを修正する付記2に記載の物体検知装置。
 (付記4)
 前記画像データは、対応する正解ラベルを有しないラベルなし画像データを含み、
 前記第1のロス算出部は、前記ラベルなし画像データについては、前記ターゲットモデルの物体検知部が出力したスコアと、前記融合部が出力したスコアとの差異を前記第1のロスとして算出する付記1乃至3のいずれか一項に記載の物体検知装置。
 (付記5)
 前記重み算出部は、前記画像データに対して1つの重みを算出し、
 前記融合部は、前記複数の物体検知部が出力するスコアを、前記1つの重みで融合する付記1乃至4のいずれか一項に記載の物体検知装置。
 (付記6)
 前記重み算出部は、前記部分領域毎に前記重みを算出し、
 前記融合部は、前記複数の物体検知部が出力するスコアを、前記部分領域毎に算出された重みで融合する付記1乃至4のいずれか一項に記載の物体検知装置。
 (付記7)
 前記重み算出部は、前記物体を示すクラス毎に前記重みを算出し、
 前記融合部は、前記複数の物体検知部が出力するスコアを、前記クラス毎に算出された重みで融合する付記1乃至4のいずれか一項に記載の物体検知装置。
 (付記8)
 前記融合部は、前記複数の物体検知部が出力するスコアに、前記重み算出部が算出したそれぞれの物体検知部についての重みを乗じて加算した後、平均値を求める付記1乃至7のいずれか一項に記載の物体検知装置。
 (付記9)
 前記複数の物体検知部の各々および前記ターゲットモデルの物体検知部は、前記物体が存在する矩形領域の座標情報を前記部分領域毎に出力し、
 前記融合部は、前記重み算出部が算出した重みで前記座標情報を融合し、
 前記第1のロス算出部は、前記ターゲットモデルの物体検知部の出力と、前記正解ラベルおよび前記融合部が融合したスコアとの差異を示す第1のロスを算出し、
 前記第2のロス算出部は、前記融合部が融合した座標情報と、前記正解ラベルとの差異を含むロスを算出する付記2に記載の物体検知装置。
 (付記10)
 前記融合部は、前記複数の物体検知部が出力する前記座標情報に、前記重み算出部が算出したそれぞれの物体検知部についての重みを乗じて加算した後、平均値を求める付記9に記載の物体検知装置。
 (付記11)
 入力された画像データに対して設定される部分領域毎に、予め定めた物体が存在する確からしさを示すスコアを複数の物体検知部から出力し、
 前記画像データに基づいて、前記複数の物体検知部が出力するスコアを融合する際の重みを、重み算出パラメータを用いて算出し、
 前記重み算出部が算出した重みで、前記複数の物体検知部が出力するスコアを前記部分領域毎に融合し、
 前記画像データに対して設定される部分領域毎に、予め定めた物体が存在する確からしさを示すスコアをターゲットモデルの物体検知部から出力し、
 前記ターゲットモデルの物体検知部の出力と、前記画像データの正解ラベルおよび融合したスコアとの差異を示す第1のロスを算出し、
 前記第1のロスが減少するように、前記ターゲットモデルの物体検知部のパラメータを修正する、物体検知装置の学習方法。
 (付記12)
 入力された画像データに対して設定される部分領域毎に、予め定めた物体が存在する確からしさを示すスコアを複数の物体検知部から出力し、
 前記画像データに基づいて、前記複数の物体検知部が出力するスコアを融合する際の重みを、重み算出パラメータを用いて算出し、
 前記重み算出部が算出した重みで、前記複数の物体検知部が出力するスコアを前記部分領域毎に融合し、
 前記画像データに対して設定される部分領域毎に、予め定めた物体が存在する確からしさを示すスコアをターゲットモデルの物体検知部から出力し、
 前記ターゲットモデルの物体検知部の出力と、前記画像データの正解ラベルおよび融合したスコアとの差異を示す第1のロスを算出し、
 前記第1のロスが減少するように、前記ターゲットモデルの物体検知部のパラメータを修正する、物体検知装置の学習処理をコンピュータに実行させるプログラムを記録した記録媒体。
 以上、実施形態及び実施例を参照して本発明を説明したが、本発明は上記実施形態及び実施例に限定されるものではない。本発明の構成や詳細には、本発明のスコープ内で当業者が理解し得る様々な変更をすることができる。
 1 大規模モデル
 2 学習済みモデル
 3 ゲーティングネットワーク
 4 演算部
 5 ターゲットモデル
 10、10x、40、50 物体検知装置
 21 画像入力部
 22、52 重み算出部
 23、24、51 物体検知部
 25 積和部
 26、33、56 パラメータ修正部
 27、32、55 ロス算出部
 28 正解ラベル記憶部
 31 ターゲットモデル物体検知部
 41 極大値選択部
 53 融合部

Claims (12)

  1.  入力された画像データに対して設定される部分領域毎に、予め定めた物体が存在する確からしさを示すスコアを出力する複数の物体検知部と、
     前記画像データに基づいて、前記複数の物体検知部が出力するスコアを融合する際の重みを、重み算出パラメータを用いて算出する重み算出部と、
     前記重み算出部が算出した重みで、前記複数の物体検知部が出力するスコアを前記部分領域毎に融合する融合部と、
     前記画像データに対して設定される部分領域毎に、予め定めた物体が存在する確からしさを示すスコアを出力するターゲットモデルの物体検知部と、
     前記ターゲットモデルの物体検知部の出力と、前記画像データの正解ラベルおよび前記融合部が融合したスコアとの差異を示す第1のロスを算出する第1のロス算出部と、
     前記第1のロスが減少するように、前記ターゲットモデルの物体検知部のパラメータを修正する第1のパラメータ修正部と、
     を備える物体検知装置。
  2.  前記正解ラベルと、前記融合部が融合したスコアとの差異を示す第2のロスを算出する第2のロス算出部と、
     前記第2のロスが減少するように、前記重み算出パラメータを修正する第2のパラメータ修正部と、
     を備える請求項1に記載の物体検知装置。
  3.  前記第2のパラメータ修正部は、前記第1のロス及び前記第2のロスに基づいて、前記重み算出パラメータを修正する請求項2に記載の物体検知装置。
  4.  前記画像データは、対応する正解ラベルを有しないラベルなし画像データを含み、
     前記第1のロス算出部は、前記ラベルなし画像データについては、前記ターゲットモデルの物体検知部が出力したスコアと、前記融合部が出力したスコアとの差異を前記第1のロスとして算出する請求項1乃至3のいずれか一項に記載の物体検知装置。
  5.  前記重み算出部は、前記画像データに対して1つの重みを算出し、
     前記融合部は、前記複数の物体検知部が出力するスコアを、前記1つの重みで融合する請求項1乃至4のいずれか一項に記載の物体検知装置。
  6.  前記重み算出部は、前記部分領域毎に前記重みを算出し、
     前記融合部は、前記複数の物体検知部が出力するスコアを、前記部分領域毎に算出された重みで融合する請求項1乃至4のいずれか一項に記載の物体検知装置。
  7.  前記重み算出部は、前記物体を示すクラス毎に前記重みを算出し、
     前記融合部は、前記複数の物体検知部が出力するスコアを、前記クラス毎に算出された重みで融合する請求項1乃至4のいずれか一項に記載の物体検知装置。
  8.  前記融合部は、前記複数の物体検知部が出力するスコアに、前記重み算出部が算出したそれぞれの物体検知部についての重みを乗じて加算した後、平均値を求める請求項1乃至7のいずれか一項に記載の物体検知装置。
  9.  前記複数の物体検知部の各々および前記ターゲットモデルの物体検知部は、前記物体が存在する矩形領域の座標情報を前記部分領域毎に出力し、
     前記融合部は、前記重み算出部が算出した重みで前記座標情報を融合し、
     前記第1のロス算出部は、前記ターゲットモデルの物体検知部の出力と、前記正解ラベルおよび前記融合部が融合したスコアとの差異を示す第1のロスを算出し、
     前記第2のロス算出部は、前記融合部が融合した座標情報と、前記正解ラベルとの差異を含むロスを算出する請求項2に記載の物体検知装置。
  10.  前記融合部は、前記複数の物体検知部が出力する前記座標情報に、前記重み算出部が算出したそれぞれの物体検知部についての重みを乗じて加算した後、平均値を求める請求項9に記載の物体検知装置。
  11.  入力された画像データに対して設定される部分領域毎に、予め定めた物体が存在する確からしさを示すスコアを複数の物体検知部から出力し、
     前記画像データに基づいて、前記複数の物体検知部が出力するスコアを融合する際の重みを、重み算出パラメータを用いて算出し、
     前記重み算出部が算出した重みで、前記複数の物体検知部が出力するスコアを前記部分領域毎に融合し、
     前記画像データに対して設定される部分領域毎に、予め定めた物体が存在する確からしさを示すスコアをターゲットモデルの物体検知部から出力し、
     前記ターゲットモデルの物体検知部の出力と、前記画像データの正解ラベルおよび融合したスコアとの差異を示す第1のロスを算出し、
     前記第1のロスが減少するように、前記ターゲットモデルの物体検知部のパラメータを修正する、物体検知装置の学習方法。
  12.  入力された画像データに対して設定される部分領域毎に、予め定めた物体が存在する確からしさを示すスコアを複数の物体検知部から出力し、
     前記画像データに基づいて、前記複数の物体検知部が出力するスコアを融合する際の重みを、重み算出パラメータを用いて算出し、
     前記重み算出部が算出した重みで、前記複数の物体検知部が出力するスコアを前記部分領域毎に融合し、
     前記画像データに対して設定される部分領域毎に、予め定めた物体が存在する確からしさを示すスコアをターゲットモデルの物体検知部から出力し、
     前記ターゲットモデルの物体検知部の出力と、前記画像データの正解ラベルおよび融合したスコアとの差異を示す第1のロスを算出し、
     前記第1のロスが減少するように、前記ターゲットモデルの物体検知部のパラメータを修正する、物体検知装置の学習処理をコンピュータに実行させるプログラムを記録した記録媒体。
PCT/JP2019/027483 2019-07-11 2019-07-11 物体検知装置、学習方法、及び、記録媒体 WO2021005776A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2021530447A JP7164049B2 (ja) 2019-07-11 2019-07-11 物体検知装置、学習方法、及び、プログラム
US17/624,913 US20220277553A1 (en) 2019-07-11 2019-07-11 Object detection device, learning method, and recording medium
PCT/JP2019/027483 WO2021005776A1 (ja) 2019-07-11 2019-07-11 物体検知装置、学習方法、及び、記録媒体

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2019/027483 WO2021005776A1 (ja) 2019-07-11 2019-07-11 物体検知装置、学習方法、及び、記録媒体

Publications (1)

Publication Number Publication Date
WO2021005776A1 true WO2021005776A1 (ja) 2021-01-14

Family

ID=74114108

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/027483 WO2021005776A1 (ja) 2019-07-11 2019-07-11 物体検知装置、学習方法、及び、記録媒体

Country Status (3)

Country Link
US (1) US20220277553A1 (ja)
JP (1) JP7164049B2 (ja)
WO (1) WO2021005776A1 (ja)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013045433A (ja) * 2011-08-26 2013-03-04 Canon Inc 学習装置、学習装置の制御方法、検出装置、検出装置の制御方法、およびプログラム
JP2019061579A (ja) * 2017-09-27 2019-04-18 富士フイルム株式会社 学習支援装置、学習支援装置の作動方法、学習支援プログラム、学習支援システム、および端末装置
JP2019079445A (ja) * 2017-10-27 2019-05-23 ホーチキ株式会社 火災監視システム

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3238015A4 (en) * 2014-12-22 2019-01-23 Robert Bosch GmbH VISUAL CONTEXT SENSITIVE SYSTEM BASED ON A FIRST PERSON CAMERA
US10198671B1 (en) * 2016-11-10 2019-02-05 Snap Inc. Dense captioning with joint interference and visual context
US11017550B2 (en) * 2017-11-15 2021-05-25 Uatc, Llc End-to-end tracking of objects
US10740618B1 (en) * 2018-04-30 2020-08-11 Amazon Technologies, Inc. Tracking objects in live 360 video
US11138745B2 (en) * 2018-04-30 2021-10-05 Uatc, Llc Object association for autonomous vehicles
CN112970031A (zh) * 2018-09-11 2021-06-15 瑞典爱立信有限公司 用于关联视频中的目标的方法
US10885370B2 (en) * 2018-12-16 2021-01-05 International Business Machines Corporation Selecting object detections or recognitions using correctness mappings
JP7164048B2 (ja) * 2019-07-11 2022-11-01 日本電気株式会社 物体検知装置、学習方法、及び、プログラム
US11107219B2 (en) * 2019-07-22 2021-08-31 Adobe Inc. Utilizing object attribute detection models to automatically select instances of detected objects in images
US11461915B2 (en) * 2020-01-06 2022-10-04 Qualcomm Incorporated Object size estimation using camera map and/or radar information
WO2022064610A1 (ja) * 2020-09-24 2022-03-31 日本電気株式会社 物体検知装置、学習済みモデル生成方法、および、記録媒体

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013045433A (ja) * 2011-08-26 2013-03-04 Canon Inc 学習装置、学習装置の制御方法、検出装置、検出装置の制御方法、およびプログラム
JP2019061579A (ja) * 2017-09-27 2019-04-18 富士フイルム株式会社 学習支援装置、学習支援装置の作動方法、学習支援プログラム、学習支援システム、および端末装置
JP2019079445A (ja) * 2017-10-27 2019-05-23 ホーチキ株式会社 火災監視システム

Also Published As

Publication number Publication date
US20220277553A1 (en) 2022-09-01
JP7164049B2 (ja) 2022-11-01
JPWO2021005776A1 (ja) 2021-01-14

Similar Documents

Publication Publication Date Title
JP2020061066A (ja) 学習プログラム、検出プログラム、学習装置、検出装置、学習方法および検出方法
KR102462934B1 (ko) 디지털 트윈 기술을 위한 영상 분석 시스템
KR102177412B1 (ko) 이미지와 텍스트간 유사도 매칭 시스템 및 방법
Zhou et al. Degradation evaluation of lateral story stiffness using HLA-based deep learning networks
JP6574004B2 (ja) 計算手法決定システム、計算手法決定装置、処理装置、計算手法決定方法、処理方法、計算手法決定プログラム、及び、処理プログラム
CN110188780B (zh) 用于定位多目标特征点的深度学习模型的构建方法及装置
US11593955B2 (en) Road map fusion
JP7380902B2 (ja) 物体検知装置、学習済みモデル生成方法、及び、プログラム
CN113378656B (zh) 一种基于自适应图卷积神经网络的动作识别方法和装置
JP7438365B2 (ja) 学習活用システム、活用装置、学習装置、プログラム及び学習活用方法
WO2021090473A1 (ja) 物体検知装置、学習方法、及び、記録媒体
WO2021005775A1 (ja) 物体検知装置、学習方法、及び、記録媒体
WO2021005776A1 (ja) 物体検知装置、学習方法、及び、記録媒体
EP3998577A1 (en) Object detection device, object detection method, and program
JP6725194B2 (ja) 学習済みモデルを生成する方法、データを分類する方法、コンピュータおよびプログラム
INTHIYAZ et al. YOLO (YOU ONLY LOOK ONCE) Making Object detection work in Medical Imaging on Convolution detection System.
CN116208399A (zh) 一种基于元图的网络恶意行为检测方法及设备
EP4002297A1 (en) Systems and methods for automated detection of building footprints
JP2007213441A (ja) 多変数決定木構築システム、多変数決定木構築方法および多変数決定木を構築するためのプログラム
WO2021152801A1 (ja) 学習装置、学習方法、及び、記録媒体
CN114049546A (zh) 考虑目标间关系的遥感影像目标检测系统及方法
CN113837049A (zh) 基于卷积神经网络和遗传算法的智能路面清洁方法
WO2021059527A1 (ja) 学習装置、学習方法、及び、記録媒体
Luetto People counting using detection networks and self calibrating cameras on edge computing
CN118037738B (zh) 一种沥青路面灌缝胶黏结性能检测方法及设备

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: 19937162

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021530447

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19937162

Country of ref document: EP

Kind code of ref document: A1