Object detection apparatus, object detection method, and program

By setting detection areas and optimizing model shape and size, the technique addresses processing time and accuracy challenges in object detection, enabling efficient and accurate object detection in resource-constrained environments.

JP2024138823APending Publication Date: 2024-10-09OKI ELECTRIC INDUSTRY CO LTD

Patent Information

Application Number
JP2023049523
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-27
Publication Date
2024-10-09

AI Technical Summary

Technical Problem

Existing object detection techniques face challenges in reducing processing time while maintaining high accuracy, particularly in resource-constrained environments where real-time processing is required, due to issues such as resizing and padding of images, multiple inferences, and variable detection areas.

Method used

The technique involves setting detection areas based on object size, converting the model shape to match the detection area, and optimizing the input size to the model, thereby reducing unnecessary calculations and processing time while ensuring high accuracy.

Benefits of technology

This approach allows for highly accurate object detection with reduced processing time, even in resource-limited environments, by minimizing unnecessary image input and optimizing model shape and size, thus enhancing real-time performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024138823000001_ABST
    Figure 2024138823000001_ABST
Patent Text Reader

Abstract

To provide a technique for detecting an object with high accuracy and for reducing processing time required for detecting the object.SOLUTION: There is provided an object detection apparatus having an area setting unit for setting a detection area where an object is detected, a model generating unit for, based on structure information of a first model, a size of the detection area and a target size of input to a second model, converting a shape of the first model to generate the second model, an image generating unit for detecting a detection area image by carrying out cropping based on the image captured by an imaging device and the detection area, and an object detection unit for obtaining a detection result of the object based on the second model and the detection area image.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an object detection device, an object detection method, and a program. [Background technology]

[0002] In recent years, techniques for detecting an object based on an image have been known. Various techniques are known as techniques for improving the accuracy of image-based object detection.

[0003] For example, Patent Document 1 discloses a technique for dividing an input image into multiple images and then inputting the images into a detection model such as a Convolutional Neural Network (CNN). This technique makes it possible to perform highly accurate object detection without significantly changing the aspect ratio of the input image and reducing information loss due to resizing, even when an image larger than the input size of the detection model is input to the detection model.

[0004] Patent Document 2 discloses a technique in which an input image obtained by capturing an image and flipping it upside down is input to a detection model, and the detection model determines whether or not there is an object that satisfies the conditions that the score value indicating the object-likeliness is equal to or greater than a threshold value and that the object is equal to or smaller than a predetermined size. In this technique, if there is an object that satisfies the conditions, the area in which the object that satisfies the conditions is present is expanded, and object detection is performed again using the detection model based on the expanded area, thereby performing highly accurate object detection.

[0005] Patent Document 3 discloses a technique for separating the background and foreground of a captured image, extracting an area of ​​a predetermined size or less from the foreground as an object candidate area, creating multiple input images corresponding to the periphery of the object candidate area, and performing object detection on the input images using a detection model. With this technique, even if the size of an object captured in an image is small, the object can be detected with high accuracy.

[0006] Patent Document 4 discloses a technology in which a target area is set in advance in a part of an image obtained by capturing an image of a predetermined area, two-dimensional coordinates in the target area are converted into three-dimensional coordinates based on the correspondence between the image capturing surface and a road plane existing in real space, and object detection is performed using the three-dimensional coordinates. This technology makes it possible to expand the target area taking into account the size of the object to be detected. Then, by inputting only the detection area after the target area is expanded into the detection model, object detection can be performed with a small amount of calculation while suppressing a decrease in the accuracy of object detection. [Prior art documents] [Patent documents]

[0007] [Patent Document 1] JP 2022-101321 A [Patent Document 2] Patent Publication No. 2022-84282 [Patent Document 3] JP 2020-017136 A [Patent Document 4] Patent Publication No. 2022-129150 Summary of the Invention [Problem to be solved by the invention]

[0008] However, it is desirable to provide a technique that enables reducing the processing time required for object detection while detecting the object with high accuracy. [Means for solving the problem]

[0009] In order to solve the above problem, according to one aspect of the present invention, there is provided an object detection device comprising: an area setting unit that sets a detection area in which an object is detected; a model generation unit that converts a shape of the first model to generate the second model based on structural information of the first model, the size of the detection area, and a target input size to a second model; an image generation unit that generates a detection area image by cropping based on an image captured by an imaging device and the detection area; and an object detection unit that obtains a detection result for the object based on the second model and the detection area image.

[0010] The object detection unit may obtain, as the detection result, data output from the second model based on inputting the detection area image to the second model.

[0011] The model generation unit may determine the target input size for the second model based on a target processing time for the second model, an input size for the first model, and a measured processing time of the first model during learning.

[0012] The model generation unit may calculate a ratio of the target input size to the second model to the size of the detection area, calculate input length and width to the second model based on the ratio and the length and width of the detection area, and convert a shape of the first model based on the input length and width to the second model and structural information of the first model.

[0013] The model generation unit may calculate a positive square root of the ratio, and calculate an input length and width to the second model based on multiplication of the positive square root of the ratio and the length and width of the detection area.

[0014] The first model includes a first processing layer, and the second model includes a second processing layer after the first processing layer is transformed, and the model generation unit may transform a shape of the first model by changing the number of times processing is performed by the first processing layer based on an input length and width to the second model so that the entire detection area is processed by the second processing layer.

[0015] The object detection unit may resize the detection area image so that the length and width of the detection area image match the length and width of an input to the second model, and input the detection area image after the resizing to the second model.

[0016] The detection area may include a first detection area and a second detection area, the model generation unit may generate a model corresponding to the first detection area and a model corresponding to the second detection area based on structural information of the first model, a size of the first detection area, a size of the second detection area, and the target input size to the second model, the image generation unit may generate a first detection area image and a second detection area image based on the image, the first detection area, and the second detection area, and the object detection unit may detect a first object present in the first detection area based on the model corresponding to the first detection area and the first detection area image, and detect a second object present in the second detection area based on the model corresponding to the second detection area and the second detection area image.

[0017] The model generation unit may set the target input size smaller when the operation mode of the object detection device is set to a first mode than when the operation mode is set to a second mode.

[0018] The object detection unit may set the operation mode to either the first mode or the second mode based on selection information input by a user.

[0019] The object detection unit may acquire a time required from when the detection area image is input into the second model to when the detection result is output from the second model as a measured processing time of the second model, and the model generation unit may determine a target input size to a third model based on a target processing time of the second model, an input size to the second model at the time of detecting the object, and the measured processing time of the second model, and may generate the third model by converting a shape of the second model based on structural information of the second model, the size of the detection area, and the target input size to the third model.

[0020] In addition, according to another aspect of the present invention to solve the above problem, there is provided an object detection method executed by a computer, including: setting a detection area in which an object is detected; generating a second model by converting a shape of the first model based on structural information of the first model, the size of the detection area, and a target input size to a second model; generating a detection area image by cropping based on an image captured by an imaging device and the detection area; and obtaining a detection result of the object based on the second model and the detection area image.

[0021] In addition, according to another aspect of the present invention to solve the above problem, there is provided a program that causes a computer to function as an object detection device including an area setting unit that sets a detection area in which an object is detected, a model generation unit that converts the shape of the first model to generate the second model based on structural information of the first model, the size of the detection area, and a target input size to a second model, an image generation unit that generates a detection area image by cropping based on an image captured by an imaging device and the detection area, and an object detection unit that obtains a detection result for the object based on the second model and the detection area image. Effect of the Invention

[0022] As described above, according to the present invention, a technique is provided that makes it possible to reduce the processing time required for object detection while detecting an object with high accuracy. [Brief description of the drawings]

