Foreign object detection device, foreign object detection system, and foreign object detection method

The system uses a dual area discriminator with convolutional neural networks to automatically detect and highlight foreign objects on railway vehicle roofs, addressing the dangers of manual inspection and improving detection accuracy.

JP7551447B2Active Publication Date: 2024-09-17HITACHI TRANSPORTATION TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2020175098
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2020-10-19
Publication Date
2024-09-17
Estimated Expiration
2040-10-19

AI Technical Summary

Technical Problem

Existing methods for detecting foreign objects on the roof of railway vehicles require human visual inspection, which is dangerous due to the need to work at heights, and existing AI-based solutions struggle to classify unknown objects effectively.

Method used

A foreign object detection system using a first and second area discriminator with convolutional neural networks to recognize and differentiate areas within an image, combined with an anomaly extraction unit to identify and highlight foreign objects automatically.

Benefits of technology

Enables automatic detection of foreign objects on railway vehicle roofs without human intervention, reducing safety risks and improving efficiency by accurately identifying and marking foreign objects on images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007551447000011
    Figure 0007551447000011
  • Figure 0007551447000005
    Figure 0007551447000005
  • Figure 0007551447000016
    Figure 0007551447000016
Patent Text Reader

Abstract

To provide a foreign matter detection device, a foreign matter detection system, and a foreign matter detection method capable of automatically detecting an abnormality on an object or foreign matter and clearly indicating a foreign matter area shown on an image.SOLUTION: Provided is a foreign matter detection device that detects a foreign matter using an image in which a determination object being a plurality of determination objects is shown on one image. The foreign matter detection device comprises: a first area discriminator for recognizing an area for each of the plurality of determination objects shown in the image; a second area discriminator for not recognizing an area of a second determination object when the area of the determination object shown in the image is discriminated and the area of the second determination object is in an area of a first determination object; an abnormality extraction unit for obtaining a difference between the output given by the first area discriminator and the output given by the second area discriminator; and an output unit for externally outputting the difference.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a foreign object detection device, a foreign object detection system, and a foreign object detection method that detects an unknown foreign object, for example, on the roof of a railway vehicle, by AI analysis of image data captured by an exterior imaging device. [Background technology]

[0002] For example, unexpected foreign objects such as plastic bags may fly onto the roof of a train and cause an accident. Also, after work on the roof, tools may be left behind and the train may move on.

[0003] However, when a foreign object is present on the roof, the only way to check for it is by visual inspection, which is dangerous since the work must be done at a high altitude.

[0004] In order to reduce the risk of working at height, visual inspection through a camera may be performed as described in Non-Patent Document 1. In the medical field, a method using AI is known as a means of finding abnormalities and foreign bodies in the test subject. Patent Document 1 describes a learning and classification method for finding several candidate diseases using a machine learning system that uses only diagnostic data of normal eyes as training data. [Prior art documents] [Patent documents]

[0005] [Patent Document 1] JP 2020-32190 A [Non-patent literature]

[0006] [Non-Patent Document 1] Special feature: Sensing and monitoring technology Monitoring the condition of railway vehicles "Railway Technical Research Institute" 2009.2 Summary of the Invention [Problem to be solved by the invention]

[0007] However, although the method described in Non-Patent Document 1 can avoid the dangers of working at heights, it requires a human to check the video footage of the vehicle captured by the camera, and the task of closely watching the video footage to find foreign objects requires a lot of time and effort, so there is a need for automation of this process.

[0008] In addition, the method described in Patent Document 1 cannot classify unknown objects or phenomena that cannot be investigated in advance, making it difficult to discover unknown foreign objects that may fly onto the roof of a railway car. Therefore, it is difficult to directly apply AI such as that described in Patent Document 1 to foreign object detection.

[0009] In response to such situations, the present invention aims to provide a foreign object detection device, a foreign object detection system, and a foreign object detection method that can automatically detect abnormalities or foreign objects on an object and clearly indicate foreign object areas that appear on an image. [Means for solving the problem]

[0010] In view of the above, the present invention is a foreign object detection device that detects foreign objects using an image in which a plurality of objects to be judged are shown in the image, the foreign object detection device comprising: a first area discriminator that recognizes the area of ​​each of the plurality of objects to be judged shown in the image; a second area discriminator that discriminates the areas of the objects to be judged shown in the image and does not recognize the area of ​​the second object to be judged when the area of ​​the second object to be judged is present within the area of ​​the first object to be judged; an abnormality extraction unit that determines the difference between the output provided by the first area discriminator and the output provided by the second area discriminator; and an output unit that outputs the difference to the outside.

[0011] In addition, the present invention is defined as "a foreign object detection system using a foreign object detection device, characterized in that it comprises a detection sensor that detects that an object to be determined is in a predetermined position, a photographing camera that photographs the object to be determined when the detection sensor detects that it is in the predetermined position and provides the photographed image to the foreign object detection device, and a display device that displays on a screen the output from the output section of the foreign object detection device."

[0012] Furthermore, the present invention provides a "foreign object detection method for detecting a foreign object using an image of an object in which a single image shows a plurality of objects to be judged, the method including a learning step of generating an area discriminator having a weighted hierarchical network structure using a plurality of images of the object, an image acquisition step of detecting that the object is at a predetermined position, photographing the object, and obtaining the photographed image, and an image processing step of detecting a foreign object in the object using the photographed image of the object, the image processing step including a process of recognizing the area of ​​each of the plurality of objects to be judged shown in the image by a first area discriminator generated in the learning step, a process of discriminating the areas of the objects to be judged shown in the image by a second area discriminator, and not recognizing the area of ​​the second object to be judged when the area of ​​the second object to be judged is within the area of ​​the first object to be judged, an anomaly extraction process of determining the difference between the output provided by the first area discriminator and the output provided by the second area discriminator, and an output process of outputting the difference to the outside." Effect of the Invention

[0013] The present invention allows for the automatic detection of anomalies or foreign objects on any object. [Brief description of the drawings]

[0014] [Figure 1] 1 is a diagram showing an example of the overall configuration of a foreign object detection system according to a first embodiment of the present invention. [Diagram 2] FIG. 3 shows an example of the configuration of a processor 300. [Diagram 3] FIG. 3 is a diagram showing an example of the arrangement of an image processing unit 301 according to the first embodiment. [Figure 4] 5A and 5B are diagrams showing examples of detection results in a first area discriminator 301B and a second area discriminator 301C. [Diagram 5] FIG. 13 is a diagram showing examples of D1a and D1b as learning data 632 for a first area discriminator. [Figure 6]FIG. 13 is a diagram showing an example of a hierarchical network structure in a first area discriminator 301B and a second area discriminator 301C. [Figure 7] 11 is a diagram showing an example of input and output when a driver is placed on the vehicle roof as a foreign object. [Figure 8] FIG. 13 is a diagram showing an example of input and output when an umbrella is placed on the vehicle roof as a foreign object. [Figure 9] FIG. 11 is a diagram showing an example of an image comparison result based on class labels. [Figure 10] 6A to 6C are diagrams showing examples of outputs of each process of an erroneous recognition area filtering function of the anomaly extraction unit. [Figure 11] FIG. 11 is a diagram showing an example of an image finally obtained as an output of the erroneous recognition region filter function. [Figure 12] FIG. 13 is a diagram showing an example of an output image of an output unit 301E. [Figure 13] FIG. 13 is a diagram showing an example of a flowchart illustrating a series of steps for detecting a foreign object according to the present invention. [Figure 14] FIG. 11 is a diagram showing an example of the arrangement of an image processing unit 301 according to a third embodiment. [Figure 15] 6A and 6B are diagrams showing examples of detection results in a first area discriminator 301B and a second area extraction processor 600. [Figure 16] 13A and 13B are diagrams showing examples of template images acquired by the data access function of the second region extraction process. [Figure 17] 13A and 13B are diagrams showing examples of area data corresponding to a template image acquired by the data access function of the second area extraction process; [Figure 18] FIG. 18 is a diagram showing an example of the processing flow of the alignment function of the second region extraction processing. [Figure 19] FIG. 13 is a diagram showing an example of the arrangement of an image processing unit 301 according to a fourth embodiment. [Figure 20] FIG. 13 is a diagram showing an example of the arrangement of an image processing unit 301 according to a fifth embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0015] Hereinafter, a foreign object detection device, a foreign object detection system, and a foreign object detection method according to the present invention will be described with reference to the drawings. The present invention relates to a foreign object detection device, a foreign object detection system, and a foreign object detection method for detecting an unexpected and unknown foreign object that has occurred on an object. In this embodiment, an example will be described in which the object is the roof of a railway vehicle.

[0016] Hereinafter, the configuration and processing contents of a foreign object detection device and a foreign object detection system according to the present invention will be described with reference to Example 1, and a foreign object detection method will be described with reference to Example 2. Also, other alternative examples will be described with reference to Examples 3, 4, and 5. EXAMPLES

[0017] 1 shows an example of the overall configuration of a foreign object detection system according to a first embodiment of the present invention. The foreign object detection system of this embodiment includes a photographing camera 201, a vehicle body detection sensor 202, a camera control unit 200, a processor 300, and a display device (monitor) 304, and the processor 300 and the display device (monitor) 304 constitute a foreign object detection device.

[0018] Of these, the photographing camera 201 and the vehicle body sensor 202 are connected to the camera control unit 200 by wire or wirelessly. In this example, the vehicle body is detected by the vehicle body sensor 202, and while a detection signal is being output, the photographing camera 201 photographs the vehicle body. Note that this diagram merely illustrates an example of the overall configuration of the system, and it goes without saying that when used as a foreign object detection device, the camera control unit 200 and the vehicle body detection sensor 202 can be treated as external components. Each configuration will be described below.

[0019] First, a description will be given of the configuration of the camera control unit 200. The camera control unit 200 is connected to a photographing camera 201 and a vehicle body detection sensor 202 to transmit and receive signals, and has an internal processing function of starting photographing, ending photographing, and detecting an abnormality.

