Image recognition apparatus and image recognition method
Patent Information
- Application Number
- JP2022100235
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2022-06-22
- Publication Date
- 2024-08-28
- Estimated Expiration
- 2042-06-22
AI Technical Summary
Existing image recognition techniques face issues where detection targets in the vicinity are mistakenly detected using distant recognition dictionaries, leading to inaccurate detection.
An image recognition device employs two detection models: one for nearby objects using large images and another for distant objects using smaller images, with a determination unit validating or invalidating detections based on overlap to improve accuracy.
This approach enhances detection accuracy by preventing false positives and ensuring accurate identification of both nearby and distant objects.
Abstract
Description
[Technical field]
[0001] The present invention relates to an image recognition device and an image recognition method. [Background technology]
[0002] There is a known technology that detects objects such as pedestrians from images captured around a vehicle using image recognition technology such as pattern matching. For example, a technology has been proposed that improves detection accuracy by preparing multiple recognition dictionaries, including those for distant objects and those for nearby objects, and performing pattern matching using the multiple recognition dictionaries (see, for example, Patent Document 1). [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2022-17871 A Summary of the Invention [Problem to be solved by the invention]
[0004] In the above-mentioned prior art, a part of a detection object present in the vicinity may be detected as the detection object by the distant recognition dictionary, and the detection object may not be detected properly.
[0005] The present invention has been made in consideration of the above circumstances, and has an object to provide a technique for improving the detection accuracy of a detection target in image recognition processing based on a recognition dictionary. [Means for solving the problem]
[0006] An image recognition device of one embodiment of the present invention includes an image acquisition unit that acquires a captured image, a first detection unit that detects a first region in the captured image containing a detection target using a first detection model trained by machine learning using an input image having an image size equal to or larger than a predetermined value, a second detection unit that detects a second region in the captured image containing a detection target using a second detection model trained by machine learning using an input image having an image size less than a predetermined value, and a determination unit that invalidates detection of either the first region or the second region if the first region and the second region overlap in the captured image.
[0007] Another aspect of the present invention is an image recognition method, which includes the steps of acquiring a captured image, detecting a first region in the captured image that includes a detection target using a first detection model trained by machine learning using an input image having an image size equal to or larger than a predetermined value, detecting a second region in the captured image that includes a detection target using a second detection model trained by machine learning using an input image having an image size smaller than a predetermined value, and invalidating detection of either the first region or the second region when the first region and the second region overlap in the captured image. Effect of the Invention
[0008] According to the present invention, it is possible to improve the detection accuracy of a detection target in image recognition processing. [Brief description of the drawings]
[0009] [Figure 1] 1 is a block diagram illustrating a functional configuration of an image recognition device according to a first embodiment. [Diagram 2] 2(a) to (d) are diagrams showing examples of learning images. [Diagram 3] 11 is a diagram showing an example of a captured image in which a first region and a second region are detected without overlapping each other. FIG. [Figure 4] 10 is a diagram showing an example of a captured image in which a first region and a second region are detected to overlap each other. FIG. [Diagram 5] FIG. 13 is a diagram showing an example of a display image on which an additional image is superimposed. [Figure 6] FIG. 13 is a diagram showing an example of a display image on which an additional image is superimposed. [Figure 7] 4 is a flowchart showing the flow of an image recognition method according to the first embodiment. [Figure 8] FIG. 11 is a block diagram illustrating a functional configuration of an image recognition device according to a second embodiment. [Figure 9] 11 is a diagram showing an example of a captured image in which a first region, a second region, and a partial region are detected to overlap each other. FIG. [Figure 10] 10 is a flowchart showing the flow of an image recognition method according to a second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. Specific numerical values and the like shown in the embodiment are merely examples for facilitating understanding of the invention, and do not limit the present invention unless otherwise specified. In the drawings, elements that are not directly related to the present invention are omitted.
[0011] (First embodiment) FIG. 1 is a block diagram showing a schematic functional configuration of an image recognition device 10 according to a first embodiment. The image recognition device 10 includes an image acquisition unit 12, a first detection unit 14, a second detection unit 16, a determination unit 18, and a display control unit 20. The image recognition device 10 is mounted on a moving body such as a vehicle, and detects people such as pedestrians around the vehicle. The image recognition device 10 may be fixedly installed at a predetermined location and detect people and the like around the device. In this embodiment, a case where the image recognition device 10 is mounted on a vehicle is illustrated. In addition, in this embodiment, a case where the image recognition device 10 detects people such as pedestrians is illustrated. Note that the detection target detected by the image recognition device 10 can be applied to objects other than people.
[0012] Each functional block shown in this embodiment can be realized, for example, by cooperation of hardware and software. The hardware of the image recognition device 10 is realized by elements and mechanical devices such as a CPU and memory of a computer. The software of the image recognition device 10 is realized by a computer program or the like.
[0013] The image acquisition unit 12 acquires an image captured by the camera 22. The camera 22 is mounted on a vehicle and captures an image of the surroundings of the vehicle. For example, the camera 22 captures an image of the front of the vehicle. The camera 22 may capture an image of the rear of the vehicle or an image of the side of the vehicle. The image recognition device 10 may or may not include the camera 22.
[0014] The camera 22 is configured to capture infrared rays around the vehicle. The camera 22 is a so-called infrared thermography, and images the temperature distribution around the vehicle, making it possible to identify a heat source existing around the vehicle. The camera 22 may be configured to detect mid-infrared rays with a wavelength of about 2 μm to 5 μm, or may be configured to detect far-infrared rays with a wavelength of about 8 μm to 14 μm. The camera 22 may be configured to capture visible light. The camera 22 may be configured to capture color images of red, green, and blue, or may be configured to capture monochrome images of visible light. In this embodiment, the camera 22 will be described as a camera that captures thermal images using far-infrared rays. The captured images captured by the camera 22 are, for example, moving images at 30 frames per second.
[0015] The first detection unit 14 detects a first region including a detection target in a captured image acquired by the image acquisition unit 12. The first detection unit 14 detects the detection target using a first detection model that is machine-learned using an input image having an image size equal to or larger than a predetermined value. The first detection model is a nearby recognition dictionary for detecting a detection target that exists in the vicinity. When the detection target is a pedestrian, an example of the size of the input image used for machine learning of the first detection model is 160 pixels vertically and 80 pixels horizontally.
[0016] The second detection unit 16 detects a second region including the detection target in the captured image acquired by the image acquisition unit 12. The second detection unit 16 detects the detection target using a second detection model that has been machine-learned using an image having an image size less than a predetermined value as an input. The second detection model is a long-distance recognition dictionary for detecting detection targets that exist in the distance. The size of the input image used for the machine learning of the second detection model is smaller than the size of the input image used for the machine learning of the first detection model. When the detection target is a pedestrian, an example of the size of the input image used for the machine learning of the second detection model is 80 pixels vertically and 40 pixels horizontally.
[0017] The model used for machine learning may include an input corresponding to the image size (number of pixels) of the input image, an output that outputs a recognition score, and an intermediate layer that connects the input and the output. The intermediate layer may include a convolutional layer, a pooling layer, a fully connected layer, etc. The intermediate layer may have a multi-layer structure, and may be configured to enable so-called deep learning. The model used for machine learning may be constructed using a convolutional neural network (CNN). Note that the model used for machine learning is not limited to the above, and any machine learning model may be used.
[0018] 2(a)-(d) are diagrams showing examples of learning images used to generate a pedestrian detection model. Figs. 2(a) and (b) show learning images 31-36 for generating a first detection model. Figs. 2(c) and (d) show learning images 41-46 for generating a second detection model. Figs. 2(a) and (c) are examples of correct answer data, and Figs. 2(b) and (d) are examples of incorrect answer data.
[0019] As shown in the figure, the learning images 31-36 for the first detection model have a relatively large image size and a relatively high resolution. An example of the image size of the learning images 31-36 for the first detection model is 160×80 pixels. On the other hand, the learning images 41-46 for the second detection model have a relatively small image size and a relatively low resolution. An example of the image size of the learning images 41-46 for the second detection model is 80×40 pixels.
[0020] The determination unit 18 determines the validity of the detection results by the first detection unit 14 and the second detection unit 16. When the first detection unit 14 or the second detection unit 16 detects a region including a detection target without overlapping the first region and the second region, the determination unit 18 determines the detection to be valid. When the first detection unit 14 detects the first region, but the second detection unit 16 does not detect the second region overlapping the first region, the determination unit 18 determines the detection of the first region to be valid. When the second detection unit 16 detects the second region, but the first detection unit 14 does not detect the first region overlapping the second region, the determination unit 18 determines the detection of the second region to be valid. When the first region and the second region do not overlap in the captured image, that is, when the first region and the second region are separated from each other, the determination unit 18 determines the detection of each of the first region and the second region to be valid.
[0021] When the first detection unit 14 and the second detection unit 16 detect overlapping regions including the detection target, the determination unit 18 determines the validity of the detection result according to the overlap of the detected regions in the captured image. When the first region and the second region overlap in the captured image, that is, when the detection targets of the first detection unit 14 and the second detection unit 16 overlap, the determination unit 18 validates the detection of one of the first region and the second region and invalidates the detection of the other. For example, when the first region and the second region overlap in the captured image, the determination unit 18 validates the detection of the first region and invalidates the detection of the second region. The determination unit 18 invalidates the detection of the second region that overlaps with the first region in the captured image.
[0022] The determination unit 18 may manage list data of the detection areas detected by the first detection unit 14 or the second detection unit 16. The determination unit 18 adds data of the first area detected by the first detection unit 14 to the list. The determination unit 18 adds data of the second area detected by the second detection unit 16 to the list. If the first area and the second area overlap, the determination unit 18 deletes data of the second area that overlaps with the first area from the list. In this case, the detection area (first area or second area) remaining in the list becomes valid, and the detection area (first area or second area) deleted from the list becomes invalid.
[0023] 3 is a diagram showing an example of a captured image 50a in which a first region 52a and a second region 54a are detected without overlapping. The first region 52a detected by the first detection unit 14 includes a pedestrian who appears large in the captured image 50a because he is located close to the camera 22. The second region 54a detected by the second detection unit 16 includes a pedestrian who appears small in the captured image 50a because he is located far from the camera 22.
[0024] In the case of Fig. 3, the first region 52a and the second region 54a do not overlap, so the determination unit 18 validates the detection of both the first region 52a and the second region 54a. This allows pedestrians included in both the first region 52a and the second region 54a to be properly detected. In other words, both pedestrians located nearby and pedestrians located far away can be properly detected.
[0025] FIG. 4 is a diagram showing an example of a captured image 50b in which a first region 52b and a second region 54b are detected to overlap. The first region 52b detected by the first detection unit 14 includes a pedestrian who appears large in the captured image 50b because the pedestrian is located close to the camera 22. The second region 54b detected by the second detection unit 16 includes a right foot of the pedestrian who is located close to the camera 22. In the case of FIG. 4, the second detection unit 16 erroneously detects a part (part) of a pedestrian located nearby as the second region 54b. Such erroneous detection can occur because the image size of a partial range of a pedestrian located nearby is close to the detection size of the second detection model for a long distance, and the brightness distribution (e.g., heat distribution) of the partial range is similar to the second detection model.
[0026] 4, because the first region 52b and the second region 54b overlap, the determination unit 18 validates the detection of the first region 52b while invalidating the detection of the second region 54b. This invalidates the erroneous detection by the second detection unit 16, and allows the pedestrian included in the first region 52b to be properly detected.
[0027] Returning to FIG. 1, the display control unit 20 generates a display image based on the determination result of the determination unit 18, and displays the generated display image on the display device 24. The display control unit 20 generates a display image in which an additional image such as a frame image for indicating an area determined to be valid by the determination unit 18 is superimposed on a captured image. The display control unit 20 generates a display image in which an additional image is superimposed such that the display mode of an area not determined to be invalid by the determination unit 18 is different from the display mode of an area determined to be invalid by the determination unit 18. For example, the display control unit 20 prevents the additional image from being superimposed on an area determined to be invalid by the determination unit 18. The display control unit 20 may superimpose a first additional image such as a red frame on an area not determined to be invalid by the determination unit 18, that is, a valid area, and superimpose a second additional image having a different display mode from the first additional image such as a green frame on an area determined to be invalid by the determination unit 18.
[0028] Fig. 5 is a diagram showing an example of a display image 60a on which an additional image 62a is superimposed. The display image 60a in Fig. 5 is displayed on the display device 24 when the captured image 50a in Fig. 3 is acquired. The additional image 62a is superimposed at positions corresponding to the first region 52a and the second region 54a (see Fig. 3) that are not invalidated by the determination unit 18. By superimposing the additional image 62a, the detection object can be displayed in an emphasized manner.
[0029] FIG. 6 is a diagram showing an example of a display image 60b on which an additional image 62b is superimposed. The display image 60b in FIG. 6 is displayed on the display device 24 when the captured image 50b in FIG. 4 is acquired. The additional image 62b is superimposed at a position corresponding to the first region 52b (see FIG. 4) that is not invalidated by the determination unit 18, but is not superimposed at a position corresponding to the second region 54b (see FIG. 4) that is invalidated by the determination unit 18. By superimposing the additional image 62b, the detection target can be displayed in an emphasized manner. By not superimposing the additional image on the second region 54b, which is a false detection, it is possible to prevent erroneous information from being conveyed to the user.
[0030] Fig. 7 is a flowchart showing the flow of the image recognition method according to the first embodiment. The flowchart shown in Fig. 7 is repeatedly executed while the image recognition device 10 is operating or while an image is being captured by the camera 22. The image acquisition unit 12 acquires a captured image (step S10). The first detection unit 14 detects a first region including a detection target in the captured image using a first detection model for close range (step S12). The second detection unit 16 detects a second region including a detection target in the captured image using a second detection model for distant range (step S14).
[0031] When the first region and the second region overlap in the captured image (Yes in step S16), the determination unit 18 invalidates the detection of the second region overlapping the first region (step S18). Specifically, when the first region and the second region are detected in the captured image and the range of the detected first region overlaps with the range of the detected second region, the determination unit 18 invalidates the detection of the second region overlapping the first region. For example, when 90% or more of the area of the detected second region overlaps with the detected first region, the determination unit 18 may determine that the second region overlaps with the first region.
[0032] If the first region and the second region do not overlap in the captured image (No in step S16), the determination unit 18 skips the process of step S18. If the first region and the second region overlap, the determination unit 18 validates the detection of the first region and invalidates the detection of the second region. The determination unit 18 validates the detection of regions other than the invalid second region. If the first region and the second region do not overlap, the determination unit 18 validates the detection of the detected first region and second region. The display control unit 20 generates a display image in which the additional image is superimposed on the valid region, and causes the display device 24 to display the display image in which the additional image is superimposed, during the period in which the valid region is detected.
[0033] According to this embodiment, when the first region detected by the first detection unit 14 and the second region detected by the second detection unit 16 overlap, one of the regions is invalidated, thereby preventing erroneous detection. The second detection model for long distances uses a learning image with a lower resolution than the first detection model for close distances, so the possibility of erroneous detection is relatively high. According to this embodiment, the first region detected by the first detection model for close distances is given priority, so that the second region that overlaps with the first region and is erroneously detected can be invalidated. This can improve the detection accuracy of the detection target object.
[0034] Second embodiment 8 is a block diagram showing a schematic functional configuration of an image recognition device 70 according to the second embodiment. The second embodiment differs from the first embodiment in that a partial detection unit 72 is further provided, and a determination unit 74 determines the validity of detection using a detection result of the partial detection unit 72. The second embodiment will be described below, focusing on the differences from the first embodiment, and descriptions of commonalities will be omitted as appropriate.
[0035] The image recognition device 70 includes an image acquisition unit 12, a first detection unit 14, a second detection unit 16, a partial detection unit 72, a determination unit 74, and a display control unit 20. The image acquisition unit 12, the first detection unit 14, the second detection unit 16, and the display control unit 20 are configured in the same manner as in the first embodiment.
[0036] The partial detection unit 72 detects a partial region including a part of the detection object in the captured image acquired by the image acquisition unit 12. The partial detection unit 72 detects a part of the detection object using a partial detection model that has been machine-learned using an image of a partial range of the detection object as an input. As the learning image for the partial detection model, for example, an image obtained by partially cutting out the detection object included in the learning image for the first detection model for the vicinity can be used. Therefore, the image size of the learning image for the partial detection model is smaller than the size of the input image used for the machine learning of the first detection model. The image size of the learning image for the partial detection model may be approximately the same as the size of the input image used for the machine learning of the second detection model.
[0037] The part detection unit 72 may have a plurality of part detection models for detecting each of a plurality of parts of the detection object. When the detection object is a pedestrian, for example, the part detection unit 72 may have part detection models for detecting each of the head, upper body, lower body, arms, and legs.
[0038] Partial detection unit 72 detects a part of the detection target object contained in the first region detected by first detection unit 14. When a part of the detection target object is detected in the first region, it is highly likely that the entire detection target object is contained in the first region, and therefore detection by first detection unit 14 is considered appropriate. On the other hand, when a part of the detection target object is not detected in the first region, it is highly likely that the entire detection target object is not contained in the first region, and therefore detection by first detection unit 14 is inappropriate, and it is considered that first detection unit 14 has made an erroneous detection.
[0039] When the first region or the second region is detected without overlapping, the determination unit 74 determines the detection to be valid. When both the first region and the second region are detected and the first region and the second region overlap in the captured image, the determination unit 74 uses the detection result of the portion detection unit 72 to determine the validity of the detection of the first region and the second region.
[0040] When the first region and the second region overlap in the captured image and the partial region overlaps the first region, the determination unit 74 validates the detection of the first region and invalidates the detection of the second region. In this case, it is highly likely that a part of the detection object included in the first region is detected as the second region, and it is highly likely that the second detection unit 16 has made an erroneous detection. When the first region and the second region overlap in the captured image and the first region and the partial region do not overlap, the determination unit 74 invalidates the detection of the first region and validates the detection of the second region. In this case, it is highly likely that the entire detection object is included in the first region, and it is highly likely that the first detection unit 14 has made an erroneous detection.
[0041] 9 is a diagram showing an example of a captured image 50b in which the first region 52b, the second region 54b, and the partial regions 56a, 56b, and 56c are detected in an overlapping manner. The captured image 50b in FIG. 9 is the same as that in FIG. 4, but differs in that the first partial region 56a, the second partial region 56b, and the third partial region 56c are detected by the partial detection unit 72. The first partial region 56a is a detection region for the head of a pedestrian included in the first region 52b. The second partial region 56b is a detection region for the upper body of a pedestrian included in the first region 52b. The third partial region 56c is a detection region for the lower body of a pedestrian included in the first region 52b.
[0042] In the case of Fig. 9, since the first region 52b and the second region 54b overlap, and the first region 52b and the partial regions 56a to 56c overlap, the determination unit 74 validates the detection of the first region 52b and invalidates the detection of the second region 54b. This invalidates the erroneous detection by the second detection unit 16, and allows the pedestrian included in the first region 52b to be properly detected. When the display control unit 20 acquires the captured image 50b of Fig. 9, it causes the display device 24 to display a display image 60b similar to that of Fig. 6.
[0043] FIG. 9 shows a state in which the first region 52b and the partial regions 56a to 56c overlap, but the detection of the first region 52b may be valid and the detection of the second region 54b may be invalidated by the first region 52b being overlapped by any one of the first partial region 56a, the second partial region 56b, and the third partial region 56c.
[0044] In FIG. 9, for example, when the first partial region 56a in which the head is detected overlaps the upper part of the first region 52b, the detection of the first region 52b may be enabled and the detection of the second region 54b may be disabled. In addition, in FIG. 9, when the second partial region 56b in which the upper body is detected overlaps the upper part of the first region 52b, the detection of the first region 52b may be enabled and the detection of the second region 54b may be disabled. Furthermore, in FIG. 9, when the third partial region 56c in which the lower body is detected overlaps the lower part of the first region 52b, the detection of the first region 52b may be enabled and the detection of the second region 54b may be disabled. Even in the case of detection using another partial detection model, the detection of the first region 52b may be enabled and the detection of the second region 54b may be disabled if the partial regions overlap at an appropriate position in the range in which a pedestrian is detected.
[0045] Fig. 10 is a flowchart showing the flow of the image recognition method according to the second embodiment. The processes from step S30 to step S36, step S42, and step S46 in the flowchart shown in Fig. 10 are the same as the processes from step S10 to step S16, step S18, and step S20 in the flowchart shown in Fig. 7, and therefore will not be described.
[0046] If the first region and the second region overlap in the captured image (Yes in step S36), the partial detection unit 72 uses the partial detection model to detect a partial region in the first region that includes a part of the detection target (step S38). If there is a partial region that overlaps the first region (Yes in step S40), the determination unit 74 invalidates the detection of the second region that overlaps the first region (step S42). If there is no partial region that overlaps the first region (No in step S40), the determination unit 74 invalidates the detection of the first region that overlaps the second region (step S44). If the first region and the second region do not overlap in the captured image (No in step S36), the process of steps S38 to S44 is skipped.
[0047] According to this embodiment, when the first region and the second region overlap, the validity of the detection of the first region can be more appropriately determined by detecting the presence or absence of a part of the detection target in the first region. When a part of the detection target is detected in the first region, the detection of the first region is enabled and the detection of the second region is disabled, thereby disabling the second region that overlaps with the first region and is erroneously detected. On the other hand, when a part of the detection target is not detected in the first region, the detection of the second region is enabled and the detection of the first region is disabled, thereby disabling the first region that overlaps with the second region and is erroneously detected. This can improve the detection accuracy of the detection target.
[0048] In the second embodiment, when the first region and the second region overlap, the determination unit 74 may validate the detection of the first region when a plurality of partial regions are detected in the first region. For example, the determination unit 74 may validate the detection of the first region when two or more partial regions of the head, upper body, lower body, arms, and legs are detected.
[0049] The present invention has been described above with reference to the above-mentioned embodiment, but the present invention is not limited to the above-mentioned embodiment, and appropriate combinations or substitutions of the respective configurations shown in the embodiment are also included in the present invention. [Explanation of symbols]
[0050] 10, 70...image recognition device, 12...image acquisition unit, 14...first detection unit, 16...second detection unit, 18, 74...determination unit, 20...display control unit, 22...camera, 24...display device, 72...partial detection unit.
Claims
1. an image acquisition unit that acquires a captured image; a first detection unit that detects a first region including a detection target object in the captured image by using a first detection model that has been machine-learned using an input image having an image size equal to or larger than a predetermined value; a second detection unit that detects a second region including the detection object in the captured image by using a second detection model that has been machine-learned using an image having an image size less than the predetermined value as an input; and An image recognition device comprising: a determination unit that, when the first area and the second area overlap in the captured image, validates detection of either the first area or the second area and invalidates detection of the other area.
2. The first detection model is a recognition dictionary for a nearby area, and the second detection model is a recognition dictionary for a distant area, The size of the image used for the machine learning of the second detection model is smaller than the size of the image used for the machine learning of the first detection model. The image recognition device according to claim 1 .
3. The image recognition device according to claim 1 , wherein, when the first region and the second region overlap in the captured image, the determination unit validates detection of the first region and invalidates detection of the second region.
4. A part detection unit that detects a partial region including a part of the detection object by using a machine learning part detection model, The determination unit is a) when the first region and the second region overlap in the captured image and the first region and the partial region overlap, detection of the first region is enabled and detection of the second region is disabled; b) when the first region and the second region overlap in the captured image and the first region and the partial region do not overlap, detection of the second region is enabled and detection of the first region is disabled. The image recognition device according to claim 1 .
5. 5. The image recognition device according to claim 1, further comprising a display control unit that causes a display device to display an image for display in which an additional image is superimposed on the captured image so that the display mode of the first area or the second area that has not been invalidated by the determination unit is different from the display mode of the first area or the second area that has been invalidated by the determination unit.
6. acquiring a captured image; detecting a first region including a detection target object in the captured image by using a first detection model that has been machine-learned using an input image having an image size equal to or larger than a predetermined value; detecting a second region including the detection object in the captured image by using a second detection model that has been machine-learned using an image having an image size less than the predetermined value as an input; When the first area and the second area overlap in the captured image, detection of either the first area or the second area is validated and detection of the other area is invalidated.