[0023] [Figure 1] 1 is a diagram illustrating an example of a functional configuration of an object detection system according to a first embodiment of the present invention. [Diagram 2] 4 is a flowchart showing an example of the overall operation of the object detection device 1 according to the first embodiment of the present invention. [Diagram 3] 2A to 2C are diagrams illustrating examples of a set area and a detection area according to the first embodiment of the present invention. [Figure 4] 13 is a flowchart showing an example of an operation for setting a detection area. [Diagram 5] FIG. 11 is a diagram for explaining an example of a model before conversion. [Figure 6] 13 is a flowchart illustrating an example of an operation of model shape conversion. [Figure 7] FIG. 11 is a diagram for explaining a first example of the shape of a model after transformation. [Figure 8] FIG. 13 is a diagram for explaining a second example of the shape of a model after transformation. [Figure 9] 10 is a flowchart showing an example of an operation for generating a detection area image. [Figure 10] 5 is a flowchart showing an example of an object detection operation according to the first embodiment of the present invention. [Figure 11] 13A and 13B are diagrams for explaining examples of a set area and a detection area according to the second embodiment of the present invention. [Figure 12] FIG. 13 is a diagram for explaining an example of model shape transformation according to the third embodiment of the present invention. [Figure 13] FIG. 13 is a diagram illustrating an example of a functional configuration of an object detection system according to a fourth embodiment of the present invention. [Figure 14] 13 is a flowchart showing an example of the overall operation of an object detection device 5 according to the fourth embodiment of the present invention. [Figure 15] 13 is a flowchart showing an example of an object detection operation according to the third embodiment of the present invention. [Figure 16] 13 is a flowchart showing an example of an operation for updating model information; [Figure 17] 1 is a diagram illustrating a hardware configuration of an information processing device 900 as an example of an object detection device 1 according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0024] Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In this specification and the drawings, components having substantially the same functional configurations are designated by the same reference numerals, and duplicated explanations will be omitted.

[0025] (0. Overview) First, an overview of the embodiment of the present invention will be described.

[0026] In recent years, in an edge environment where resources used for calculations are limited and real-time processing is required, it is desirable to perform object detection with high accuracy and high speed. As an example, the technology according to the embodiment of the present invention can be applied to such an edge environment. Below, a problem with the comparative example will be described.

[0027] (Issues due to cropping of input images) Due to limited resources available for computation, object detection may be performed using a detection model that cannot accept images with a high resolution. In such cases, a common method is to crop the input image to increase the proportion of the object area in the input image, thereby improving the detection accuracy of small objects in the input image.

[0028] However, when an input image is divided into multiple images and then input into a detection model, as in the technology described in Patent Document 1, there is a high possibility that only a portion of an object will be captured in the divided images, which can result in a problem of reduced accuracy in object detection.

[0029] Therefore, in the embodiment of the present invention, a detection area is set based on the correspondence between the imaging plane of the image and the road plane existing in the real space, similar to the technology described in Patent Document 4. This reduces the possibility that only a part of the object will be included in the detection area, thereby suppressing a decrease in object detection accuracy.

[0030] (Processing time issues due to multiple inferences) When multiple inferences using a detection model are required before a final object detection result is obtained, as in the techniques described in Patent Documents 1 to 3, a problem may arise in that a long processing time is required because multiple inferences are performed.

[0031] In addition, in the technology described in Patent Document 4, when multiple detection areas are set in one input image, it is assumed that the input image is divided into the same number of images as the number of detection areas, and object detection is performed using the same detection model for each of the multiple images generated by the division. In this case, a problem may occur in that inference is required for each of the multiple images using the same detection model.

[0032] For example, in an edge environment where resources available for computation are limited and real-time processing is required, multiple computationally intensive inferences may increase processing time and impair the real-time processing. The loss of real-time processing may cause problems in system operation.

[0033] (Issues due to differences in the resolution of input images and the input size to the model) As in the technology described in Patent Document 4, when a detection area is set in a part of an image and object detection is performed in the set detection area, the size of the detection area may be variable. Therefore, when object detection is performed using a detection model with a limited input size, it is possible to combine a resizing process such as nearest neighbor interpolation or bilinear interpolation on the image with a padding process that adds margins to the top, bottom, left, and right of the image. As a result, an input image that matches the input size to the detection model is created, and the created input image is input to the detection model to perform object detection.

[0034] However, performing resizing and padding on an image may result in loss of information from the image, which may lead to a decrease in accuracy of object detection based on the image and a waste of calculations for the margins added by the padding.

[0035] For example, assume that an image with a size of 1920 x 1080 and an aspect ratio of 16:9 is input to a detection model with an input size of 640 x 640 and an aspect ratio of 1:1. In this case, the image size is reduced to 640 x 360, padding is performed on the top and bottom of the image so that the image size becomes 640 x 640, and then the image is input to the detection model.

[0036] In this case, information of size 1280×720 may be lost from the input image, and unnecessary calculations may occur in the blank area of ​​size 640×280 added by padding.

[0037] Therefore, in this specification, a technique for solving these problems will be mainly described. More specifically, in an embodiment of the present invention, a detection area is set in consideration of the size of an object to be detected, as in the technique described in Patent Document 4, and a shape transformation of a model is performed based on the size of the detection area. For example, the shape transformation of a model is performed based on four-dimensional information, which is the direction (N: batch size, H: vertical size, W: horizontal size, C: channel) used in a general CNN model that handles images, so that the ratio of H to W is the same as or close to the aspect ratio of the image.

[0038] Furthermore, by converting the shape of the model so that the area of ​​H and W (=H×W) is equal to or smaller than a certain value, an increase in the amount of calculations can be suppressed.

[0039] In the techniques described in Patent Documents 1 to 3, a shape change is performed on an image that is input to a detection model with a fixed input size.

[0040] On the other hand, in the embodiment of the present invention, by making the shape of the detection model variable, it is possible to perform highly accurate object detection even for an input image with a variable shape. This prevents unnecessary areas from being input to the detection model, and only optimal areas are input to the detection model, making it possible to perform object detection with high accuracy and high processing time.

[0041] In this specification, it is mainly assumed that the object detected based on the image is a vehicle. However, the object detected based on the image is not limited to a vehicle. For example, the object detected based on the image may be an object other than a vehicle (e.g., a ship, an aircraft, etc.), or may be a person, a robot, etc.

[0042] The outline of the embodiment of the present invention has been described above.

[0043] 1. First Embodiment Next, a first embodiment of the present invention will be described.

[0044] (1-1. Configuration of Object Detection System) First, a configuration example of an object detection system according to a first embodiment of the present invention will be described. Fig. 1 is a diagram showing a functional configuration example of the object detection system according to the first embodiment of the present invention. The object detection system according to the first embodiment of the present invention includes an object detection device 1, an imaging device 2, a storage device 3, and an output device 4.

[0045] The object detection device 1 can be realized by a computer. As shown in Fig. 1, the object detection device 1 is connected to an imaging device 2, a storage device 3, and an output device 4 by wire or wirelessly. The object detection device 1 also includes an image acquisition unit 11, an area setting unit 12, a model generation unit 13, an image generation unit 14, an object detection unit 15, and a result output unit 16.

[0046] The image acquisition unit 11, the area setting unit 12, the model generation unit 13, the image generation unit 14, the object detection unit 15, and the result output unit 16 each include a calculation device such as a CPU (Central Processing Unit), and the functions of each unit can be realized by a program stored in a ROM (Read Only Memory) being expanded into a RAM (Random Access Memory) by the calculation device and executed. At this time, a computer-readable recording medium on which the program is recorded can also be provided.

[0047] Alternatively, the image acquisition unit 11, the area setting unit 12, the model generation unit 13, the image generation unit 14, the object detection unit 15, and the result output unit 16 may be configured by dedicated hardware, or may be configured by a combination of multiple hardware. Data required for the calculation by the calculation device is appropriately stored in the storage device 3.

[0048] The area setting unit 12 includes a set area acquisition unit 121 and a detection area setting unit 122. The model generation unit 13 includes a model information acquisition unit 131, a target processing time acquisition unit 132, a model shape determination unit 133, and a model shape conversion unit 134. The image generation unit 14 includes a cropping processing unit 141. The object detection unit 15 includes a resizing processing unit 151 and an inference unit 152.

[0049] (Imaging device 2) The imaging device 2 may be configured with a camera. The camera may include an image sensor that captures images continuously in time series to obtain multiple images. The multiple images may also be referred to as "video." Furthermore, each of the multiple images may also be referred to as a "frame." For example, the imaging device 2 is installed above or beside a road, and captures an image of the road plane to continuously output multiple images to the object detection device 1.

[0050] 1, the imaging device 2 and the object detection device 1 exist separately. However, the imaging device 2 and the object detection device 1 may be integrated together. In other words, the imaging device 2 may be incorporated into the object detection device 1.