[0020] The shooting start function is a function that outputs a shooting start command signal to the shooting camera 201 when triggered by a vehicle body detection signal received from the vehicle body detection sensor 202. The shooting end function is a function that outputs a shooting end signal to the shooting camera 201 after a certain time has elapsed since the vehicle body detection signal received from the vehicle body detection sensor 202 turned OFF after shooting has started. The abnormality detection function is a function that forcibly ends shooting when the shooting time exceeds a certain time. The camera control unit 200 operates in the order of the shooting start function and the shooting end function, and controls the shooting camera 201 to shoot an image or video on the vehicle roof. The shot image or video is transmitted to the image recording unit 302 in the processor 300 and stored. The function of the camera control unit 200 is realized by a sequence control device such as a PLC (Programmable Logic Controller).

[0021] Next, an example of the configuration of the processor 300 will be described with reference to Fig. 2. The processor 300 in Fig. 2 includes an image processing unit 301, an image recording unit 302, a display control unit 303, an operation unit 313, a CPU 310, a ROM 311, and a RAM 312.

[0022] The processor 300 inputs the video / image of the vehicle roof stored in the image recording unit 302 to the image processing unit 301, and after the image processing unit 301 detects abnormalities / foreign objects, displays the detection results on a display device (monitor) 304 via a display control unit 303.

[0023] The processing of the processor 300 is mainly performed under the control of the CPU 310. The ROM 311 is a non-transitory storage medium, including a storage device such as an HDD or SSD that is both readable and writable, and serves as an auxiliary storage device. The ROM 311 stores programs for causing the CPU 310 to execute the processing performed by the image processing unit 301, the display control unit 303, the operation unit 313, and the image recording unit 302.

[0024] The RAM 312 is a temporary storage medium, includes volatile storage elements (which cannot retain data when the power supply is not connected) such as DRAM or SRAM, and serves as a main storage device. The RAM 312 is used during processing performed by the image processing unit 301, image recording unit 302, display control unit 303, and operation unit 313. The configurations of the image processing unit 301, image recording unit 302, and operation unit 313 will be described below.

[0025] The configuration of the image processing unit 301 will be described with reference to FIG. 3. The image processing unit 301 includes an image acquisition unit 301A, a first area discriminator 301B, a second area discriminator 301C, an abnormality extraction unit 301D, and an output unit 301E. The image processing unit 301 may include a repeat control unit (not shown) that continues the video (video) captured by the image capture camera 201 from start to finish. The image processing unit 301 acquires images or videos captured on the vehicle roof and stored in the image recording unit 302 by the image acquisition unit 301A, and detects foreign objects on the vehicle roof from the images or videos. In the example of FIG. 3, information on the detected foreign object is stored again in the image recording unit 302.

[0026] To state the conclusion first, the image processing result in the image processing unit 301 is as exemplified in Fig. 4. Here, for an image D of a vehicle roof input to the image acquisition unit 301A, the first area discriminator 301B outputs an image D1 in which the vehicle roof 510, the air conditioner outdoor unit 511, a foreign object (tree branch) 514, and other areas 513 are identified as objects to be determined, and the second area discriminator 301C outputs an image D2 in which the vehicle roof 510, the air conditioner outdoor unit 511, and other areas 513 are identified as objects to be determined. As a result, the anomaly extraction unit 301D obtains an image D3 consisting only of information on the foreign object (tree branch) 514 as the difference.

[0027] Below, the configurations of first area discriminator 301B and second area discriminator 301C for obtaining the above results will be explained using FIG. 3, and thereafter, the pre-learning for configuring first area discriminator 301B and second area discriminator 301C will be explained using FIG. 5, and an example of the CNN configuration of first area discriminator 301B and second area discriminator 301C will be explained using FIG. 6.

[0028] 3, first, the first area discriminator 301B has CNN structure 1 (630) which is a structure of a convolutional neural network, and weight data 1 (631). The weight data 1 (631) is weight data obtained when learning using learning data 632 for the first area discriminator. The second area discriminator 301C also has CNN structure 2 (635) which is a structure of a convolutional neural network, and weight data 2 (633). The weight data 2 (633) is weight data obtained when learning using learning data 634 for the second area discriminator.

[0029] The first area discriminator 301B and the second area discriminator 301C shown in Fig. 3 are learning processing functions that have undergone learning processing using learning data, and the CNN structure 1 and the CNN structure 2 have, for example, a neural network as a main component. Here, the learning contents executed in advance will be specifically described.

[0030] FIG. 5 shows an example in which D1a and D1b are prepared as examples of learning data 632 for the first area discriminator. D1a in FIG. 5 is a single optical image of a normal vehicle roof, and this single optical image shows three objects as objects to be determined: a vehicle roof 520, an air conditioner outdoor unit 521, and a remaining area 523. D1b in FIG. 5 is a data image obtained by dividing (annotating) the optical image D1a of the normal vehicle roof shown in FIG. 5, in which the vehicle roof 520 is shown as a spot pattern 520A, the air conditioner outdoor unit 521 as a vertical line pattern 521A, and the remaining area 523 as a vertical line pattern 523A. As learning data 632 for the first area discriminator 301B, a required number of sets of the optical image D1a of the normal vehicle roof shown in FIG. 5 and the data image D1b obtained by dividing the optical image D1a into areas are prepared.

[0031] The second area discriminator learning data 634 is prepared by preparing a required number of images D1a showing a normal vehicle roof top and image data D1b with annotations thereon, similar to the first area discriminator learning data 632. As long as it shows a normal vehicle roof top, the image may be exactly the same as the first area discriminator learning data 632, or a different image may be used.

[0032] As a result of the difference between the learning and the CNN structure, the first area discriminator 301B performs a process of finding an area that is highly likely to be an unknown foreign object on the vehicle roof in the image obtained by the image acquisition unit 301A. The second area discriminator 301C performs a process of finding an area of ​​an object on the vehicle roof in the image obtained by the image acquisition unit 301A. The first area discriminator 301B is a recognition device configured by learning on a normal vehicle roof, and prominently recognizes an area having a characteristic shape and pattern that exists on the vehicle roof. The second area discriminator 301C is a recognition device configured by learning on a normal vehicle roof, and prominently recognizes the boundary line of an object on a normal vehicle roof, and does not recognize fine features in the area of ​​the object inside the boundary line. The CNN structure in the first area discriminator 301B and the second area discriminator 301C is, for example, a convolutional neural network, and has a hierarchical network structure. The convolutional neural networks applied to the first region discriminator 301B and the second region discriminator 301C include networks for performing various segmentations, which have different network structures and trained data. In addition, various types of large-scale data sets that can be used for training the convolutional neural network are widely published, and there are networks with various characteristics depending on the type of large-scale data set trained by the convolutional neural network. From these various commonly known convolutional neural networks, a network that prominently recognizes regions with characteristic shapes and patterns, which fulfills the role of the first region discriminator 301B, and a network that prominently recognizes object boundaries and does not recognize fine features in the object regions inside the boundaries, which fulfills the role of the second region discriminator 301C, are selected. The first region discriminator 301B and the second region discriminator 301C may be realized by using the selected network as it is, or may be realized by using a network to which learning has been added so as to more prominently express the features of the selected network (enhancing the features by fine tuning).

[0033] The CNN structure 1 (630) and the CNN structure 2 (635) in the first region discriminator 301B and the second region discriminator 301C in Fig. 3 are convolutional neural networks having different layer configurations, and have a hierarchical network structure. The layer configurations of the CNN structure 1 (630) and the CNN structure (635) in the first region discriminator 301B and the second region discriminator 301C will be described with reference to Fig. 6. However, here, the layer configuration common to the two CNN structures will be described using the CNN structure 1 (630) as a representative example.

[0034] In the example of the CNN structure 1 (630) of the first region discriminator 301B shown in FIG. 6, the first region discriminator 301B includes an input layer 350A, an intermediate layer 350B, and an output layer 350C. The input layer 350A receives an image D acquired by the image acquisition unit 301A as an input and extracts a feature amount contained in the image. The intermediate layer 350B has a plurality of sets of a convolution layer 353 and a pooling layer 354, receives the feature amount acquired by the input layer 350A as an input, and extracts a feature different from the feature acquired by the input layer 350A. The convolution layer 353 and the deconvolution layer 353 used in the input layer 350A and the intermediate layer 350B have a plurality of weight parameters, which are updated each time learning progresses. The layer configuration of the input layer 350A and the intermediate layer 350B may not only be a repeated structure as shown in FIG. 6, but may also include any of the layers in a plurality of consecutive layers. In addition, in the intermediate layer 350B, in addition to the convolution layer 353 and the pooling layer 354, a batch normalization process may be added. The batch normalization process is a process that averages the data distribution for each mini-batch. It is generally known that this process has the effect of suppressing overlearning and increasing the learning speed.

[0035] Among these, in particular, in the processing in the intermediate layer, in the intermediate layer 350B, feature extraction is performed by repeating the convolution operation by the convolution layer 353 and the pooling process by the pooling layer 354. The convolution operation is an operation to extract features from an image by a convolution filter and obtain a feature map. One feature map can be obtained for each filter (channel). The feature map is downscaled by the convolution layer 353, and the deeper the layer, the smaller the image size becomes. By reducing the image size, it becomes possible to extract a wider range of features than before downscaling. The pooling process is a process to obtain a new feature map by performing a reduction or expansion process on the feature map output by the convolution operation. It plays a role of giving robustness to the extracted features so that they are not affected by parallel movement, etc. In the layer close to the input side, local features such as edges are extracted, and in the layer close to the output side, learning is performed so that non-local features such as the shape of the entire object can be extracted. Furthermore, when segmentation is performed, the image is upscaled by the convolutional layer 353 and pooling layer 354 in the latter half of the intermediate layer 350B, and the output of the final convolutional layer 353 becomes a feature map of the same image size as the image input to the first region discriminator 301B.

[0036] Next, the processing in the output layer will be described. In the output layer 350C of the first area discriminator 301B, detection of objects included in the input image D is performed based on the features extracted in the intermediate layer 350B, and the detection result is output. This image is D1.

