Image recognition device, image recognition method, and program
A dual detection system using separate models for nearby and distant objects in image recognition enhances accuracy by invalidating overlapping regions, addressing the challenge of incorrect detections in existing techniques.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- JVC KENWOOD CORP
- Filing Date
- 2022-06-22
- Publication Date
- 2026-06-02
AI Technical Summary
Existing image recognition techniques face challenges in accurately distinguishing between nearby and distant objects, leading to incorrect detections due to overlapping detection regions.
Implementing a dual detection system using separate models for nearby and distant objects, with overlapping regions being invalidated to enhance detection accuracy.
Improves the detection accuracy of objects by preventing false positives through the validation of non-overlapping detection regions, ensuring precise identification of both nearby and distant targets.
Smart Images

Figure 0007868427000001 
Figure 0007868427000002 
Figure 0007868427000003
Abstract
Description
Technical Field
[0001] The present invention relates to an image recognition device 、 and an image recognition method and program .
Background Art
[0002] There is known a technique for detecting an object such as a pedestrian from an image obtained by imaging the surroundings of a vehicle using an image recognition technique such as pattern matching. For example, a technique has been proposed in which a plurality of recognition dictionaries including a long-distance dictionary and a proximity dictionary are prepared, and pattern matching is performed using the plurality of recognition dictionaries to improve detection accuracy (see, for example, Patent Document 1).
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] In the above prior art, a part of a detection object existing in the vicinity may be detected as a detection object by a long-distance recognition dictionary, and the detection object may not be appropriately detected.
[0005] The present invention has been made in view of the above circumstances, and an object thereof is to provide a technique for improving the detection accuracy of a detection object in image recognition processing based on a recognition dictionary.
Means for Solving the Problems
[0006] An image recognition device according to one aspect of the present invention includes: an image acquisition unit that acquires an image; a first detection unit that detects a first region containing an object to be detected in the image using a first detection model that has been trained on an image with an image size greater than or equal to a predetermined value as input; a second detection unit that detects a second region containing an object to be detected in the image using a second detection model that has been trained on an image with an image size less than a predetermined value as input; and a determination unit that invalidates the detection of either the first region or the second region if the first region and the second region overlap in the image.
[0007] Another aspect of the present invention is an image recognition method. This method comprises the steps of: acquiring an image; detecting a first region containing an object to be detected in the image using a first detection model trained on an image with an image size greater than or equal to a predetermined value; detecting a second region containing an object to be detected in the image using a second detection model trained on an image with an image size less than or equal to a predetermined value; and, if the first region and the second region overlap in the image, disabling the detection of either the first region or the second region. [Effects of the Invention]
[0008] According to the present invention, the detection accuracy of objects to be detected in image recognition processing can be improved. [Brief explanation of the drawing]
[0009] [Figure 1] This is a schematic block diagram showing the functional configuration of the image recognition device according to the first embodiment. [Figure 2] Figures 2(a) to 2(d) show examples of training images. [Figure 3] This figure shows an example of an image captured in which the first and second regions do not overlap. [Figure 4] This figure shows an example of an image where the first and second regions overlap during detection. [Figure 5] This figure shows an example of a display image with an additional image superimposed. [Figure 6] This figure shows an example of a display image with an additional image superimposed. [Figure 7] This is a flowchart showing the flow of the image recognition method according to the first embodiment. [Figure 8] This is a schematic block diagram showing the functional configuration of the image recognition device according to the second embodiment. [Figure 9] This figure shows an example of an image where the first region, the second region, and a subregion overlap and are detected. [Figure 10] This is a flowchart showing the flow of the image recognition method according to the second embodiment. [Modes for carrying out the invention]
[0010] Embodiments of the present invention will be described below with reference to the drawings. The specific numerical values and other details shown in these embodiments are merely examples to facilitate understanding of the invention and do not limit the present invention unless otherwise specified. Elements not directly related to the present invention are omitted from the drawings.
[0011] (First Embodiment) Figure 1 is a schematic block diagram showing the functional configuration of the image recognition device 10 according to the first embodiment. The image recognition device 10 comprises 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 object such as a vehicle and detects people such as pedestrians around the vehicle. The image recognition device 10 may also be fixedly installed in a predetermined location and detect people, etc., around the device. In this embodiment, the case in which the image recognition device 10 is mounted on a vehicle is illustrated. Furthermore, in this embodiment, the case in which the image recognition device 10 detects people such as pedestrians is illustrated. Note that the objects detected by the image recognition device 10 can be other than people.
[0012] Each functional block shown in this embodiment can be realized, for example, by the cooperation of hardware and software. The hardware of the image recognition device 10 is realized by elements and mechanical devices such as a computer's CPU and memory. The software of the image recognition device 10 is realized by a computer program or the like.
[0013] The image acquisition unit 12 acquires the captured image captured by the camera 22. The camera 22 is mounted on the vehicle and captures an image of the surrounding area of the vehicle. The camera 22, for example, 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 include the camera 22 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 thermograph, which images the temperature distribution around the vehicle and enables identification of heat sources existing around the vehicle. The camera 22 may be configured to detect mid-infrared rays having a wavelength of about 2 μm to 5 μm, or may be configured to detect far-infrared rays having a wavelength of about 8 μm to 14 μm. Note that 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 the present embodiment, the camera 22 will be described as a camera that captures a thermal image using far-infrared rays. The captured image captured by the camera 22 is, for example, a moving image such as 30 frames per second.
[0015] The first detection unit 14 detects a first area in the captured image acquired by the image acquisition unit 12 that contains the detection target. The first detection unit 14 detects the detection target using a first detection model that has been machine-learned with an image having an image size of a predetermined value or more as an input. The first detection model is a recognition dictionary for the vicinity for detecting a detection target existing in the vicinity. When the detection target is a pedestrian, an example of the size of the input image used for the machine learning of the first detection model is 160 pixels in height and 80 pixels in width.
[0016] The second detection unit 16 detects a second area in the captured image acquired by the image acquisition unit 12 that includes the detection target object. The second detection unit 16 detects the detection target object using a second detection model that has been machine-learned with an image having an image size less than a predetermined value as input. The second detection model is a recognition dictionary for distant objects for detecting detection target objects existing 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 object 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 in the vertical direction and 40 pixels in the horizontal direction.
[0017] The model used for machine learning can 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 can 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 to be executed. 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] FIGS. 2(a) to (d) are diagrams showing examples of learning images, and show examples of learning images used to generate a detection model for pedestrians. FIGS. 2(a) and (b) show learning images 31 to 36 for generating the first detection model. FIGS. 2(c) and (d) show learning images 41 to 46 for generating the second detection model. FIGS. 2(a) and (c) are examples of correct data, and FIGS. 2(b) and (d) are examples of incorrect data.
[0019] As shown in the illustration, the training images 31-36 for the first detection model are relatively large in size and relatively high in resolution. An example of the image size for training images 31-36 for the first detection model is 160 x 80 pixels. On the other hand, the training images 41-46 for the second detection model are relatively small in size and relatively low in resolution. An example of the image size for training images 41-46 for the second detection model is 80 x 40 pixels.
[0020] The determination unit 18 determines the validity of the detection results from the first detection unit 14 and the second detection unit 16. The determination unit 18 determines that the detection is valid if the first detection unit 14 or the second detection unit 16 detects an area containing the object to be detected without the first and second areas overlapping. The determination unit 18 determines that the detection of the first area is valid if the first detection unit 14 detects the first area, but the second area overlapping the first area is not detected by the second detection unit 16. The determination unit 18 determines that the detection of the second area is valid if the second area is detected by the second detection unit 16, but the first area overlapping the second area is not detected by the first detection unit 14. The determination unit 18 determines that the detection of the first and second areas is valid if the first and second areas do not overlap in the captured image, that is, if the first and second areas are far apart from each other.
[0021] The determination unit 18 determines the validity of the detection result according to the overlap of the detected regions in the captured image when both the first detection unit 14 and the second detection unit 16 detect overlapping regions containing the object to be detected. The determination unit 18 determines the validity of the detection result when the first region and the second region overlap in the captured image, that is, when the objects to be detected by the first detection unit 14 and the second detection unit 16 overlap, by validating the detection of one of the first region and invalidating the detection of the other. For example, if the first region and the second region overlap in the captured image, the determination unit 18 enables 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 detection regions detected by the first detection unit 14 or the second detection unit 16. The determination unit 18 adds the data of the first region detected by the first detection unit 14 to the list. The determination unit 18 adds the data of the second region detected by the second detection unit 16 to the list. If the first region and the second region overlap, the determination unit 18 removes the data of the second region that overlaps with the first region from the list. In this case, the detection regions remaining in the list (first region or second region) become valid, and the detection regions removed from the list (first region or second region) become invalid.
[0023] Figure 3 shows an example of an image 50a in which the first region 52a and the second region 54a are detected without overlapping. The first region 52a detected by the first detection unit 14 includes pedestrians that appear large in the image 50a because they are located close to the camera 22. The second region 54a detected by the second detection unit 16 includes pedestrians that appear small in the image 50a because they are located farther away from the camera 22.
[0024] In the case of Figure 3, the determination unit 18 enables detection of both the first region 52a and the second region 54a because the first region 52a and the second region 54a do not overlap. This allows for the appropriate detection of pedestrians included in each of the first region 52a and the second region 54a. In other words, it is possible to appropriately detect both nearby and distant pedestrians.
[0025] Figure 4 shows an example of an image 50b in which the first region 52b and the second region 54b are detected overlapping. The first region 52b detected by the first detection unit 14 includes a pedestrian that appears large in the image 50b because it is located close to the camera 22. The second region 54b detected by the second detection unit 16 includes the right foot portion of a pedestrian located close to the camera 22. In the case of Figure 4, the second detection unit 16 mistakenly detects a portion (part) of a nearby pedestrian as the second region 54b. Such a misdetection can occur because the image size of the partial range of the nearby pedestrian is close to the detection size of the second detection model for distant objects, and the brightness distribution (e.g., heat distribution) of that partial range approximates the second detection model.
[0026] In the case of Figure 4, the determination unit 18 recognizes that the first region 52b and the second region 54b overlap, and therefore enables detection of the first region 52b while disabling detection of the second region 54b. This disables false detections by the second detection unit 16 and allows for the proper detection of pedestrians included in the first region 52b.
[0027] Returning to Figure 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 by superimposing an additional image, such as a frame image, to indicate the area that the determination unit 18 has deemed valid, onto the captured image. The display control unit 20 generates a display image by superimposing the additional image such that the display manner of the area that the determination unit 18 has not deemed invalid is different from the display manner of the area that has deemed invalid. For example, the display control unit 20 does not superimpose an additional image on the area that the determination unit 18 has deemed invalid. The display control unit 20 may superimpose a first additional image, such as a red frame, on the area that the determination unit 18 has not deemed invalid, i.e., a valid area, and superimpose a second additional image, such as a green frame, which has a different display manner from the first additional image, on the area that the determination unit 18 has deemed invalid.
[0028] Figure 5 shows an example of a display image 60a with an additional image 62a superimposed. The display image 60a in Figure 5 is displayed on the display device 24 when the captured image 50a in Figure 3 is acquired. The additional image 62a is superimposed at positions corresponding to the first region 52a and the second region 54a (see Figure 3) that the determination unit 18 has not invalidated. By superimposing the additional image 62a, the detected object can be displayed with emphasis.
[0029] Figure 6 shows an example of a display image 60b with an additional image 62b superimposed. The display image 60b in Figure 6 is displayed on the display device 24 when the captured image 50b in Figure 4 is acquired. The additional image 62b is superimposed on the position corresponding to the first region 52b (see Figure 4) that the determination unit 18 has not invalidated, but it is not superimposed on the position corresponding to the second region 54b (see Figure 4) that the determination unit 18 has invalidated. By superimposing the additional image 62b, the detected object can be displayed with emphasis. By not superimposing the additional image on the second region 54b, which is a false detection, it is possible to prevent the user from being given incorrect information.
[0030] Figure 7 is a flowchart showing the flow of the image recognition method according to the first embodiment. The flowchart shown in Figure 7 is executed repeatedly while the image recognition device 10 is operating or while the camera 22 is capturing images. The image acquisition unit 12 acquires the captured image (step S10). The first detection unit 14 uses a first detection model for nearby objects to detect a first region in the captured image that contains the object to be detected (step S12). The second detection unit 16 uses a second detection model for distant objects to detect a second region in the captured image that contains the object to be detected (step S14).
[0031] If the first region and the second region overlap in the captured image (Yes in step S16), the determination unit 18 disables the detection of the second region overlapping the first region (step S18). Specifically, if the first region and the second region are detected in the captured image, and the range of the detected first region and the range of the detected second region overlap, the determination unit 18 disables the detection of the second region overlapping the first region. For example, the determination unit 18 may determine that the second region overlaps the first region if 90% or more of the area of the detected second region overlaps with the detected first region.
[0032] If the first and second regions do not overlap in the captured image (No. in step S16), the determination unit 18 skips the processing in step S18. If the first and second regions do overlap, the determination unit 18 enables detection of the first region and disables detection of the second region. The determination unit 18 enables detection of regions other than the second region that is disabled. If the first and second regions do not overlap, the determination unit 18 enables detection of the detected first and second regions. The display control unit 20 generates a display image by superimposing an additional image on the region to be enabled and displays it on the display device 24 (step S20). The display control unit 20 displays the display image with the additional image superimposed on it on the display device 24 for the period during which the region to be enabled 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, false detection can be prevented by invalidating one of the regions. The second detection model for distant objects uses lower-resolution training images compared to the first detection model for nearby objects, so the possibility of false detection is relatively higher. According to this embodiment, by prioritizing the first region detected by the first detection model for nearby objects, the second region that overlaps with the first region and is falsely detected can be invalidated. This makes it possible to improve the detection accuracy of the object to be detected.
[0034] (Second Embodiment) Figure 8 is a schematic block diagram showing the functional configuration of the image recognition device 70 according to the second embodiment. The second embodiment differs from the first embodiment in that it further includes a partial detection unit 72, and the determination unit 74 determines the effectiveness of the detection using the detection result of the partial detection unit 72. The second embodiment will be described below, focusing on the differences from the first embodiment, and explanations of common features will be omitted as appropriate.
[0035] The image recognition device 70 comprises 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 in the captured image acquired by the image acquisition unit 12 that contains a part of the object to be detected. The partial detection unit 72 detects the part of the object using a partial detection model that has been trained on images of a partial range of the object to be detected as input. As training images for the partial detection model, for example, images obtained by partially cutting out the object to be detected from the training images of the first detection model for neighbors can be used. Therefore, the image size of the training images for the partial detection model is smaller than the size of the input images used for machine learning of the first detection model. The image size of the training images for the partial detection model may be about the same as the size of the input images used for machine learning of the second detection model.
[0037] The partial detection unit 72 may have multiple partial detection models for detecting each of multiple parts of the object to be detected. If the object to be detected is a pedestrian, for example, it may have partial detection models for detecting the head, upper body, lower body, arms, and legs.
[0038] The partial detection unit 72 detects a portion of the object to be detected that is included in the first region detected by the first detection unit 14. If a portion of the object to be detected is detected in the first region, it is highly likely that the entire object to be detected is included in the first region, and therefore the detection by the first detection unit 14 is considered appropriate. On the other hand, if a portion of the object to be detected is not detected in the first region, it is highly likely that the entire object to be detected is not included in the first region, and therefore the detection by the first detection unit 14 is considered inappropriate, and the first detection unit 14 is considered to have made a false detection.
[0039] The determination unit 74 validates the detection if the first or second region is detected without overlapping. If both the first and second regions are detected and they overlap in the captured image, the determination unit 74 uses the detection result of the partial detection unit 72 to determine the validity of the detection of the first and second regions.
[0040] The determination unit 74 enables detection of the first region and disables detection of the second region if the first region and the second region overlap in the captured image, and a portion of the first region overlaps with the second region. In this case, there is a high possibility that a portion of the object to be detected that is included in the first region is being detected as the second region, and there is a high possibility that the second detection unit 16 is making a false detection. The determination unit 74 disables detection of the first region and enables detection of the second region if the first region and the second region overlap in the captured image, and a portion of the first region does not overlap with the first region. In this case, there is a low possibility that the entire object to be detected is included in the first region, and there is a high possibility that the first detection unit 14 is making a false detection.
[0041] Figure 9 shows an example of an image 50b in which the first region 52b, the second region 54b, and sub-regions 56a, 56b, and 56c overlap and are detected. The image 50b in Figure 9 is the same as in Figure 4, but differs in that the first sub-region 56a, the second sub-region 56b, and the third sub-region 56c are detected by the sub-detection unit 72. The first sub-region 56a is the detection region of the pedestrian's head included in the first region 52b. The second sub-region 56b is the detection region of the pedestrian's upper body included in the first region 52b. The third sub-region 56c is the detection region of the pedestrian's lower body included in the first region 52b.
[0042] In the case of Figure 9, the determination unit 74 determines that the first region 52b and the second region 54b overlap, and the first region 52b overlaps with the partial regions 56a to 56c, so it enables detection of the first region 52b and disables detection of the second region 54b. This disables false detection by the second detection unit 16 and allows for the proper detection of pedestrians included in the first region 52b. When the display control unit 20 acquires the captured image 50b in Figure 9, it displays the same display image 60b as in Figure 6 on the display device 24.
[0043] In Figure 9, the state in which the first region 52b and subregions 56a to 56c overlap is shown. However, if the first region 52b overlaps with any of the first subregion 56a, second subregion 56b, or third subregion 56c, detection of the first region 52b may be enabled and detection of the second region 54b may be disabled.
[0044] In Figure 9, for example, if the first partial region 56a, where the head is detected, overlaps above 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. Also, in Figure 9, if the second partial region 56b, where the upper body is detected, overlaps above 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 Figure 9, if the third partial region 56c, where the lower body is detected, overlaps below 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 with detection using other partial detection models, if a partial region overlaps at an appropriate position within the range where a pedestrian is detected, the detection of the first region 52b may be enabled and the detection of the second region 54b may be disabled.
[0045] Figure 10 is a flowchart showing the flow of the image recognition method according to the second embodiment. The processes in steps S30 to S36, S42 and S46 in the flowchart shown in Figure 10 are the same as the processes in steps S10 to S16, S18 and S20 in the flowchart shown in Figure 7, so their explanation is omitted.
[0046] If the first and second regions overlap in the captured image (Yes in step S36), the partial detection unit 72 uses a partial detection model to detect a partial region in the first region that contains a part of the object to be detected (step S38). If there is a partial region that overlaps the first region (Yes in step S40), the determination unit 74 disables 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 disables the detection of the first region that overlaps the second region (step S44). If the first and second regions do not overlap in the captured image (No in step S36), the processing in steps S38 to S44 is skipped.
[0047] According to this embodiment, when the first and second regions overlap, the effectiveness of detection in the first region can be more appropriately determined by detecting the presence or absence of a portion of the object to be detected in the first region. When a portion of the object to be detected is detected in the first region, the detection of the first region is enabled and the detection of the second region is disabled, thereby neutralizing the second region which overlaps with the first region and is falsely detected. On the other hand, when a portion of the object to be detected 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 neutralizing the first region which overlaps with the second region and is falsely detected. This improves the detection accuracy of the object to be detected.
[0048] In the second embodiment, the determination unit 74 may enable detection of the first region when the first region and the second region overlap, or when multiple subregions are detected in the first region. For example, detection of the first region may be enabled when two or more subregions from among the head, upper body, lower body, arms, and legs are detected.
[0049] Although the present invention has been described above with reference to the embodiments described above, the present invention is not limited to the embodiments described above, and the present invention is also included in combinations or substitutions of the various components shown in the embodiments as appropriate. [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 captured images, A first detection unit detects a first region in the captured image that contains an object to be detected, using a first detection model that has been trained on an image having an image size greater than or equal to a predetermined value as input. A second detection unit detects a second region in the captured image that contains the object to be detected, using a second detection model trained on an image having an image size less than the predetermined value as input. The system includes a determination unit that, when the first region and the second region overlap in the captured image, enables detection of either the first region or the second region and disables detection of the other region. The first detection model is a recognition dictionary for nearby objects, and the second detection model is a recognition dictionary for distant objects. The size of the images used for machine learning of the second detection model is smaller than the size of the images used for machine learning of the first detection model. Image recognition device.
2. An image acquisition unit that acquires captured images, A first detection unit detects a first region in the captured image that contains an object to be detected, using a first detection model that has been trained on an image having an image size greater than or equal to a predetermined value as input. A second detection unit detects a second region in the captured image that contains the object to be detected, using a second detection model trained on an image having an image size less than the predetermined value as input. In the captured image, if the first region and the second region overlap, a determination unit enables detection of either the first region or the second region and disables detection of the other. A partial detection unit that uses a machine learning-based partial detection model to detect a partial region containing a part of the object to be detected, Equipped with, The determination unit, a) If the first region and the second region overlap in the captured image, and the first region and the partial region overlap, the detection of the first region is enabled and the detection of the second region is disabled. b) If the first region and the second region overlap in the captured image, but the first region and the partial region do not overlap, the detection of the second region is enabled and the detection of the first region is disabled. Image recognition device.
3. The display control unit further includes a display control unit that causes the display device to display a display image obtained by superimposing an additional image on the captured image such that the display mode of the first or second region that the determination unit has not invalidated is different from the display mode of the first or second region that the determination unit has invalidated. The image recognition device according to claim 1 or 2.
4. The steps include acquiring the captured image and A step of detecting a first region containing an object to be detected in the captured image using a first detection model trained on an image having an image size greater than or equal to a predetermined value as input, The steps include: detecting a second region in the captured image that contains the object to be detected using a second detection model trained on an image having an image size less than the predetermined value as input; The system includes the step of enabling detection of either the first region or the second region and disabling detection of the other region when the first region and the second region overlap in the captured image. The first detection model is a recognition dictionary for nearby objects, and the second detection model is a recognition dictionary for distant objects. The size of the images used for machine learning of the second detection model is smaller than the size of the images used for machine learning of the first detection model. Image recognition methods.
5. The steps include acquiring the captured image and A first detection step involves using a first detection model trained on an image having an image size greater than or equal to a predetermined value to detect a first region in the captured image in which the object to be detected is contained; A second detection step involves using a second detection model trained on an image having an image size less than a predetermined value as input to detect a second region in the captured image that contains the object to be detected. If the first region and the second region overlap in the captured image, a determination step is made to enable detection of either the first region or the second region and disable detection of the other region. A partial detection step that uses a machine learning-based partial detection model to detect a partial region containing a part of the object to be detected, Equipped with, In the aforementioned determination step, a) If the first region and the second region overlap in the captured image, and the first region and the partial region overlap, the detection of the first region is enabled and the detection of the second region is disabled. b) If the first region and the second region overlap in the captured image, but the first region and the partial region do not overlap, the detection of the second region is enabled and the detection of the first region is disabled. Image recognition methods.
6. An image recognition device, The steps include acquiring the captured image and A step of detecting a first region containing an object to be detected in the captured image using a first detection model trained on an image having an image size greater than or equal to a predetermined value as input, The steps include: detecting a second region in the captured image that contains the object to be detected using a second detection model trained on an image having an image size less than the predetermined value as input; If the first region and the second region overlap in the captured image, the detection of either the first region or the second region is enabled, and the detection of the other region is disabled. A program that executes, The first detection model is a recognition dictionary for nearby objects, and the second detection model is a recognition dictionary for distant objects. The image size used for machine learning of the second detection model is smaller than the image size used for machine learning of the first detection model.