[0051] (Storage device 3) The storage device 3 is a storage device capable of storing programs and various information for operating the object detection device 1. For example, the storage device 3 may be configured with a non-volatile memory. For example, the storage device 3 may store in advance setting area information 32, model structure information 33, weight information 34, measured processing time 35, and target processing time 36. In addition, the storage device 3 may accumulate an image 31 received by the object detection device 1 from the imaging device 2. The storage device 3 may also temporarily store data required in the course of the operation of the object detection device 1.

[0052] 1, the storage device 3 and the object detection device 1 exist separately. However, the storage device 3 and the object detection device 1 may be integrated. That is, the storage device 3 may be incorporated in the object detection device 1. The image 31, the setting area information 32, the model structure information 33, the weight information 34, the measured processing time 35, and the target processing time 36 will be described in detail later.

[0053] (Output device 4) The output device 4 outputs the object detection result obtained by the object detection device 1. For example, the output device 4 may be configured by a display. At this time, the output device 4 may display the object detection result as visual information so that the object detection result can be perceived by the user's vision. However, the form of the output device 4 is not limited. For example, the output device 4 may include a speaker or the like. At this time, the output device 4 may output the object detection result as auditory information so that the object detection result can be perceived by the user's hearing.

[0054] 1, the output device 4 and the object detection device 1 exist separately. However, the output device 4 and the object detection device 1 may be integrated together. In other words, the output device 4 may be incorporated into the object detection device 1.

[0055] (Operation example of object detection device 1) FIG. 2 is a flowchart showing an example of the overall operation of the object detection device 1 according to the first embodiment of the present invention.

[0056] (Area setting section 12) 2, the area setting unit 12 sets a detection area in which an object is detected (S11). More specifically, the area setting unit 12 acquires set area information 32 indicating the set area from the storage device 3, and sets the detection area based on the acquired set area information 32. Here, an example of the detection area setting operation according to the first embodiment of the present invention will be described with reference to FIGS. 3 and 4.

[0057] Fig. 3 is a diagram for explaining an example of a set area and a detection area according to the first embodiment of the present invention. Referring to Fig. 3, an image G1 is shown. In the image G1, a vehicle is shown as an example of an object to be detected, and a road plane on which the vehicle runs is shown as an example of a plane on which the object exists. In the image G1, a set area R1 is shown. Also, a detection area D2 set based on the set area information 32 is shown.

[0058] The set area R1 is an area that is set in consideration of the size of the object to be detected. Here, the set area R1 may be set in any manner. For example, the set area R1 may be set based on a plurality of two-dimensional coordinates designated by the user.

[0059] More specifically, as described in Patent Document 4, a plurality of two-dimensional coordinates designated by a user may be converted into a plurality of three-dimensional coordinates on the plane based on a correspondence relationship between the imaging plane of image G1 and a plane in real space in which an object exists, a plurality of new three-dimensional original coordinates may be calculated by changing the plurality of three-dimensional coordinates, and the new plurality of three-dimensional coordinates may be converted into a plurality of two-dimensional coordinates on the imaging plane based on the correspondence relationship. Then, an area enclosed by lines connecting the plurality of two-dimensional coordinates may be set as a setting area R1.

[0060] Setting the set area R1 in this manner reduces the possibility that a part of an object will protrude outside the set area R1, making it less likely that an object will not be detected normally. Therefore, setting the set area R1 in this manner can prevent a decrease in the accuracy of object detection.

[0061] Fig. 4 is a flowchart showing an example of an operation for setting a detection area. Referring to Fig. 4, a detailed example of the operation for setting a detection area (S11) is shown.

[0062] First, the set area acquisition unit 121 acquires the set area information 32 indicating the set area R1 from the storage device 3 (S112). Then, the detection area setting unit 122 sets the detection area D2 in which an object is detected, based on the set area information 32 acquired by the set area acquisition unit 121 (S114).

[0063] The detection area D2 may be set in any manner. For example, as shown in Fig. 3, the detection area setting unit 122 may set an area including the set area R1 (for example, a rectangular area circumscribing the set area R1) as the detection area D2 based on the set area information 32 acquired by the set area acquisition unit 121.

[0064] (Model Generation Unit 13) Returning to FIG. 2, the description will be continued. The model generation unit 13 generates a converted model (second model) by performing model shape conversion on a pre-conversion model (first model) (S12). More specifically, the model generation unit 13 acquires model structure information 33, which is information indicating the structure of the pre-conversion model, from the storage device 3, and converts the shape of the pre-conversion model based on the acquired model structure information 33, the size of the detection area D2, and the target input size to the converted model, to generate the converted model. Here, an example of the model shape conversion operation will be described with reference to FIGS. 5 to 8.

[0065] Fig. 5 is a diagram for explaining an example of a pre-conversion model. Referring to Fig. 5, a pre-conversion model M1 is shown. The pre-conversion model M1 is a trained model, and when an image is input to the pre-conversion model M1, an object detection result is output from the pre-conversion model M1 by inference based on the image by the pre-conversion model M1. For example, the object detection result output from the pre-conversion model M1 may be the class of an object and the position of the object appearing in the image.

[0066] The pre-conversion model M1 is a trained DNN (Deep neural network) and includes processing layers L1 to Ln (n is a positive integer). For example, the processing layer L1 is an input layer, the processing layers L2 to Ln-1 are each an intermediate layer, and the processing layer Ln is an output layer.

[0067] For example, the pre-conversion model M1 includes a convolutional neural network (CNN) as an example of a trained DNN. For example, when the pre-conversion model M1 includes a convolutional neural network, the intermediate layer of the pre-conversion model M1 includes a convolutional layer, a pooling layer, and a fully connected layer. However, the specific structure of the pre-conversion model M1 is not particularly limited.

[0068] Model structure information 33, which is information indicating the structure of the model M1 before conversion, is stored in the storage device 3. Here, the model structure information 33 may be information indicating the structure of each of the processing layers L1 to Ln.

[0069] For example, if processing layer L2 is a convolutional layer, information indicating the structure of processing layer L2 may include the fact that processing layer L2 is a convolutional layer, the size of the convolution filter, and the stride interval of the convolution filter.

[0070] For example, if processing layer L3 is a pooling layer, information indicating the structure of processing layer L3 may include information that processing layer L3 is a pooling layer, the type of representative value (e.g., maximum value, average value, etc.) calculated by the pooling layer, and the size of the window in which the representative value is calculated.

[0071] For example, if the processing layer Ln-1 is a fully connected layer, the information indicating the structure of the processing layer Ln-1 may include information that the processing layer Ln-1 is a fully connected layer, the number of neurons that constitute the fully connected layer, etc.

[0072] In addition to the model structure information 33, weight information 34 for each of the multiple neurons constituting the pre-conversion model M1 is stored in the storage device 3. The weight information 34 is information acquired during learning of the pre-conversion model M1.

[0073] Furthermore, the storage device 3 stores the processing time of the pre-conversion model M1 measured during learning as a measured processing time 35. For example, the measured processing time 35 may be a measurement value of the time required from when an image is input to the pre-conversion model M1 until an object detection result based on the image is output from the pre-conversion model M1.

[0074] Furthermore, the storage device 3 stores a target processing time 36 of a converted model obtained by converting the shape of the pre-conversion model M1. For example, the target processing time 36 may be a target value of the time required from when an image is input to the converted model until an object detection result based on the image is output from the converted model.

[0075] Fig. 6 is a flowchart showing an operation example of model shape conversion. Referring to Fig. 6, a detailed operation example of model shape conversion (S12) is shown. As shown in Fig. 6, the model information acquisition unit 131 acquires model structure information 33 from the storage device 3 (S121), acquires weight information 34 from the storage device 3 (S122), and acquires measured processing time 35 from the storage device 3 (S123). In addition, the target processing time acquisition unit 132 acquires target processing time 36 from the storage device 3 (S124).

[0076] The model shape determination unit 133 determines the shape of the model after conversion (S125). More specifically, based on information indicating the structure of the input layer L1, which is included in the model structure information 33 of the model M1 before conversion, the model shape determination unit 133 obtains the vertical length of the image input to the input layer L1 as the vertical input size base_h to the model M1 before conversion, and obtains the horizontal length of the image input to the input layer L1 as the horizontal input size base_w to the model M1 before conversion. Note that both the vertical length and the horizontal length are collectively referred to as "vertical and horizontal length".