[0037] In order to perform segmentation processing, the first region discriminator 301B identifies the region of an object contained in the image D input to the input layer 350A at the pixel level. That is, the first region discriminator 301B can output objects (car body roof, air conditioner outdoor unit, pantograph, etc.) on the vehicle roof that have been previously trained using the images D1a and D1b described in FIG. 4 as different regions and by label. In addition, since the first region discriminator 301B previously trains only normal objects on the vehicle roof, the regions that can be output by label are only the objects previously trained. Therefore, regions that are thought to be abnormal or foreign objects are recognized as objects different from those that are normal and are located in the region that is thought to be on the vehicle roof.

[0038] An example of a specific detection result in the first area discriminator 301B and the second area discriminator 301C will be described with reference to Fig. 4. In Fig. 4, D is an image of the vehicle roof for analysis acquired by the image acquisition unit 301A. Four objects are captured in the image D of the vehicle roof for analysis: a vehicle body roof 510, an air conditioner outdoor unit 511, a foreign object (tree branch) 514, and a remaining area 513. Although a tree branch is taken as an example of the foreign object captured in the image D of the vehicle roof for analysis, it is possible to replace it with other unknown foreign objects that have flown onto or been left behind on the vehicle roof, such as a dead bird, a broken umbrella, or a tool such as a screwdriver.

[0039] When the first area discriminator 301B has learned in advance three objects, namely the roof of the vehicle body, the air conditioner outdoor unit, and other areas, as illustrated and explained in Figure 5, if an image D of the vehicle roof for analysis is input to the first area discriminator 301B, an image D1 of the vehicle roof after analysis can be obtained as the output.

[0040] In image D1 of the vehicle roof after analysis by first area discriminator 301B, vehicle body roof 510, air conditioner outdoor unit 511, and other area 513 shown in image D of the vehicle roof for analysis are shown as 510A, 511A, and 513A, respectively, with patterns of spots, vertical lines, and diagonal lines. And, foreign object area 514 is recognized as 514A, which is the same diagonal line pattern as other area 513A, among the four objects shown in image D1 of the vehicle roof after analysis.

[0041] Here, the foreign object area would be recognized as the area of ​​the vehicle body roof 510A if there was no foreign object on the vehicle roof. Moreover, the foreign object area 514A is not recognized as a foreign object area by the first area discriminator 301B, but is merely recognized as a different object since it is not a normal object.

[0042] 7, foreign object area 514A is recognized as the same object area as other area 513A, but in reality it may well be recognized as the same area as air conditioner outdoor unit 511A, or it may be recognized as a mixture of air conditioner outdoor unit 511A and other area 513A. Therefore, it is difficult to identify foreign object area 514A by recognition only by first area discriminator 301B.

[0043] Also, examples of cases where there is another foreign object instead of a tree branch are shown in Fig. 7 and Fig. 8. Fig. 7 is an example of input / output when a driver is on the vehicle roof as a foreign object, and Fig. 8 is an example of input / output when an umbrella is on the vehicle roof as a foreign object. Both Fig. 7 and Fig. 8 show the same results as when image D in Fig. 4 is input to first area discriminator 301B.

[0044] 3 and 4, the processing contents and results of the second area discriminator 301C on the other hand will be described. The second area discriminator 301C performs segmentation processing similar to the first area discriminator 301B. The types of objects on the vehicle roof that are learned in advance are also similar to those of the first area discriminator 301B. As described above, the second area discriminator 301C prominently recognizes boundary lines, but does not recognize subtle features in the object areas inside the boundary lines.

[0045] An example of the output of the second area discriminator 301C is shown as D2 in Fig. 4. When the second area discriminator 301C has previously learned three objects, namely, the roof of the vehicle body 510, the outdoor unit of the air conditioner 511, and the other area 513, as described in Fig. 5, if the image D in Fig. 4 is input to the second area discriminator 301C, the output of D2 in Fig. 4 can be obtained. Here, the roof of the vehicle body, the outdoor unit of the air conditioner, and the other areas are shown by patterns of spots, vertical lines, and diagonal lines, respectively. In image D2, the area on the vehicle roof is recognized in the same way as when the normal roof surface is recognized while ignoring the foreign object in image D.

[0046] In summary, the first area discriminator 301B recognizes the area of ​​each of a plurality of objects to be determined that appear in the image, whereas the second area discriminator 301C discriminates the areas of the objects to be determined that appear in the image, but does not recognize the area of ​​a second object to be determined (e.g., 514 in D of FIG. 4) when the area of ​​the second object to be determined (e.g., 510 in D of FIG. 4) exists within the area of ​​a first object to be determined (e.g., 510 in D of FIG. 4).

[0047] The first area discriminator 301B and the second area discriminator 301C configured as described above can be configured by learning (e.g., machine learning such as deep learning) using information on an image and the position of an object on the vehicle in the image. In addition, the first area discriminator 301B and the second area discriminator 301C are configured by selecting networks having characteristics that fulfill their respective roles and using networks with different layer configurations.

[0048] In realizing the first area discriminator 301B and the second area discriminator 301C, they may learn using different image data of the vehicle roof or data of other objects. However, in order to process the output comparison function of the anomaly extraction unit 301D, it is necessary to unify the objects to be recognized by the first area discriminator 301B and the second area discriminator 301C, in other words, the classes to be recognized and their class labels. As a specific example of learning using different image data of the vehicle roof or data of other objects, when performing fine tuning, the first area discriminator and the second area discriminator may learn using different data sets in advance, or may use different image data of the vehicle roof when re-learning.

[0049] Next, we will explain fine tuning. Fine tuning is a technique that achieves effects such as improving object recognition accuracy and requiring less training data by reusing a trained convolutional neural network. A trained convolutional neural network is a hierarchical network trained on a large-scale data set, and there are various types of large-scale data sets, such as data sets for image classification, data sets for object detection, and data sets for segmentation.

[0050] A specific example of applying fine tuning to the first region discriminator 301B and the second region discriminator 351 will be described. The trained convolutional neural network is a network that recognizes objects included in a large-scale data set that has been trained in advance. Therefore, when applying it to the first region discriminator 301B and the second region discriminator 301C, it is necessary to change the object to be recognized to an object on the vehicle roof.

[0051] When the trained convolutional neural network has the layer structure shown in FIG. 6, some convolutional layers 353 close to the output side of the intermediate layer 350B shown in FIG. 6 are retrained using the images of the vehicle roof and the data of the area. The trained data is reused for the other convolutional layers 353 included in the intermediate layer 350B. In this way, it is possible to reuse the excellent feature extraction filter cultivated by training a large-scale data set, and retrain to recognize the vehicle roof using the features extracted by the excellent filter. Therefore, the recognition accuracy of foreign objects or objects on the vehicle roof is improved and a small amount of image and area data is required, compared to training the entire convolutional neural network only with the image of the vehicle roof, which is the target object.

[0052] Next, a change in recognition tendency due to fine tuning will be described. When performing fine tuning, the first area discriminator 301B and the second area discriminator 301C change their tendency to recognize the vehicle rooftop depending on the type of large-scale data set used for training the trained convolutional neural network.

[0053] As a specific example, suppose we have prepared Recognition CNN1, a trained convolutional neural network that has been trained in advance with a dataset aimed at segmenting plants and animals in the outdoors, and Recognition CNN2, a trained convolutional neural network that has been trained in advance with a dataset aimed at segmenting objects in urban areas. In this case, the dataset on which Recognition CNN1 has been trained contains images and regions of objects with many curves, such as animals and plants. The dataset on which Recognition CNN2 has been trained contains images and regions of man-made objects, such as cars, roads, people, street lights, and buildings.

[0054] In addition, when the layer structure of recognition CNN1 and recognition CNN2 is exactly the same, both are retrained using the same image of the vehicle roof and the data of that area. When image D in Figure 4 is input to both the retrained recognition CNN1 and recognition CNN2 as an image of a foreign object on the vehicle roof, a result like D1 in Figure 4 can be obtained as the output of recognition CNN1.

[0055] In D1 of Fig. 4, the region 514A where the foreign object is present is represented by a diagonal line pattern as the region 513A other than the object. Also, as the output of the recognition CNN2, a result like D2 of Fig. 4 can be obtained. In D2 of Fig. 4, the region 314B where the foreign object is present is represented by a spot pattern as the region of the roof of the vehicle body. In this way, even if the convolutional neural network is retrained with the exact same layer configuration and the exact same data, the tendency to recognize the vehicle roof changes depending on the data set that is trained in advance.

[0056] As described above, one of the factors that can cause a change in recognition tendency is that when a convolutional neural network is trained to recognize the boundaries of objects with many curves, such as animals and plants, and when it is trained to recognize the boundaries of objects with many straight lines and right angles, such as man-made objects, the features that are focused on are different, such as borders, shapes, patterns, etc., and therefore even when the network is made to recognize the roof of a vehicle after re-learning, there is a difference in how the input image is recognized.

[0057] Another factor is that when learning objects, the tendency to recognize them changes depending on whether training data annotated with broad concepts or with narrow concepts is used. For example, a convolutional neural network that has been pre-trained on buildings of various shapes, patterns, and numbers of windows, all of which are treated as one class, is retrained with objects on the roof of a vehicle.

[0058] The retrained convolutional neural network is then fed an image of a foreign object on a vehicle roof. If the foreign object in the input image is small, it will be considered to have the same characteristics as a window or pattern on a building, and the probability of ignoring the foreign object and determining that area as being on a vehicle roof will increase.

[0059] On the other hand, if a convolutional neural network that has been trained in advance to recognize data on the exact same building by dividing it into classes based on the number of windows, wall shapes, other characteristic structures, patterns, etc. is retrained with an object on the roof of a vehicle, when an image showing a foreign object on the roof of a vehicle is input, the probability of detecting a small foreign object in the input image as a foreign object rather than determining it as being on the roof of a vehicle increases, just as if the building's features were recognized by dividing it into more detail.In this way, the tendency to recognize objects on the roof of a vehicle changes depending on whether the object to be recognized is annotated using broad or narrow concepts.