[0077] The model shape determination unit 133 calculates the input size (base_h·base_w) to the pre-conversion model M1 by multiplying the vertical input size base_h to the pre-conversion model M1 by the horizontal input size base_w to the pre-conversion model M1. The input size to the pre-conversion model M1 can be expressed as the area of ​​the input to the pre-conversion model M1.

[0078] Here, the target processing time 36 of the converted model is set as target_time, and the measured processing time 35, which is the processing time of the pre-conversion model M1 measured during learning, is set as base_time. Also, the target input size to the converted model is set as target_area. The input size to the converted model can be said as the area of ​​the input to the converted model.

[0079] In the embodiment of the present invention, it is assumed that the shape of the model is converted so that the input size to the model is proportional to the amount of calculation by the intermediate layer of the model. In this case, if no calculation is performed by the input layer and the output layer, the shape of the model is converted so that the input size to the model is proportional to the processing time of the model.

[0080] Therefore, as shown in the following equation (1), the model shape determination unit 133 determines the target input size target_area for the converted model based on the input size (base_w·base_h) to the pre-conversion model M1, the target processing time target_time of the converted model, and the measured processing time base_time of the pre-conversion model M1.

[0081] target_area =(base_w·base_h)target_time / base_time (1)

[0082] It is assumed here that the target processing time target_time of the converted model is stored in advance in the storage device 3. However, the target input size target_area for the converted model may be stored in advance in the storage device 3. In this case, the model shape determination unit 133 may acquire the target input size target_area for the converted model stored in the storage device 3.

[0083] Alternatively, the target processing time base_time of the pre-conversion model may be replaced with the number of product-sum operations of the pre-conversion model, and the target processing time target_time of the converted model may be replaced with the number of product-sum operations of the converted model.

[0084] Furthermore, the horizontal size of the detection area D2 is area_w, and the vertical size of the detection area D2 is area_h. At this time, the model shape determination unit 133 calculates the size of the detection area D2 (area_w·area_h) by multiplying the horizontal size of the detection area D2, area_w, by the vertical size of the detection area D2, area_h. The size of the detection area D2 can also be expressed as the area of ​​the detection area D2.

[0085] The model shape determination unit 133 calculates the ratio of the target input size target_area to the converted model to the size of the detection area D2 (area_w·area_h). Here, the positive square root of the ratio of the target input size target_area to the converted model to the size of the detection area D2 (area_w·area_h) is defined as ration. In addition, the horizontal input size to the converted model is defined as conv_w, and the vertical input size to the converted model is defined as conv_h.

[0086] In this case, the ratio of the target input size target_area to the size of the detection area D2 (area_w area_h) to the converted model is ration 2 The model shape determination unit 133 determines the calculated ratio 2) and the size of detection area D2 (area_w·area_h), the horizontal input size conv_w to the converted model and the vertical input size conv_h to the converted model are calculated.

[0087] For example, the model shape determination unit 133 may calculate the square root of the ratio (ration) based on the target input size target_area for the converted model, the horizontal size area_w of the detection area D2, and the vertical size area_h of the detection area D2, as shown in the following equation (2).

[0088]

number

[0089] Model shape determination unit 133 calculates a horizontal input size conv_w to the converted model based on multiplication of the square root of the ratio (ration) and the horizontal size area_w of detection area D2, as shown in the following equation (3).

[0090] conv_w=area_w·ration ···(3)

[0091] Similarly, model shape determination unit 133 calculates a vertical input size conv_h to the converted model based on multiplication of the square root of the ratio (ration) and the vertical size area_h of detection area D2, as shown in the following equation (4).

[0092] conv_h=area_h·ration ···(4)

[0093] Depending on the type of model, object detection processing is performed for each of a plurality of grid cells set in the image. For example, the grid cell may be configured as a square with a predetermined length on one side. As an example, when YOLO (You Look Only Once) is used, the grid cell is configured as a square of a maximum of 32 pixels x 32 pixels. Therefore, each of the horizontal size area_w of the detection area D2 and the vertical size area_h of the detection area D2 needs to be a multiple of 32.

[0094] At this time, model shape determination unit 133 can calculate the horizontal input size conv_w to the converted model by the following formula (5).

[0095] conv_w=32[area_w·ration / 32] ···(5)

[0096] Similarly, model shape determination section 133 can calculate the vertical input size conv_h to the converted model by the following equation (6).

[0097] conv_h=32[area_h·ration / 32] ···(6)

[0098] Then, the model shape determination unit 133 determines the shape of the converted model based on the model structure information 33 of the pre-conversion model M1, the horizontal input size conv_w to the converted model, and the vertical input size conv_h to the converted model. Here, a first example and a second example of the shape of the converted model will be described with reference to Figs. 7 and 8.

[0099] Fig. 7 is a diagram for explaining a first example of the shape of a model after conversion. Referring to Fig. 7, a set area R11 set in an image G1 is shown. A rectangular area circumscribing the set area R11 is set as a detection area D12. The model shape determination unit 133 determines a converted model M12, which is a model obtained after conversion of the pre-conversion model M1 (Fig. 5), based on the detection area D12.

[0100] For example, assume that the processing layer L2 (first processing layer) included in the pre-conversion model M1 is a convolutional layer, and the processing layer L2 (second processing layer) included in the converted model M12 is a convolutional layer, and the processing layer L2 included in the pre-conversion model M1 is converted into the processing layer L2 included in the converted model M12.

[0101] At this time, based on the vertical input size conv_h to the converted model and the vertical input size conv_h to the converted model, the model shape determination unit 133 determines the processing layer L2 to be included in the modified model M12 by changing the number of processing times by the processing layer L2 included in the pre-conversion model M1 so that the entire detection area D12 is processed by the processing layer L2 included in the converted model M12.

[0102] For example, the model shape determination unit 133 determines a processing layer L2 included in a modified model M12 in which the number of times the convolution filter is moved is changed so that the convolution filter constituting the processing layer L2 included in the pre-conversion model M1 is applied to the entire detection area D12.

[0103] For example, assume that the detection area D12 is reduced in the vertical direction of the image G1 as shown in Fig. 7. In this case, the model shape determination unit 133 calculates the number of vertical movements required for the convolution filter to move from one end of the vertical direction to the other end of the detection area D12, based on the vertical input size conv_h to the converted model and the vertical length of the convolution filter. Then, the model shape determination unit 133 determines the processing layer L2 included in the changed model M12 in which the number of movements of the convolution filter has been reduced to the calculated number.

[0104] For example, assume that the processing layer L3 included in the pre-conversion model M1 is a pooling layer, and the processing layer L3 included in the converted model M12 is a pooling layer, and the processing layer L3 included in the pre-conversion model M12 is converted into the processing layer L3 included in the converted model M12.

[0105] At this time, based on the vertical length of the feature map output from the processing layer L2 immediately preceding the processing layer L3 and the vertical length of the window in which a representative value is calculated by the pooling layer, the model shape determination unit 133 determines the processing layer L3 included in the modified model M12 by changing the number of times of processing by the processing layer L3 included in the pre-conversion model M1 so that the entire feature map is processed by the processing layer L3 included in the converted model M12.

[0106] For example, assume that the detection area D12 is reduced in the vertical direction of the image G1 as shown in Fig. 7. In this case, the model shape determination unit 133 calculates the number of vertical movements required for the window to move from one end of the feature map to the other end in the vertical direction, based on the vertical length of the feature map and the vertical length of the window. Then, the model shape determination unit 133 determines the processing layer L3 included in the changed model M12, in which the number of movements has been reduced to the calculated number.

[0107] For example, assume that the processing layer Ln-1 included in the pre-conversion model M1 is a fully connected layer, the processing layer Ln-1 included in the converted model M12 is a fully connected layer, and the processing layer Ln-1 included in the pre-conversion model M12 is converted to the processing layer Ln-1 included in the converted model M12.

[0108] At this time, based on the vertical length of the feature map output from the processing layer Ln-2 immediately preceding the processing layer Ln-1 and the number of neurons constituting the fully connected layer, the model shape determination unit 133 determines the processing layer Ln-1 included in the modified model M12 in which the connection relationship through the processing layer Ln-1 included in the pre-conversion model M1 is changed so that the entire feature map is connected to each neuron that constitutes the fully connected layer.

[0109] Fig. 8 is a diagram for explaining a second example of the shape of a model after conversion. Referring to Fig. 8, a set area R12 set in an image G1 is shown. A rectangular area circumscribing the set area R12 is set as a detection area D13. The model shape determination unit 133 determines a converted model M13, which is a model obtained after conversion of the pre-conversion model M1 (Fig. 5), based on the detection area D13.

[0110] For example, assume that the processing layer L2 (first processing layer) included in the pre-conversion model M1 is a convolutional layer, and the processing layer L2 (second processing layer) included in the converted model M12 is a convolutional layer, and the processing layer L2 included in the pre-conversion model M1 is converted into the processing layer L2 included in the converted model M12.

[0111] For example, assume that the detection area D13 is reduced in the horizontal direction of the image G1 as shown in Fig. 8. In this case, the model shape determination unit 133 calculates the number of horizontal movements required for the convolution filter to move from one end to the other end in the horizontal direction of the detection area D13 based on the horizontal input size conv_w to the converted model and the horizontal length of the convolution filter. Then, the model shape determination unit 133 determines the processing layer L2 included in the changed model M13 in which the number of movements of the convolution filter has been reduced to the calculated number.

[0112] For example, assume that the processing layer L3 included in the pre-conversion model M1 is a pooling layer, and the processing layer L3 included in the converted model M13 is a pooling layer, and the processing layer L3 included in the pre-conversion model M13 is converted into the processing layer L3 included in the converted model M13.

[0113] For example, assume that the detection area D13 is reduced in the horizontal direction of the image G1 as shown in Fig. 8. In this case, the model shape determination unit 133 calculates the number of horizontal movements required for the window to move from one end of the feature map to the other end in the horizontal direction, based on the horizontal length of the feature map and the horizontal length of the window. Then, the model shape determination unit 133 determines the processing layer L3 included in the changed model M13, in which the number of movements has been reduced to the calculated number.

[0114] For example, assume that the processing layer Ln-1 included in the pre-conversion model M1 is a fully connected layer, the processing layer Ln-1 included in the converted model M13 is a fully connected layer, and the processing layer Ln-1 included in the pre-conversion model M13 is converted to the processing layer Ln-1 included in the converted model M13.

[0115] At this time, based on the horizontal length of the feature map output from the processing layer Ln-2 immediately preceding the processing layer Ln-1 and the number of neurons constituting the fully connected layer, the model shape determination unit 133 determines the processing layer Ln-1 included in the modified model M13 in which the connection relationship through the processing layer Ln-1 included in the pre-conversion model M1 is changed so that the entire feature map is connected to each neuron that constitutes the fully connected layer.

[0116] A first example and a second example of the shape of the model after conversion have been described with reference to Figs. 7 and 8. Such a conversion of the shape of the model can be performed by a known technique such as dynamic shape without changing the weight information of the model and the number of neurons included in the model. Therefore, re-learning is not required for model conversion. Furthermore, since the target input size to the model is kept constant, the processing time of the model can be suppressed to a certain time or less.

[0117] Continuing the explanation by returning to Fig. 6, model shape conversion unit 134 generates a converted model by converting the shape of the pre-conversion model in accordance with the shape of the converted model determined by model shape determination unit 133 (S126).

[0118] (Image acquisition unit 11) Returning to FIG. 2, the explanation will be continued. The image acquisition unit 11 acquires a plurality of images obtained by the imaging device 2 successively capturing images in a time series (S13). The image acquisition unit 11 may acquire images at any timing. For example, the image acquisition unit 11 may acquire images sequentially every time an image is output from the imaging device 2. Alternatively, the images output from the imaging device 2 may be accumulated in the storage device 3 for a certain period of time, and then the image acquisition unit 11 may acquire the images for the certain period of time from the storage device 3.

[0119] (Image Generation Unit 14) The image generating unit 14 generates a detection area image by performing cropping based on the image acquired by the image acquiring unit 11 and the detection area D2 (FIG. 3) (S14). Here, an operation example of the detection area image generation will be described with reference to FIG. 9.

[0120] Fig. 9 is a flowchart showing an operation example of detection area image generation. Referring to Fig. 9, a detailed operation example of detection area image generation (S14) is shown. As shown in Fig. 9, the cropping processing unit 141 generates a detection area image by cropping the detection area on the image based on the image acquired by the image acquisition unit 11 and the detection area D2 (S141). Note that cropping the detection area on the image means removing the detection area from the image, and can be said as trimming the detection area on the image.

[0121] (Object detection unit 15) The description will be continued by returning to Fig. 2. The object detection unit 15 obtains an object detection result based on the converted model and the detection area image (S15). An example of the object detection operation will be described with reference to Fig. 10.

[0122] Fig. 10 is a flowchart showing an example of the operation of object detection according to the first embodiment of the present invention. Referring to Fig. 10, a detailed example of the operation of object detection (S15) is shown. The resizing processing unit 151 determines whether or not the input length and width to the converted model do not match the length and width of the detection area image (S151).

[0123] If the resizing processing unit 151 determines that the input length and width to the converted model match the length and width of the detection area image ("NO" in S151), the operation proceeds to S153. On the other hand, if the resizing processing unit 151 determines that the input length and width to the converted model do not match the length and width of the detection area image ("YES" in S151), the resizing processing unit 151 resizes the detection area image so that the input length and width to the converted model match the length and width of the detection area image (S152), and the operation proceeds to S153.

[0124] Note that the detection area image may be resized in any manner. For example, the detection area image may be resized by stretching the detection area image. Alternatively, the detection area image may be resized by padding the outside of the detection area image.

[0125] The inference unit 152 inputs the detection area image generated in S141 or the detection area image resized by the resizing unit 151 to the converted model (S153). This causes inference using the converted model to be executed (S154). The inference unit 152 acquires data output from the converted model based on inputting the detection area image to the converted model as an object detection result (S155).

[0126] (Result output section 16) Returning to FIG. 2, the explanation will be continued. The result output unit 16 outputs the object detection result obtained by the object detection unit 15 to the output device 4 (S16). More specifically, when the output device 4 is configured with a display, the result output unit 16 controls the display of the object detection result obtained by the object detection unit 15. For example, the result output unit 16 outputs the class of an object appearing in an image and the position of the object to the output device 4 as the object detection result. Alternatively, the object detection result may be used for object tracking or the like.

[0127] When the object detection device 1 continues the process ("NO" in S17), the operation proceeds to S13. On the other hand, when the object detection device 1 ends the process ("YES" in S17), the object detection device 1 ends the process.

[0128] An example of the configuration of the object detection system according to the first embodiment of the present invention has been described above.

[0129] (1-2. Effects) According to the first embodiment of the present invention, a detection area is set taking into consideration the size of an object to be detected, and the shape of the model is converted based on the shape of the set detection area. This makes it possible to eliminate the input of unnecessary areas to the model, and by inputting only areas useful for object detection to the model, it becomes possible to detect objects with high accuracy while suppressing processing time.

[0130] The first embodiment of the present invention has been described above.

[0131] 2. Second Embodiment Next, a second embodiment of the present invention will be described. In the techniques described in Patent Documents 1 to 3, when multiple detection areas exist, it is necessary to perform inference by applying the same model to each of the multiple detection areas. In this case, the object detection accuracy when the model is applied to each of the multiple detection areas is equivalent to the object detection accuracy when the model is applied to a single detection area.

[0132] However, when a model is applied to each of a plurality of detection areas, a processing time equivalent to (processing time for a single area) x (number of detection areas) is required. Therefore, in an edge environment with limited computing resources, problems such as a shortage of computing resources may occur. In the second embodiment of the present invention, a technology for solving such problems is mainly proposed.

[0133] (2-1. Configuration of Object Detection System) First, a configuration example of an object detection system according to a second embodiment of the present invention will be described. The second embodiment of the present invention will also be described with reference to a diagram (FIG. 1) showing an example of a functional configuration of the object detection system according to the first embodiment of the present invention. The object detection system according to the second embodiment of the present invention includes an object detection device 1, an imaging device 2, a storage device 3, and an output device 4.