[0060] There are other examples where the tendency of recognition changes. The tendency of recognizing the roof of a vehicle can also change by using different images of the roof of the vehicle and data of the area of ​​the roof of the vehicle for re-learning in the first area discriminator 301B and the second area discriminator 301C. For example, if the number of objects to be learned that appear in the image varies depending on the class, the class with relatively few data tends to have more erroneous recognitions. Also, if the positions of the objects to be learned appear in the image are biased, the object tends to be not recognized except when it is in the biased position. And, if objects with very similar features are recognized as different classes, there will be more erroneous recognitions between those classes.

[0061] The above example is merely one example, and there are various other patterns of changes in recognition tendency caused by changing the image of the vehicle roof and the data of that area used during re-learning. Also, the change in recognition tendency differs depending on the object to be learned.

[0062] Taking into consideration the recognition tendency described above, the data set to be learned in advance is selected, annotations of objects appearing in images used during re-learning are performed, and the number of images to be used is adjusted, so that the first area discriminator 301B increases the probability of detecting a foreign object, and the second area discriminator 301C decreases the probability of detecting a foreign object, etc. This makes it possible to adjust the area of ​​an unknown foreign object flying onto the vehicle roof so as to be more prominently detected.

[0063] In addition, in the explanation so far, a method for realizing the first area discriminator 301B and the second area discriminator 301C using fine tuning has been mentioned, but it is also possible to realize them using only the image of the vehicle roof and the data of that area without using fine tuning. In that case, it is realized by adjusting the annotation of the object on the vehicle roof, the number of images to be used, etc.

[0064] 3 and 4, the configuration of the anomaly extraction unit 301D will be described. The anomaly extraction unit 301D has an output comparison function, an erroneous recognition area filter function, and an area discrimination function. The anomaly extraction unit 301D receives the output results D1 and D2 obtained from the first area discriminator 301B and the second area discriminator 301C as inputs, and outputs position information D3 of the area where a foreign object is present by operating the output comparison function, the erroneous recognition area filter function, and the area discrimination function in that order.

[0065] The following describes each function of the anomaly extraction unit 301D. First, the output comparison function will be described. The anomaly extraction unit 301D compares the output results D1 and D2 obtained by the first area discriminator 301B and the second area discriminator 301C to extract areas likely to contain foreign matter, and outputs the results.

[0066] In this embodiment, the comparison is performed using the difference between the first region discriminator 301B and the second region discriminator 301C. The difference is represented by a class label. The class label indicates a numerical value assigned to each object recognized by the first region discriminator 301B and the second region discriminator 301C.

[0067] A specific example of class labels will be shown. Here, it is assumed that image D in FIG. 4 is input to first area discriminator 301B, and image D1 in FIG. 4 is obtained as the output. Car body roof 510, air conditioner outdoor unit 511, and other area 513 shown in image D are shown in image D1 as 510A, 511A, and 513A using patterns of spots, vertical lines, and diagonal lines, respectively. Furthermore, foreign object area 514 shown in image D is recognized as other area 513, and is shown as 514A using a diagonal line pattern.

[0068] Image D1 is an image output from first area discriminator 301B, and class labels are stored in pixels corresponding to areas indicated by dot, vertical line, and diagonal line patterns. For example, a value of 1 is stored for the dot pattern indicating the roof 510 of the vehicle body, a value of 2 for the vertical line pattern indicating the outdoor unit 511 of the air conditioner, a value of 3 for the diagonal line pattern indicating other areas, and a value of 3 is stored for the foreign object area 514.

[0069] The output image D2 of the second area discriminator 301C is similar to the output image D2 of the first area discriminator 301B. The roof 510 of the car body, the outdoor unit 511 of the air conditioner, and the other area 513 shown in the image D are shown as 510B, 511B, and 513B in the image D2 with patterns of spots, vertical lines, and diagonal lines, respectively. In addition, the objects recognized by the first area discriminator 301B and the second area discriminator 301C are the same, and the corresponding class labels are also the same. For example, the value of the spot pattern indicating the roof 510 of the car body, the value of the vertical line pattern indicating the outdoor unit 511 of the air conditioner, and the value of the diagonal line pattern indicating the other areas are stored as 1, 2, and 3, respectively.

[0070] The above-mentioned class labels are used to calculate the difference between the output images D1 and D2 of the first region discriminator 301B and the second region discriminator 301C. If the class labels match in the outputs of the first region discriminator 301B and the second region discriminator 301C, that is, if the recognized regions match, the difference result will be 0. Conversely, if the class labels do not match, the difference result will be a numeric value other than 0.

[0071] An example of the image comparison result based on class labels is shown in Fig. 9. When D1 and D2 in Fig. 7 are obtained as the outputs of the first region discriminator 301B and the second region discriminator 301C, image D3 in Fig. 9 can be obtained as the output image by calculating the difference between the two images. The regions shown in black in Fig. 9 are regions where the class labels of the first region discriminator 301B and the second region discriminator 301C match, resulting in a difference result of 0. Regions of other colors (white, gray, etc.) are regions where the class labels of the first region discriminator 301B and the second region discriminator 301C do not match, resulting in a numerical value other than 0.

[0072] A specific example of calculation by difference is shown. When the first area discriminator 301B recognizes an area at a certain position in an image as an area with a class label value of 1 indicating the roof 510 of a vehicle body, the second area discriminator 301C recognizes the same position as an area with a class label value of 2 indicating the outdoor unit 511 of an air conditioner. When the difference between the recognition result of the first area discriminator 301B and the recognition result of the second area discriminator 301C is taken, 1-2=-1≠0. The area where a negative difference is obtained is the area shown as an area other than black (white) in FIG. 9. Also, when the recognition results of the first area discriminator 301B and the second area discriminator 301C are opposite, 2-1=1≠0. The area where a positive difference is obtained is the area shown as an area other than black (gray) in FIG. 9.

[0073] As in the above-mentioned example of calculation by difference, the numerical values ​​stored in the areas where the difference results of the first area discriminator 301B and the second area discriminator 301C are not black, that is, the areas where the class labels do not match, are sparse. In addition, in FIG. 9, the areas displayed in colors other than black include the foreign object area 514D and areas other than the foreign object area where the class labels of the first area discriminator 301B and the second area discriminator 301C do not match. Areas other than the foreign object area 514D where the class labels do not match exist due to erroneous recognition due to differences in the recognition methods of the first area discriminator 301B and the second area discriminator 301C, or due to deviations in the recognized areas, and are most noticeable near the boundary line of the object. The areas other than the foreign object area where the class labels do not match are hereinafter referred to as erroneous recognition areas.

[0074] 9, foreign substance region 514D and erroneous recognition regions are mixed in the regions shown in colors other than black, and the difference values ​​of the class labels stored in the regions shown in colors other than black are sparse, making it difficult to extract only foreign substance region 514D by image processing using the output of the output comparison function. The effect of the output comparison function is to determine whether first region discriminator 301B and second region discriminator have recognized the same region in the image, and the effect of identifying foreign substance region 514D is achieved by the erroneous recognition filter function and area discrimination function described below.

[0075] The erroneous recognition area filter function removes erroneous recognition areas by processing the output image obtained by the output comparison function. In this embodiment, the erroneous recognition area filter function binarizes the output image obtained by the output comparison function, and performs noise removal by erosion / expansion processing. The erosion / expansion processing is a process in which the white or black areas of the binarized image are eroded and then expanded to the original size.

[0076] Here is a concrete example. When the output of the output comparison function is obtained as shown in FIG. 9, the output of the erroneous recognition region filter function finally obtains the output of FIG. 11. The specific reason why the erroneous recognition region filter function is necessary is as follows.

[0077] Regarding the image shown in FIG. 9, which is the output of the output comparison function, the ideal output of the output comparison function would be a black area other than the foreign object area, and the difference result of the class label stored in the pixels of the foreign object area would be the difference result between the area other than the object on the vehicle roof (other areas 513A and 513B in images D1 and D2 in FIG. 4) and the area of ​​the object that should be captured in the absence of the foreign object (roof of the vehicle body 510B in image D2 in FIG. 4) in the area where the foreign object is placed. However, in reality, there is an erroneous recognition area, and the difference results of the class labels stored in the pixels of the erroneous recognition area and the foreign object area 514D are not unified to the same numerical value and are sparse. Note that the class label changes depending on the recognition of the object by the first area discriminator 301B and the second area discriminator 301C, so it is difficult to predict in advance how the class label stored in the foreign object area 514D will be arranged in the output image of the output comparison function. Therefore, it is difficult to use the image in FIG. 9 as it is and try to recognize the foreign object area by image processing such as edge detection.

[0078] Therefore, in order to identify the foreign substance region 514D using image processing, or to erase the erroneously recognized region, it is necessary to unify the numerical values ​​stored in the pixels of the foreign substance region 514D and the erroneously recognized region. To achieve this, first binarization is performed on the image in FIG. 9, as shown in the process in FIG. 10. The image after binarization is as shown on the left side of FIG. 10. When binarizing the class labels, they are separated into 0 and other numerical values. Looking at the left side of FIG. 10, we can see that the colors of the non-black regions in FIG. 10 have been unified to white.

[0079] Next, in order to remove the erroneous recognition area, contraction and expansion processing is performed. By performing processing to contract the white area on the left image in Figure 10, the image in the center of Figure 10 can be obtained. By contracting the white area, the white area other than the foreign object area 514F, that is, the erroneous recognition area, has disappeared except for a part.

[0080] Moreover, if a process is performed to expand the white area in the image in the center of Fig. 10 to the size of the area in the image on the left of Fig. 10, the image on the right of Fig. 10 can be obtained. Since the erroneous recognition area has disappeared except for a portion, the original size of foreign object area 514G and a portion of the erroneous recognition area remain as a white area in the image on the right of Fig. 10. Additionally, the erroneous recognition area filter function can be configured using an image processing method that makes adjustments so that the detection rate of anomalies and foreign objects is increased in a later process.

[0081] In the area discrimination function, the output result of the erroneous recognition area filter function is used to further separate areas in the image that contain anomalies from areas that do not contain anomalies. In this embodiment, the area of ​​the blob is used, and a threshold is set to discriminate between areas that contain anomalies and areas that do not contain anomalies. An example of area discrimination is shown below. When the image on the right of FIG. 10 is obtained as the output of the output comparison function or the erroneous recognition area filter function, the area of ​​the white area (blob) surrounded by the black area is calculated using the number of pixels. This area is used as a threshold, and when the blob has an area equal to or larger than a certain amount, it is recognized as an area that contains an anomaly.

[0082] Specifically, the process converts all probe regions with an area below a certain level into black regions. The recognition results are shown in Figure 12. The erroneously recognized regions that remained in the image on the right of Figure 10 have become black regions in Figure 11. As another example of the area discrimination function, all white regions shown in the image on the right of Figure 10 may be recognized as regions with abnormalities. Other methods for realizing the area discrimination function can be configured using a method for discriminating between regions with abnormalities and regions without abnormalities.

[0083] 3, the configuration of output unit 301E will be described. Output unit 301E marks the area of ​​the foreign object in the image obtained by image acquisition unit 301A with a rectangle or with an easy-to-understand color based on the output result of abnormality extraction unit 301D. Alternatively, the area of ​​the foreign object is marked using both a rectangle and an easy-to-understand color.

[0084] 12 shows the output image of output unit 301E when image acquisition unit 301A obtains image D in FIG. 4. Foreign substance area 514 is surrounded by rectangle 515. As another example, foreign substance area 514 is colored in an easily recognizable color (514I). For convenience, in FIG. 12, a checkered pattern is used instead of coloring. The image after the above processing is saved in image recording unit 302.

[0085] In the device configuration of Fig. 2, when implementing the functions of the image processing unit 301 using a processor or the like, the following points should be considered. First, the functions of the image processing unit 301 can be implemented using various processors. Examples of various processors include a CPU that implements various functions based on a program, a GPU specialized for processing images and videos, a device such as an FPGA whose internal circuit configuration can be changed after manufacture, and a dedicated electric circuit designed and manufactured to implement a specific process such as an ASIC.

[0086] To realize the functions of the image processing unit 301, the functions may be realized by combining multiple processors of the same or different types from among these processors, or multiple functions may be realized by one processor. For example, a processor that has the functions of the entire system mounted on one IC chip such as a system-on-chip may be used, or a configuration may be implemented by combining one or more CPUs, such as a server, with other processors and programs.

[0087] The image processing unit 301 is configured using one or more of various processors. The hardware structure of the various processors is an electric circuit that combines circuit elements such as semiconductor elements. The electric circuit may be an electric circuit that realizes the functions of the image processing unit using logical operations. When the various processors and electric circuits realize the functions of the image processing unit using software (programs), codes that can be read by the various processors are stored in ROM, and the various processors refer to them. The software stored in ROM includes software necessary to execute this foreign object detection system. During execution of the software process, the RAM is used as a temporary storage medium.

[0088] 2, the processor 300 is equipped with an operation unit 313. The operation unit 313 includes a keyboard and a mouse (not shown), and the user displays images and videos stored in the image recording unit via these devices.

[0089] 2, the processor 300 finally displays and outputs various information to the display device 304. The display device 304 (monitor) displays operations performed via the operation device 313, images and videos of the vehicle roof captured by the imaging camera 201, and detection results of abnormal areas output from the image processing unit 301.

[0090] As for the configuration of the image recording unit 302 in FIG. 2, the image recording unit 302 is configured to include various types of magneto-optical recording media, non-transient recording media such as semiconductor memory, and control units for these recording media, and can record images and videos captured by the photographing camera 201, output results of the image processing unit 301, and the like in association with each other. The image recording unit 302 can also be prepared outside the processor 300 and connected to the processor 300, as long as the internal data can be referenced by the display control unit 303 and the image processing unit 301. The images and information stored in the image recording unit 302 are output to the display device 304 (monitor) via the display control unit 303 by the user's operation of the operation unit. The above has described each unit of the foreign object detection device illustrated in FIG. 2 and its operation.

[0091] Regarding the first area discriminator 301B and the second area discriminator 301C in the first embodiment, to put it simply, the first area discriminator 301B can be said to be an area discriminator that uses a neural network that has been trained in advance with pre-learning data that reacts to differences in patterns within an area and determines that there are different areas inside the boundary, and that has performed additional learning with an image of the object to be judged.

[0092] In addition, the second area discriminator 301C can be said to be an area discriminator that has undergone additional learning using an image of the object to be judged, using a neural network that has been trained with pre-learning data so as to judge the inside of the boundary as the same area regardless of differences in the pattern within the area. EXAMPLES

[0093] Next, in a second embodiment, a process procedure of the foreign object detection system as a whole shown in Fig. 1 will be described. This describes a foreign object detection method using the foreign object detection system having the above-mentioned configuration.

[0094] Fig. 13 is a flow chart showing a series of foreign object detection procedures according to the present invention. This flow is divided into a learning stage S1, an image acquisition stage S2, and an abnormality detection stage S3. In the first learning stage S1, as explained in Fig. 5, a first area discriminator 301B is generated by learning using learning data D1a and D1b in processing step S11, and a second area discriminator 301C is generated by learning using learning data in a similar manner in processing step S112. The processing in the learning stage may be performed by the processor 300, or may be performed by a separate computer or the like.

[0095] The image acquisition stage S2 of the overall processing procedure includes a vehicle position control processing step S21 and a photographing camera control processing step S22, which capture images or videos of the vehicle roof. Here, the vehicle body detection sensor 201 detects a vehicle approaching the foreign object detection system, and while the vehicle is being detected, the photographing camera 202 captures images or videos of the vehicle roof. The vehicle body detection sensor 201 and the photographing camera 202 are connected to the camera control unit 200. The camera control unit 200 receives a signal from the vehicle body detection sensor, and outputs a start and end signal for photographing to the photographing camera 202 based on the signal. In addition, the camera control unit 200 has a function of stopping photographing by the photographing camera when the vehicle body detection sensor continues to detect a vehicle for a certain period of time or more, assuming that an abnormality has occurred. After the photographing is completed, the image or video of the vehicle roof captured by the photographing camera is transmitted to the image recording unit 302 in the processor 300 and stored.

[0096] Next, in the next stage of the overall processing procedure, anomaly detection stage S3, processor 300 identifies areas where foreign objects are present. For this purpose, images or videos stored in image recording unit 302 are input to image processing unit 301, and the input images or videos are output with areas where foreign objects are present marked. Then, in processing step S31, image acquisition unit 301A first acquires images or videos of the vehicle roof stored in image recording unit 302. When acquiring videos, the videos are converted into images for each frame before being acquired. Furthermore, when the videos are acquired, image processing unit 301 is provided with a repeat control unit (not shown), and each procedure of image processing unit 301 is applied to all images into which the videos have been converted.

[0097] Next, in process steps S32 and S33, the image acquired by the image acquisition unit 301A is input to the first area discriminator 301B and the second area discriminator 301C, respectively, to obtain outputs D1 and D2. Images D1 and D2 in FIG. 4 are examples of outputs of the first area discriminator 301B and the second area discriminator 301C when the image acquisition unit 301A acquires the image D in FIG. 4. However, the first area discriminator 301B and the second area discriminator 301C have learned objects on the vehicle roof in advance, and in the image D1 in FIG. 4, the foreign object (tree branch) 514 is recognized as an area other than the area 510A of the vehicle roof. Also, in the image D2 in FIG. 4, the area where the foreign object 514 is present is ignored, and the area is recognized as the area 510B of the vehicle roof.

[0098] Next, in processing step S34, the outputs obtained from the first region discriminator 301B and the second region discriminator 301C are input to the anomaly extraction unit 301D, and the output is obtained. When the outputs obtained from the first region discriminator 301B and the second region discriminator 301C are images D1 and D2 in FIG. 7, respectively, an example of the final output of the anomaly extraction unit 301D is image D3 in FIG. 4. The internal processing of the anomaly extraction unit 301D is performed in the order of an output comparison function, an error recognition filter function, and an area discrimination function. As a specific processing example, the output of the output comparison function when images D1 and D2 in FIG. 4 are input to the anomaly extraction unit 301D is shown in FIG. 9, the output of the error recognition filter function in FIG. 10, and the output of the area discrimination function in FIG. 11.

[0099] Next, in processing step S35, the output of the anomaly extraction unit 301D is input to the output unit 301E, and the output of the output unit 301E is stored in the image recording unit 302. The output unit 301E performs processing for marking the area of ​​the foreign object with a rectangle or color based on the area of ​​the foreign object obtained by the output of the anomaly extraction unit 301D for the image obtained by the image acquisition unit 301A. The output of the output unit 301E when the output of FIG. 10 is obtained from the anomaly extraction unit 301D is shown in FIG. 12. The area where the foreign object is present is indicated by a rectangular marking 515 and a color marking 514G. After obtaining an image such as that shown in FIG. 12, the obtained image is stored in the image recording unit 302 as a detection result image. At that time, it is associated with the image obtained by the image acquisition unit 301A. Also, when an image is obtained by the image acquisition unit 301A, the image is converted into an image for each frame, and the procedure up to the marking of the area where the foreign object is present is applied to all the frame images of the image to obtain a result, and all the frame images to which the procedure has been applied are reconverted into an image. The reconverted image is stored as a detection result image in the image recording unit 302. At this time, the image is associated with the image acquired by the image acquisition unit 301A.

[0100] Next, in processing step S36, the detection result is displayed to the user. Here, the detection result image or the detection result video stored in the image recording unit 302 is output to the display device. The detection result image or the detection result video is output to the display device by the user's direct operation using the operation unit 313 inside the processor 300. In addition, even if the user does not directly operate it, it is possible to automatically output the detection result image or the detection result video to the display device at the time when it is saved in the image recording unit 302. The user judges whether there is a foreign object on the vehicle roof by looking at the detection result image or the detection result video output to the display device. In addition, if a foreign object is detected in the output result image or the output result video, it is also possible to automatically issue a warning to the user. In addition, the image or video of the vehicle roof on which no foreign object has been detected by the image processing unit 301 can also be output to the display device by the user's operation.