[0134] However, in the object detection device 1 according to the second embodiment of the present invention, the detection area setting unit 122 sets a plurality of detection areas. More specifically, the area setting unit 122 acquires set area information 32 indicating the set area from the storage device 3, and sets a plurality of detection areas based on the acquired set area information 32. Here, an example of the detection area setting operation according to the second embodiment of the present invention will be described with reference to FIG.

[0135] (Area setting section 12) Fig. 11 is a diagram for explaining an example of a set area and a detection area according to the second embodiment of the present invention. Referring to Fig. 11, an image G2 is shown. In the image G2, a road plane on which a vehicle runs is shown as an example of a plane on which an object exists. In the image G2, a set area R21 and a set area R22 are shown.

[0136] Also shown is a detection area D21 (first detection area) set based on a set area R21, and a detection area D22 (second detection area) set based on a set area R22. Each of the detection area D21 and the detection area D22 may be set in the same manner as the detection area D12 according to the first embodiment of the present invention.

[0137] (Model Generation Unit 13) The model generation unit 13 acquires model structure information 33, which is information indicating the structure of the model before conversion, from the storage device 3, and converts the shape of the model before conversion based on the acquired model structure information 33, the size of the detection area D21, the size of the detection area D22, and the target input size to the converted model, to generate a converted model M21 corresponding to the detection area D21 and a converted model M22 corresponding to the detection area D22.

[0138] The horizontal size of the detection area D21 is area_w1, and the vertical size of the detection area D21 is area_h1. At this time, the model shape determination unit 133 calculates the size of the detection area D21 (area_w1·area_h1) by multiplying the horizontal size of the detection area D21, area_w1, by the vertical size of the detection area D21, area_h1.

[0139] The model shape determination unit 133 calculates the ratio of the target input size target_area to the converted model M21 to the size (area_w1·area_h1) of the detection area D21. Here, the positive square root of the ratio of the target input size target_area to the converted model M21 to the size (area_w1·area_h1) of the detection area D21 is defined as ration1. In addition, the horizontal input size to the converted model M21 is defined as conv_w1, and the vertical input size to the converted model M21 is defined as conv_h1.

[0140] In this case, the ratio of the target input size target_area to the size of the detection area D21 (area_w1·area_h1) for the converted model M21 is ration1. 2 The model shape determination unit 133 determines the calculated ratio (ration1 2 ) and the size of the detection area D21 (area_w1·area_h1), the horizontal input size conv_w1 to the converted model M21 and the vertical input size conv_h1 to the converted model M21 are calculated.

[0141] For example, the model shape determination unit 133 may calculate the square root of the ratio (ration1) based on the target input size target_area for the converted model M21, the horizontal size area_w1 of the detection area D21, and the vertical size area_h1 of the detection area D21, as shown in the following equation (7).

[0142]

number

[0143] The model shape determination unit 133 calculates a horizontal input size conv_w1 to the converted model M21 based on multiplication of the square root of the ratio (ration1) and the horizontal size area_w1 of the detection area D21, as shown in the following equation (8).

[0144] conv_w1=area_w1·ration1 ···(8)

[0145] Similarly, model shape determination unit 133 calculates the vertical input size conv_h1 to converted model M21 based on multiplication of the square root of the ratio (ration1) and the vertical size area_h1 of detection area D21, as shown in the following equation (9).

[0146] conv_h1=area_h1·ration ···(9)

[0147] When object detection processing is performed for each of a plurality of grid cells set in an image, the model shape determination unit 133 may calculate the horizontal input size conv_w1 to the converted model M21 by the following formula (10).

[0148] conv_w1=32[area_w1·ration1 / 32] ···(10)

[0149] Similarly, the model shape determination unit 133 can calculate the vertical input size conv_h1 to the converted model M21 by the following formula (11).

[0150] conv_h1=32[area_h1·ration1 / 32] ···(11)

[0151] Then, the model shape determination unit 133 determines the shape of the converted model M21 based on the model structure information 33 of the pre-conversion model M1, the horizontal input size conv_w to the converted model M21, and the vertical input size conv_h to the converted model M21. The shape of the converted model M21 may be determined in the same manner as the shape of the converted model M11 according to the first embodiment of the present invention.

[0152] Similarly, the horizontal size of the detection area D22 is area_w2, and the vertical size of the detection area D22 is area_h2. The positive square root of the ratio of the target input size target_area to the converted model M22 to the size of the detection area D22 (area_w2 area_h2) is ration2. The horizontal input size to the converted model M22 is conv_w2, and the vertical input size to the converted model M22 is conv_h2.

[0153] The horizontal input size conv_w2 to the converted model M22 is calculated according to the following formula (12).

[0154] conv_w2=area_w2·ration2 ···(12)

[0155] Similarly, the vertical input size conv_h2 to the converted model M22 is calculated according to the following formula (13).

[0156] conv_h2=area_h2·ration2 ···(13)

[0157] When object detection processing is performed for each of a plurality of grid cells set in an image, the model shape determination unit 133 may calculate the horizontal input size conv_w2 to the converted model M22 by the following formula (14).

[0158] conv_w2=32[area_w2·ration2 / 32] ···(14)

[0159] Similarly, the model shape determination unit 133 can calculate the vertical input size conv_h2 to the converted model M22 by the following formula (15).

[0160] conv_h2=32[area_h2·ration2 / 32] ···(15)

[0161] Then, the model shape determination unit 133 determines the shape of the converted model M21 based on the model structure information 33 of the pre-conversion model M1, the horizontal input size conv_w1 to the converted model M21, and the vertical input size conv_h1 to the converted model M22. The shape of the converted model M21 may be determined in the same manner as the shape of the converted model M11 according to the first embodiment of the present invention.

[0162] Similarly, the model shape determination unit 133 determines the shape of the converted model M22 based on the model structure information 33 of the pre-conversion model M1, the horizontal input size conv_w2 to the converted model M22, and the vertical input size conv_h2 to the converted model M22. The shape of the converted model M22 may be determined in the same manner as the shape of the converted model M11 according to the first embodiment of the present invention.

[0163] (Image Generation Unit 14) The image generating unit 14 generates a detection area image (second detection area image) corresponding to the converted model M21 by performing cropping based on the image acquired by the image acquiring unit 11 and the detection area D21. Furthermore, the image generating unit 14 generates a detection area image (first detection area image) corresponding to the converted model M22 by performing cropping based on the image acquired by the image acquiring unit 11 and the detection area D22.

[0164] (Object detection unit 15) The object detection unit 15 obtains a detection result of an object (first object) corresponding to the converted model M21 based on the converted model M21 and a detection area image corresponding to the converted model M21. Furthermore, the object detection unit 15 obtains a detection result of an object (second object) corresponding to the converted model M22 based on the converted model M22 and a detection area image corresponding to the converted model M22.

[0165] (Result output section 16) The result output unit 16 outputs the object detection result corresponding to the converted model M21 obtained by the object detection unit 15 to the output device 4. Furthermore, the result output unit 16 outputs the object detection result corresponding to the converted model M22 obtained by the object detection unit 15 to the output device 4.

[0166] An example of the configuration of the object detection system according to the second embodiment of the present invention has been described above.

[0167] (2-2. Effects) According to the second embodiment of the present invention, even if multiple detection areas are set in one image, it is possible to omit input of unnecessary areas to the model, as in the first embodiment of the present invention, and by inputting only areas useful for object detection to the model, it is possible to detect objects with high accuracy while suppressing processing time. Furthermore, since the shape of the model applied to each detection area may differ, the processing time by the model can be further suppressed.

[0168] The second embodiment of the present invention has been described above.

[0169] 3. Third embodiment Next, a third embodiment of the present invention will be described. In the techniques described in Patent Documents 1 to 3, the processing time required for object detection cannot be reduced depending on the object to be detected, and therefore a problem may arise in that the real-time nature of object detection is impaired. For example, such a problem may arise when the computation resources available in the expected environment are less than the computation resources available, or when the object detection results are used to track objects moving at high speed (for example, vehicles traveling on a highway). In the third embodiment of the present invention, a technique for solving such a problem is mainly proposed.

[0170] (3-1. Configuration of Object Detection System) First, a configuration example of an object detection system according to a third embodiment of the present invention will be described. The third embodiment of the present invention will also be described with reference to a diagram (FIG. 1) showing an example of a functional configuration of the object detection system according to the first embodiment of the present invention. The object detection system according to the third embodiment of the present invention includes an object detection device 1, an imaging device 2, a storage device 3, and an output device 4.

[0171] However, in the object detection device 1 according to the third embodiment of the present invention, either a first mode or a second mode can be set as the operation mode of the object detection device 1. Typically, the first mode is a mode in which a vehicle traveling on a highway is detected as an example of an object. Therefore, hereinafter, the first mode is also referred to as a "highway imaging mode." On the other hand, typically, the second mode is a mode in which a vehicle traveling on a general road is detected as an example of an object. Therefore, hereinafter, the second mode is also referred to as a "general road imaging mode."

[0172] The model shape determination unit 133 sets the operation mode to either the expressway imaging mode or the general road imaging mode based on selection information input by the user to an operation unit (e.g., a button, etc.) not shown. More specifically, when the selection information indicates the expressway imaging mode, the model shape determination unit 133 sets the operation mode to the expressway imaging mode. On the other hand, when the selection information indicates the general road imaging mode, the model shape determination unit 133 sets the operation mode to the general road imaging mode.

[0173] When the operation mode is set to the expressway imaging mode, the model shape determination unit 133 sets the target input size smaller than when the operation mode is set to the general road imaging mode. As an example, a case is assumed in which a target processing time for the expressway imaging mode and a target processing time for the general road imaging mode are stored in the storage device 3. For example, since object detection on a highway requires a stronger real-time property, it may be assumed that the target processing time for the expressway imaging mode is shorter than the target processing time for the general road imaging mode.

[0174] In such a situation, when the operation mode is set to the expressway imaging mode, the target processing time acquisition unit 132 acquires the target processing time for the expressway imaging mode from the storage device 3. On the other hand, when the operation mode is set to the general road imaging mode, the target processing time acquisition unit 132 acquires the target processing time for the general road imaging mode from the storage device 3.

[0175] Then, similar to the first embodiment of the present invention, model shape determination unit 133 determines a target input size for the converted model based on the target processing time acquired by target processing time acquisition unit 132, the input size for the converted model, and the measured processing time for the converted model. Furthermore, similar to the first embodiment of the present invention, model shape determination unit 133 determines the shape of the converted model based on the target input size for the converted model, model structure information 33, and the size of the detection area.

[0176] It is also assumed that the target input size for the expressway imaging mode and the target input size for the general road imaging mode are stored in the storage device 3. For example, since object detection on a highway requires stronger real-time performance, it may be assumed that the target input size for the expressway imaging mode is smaller than the target input size for the general road imaging mode.

[0177] In such a situation, when the operation mode is set to the expressway imaging mode, the target processing time acquisition unit 132 may acquire a target input size for the expressway imaging mode from the storage device 3. On the other hand, when the operation mode is set to the general road imaging mode, the target processing time acquisition unit 132 may acquire a target input size for the general road imaging mode from the storage device 3. Here, an example of model shape conversion according to the third embodiment of the present invention will be described with reference to Fig. 12.

[0178] (Area setting section 12) Fig. 12 is a diagram for explaining an example of model shape transformation according to the third embodiment of the present invention. Referring to Fig. 12, an image G3 is shown. The image G3 shows a highway on which a vehicle is traveling. A set area R31 is shown in the image G3. Also, a detection area D31 set based on the set area R31 is shown.

[0179] In such a situation, the operation mode of the object detection device 1 is set to the highway imaging mode, and the converted model M31 is generated based on the target processing time for the highway imaging mode. The target processing time for the highway imaging mode is shorter than the target processing time for the general road imaging mode.

[0180] Therefore, the model shape determination unit 133 determines the shape of the changed model M31 in which the number of times of processing by the processing layers included in the pre-conversion model is reduced. Then, the model shape conversion unit 134 converts the shape of the pre-conversion model in accordance with the shape of the post-conversion model M31 determined by the model shape determination unit 133, thereby generating the post-conversion model M31.

[0181] (3-2. Effects) According to the third embodiment of the present invention, the processing time required for object detection can be shortened depending on the object to be detected. This makes it possible to continuously detect objects in order to track fast-moving objects (for example, vehicles traveling on a highway), and is expected to improve the real-time nature of object detection.

[0182] The third embodiment of the present invention has been described above.

[0183] 4. Fourth Embodiment Next, a fourth embodiment of the present invention will be described. When a load is applied to a computational resource (such as a processor) by processes other than object detection during operation, a situation is assumed in which the computational resource available for object detection is reduced. In the techniques described in Patent Documents 1 to 3, such a situation may cause a problem that the processing time of the converted model exceeds the target processing time. In the third embodiment of the present invention, a technique for solving such a problem is mainly proposed.

[0184] (4-1. Configuration of Object Detection System) First, a configuration example of an object detection system according to a fourth embodiment of the present invention will be described. Fig. 13 is a diagram showing a functional configuration example of an object detection system according to the fourth embodiment of the present invention. The object detection system according to the fourth embodiment of the present invention includes an object detection device 5, an imaging device 2, a storage device 3, and an output device 4.

[0185] Here, the object detection device 5 according to the fourth embodiment of the present invention is mainly different from the object detection device 1 according to the first embodiment of the present invention in that it includes a model information update unit 17. Therefore, the model information update unit 17 will be mainly described.

[0186] (Operation example of object detection device 5) Fig. 14 is a flowchart showing an example of the overall operation of the object detection device 5 according to the fourth embodiment of the present invention. With reference to Fig. 14, the overall operation of the object detection device 5 according to the fourth embodiment of the present invention is different from the overall operation of the object detection device 1 according to the first embodiment of the present invention (Fig. 2) mainly in object detection (S25) and model information update (S28). Therefore, hereinafter, object detection (S25) and model information update (S28) will be mainly described.

[0187] (Object detection unit 15) Fig. 15 is a flowchart showing an example of the operation of object detection according to the third embodiment of the present invention. Referring to Fig. 15, a detailed example of the operation of object detection (S25) is shown. In object detection according to the third embodiment of the present invention, unlike object detection according to the first embodiment of the present invention, the processing time required from when a detection area image is input to a converted model until an object detection result is output from the converted model is measured (S156), and the measured processing time is acquired as the measured processing time of the converted model.

[0188] (Model Information Update Part 17) Fig. 16 is a flowchart showing an example of the operation of model information updating. Referring to Fig. 16, a detailed example of the operation of model information updating (S28) is shown. The model information updating unit 17 updates (S281) the model structure information 33 stored in the storage device 3 with the structure information of the converted model generated by the model shape conversion (S12). Furthermore, the model information updating unit 17 updates (S282) the measurement processing time 35 stored in the storage device 3 with the measurement processing time acquired by (S156).

[0189] As a result, in the model shape transformation (S12) executed next, the model information acquisition unit 131 acquires model structure information 33 (structure information of the second model) from the storage device 3 (S121), acquires weight information 34 from the storage device 3 (S122), and acquires measured processing time 35 (measured processing time of the second model) from the storage device 3 (S123). In addition, the target processing time acquisition unit 132 acquires target processing time 36 from the storage device 3 (S124).

[0190] Then, similarly to the first embodiment of the present invention, the model shape determination unit 133 determines a target input size for a new model (third model) based on the acquired target processing time 36, the input size to the converted model at the time of object detection (input size to the second model), and the acquired measured processing time 35.

[0191] Furthermore, the model shape determination unit 133 determines the shape of the new model based on the acquired model structure information 33 (structural information of the second model), the size of the detection area, and the target input size to the new model (third model). The model shape conversion unit 134 converts the shape of the converted model (second model) according to the shape of the new model determined by the model shape determination unit 133, to generate a new model.

[0192] (4-2. Effects) According to the fourth embodiment of the present invention, when processing a plurality of images obtained by successively capturing images using the imaging device 2, shape conversion of the model may be performed for each image to be processed. For example, cases may be assumed in which the amount of computation available using computational resources (e.g., a processor) is limited by the execution of a process other than object detection, or the actual processing time of the model does not reach the target processing time. In such cases, by adjusting the shape of a new model taking into account the processing time and model shape during processing of the previous frame for each image, it is possible to bring the processing time of the new model closer to the target processing time.