[0101] Finally, the effect of the foreign object detection system will be described. The above-mentioned procedure makes it possible to automatically detect whether or not a foreign object is present on the vehicle roof. More specifically, automatic foreign object detection makes it possible to find foreign objects without climbing onto the vehicle roof, which is effective in reducing the amount of work done at height by vehicle inspection workers. In addition, if the foreign object detection system is set to issue an alert when it finds a foreign object on the vehicle roof, it is also effective in early detection of foreign objects. And, if the foreign object detection system is energized, it is possible to constantly inspect the vehicle roof of vehicles passing through the installation location of the foreign object detection system. This is more advantageous than a human visual inspection of vehicles that have entered the inspection line in terms of the frequency of inspection and the degree of freedom in the location of the inspection. EXAMPLES

[0102] In the third embodiment, a modified configuration for recognizing an object will be described. In the foreign object detection system and the foreign object detection method according to the present invention, the process of the second area discriminator 301C in the image processing unit 301 can be replaced with the process described below.

[0103] The processing will be described below. It is assumed that the object is on the roof of the vehicle. An example of the image processing unit 301 in which the second area discriminator 301C is modified is shown in Fig. 14. In Fig. 14, the role of the second area discriminator 301C can be replaced by a second area extraction processor 600 instead of the second area discriminator 301C.

[0104] The second area discriminator 301C described in the first embodiment clearly recognizes the boundary lines of objects on a normal vehicle roof, and does not recognize minute features in the area of ​​the object inside the boundary lines. Therefore, if there is a foreign object on the vehicle roof in the image input to the second area discriminator 301C, the second area discriminator 301C recognizes the same area as when the normal roof is recognized while ignoring the foreign object, and outputs that area. In the third embodiment, a second area extraction processor 600 is executed instead of the second area discriminator 301C.

[0105] The second region extraction processor 600 is a process in which region data of objects on the entire normal vehicle roof is prepared in advance by manual annotation, and from that data, the second region extraction processor 600 extracts the region of an object at the same position as the region of the object appearing in the image acquired by the image acquisition unit 301A using pattern matching. The manually prepared region data of the entire vehicle roof is stored in the image recording unit 302. Also, in Fig. 15, examples of outputs from the image acquisition unit 301A, the first region discriminator 301B, the second region extraction processor 600, and the abnormality extraction unit 301D are shown as D, D1, D2, and D3, respectively.

[0106] In this case, the second region extraction process is configured as follows. First, the second region extraction process 600 has a data access function and a position alignment function. The second region extraction process 600 operates in the order of the data access function, the position alignment function, and the region extraction function, using the image acquired by the image acquisition unit 301A as input. As output, the region of the object on the vehicle roof, excluding foreign objects, in the image acquired by the image acquisition unit 301A is acquired. Each function will be described below.

[0107] First, the data access function is a function for acquiring a template image of the entire area on the vehicle roof and area data corresponding to the template image stored in the image recording unit 302. When implementing the third embodiment, a template image for pattern matching and the area data corresponding to the template image are stored in advance in the image recording unit 302. The data access function is a function for reading them.

[0108] Examples of the template image and its corresponding area data are shown in Fig. 16 and Fig. 17, respectively. Fig. 16 is an example of a template image for pattern matching. The image prepared as the template image is an optical image similar to the image acquired by image acquisition unit 301A. The template image is a panoramic image capturing the rooftops of all the vehicles in one train by connecting multiple images of the vehicle roofs captured in advance by photographing camera 202 without missing any parts. It is used when determining the similarity with the image acquired by image acquisition unit 301A by the positioning function described later. Hereinafter, it will be referred to as the template image.

[0109] Fig. 17 shows an example of data segmented into regions of objects on a normal vehicle roof, which have been manually annotated on the template image shown in Fig. 16. The vehicle roof region, the air conditioner outdoor unit, the pantograph, and other regions are shown with patterns of spots, vertical lines, horizontal lines, and diagonal lines, respectively. This is used when extracting the output of the registration function, which will be described later. Hereinafter, this will be referred to as region data.

[0110] Both Fig. 16 and Fig. 17 are images showing data of the entire area of ​​the vehicle roof. Fig. 16 and Fig. 17 show data for one car, but in reality, the entire area of ​​the vehicle roof is prepared according to the train configuration for which foreign object detection is to be performed. Furthermore, when creating a template image DT as shown in Fig. 16 and data DTa of the area as shown in Fig. 17, they are created so that there is no deviation between the longitudinal position of the vehicle in the template image DT and the longitudinal position of the vehicle in the image acquired by image acquisition unit 301A.

[0111] As a result, the vertical position of the vehicle in the template image DT and the vertical position of the vehicle in the image D acquired by the image acquisition unit 301A are unified, and when performing pattern matching, it is sufficient to search for a position where the image D acquired by the image acquisition unit 301A and the template image DT match in the horizontal direction. This eliminates errors due to vertical search, and has the effect of reducing the probability of an erroneous recognition area occurring in the output comparison function of the abnormality extraction unit 301D. However, the vertical position of the vehicle in the image D acquired by the image acquisition unit 301A may change due to the shaking of the vehicle photographed by the photographing camera 202. Examples of factors that can be considered include the wheels shifting sideways and the vehicle body moving up and down due to air springs. Due to these factors, a deviation occurs between the vertical position of the vehicle in the template image DT and the vertical position of the vehicle in the image D acquired by the image acquisition unit 301A, and an erroneous recognition area occurs in the output comparison function of the abnormality extraction unit 301D. However, the occurrence of erroneous recognition regions due to the circumstances shown as examples of causes above is very small, and can be dealt with by removing the erroneous recognition regions using the erroneous recognition region filtering function of anomaly extractor 301D.

[0112] The positioning function is a function that detects, by pattern matching, in the template image DT acquired by the data access function, the same position as the area on the vehicle roof that appears in the image D acquired by the image acquisition unit 301A, and outputs area data DTa corresponding to the detected position. Fig. 18 shows an example of the processing flow of the positioning function when the image acquisition unit 301A acquires the image D of Fig. 18, and the data access function acquires the template image DT and the area data DTa corresponding to the template image DT in Fig. 16 and Fig. 17. The input image D of Fig. 18 is exactly the same as the input image D of Fig. 15.

[0113] A specific example of pattern matching will be described. Here, for example, the similarity is calculated between the input image D in FIG. 18 and the template image DT in FIG. 18. Specifically, the input image D in FIG. 18 is superimposed on the template image DT in FIG. 18, and the similarity is calculated using a function. An example of the superimposed position is shown by a rectangle 610. This is repeated until the entire area of ​​the template image DT in FIG. 18 is covered, as if it were being slid over the template image DT in FIG. 18. The function for calculating the similarity is a widely known function such as SSD, SAD, NCC, etc.

[0114] Next, the position 610 on the template image DT in Fig. 18 which has the highest calculated similarity score is extracted, and region data 611 corresponding to that position is extracted from the region data DTa in Fig. 18. The extracted position of the region data DTa in Fig. 18 is shown in rectangle 611, and an example of the extracted region data is shown in D1 in Fig. 18. D1 in Fig. 18 becomes the positioning function, and further becomes the output image of the second region extraction processor 600.

[0115] In this case, the output of the second region extraction processor 600 is extracted from the region data that has been manually annotated, so no erroneous recognition regions occur in the boundary parts of objects or other regions. Therefore, compared with the output of the second region discriminator 301C, there is an effect of reducing erroneous recognition regions.

[0116] In addition, while the learning process of a convolutional neural network and the features used during recognition are unclear, the pattern matching method clearly shows the processing process in mathematical formulas. Therefore, it is easier to guarantee the effectiveness of the function than a classifier based on a convolutional neural network.

[0117] Regarding the first area discriminator 301B and the second area extraction process 600 in the third embodiment, to put it simply, the first area discriminator 301B is an area discriminator that uses a neural network that has been trained with pre-learning data that reacts to differences in patterns within an area and determines that there are different areas inside the boundary, and that has performed additional learning with an image of the object to be judged.

[0118] The second region extraction process 600 can be said to be a second region extraction processor that manually creates a region designation of an object to be determined, and cuts out an image with the designated region at the same position as the input image. EXAMPLES

[0119] In the fourth embodiment, a modified example of the configuration of the first region discriminator and the second region discriminator will be described. As the fourth embodiment of the present invention, a foreign object detection system and a foreign object detection method will be described below with reference to FIG. 19, which is characterized in that the first region discriminator 301B and the second region discriminator 301C are made of CNNs having the same structure and each discriminator is trained with different training data.

[0120] The first area discriminator 301B and the second area discriminator 301C have the same CNN structure 640. In addition, the first area discriminator 301B has weight data 1 (631), and the second area discriminator 301C has weight data 2 (633). The weight data 1 (631) is weight data obtained when learning using the learning data 632 for the first area discriminator. The weight data 2 (633) is weight data obtained when learning using the learning data 642 for the second area discriminator.

[0121] The first area discriminator learning data 632 includes data that is annotated using an image that shows a normal vehicle roof with relatively few foreign objects and stains selected from images taken for learning. By learning the first area discriminator 301B using the data set selected in this way, the first area discriminator 301B outputs the results of segmenting class areas for parts of the vehicle roof that faithfully capture the characteristics of each class.

[0122] On the other hand, the second area discriminator learning data 642 is learned by adding image data of the vehicle roof where the vehicle roof is dirty, wet due to rain, or has foreign objects on it, in addition to images of the normal vehicle roof. In this annotation, data is created that ignores the dirt, wetness, and foreign objects on the vehicle roof and teaches the area as a class for when those objects are not present.

[0123] Also, image data with artificial noise added to an image of a normal vehicle roof may be added. Artificial noise refers to pictures of any shape, color, and size that are generated in an image by image processing technology. Specific examples include elliptical and rectangular pictures. In annotation of an image with artificial noise added, data is created that ignores the artificial noise and teaches it as a region class when there is no such noise, just like image data with dirt, wetness, or foreign objects on the vehicle roof. Since the artificial noise can be a substitute for dirt, wetness, or foreign objects on the vehicle roof, it is possible to secure the amount of data required for learning even when image data with dirt, wetness, or foreign objects on the vehicle roof is difficult to obtain.

[0124] By training the second area discriminator 301C using such a data set, when an image of dirt, wetness, or foreign objects on the roof is given as input from the image acquisition unit 301A, the second area discriminator 301C ignores these and outputs an image that appears to recognize the roof of a vehicle as normal.

[0125] As described above, the first area discriminator 301B outputs a classification result for dirt, wetness, and foreign objects on the roof that is different from the area surrounding them, and the second area discriminator 301C outputs a classification result that ignores dirt, wetness, and foreign objects on the roof. The difference between these results is output by the anomaly detection unit 301D, so it is possible to extract foreign objects by using a CNN with the same structure but different weights.

[0126] By making the first region discriminator 301B and the second region discriminator 301C the CNN structure 640 of the same convolutional neural network structure, it is possible to grasp the difference in output due to differences in training data by adjusting the training data while grasping the change in output due to the data to be trained, without taking into consideration the difference in output result due to differences in structure, and it is possible to create a CNN with good performance.

[0127] In the third embodiment, a second region extractor using pattern matching was required to align the output of the first region discriminator 301B and the second region extraction processor 600, but in the fourth embodiment, the same input image is input to the first region discriminator and the second region discriminator, so that in the process of taking the difference in the anomaly extraction unit, a difference in class at a boundary line deviation portion due to a simple shift in the image is not erroneously recognized as a foreign object. In addition, there is an effect that a large amount of manual annotation work required in the second embodiment to create the second region extraction processor 600 is not required, and it can be created at low cost. These effects are also effective in the first embodiment.

[0128] Regarding the first area discriminator 301B and the second area discriminator 301C in the fourth embodiment, to put it simply, the first area discriminator 301B can be said to be an area discriminator that uses a neural network that has been trained in advance using pre-learning data that reacts to differences in patterns within an area and determines that there are different areas inside the boundary, and that has undergone additional learning using images of normal objects to be judged.

[0129] Moreover, the second area discriminator 301C uses a neural network that has been trained in advance with pre-training data that determines that the inside of the boundary is the same area regardless of differences in the pattern within the area, and this neural network has been additionally trained using an image of a normal object to be judged, an image to which artificial noise has been added, and an annotation image in which the noise in that image has been ignored.In other words, the second area discriminator 301C has a neural network structure that is exactly the same as that of the first area discriminator. EXAMPLES

[0130] As a fifth embodiment of the present invention, a foreign object detection system and a foreign object detection method will be described with reference to FIG. 20, which are characterized in that a first area discriminator 301B and a second area discriminator 301C are made of CNNs having different structures, and each discriminator is trained with different learning data.

[0131] The first area discriminator 301B and the second area discriminator 301C have CNN structure 1 (630) and CNN structure 2 (635), respectively. Furthermore, the first area discriminator 301B has weight data 1 (631), and the second area discriminator 301C has weight data 2 (633). The weight data 1 (631) is weight data obtained when learning using learning data 632 for the first area discriminator. The weight data 2 (633) is weight data obtained when learning using learning data 2 (642) for the second area discriminator.

[0132] At this time, the CNN structure 1 (630) and the CNN structure 2 (635) are convolutional neural networks with different layer structures, and have the same layer structures as the first area discriminator and the second area discriminator in the first embodiment. When training the second area discriminator, in addition to an image showing a normal vehicle roof, an image showing a dirty, wet, or foreign object-carrying vehicle roof, and an image showing a normal vehicle roof to which artificial noise has been added are used. These images are the same as the learning data 2 (642) for the second area discriminator in the third embodiment.

[0133] By making the first region discriminator 301B and the second region discriminator 301C have different convolutional neural network structures and by training the network using images with abnormalities and foreign objects, the degree of freedom in the layer structure and image data for training has increased. Therefore, it is possible to create a CNN with better performance than those in the first and fourth embodiments.

[0134] Regarding the first area discriminator 301B and the second area discriminator 301C in the fifth embodiment, to put it simply, the first area discriminator 301B can be said to be an area discriminator that uses a neural network that has been trained in advance using pre-learning data that reacts to differences in patterns within an area and determines that there are different areas inside the boundary, and that has undergone additional learning using images of normal objects to be judged.

[0135] In addition, the second area discriminator 301C can be described as an area discriminator that uses a neural network that has been trained in advance using pre-training data that determines that the inside of the boundary is the same area regardless of differences in the pattern within the area, and that has been additionally trained on this neural network using an image of a normal object to be judged, an image to which artificial noise has been added, and an annotation image in which the noise in that image has been ignored. [Explanation of symbols]

[0136] 101:Railroad cars 200: Camera control unit 201: Camera for photography 202: Vehicle detection sensor 300: Processor 301: Image processing unit 302: Image recording unit 303: Display control unit 304: Display device (monitor) 310: CPU 311:ROM 312:RAM 313:Operation unit 301A: Image acquisition section 301B: First area discriminator 301C: Second area discriminator 301D: Anomaly Extraction Department 301E: Output section 350A: Input layer 350B: Middle layer 350C: Output layer 510: Vehicle roof area 511: Air conditioner outdoor unit 513: Areas other than 510 and 511 514: Foreign object (tree branch) 516: Foreign object (driver) 517: Foreign object (umbrella) 510A: Area of ​​the vehicle roof recognized by the first area discriminator 301B 511A: Area of ​​the outdoor unit of the air conditioner recognized by the first area discriminator 301B 513A: Area other than 510 and 511 recognized by the first area discriminator 301B 514A: Foreign object (tree branch) recognized by the first area discriminator 301B 516A: Foreign object (driver) recognized by the first area discriminator 301B 517A: Foreign object (umbrella) recognized by the first area discriminator 301B 520: Vehicle roof area in the learning data of the first area discriminator and the second area discriminator 521: Area of ​​the outdoor unit of the air conditioner in the learning data of the first area discriminator and the second area discriminator 523: Areas other than 520 and 521 in the learning data of the first area discriminator and the second area discriminator 520A: Vehicle roof area after area division in the learning data of the first area discriminator and the second area discriminator 521A: Outdoor unit of an air conditioner when divided into regions in the learning data of the first region discriminator and the second region discriminator 523A: Areas other than 520 and 521 when dividing the learning data of the first area discriminator and the second area discriminator 510B: Area on the vehicle roof recognized by the second area discriminator 511B: Outdoor unit of air conditioner recognized by the second area discriminator 513B: Area other than 510 and 511 recognized by the second area discriminator 510C: Area on the vehicle roof output by the second area extraction process 511C: Area of ​​the outdoor unit of the air conditioner output by the second area extraction process 513C: Area other than 510 and 511 output by the second area extraction process 514D: Area containing foreign matter output by the output comparison function of the anomaly extraction section 514E: Area containing foreign matter when binarizing the misrecognized area filter function of the anomaly extraction section 514F: Area containing foreign matter when shrinking the false recognition area filter function of the anomaly extraction section 514G: Area containing foreign matter when expanding the erroneous recognition area filter function of the anomaly extraction section 514H: Area containing foreign matter output by the area discrimination function of the abnormality extraction section 514I: Color marking of areas with foreign matter by the output unit 515: Marking of the area containing the foreign object by a rectangle using the output unit 600: Second region extraction processor 610: Rectangle showing the input of the alignment function and the similarity calculation image of the template image 611: Rectangle showing area data extraction image of alignment function 630:CNN structure 631: Weight data 1 632: First region discriminator training data 633:Weight data 2 634: Training data for the second region discriminator

Claims

1. A foreign object detection device that detects foreign objects using an image in which a plurality of objects to be determined are shown, a first area discriminator that recognizes an area for each of the plurality of objects to be determined that appear in the image; a second area discriminator that discriminates the areas of the objects to be determined that appear in the image, and does not recognize the area of ​​a second object to be determined when the area of ​​the second object to be determined exists within the area of ​​a first object to be determined; an abnormality extraction unit that determines a difference between an output provided by the first area discriminator and an output provided by the second area discriminator; and an output unit that outputs the difference to an external device, Of the first area discriminator and the second area discriminator, at least the first area discriminator has a hierarchical network structure weighted using a plurality of images in which a plurality of objects to be determined are captured in one image, When the first area discriminator and the second area discriminator have the hierarchical network structure, The first area discriminator is an area discriminator that uses a neural network that has been trained with pre-training data so as to react to differences in shape and pattern within an area and determine that there is a different area inside the boundary, and that has been additionally trained with an image of an object to be determined, a foreign object detection device, characterized in that the second area discriminator is an area discriminator that has been additionally trained using an image of the object to be judged by using a neural network that has been trained using pre-learning data so as to judge areas inside the boundary as the same area regardless of differences in shape or pattern within the area.

2. A foreign object detection device that detects foreign objects using an image in which a plurality of objects to be determined are shown, a first area discriminator that recognizes an area for each of the plurality of objects to be determined that appear in the image; a second area discriminator that discriminates the areas of the objects to be determined that appear in the image, and does not recognize the area of ​​a second object to be determined when the area of ​​the second object to be determined exists within the area of ​​a first object to be determined; an abnormality extraction unit that determines a difference between an output provided by the first area discriminator and an output provided by the second area discriminator; and an output unit that outputs the difference to an external device, Of the first area discriminator and the second area discriminator, at least the first area discriminator has a hierarchical network structure weighted using a plurality of images in which a plurality of objects to be determined are captured in one image, When the first area discriminator has the hierarchical network structure, The first area discriminator is an area discriminator that uses a neural network that has been trained with pre-training data so as to react to differences in shape and pattern within an area and determine that there is a different area inside the boundary, and that has been additionally trained with an image of an object to be determined, A foreign object detection device characterized in that the second area discriminator is provided with a template image in which an area of ​​the object to be determined is specified, and cuts out the template image with the specified area in the same position as an image of the object to be determined.