[0193] (5. Hardware configuration example) Next, an example of the hardware configuration of the object detection device 1 according to the first embodiment of the present invention will be described. Note that the hardware configurations of the object detection devices according to the other embodiments can be realized in the same manner.

[0194] Hereinafter, an example of the hardware configuration of the information processing device 900 will be described as an example of the hardware configuration of the object detection device 1 according to the first embodiment of the present invention. Note that the example of the hardware configuration of the information processing device 900 described below is merely one example of the hardware configuration of the object detection device 1. Therefore, in the hardware configuration of the object detection device 1, unnecessary components may be deleted from the hardware configuration of the information processing device 900 described below, and new components may be added.

[0195] 17 is a diagram showing a hardware configuration of an information processing device 900 as an example of the object detection device 1 according to an embodiment of the present invention. The information processing device 900 includes a CPU (Central Processing Unit) 901, a ROM (Read Only Memory) 902, a RAM (Random Access Memory) 903, a host bus 904, a bridge 905, an external bus 906, an interface 907, an input device 908, an output device 909, a storage device 910, and a communication device 911.

[0196] The CPU 901 functions as an arithmetic processing device and control device, and controls the overall operation of the information processing device 900 in accordance with various programs. The CPU 901 may also be a microprocessor. The ROM 902 stores programs and arithmetic parameters used by the CPU 901. The RAM 903 temporarily stores programs used in the execution of the CPU 901 and parameters that change appropriately during the execution. These are connected to each other by a host bus 904 consisting of a CPU bus etc.

[0197] The host bus 904 is connected to an external bus 906, such as a PCI (Peripheral Component Interconnect / Interface) bus, via a bridge 905. It is not necessary to configure the host bus 904, bridge 905, and external bus 906 separately, and these functions may be implemented in a single bus.

[0198] The input device 908 is composed of input means such as a mouse, keyboard, touch panel, button, microphone, switch, and lever for the user to input information, and an input control circuit that generates an input signal based on the user's input and outputs it to the CPU 901. A user who operates the information processing device 900 can input various data to the information processing device 900 and instruct the information processing device 900 to perform processing operations by operating this input device 908.

[0199] The output device 909 includes, for example, a display device such as a CRT (Cathode Ray Tube) display device, a Liquid Crystal Display (LCD) device, an OLED (Organic Light Emitting Diode) device, or a lamp, and an audio output device such as a speaker.

[0200] The storage device 910 is a device for storing data. The storage device 910 may include a storage medium, a recording device for recording data in the storage medium, a reading device for reading data from the storage medium, and a deleting device for deleting data recorded in the storage medium. The storage device 910 is configured, for example, with an HDD (Hard Disk Drive). This storage device 910 drives a hard disk and stores programs executed by the CPU 901 and various data.

[0201] The communication unit 911 is, for example, a communication interface configured with a communication device for connecting to a network, etc. Also, the communication unit 911 may be compatible with either wireless communication or wired communication.

[0202] An example of the hardware configuration of the object detection device 1 according to the first embodiment of the present invention has been described above.

[0203] (6. Summary) Although the preferred embodiment of the present invention has been described in detail above with reference to the accompanying drawings, the present invention is not limited to such an example. It is clear that a person having ordinary knowledge in the technical field to which the present invention pertains can conceive of various modified or altered examples within the scope of the technical ideas described in the claims, and it is understood that these also naturally belong to the technical scope of the present invention.

[0204] For example, in the above, the case where the object detected based on the image is a vehicle is mainly assumed. However, the object detected based on the image is not limited to a vehicle. For example, the object detected based on the image may be an object other than a vehicle (for example, a ship, an aircraft, etc.), or may be a person, a robot, etc. [Explanation of symbols]

[0205] 1. Object detection device 11 Image acquisition section 12 Area setting section 121 Setting area acquisition unit 122 Detection area setting section 13 Model Generation Unit 131 Model Information Acquisition Unit 132 Target processing time acquisition unit 133 Model Shape Determination Unit 134 Model shape conversion unit 14 Image Generation Unit 141 Cropping processing unit 15 Object detection unit 151 Resize processing section 152 Reasoning part 16 Result output section 17 Model Information Update Section 2. Imaging device 3 Storage device 4 Output Device

Claims

1. an area setting unit that sets a detection area in which an object is detected; a model generating unit that converts a shape of the first model to generate the second model based on structural information of the first model, the size of the detection area, and a target input size to the second model; an image generating unit that generates a detection area image by performing cropping based on an image captured by an imaging device and the detection area; an object detection unit that obtains a detection result of the object based on the second model and the detection area image; An object detection device comprising:

2. the object detection unit obtains data output from the second model as the detection result based on inputting the detection area image to the second model; The object detection device according to claim 1 .

3. The model generation unit determining the target input size for the second model based on a target processing time for the second model, an input size for the first model, and a measured processing time for the first model during learning; The object detection device according to claim 1 .

4. The model generation unit calculating a ratio of the target input size to the second model with respect to the size of the detection area, calculating input length and width to the second model based on the ratio and the length and width of the detection area, and converting a shape of the first model based on the input length and width to the second model and structural information of the first model; The object detection device according to claim 1 .

5. The model generation unit calculating a positive square root of the ratio, and calculating an input length and width to the second model based on multiplying the positive square root of the ratio by the length and width of the detection area; The object detection device according to claim 4.

6. The first model includes a first processing layer. the second model includes a second processing layer after the first processing layer is transformed; the model generation unit converts the shape of the first model by changing the number of times of processing by the first processing layer based on the length and width of the input to the second model so that the entire detection area is processed by the second processing layer; The object detection device according to claim 1 .

7. the object detection unit resizes the detection area image so that the length and width of the detection area image coincide with the length and width of an input to the second model, and inputs the detection area image after the resizing to the second model. The object detection device according to claim 1 .

8. the detection area includes a first detection area and a second detection area; the model generation unit generates a model corresponding to the first detection area and a model corresponding to the second detection area based on structural information of the first model, a size of the first detection area, a size of the second detection area, and the target input size to the second model; the image generation unit generates a first detection area image and a second detection area image based on the image, the first detection area, and the second detection area; the object detection unit detects a first object present in the first detection area based on a model corresponding to the first detection area and the first detection area image, and detects a second object present in the second detection area based on a model corresponding to the second detection area and the second detection area image; The object detection device according to claim 1 .

9. The model generation unit When the operation mode of the object detection device is set to a first mode, the target input size is made smaller than when the operation mode is set to a second mode. The object detection device according to claim 1 .

10. the object detection unit sets the operation mode to either the first mode or the second mode based on selection information input by a user; The object detection device according to claim 9 .

11. The object detection unit is acquiring a time required from when the detection area image is input to the second model until when the detection result is output from the second model as a measured processing time of the second model; The model generation unit determining a target input size for a third model based on a target processing time for the second model, an input size for the second model at the time of detecting the object, and the measured processing time for the second model; generating the third model by converting a shape of the second model based on structural information of the second model, a size of the detection area, and the target input size to the third model; The object detection device according to claim 1 .

12. Setting a detection area in which an object is detected; generating the second model by converting a shape of the first model based on structural information of the first model, a size of the detection area, and a target input size to a second model; generating a detection area image by performing cropping based on an image captured by an imaging device and the detection area; obtaining a detection result of the object based on the second model and the detection area image; 16. A computer-implemented method for object detection, comprising:

13. Computer, an area setting unit that sets a detection area in which an object is detected; a model generating unit that converts a shape of the first model to generate the second model based on structural information of the first model, the size of the detection area, and a target input size to the second model; an image generating unit that generates a detection area image by performing cropping based on an image captured by an imaging device and the detection area; an object detection unit that obtains a detection result of the object based on the second model and the detection area image; A program that causes the device to function as an object detection device.

Citation Information

Patent Citations

  • Object detection device and object detection method

    JP2019219804A

  • Learning method and testing method for object detector, learning device and testing device using the same

    JP2020119522A

  • Object detection using multiple neural networks trained for different image fields

    US20220114807A1

  • Neural Architecture Scaling For Hardware Accelerators

    US20220230048A1

  • Systems and methods for detecting small objects in an image using a neural network

    US20220292817A1

Cited By

  • A method for detecting at least one object on an input image using an expanded cropped image, and a computing device utilizing the same.

    JP7938997B1