3. A foreign object detection device that detects foreign objects using an image in which a plurality of objects to be determined are shown, a first area discriminator that recognizes an area for each of the plurality of objects to be determined that appear in the image; a second area discriminator that discriminates the areas of the objects to be determined that appear in the image, and does not recognize the area of ​​a second object to be determined when the area of ​​the second object to be determined exists within the area of ​​a first object to be determined; an abnormality extraction unit that determines a difference between an output provided by the first area discriminator and an output provided by the second area discriminator; and an output unit that outputs the difference to an external device, Of the first area discriminator and the second area discriminator, at least the first area discriminator has a hierarchical network structure weighted using a plurality of images in which a plurality of objects to be determined are captured in one image, When the first area discriminator and the second area discriminator have the hierarchical network structure, The first region discriminator is a region discriminator that uses a neural network that has been trained with pre-training data so as to react to differences in shape and pattern within a region and determine that there is a different region inside the boundary, and that has been additionally trained with an image of a normal object to be judged, The second area discriminator is an area discriminator having exactly the same neural network structure as the first area discriminator, the neural network being trained in advance with pre-learning data that determines the inside of the boundary as the same area regardless of differences in shape or pattern within the area, and additional learning being performed on this neural network using an image of a normal object to be judged, an image to which artificial noise has been added, and an annotation image in which the noise in that image has been ignored.

4. A foreign object detection device that detects foreign objects using an image in which a plurality of objects to be determined are shown, a first area discriminator that recognizes an area for each of the plurality of objects to be determined that appear in the image; a second area discriminator that discriminates the areas of the objects to be determined that appear in the image, and does not recognize the area of ​​a second object to be determined when the area of ​​the second object to be determined exists within the area of ​​a first object to be determined; an abnormality extraction unit that determines a difference between an output provided by the first area discriminator and an output provided by the second area discriminator; and an output unit that outputs the difference to an external device, Of the first area discriminator and the second area discriminator, at least the first area discriminator has a hierarchical network structure weighted using a plurality of images in which a plurality of objects to be determined are captured in one image, When the first area discriminator and the second area discriminator have the hierarchical network structure, The first region discriminator is a region discriminator that uses a neural network that has been trained with pre-training data so as to react to differences in shape and pattern within a region and determine that there is a different region inside the boundary, and that has been additionally trained with an image of a normal object to be judged, The second area discriminator is an area discriminator that uses a neural network that has been trained in advance using pre-learning data that determines that the inside of the boundary is the same area regardless of differences in shape or pattern within the area, and that has undergone additional training on this neural network using an image of a normal object to be judged, an image to which artificial noise has been added, and an annotation image in which the noise in the image has been ignored.

5. The foreign object detection device according to any one of claims 1 to 4, a detection unit for detecting a foreign object comprising: an output comparison function for obtaining a difference between an output of the first region discriminator and an output of the second region discriminator; an erroneous recognition region filter function for performing noise removal on the difference by binarization, contraction, and expansion processing; and an area discrimination function for further separating an area in an image that contains an abnormality from an area that does not contain an abnormality, using an output result of the erroneous recognition region filter function.

6. A foreign object detection system using the foreign object detection device according to any one of claims 1 to 5, A foreign object detection system comprising: a detection sensor that detects that the object to be determined is in a predetermined position; an imaging camera that photographs the object to be determined when the detection sensor detects that it is in the predetermined position and provides the photographed image to the foreign object detection device; and a display device that displays on a screen the output from the output section of the foreign object detection device.

7. A method for detecting foreign objects using an image of an object in which a single image shows a plurality of objects to be judged, comprising: the computer executes processing in a learning stage of generating an area discriminator having a weighted hierarchical network structure using a plurality of images of the object; an image acquisition stage of detecting that the object is in a predetermined position and acquiring an image of the object by photographing the object; and an image processing stage of detecting a foreign object in the object using the image of the object; the image processing step includes a process of recognizing an area for each of the plurality of objects to be determined that appear in the image by a first area discriminator generated in the learning step, a process of discriminating the areas of the objects to be determined that appear in the image by a second area discriminator and not recognizing the area of ​​the second object to be determined when the area of ​​the second object to be determined exists within the area of ​​the first object to be determined, an anomaly extraction process of finding a difference between an output provided by the first area discriminator and an output process of providing the difference to the outside, the first area discriminator and the second area discriminator have the hierarchical network structure due to the learning step, The first area discriminator is an area discriminator that uses a neural network that has been trained with pre-training data so as to react to differences in shape and pattern within the area and determine that there are different areas inside the boundary, and that has been additionally trained with an image of an object to be determined, a second area discriminator that has been additionally trained using an image of an object to be judged by using a neural network that has been trained using pre-training data so as to judge areas inside the boundary as the same area regardless of differences in shape or pattern within the area,

8. A method for detecting foreign objects using an image of an object in which a single image shows a plurality of objects to be judged, comprising: the computer executes processing in a learning stage of generating an area discriminator having a weighted hierarchical network structure using a plurality of images of the object; an image acquisition stage of detecting that the object is in a predetermined position and acquiring an image of the object by photographing the object; and an image processing stage of detecting a foreign object in the object using the image of the object; the image processing step includes a process of recognizing a region for each of the plurality of objects to be determined that appear in the image by a first region discriminator generated in the learning step, a process of discriminating the regions of the objects to be determined that appear in the image by a second region discriminator and not recognizing the region of the second object to be determined when the region of the second object to be determined exists within the region of the first object to be determined, an anomaly extraction process of determining a difference between an output provided by the first region discriminator and an output process of externally outputting the difference, the first area discriminator has the hierarchical network structure due to the learning step, The first area discriminator is an area discriminator that uses a neural network that has been trained with pre-training data so as to react to differences in shape and pattern within an area and determine that there is a different area inside the boundary, and that has been additionally trained with an image of an object to be determined, a second area discriminator that is provided with a template image in which an area of ​​the object to be determined is specified, and that cuts out the template image with the specified area at the same position as an image of the object to be determined.

9. A method for detecting foreign objects using an image of an object in which a single image shows a plurality of objects to be judged, comprising: the computer executes processing in a learning stage of generating an area discriminator having a weighted hierarchical network structure using a plurality of images of the object; an image acquisition stage of detecting that the object is in a predetermined position and acquiring an image of the object by photographing the object; and an image processing stage of detecting a foreign object in the object using the image of the object; the image processing step includes a process of recognizing a region for each of the plurality of objects to be determined that appear in the image by a first region discriminator generated in the learning step, a process of discriminating the regions of the objects to be determined that appear in the image by a second region discriminator and not recognizing the region of the second object to be determined when the region of the second object to be determined exists within the region of the first object to be determined, an anomaly extraction process of determining a difference between an output provided by the first region discriminator and an output process of externally outputting the difference, the first area discriminator and the second area discriminator have the hierarchical network structure due to the learning step, The first region discriminator is a region discriminator that uses a neural network that has been trained with pre-training data so as to react to differences in shape and pattern within a region and determine that there is a different region inside the boundary, and that has been additionally trained with an image of a normal object to be judged, a second area discriminator that uses a neural network that has been trained in advance using pre-training data that determines that the inside of a boundary is the same area regardless of differences in shape or pattern within the area, and that has been additionally trained on this neural network using an image of a normal object to be judged, an image to which artificial noise has been added, and an annotation image in which the noise in that image has been ignored, thereby resulting in a neural network structure that is exactly the same as that of the first area discriminator;

10. A method for detecting foreign objects using an image of an object in which a single image shows a plurality of objects to be judged, comprising: the computer executes processing in a learning stage of generating an area discriminator having a weighted hierarchical network structure using a plurality of images of the object; an image acquisition stage of detecting that the object is in a predetermined position and acquiring an image of the object by photographing the object; and an image processing stage of detecting a foreign object in the object using the image of the object; the image processing step includes a process of recognizing a region for each of the plurality of objects to be determined that appear in the image by a first region discriminator generated in the learning step, a process of discriminating the regions of the objects to be determined that appear in the image by a second region discriminator and not recognizing the region of the second object to be determined when the region of the second object to be determined exists within the region of the first object to be determined, an anomaly extraction process of determining a difference between an output provided by the first region discriminator and an output process of externally outputting the difference, the first area discriminator and the second area discriminator have the hierarchical network structure due to the learning step, The first region discriminator is a region discriminator that uses a neural network that has been trained with pre-training data so as to react to differences in shape and pattern within a region and determine that there is a different region inside the boundary, and that has been additionally trained with an image of a normal object to be judged, The second area discriminator is an area discriminator that uses a neural network that has been trained in advance using pre-training data that determines the inside of the boundary as the same area regardless of differences in shape or pattern within the area, and that has been additionally trained on this neural network using an image of a normal object to be judged, an image to which artificial noise has been added, and an annotation image in which the noise in the image has been ignored.

11. A foreign object detection method according to any one of claims 7 to 10, comprising: The foreign object detection method is characterized in that the anomaly extraction processing includes an output comparison processing for obtaining a difference between the output of the first area discriminator and the output of the second area discriminator, an erroneous recognition area filtering processing for performing noise removal on the difference by binarization, contraction, and expansion processing, and an area discrimination processing for further separating areas in the image that have anomalies from areas that do not have anomalies using an output result of the erroneous recognition area filtering processing.

Citation Information

Patent Citations

  • Apparatus and method for detecting defect, apparatus and method for processing information, and its program

    JP2008139201A

  • Area division device and area division method

    JP2012118923A

  • Information processing apparatus, information processing method, and program

    JP2018120300A

  • Multivariate and multi-resolution retinal image anomaly detection system

    JP2020032190A

  • Fault inspection device, fault inspection method, fault inspection program, learning device and learned model

    JP2020135051A