Method for detecting a defect on a metal part

A neural network-based method for defect detection in complex metal parts uses self-supervised training to estimate reflectance and normal directions, addressing the limitations of conventional methods by enhancing reliability and reducing calibration errors.

FR3167235A1Pending Publication Date: 2026-04-10SAFRAN SA
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
FR · FR
Patent Type
Applications
Current Assignee / Owner
SAFRAN SA
Filing Date
2024-10-03
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Conventional optical inspection methods struggle to reliably detect defects in reflective and complex-geometry metal parts due to natural variability in grain and texture, requiring time-consuming calibration and additional equipment, and lack of reliable reference images.

Method used

A method using a neural network trained with self-supervised training neural networks to determine reflectance and normal direction maps, estimating illumination direction and light intensity without prior information, enabling defect detection in complex metal parts.

Benefits of technology

Improves reliability and robustness of defect detection in complex metal parts by accurately estimating illumination direction and light intensity, reducing errors associated with traditional calibration methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

Method for Detecting a Defect on a Metal Part with Complex Geometry. One aspect of the invention relates to a method for detecting a surface defect on a metal part, that is, a part whose external surface is reflective and which may have a complex geometry. This method relies on the use of a neural network, called a detection network, specifically trained to detect such a defect, either directly by analyzing images of the part in question acquired via a camera and under artificial lighting, or by analyzing the properties of the part and the acquisition conditions, determined from the images of the part. The proposed approach has the advantage of not requiring prior information about the acquisition or the part, thanks to the combined use of two self-supervised training neural networks to form the training dataset necessary for the supervised training of the detection network.
Need to check novelty before this filing date? Find Prior Art

Description

Title of the invention: Method for detecting a defect on a metal part. TECHNICAL FIELD OF THE INVENTION

[0001] The technical field of the invention is that of non-destructive testing.

[0002] The present invention relates to a method for detecting a defect on a metal part with complex geometry. TECHNOLOGICAL BACKGROUND OF THE INVENTION

[0003] In non-destructive testing, optical inspection methods are known to be used to detect surface defects on mechanical parts. Most of these methods rely on acquiring an image of the part using a camera, illuminated by a controlled artificial light source, in order to enhance image contrast and reveal the textures of the parts to detect any potential defects, such as cracks. Such approaches allow for the automation of part inspections, thereby improving the robustness, reliability, and speed of the inspections.

[0004] The drawback is that conventionally used optical inspection methods cannot reliably inspect reflective parts, such as metallic parts, and parts with complex external geometries, which are often critical in various industries, such as aircraft blades in aeronautics. Indeed, comparing an image of such a part to a reference image (i.e., an image of a part without a defect or with a known defect) to detect a defect is difficult due to the natural variability of the part's grain (for example, caused by variations in alloys and / or colorimetry), even when the parts are defect-free, resulting in significant texture differences. This natural variability in the part's grain then masks the variability in the image associated with the presence of a defect.In other words, it is difficult to obtain images of metal parts with known defects (i.e., reference defects) that can be reliably used, especially since the occurrence of a defect on such a part is rare due to the particularly robust and optimized manufacturing processes. It should also be noted that images obtained by these conventional methods are subject to masking effects, whether through shading or light saturation, due to the reflectivity of the parts and their geometry.

[0005] In this context, methods have been developed specifically adapted to metallic parts, which are therefore highly reflective and may have complex shapes. These methods are based on acquisition by a camera, images of the room illuminated from different angles of light incidence by different artificial light sources, typically by stereo-photometry.

[0006] Known methods based on this acquisition principle require knowledge of certain acquisition parameters, such as the direction and / or intensity of light from each source relative to the part in the camera's frame of reference, or certain properties of the part, such as its reflectance. This information serves as a reference for detecting the presence of a defect in the part. These methods therefore require precise calibration of the acquisition and the use of additional equipment to measure this data, which is time-consuming, complicates the implementation of the inspection, and introduces additional sources of error related to measurement uncertainties.

[0007] There is therefore a need for a tool for detecting defects in complex-shaped metal parts that is reliable, robust, and quick to implement, and does not require prior information about the acquisition or the part in question. Summary of the invention

[0008] The invention offers a solution to the problems mentioned above, by enabling the detection of a defect in a part via a neural network trained on a training database built through the joint use of two self-supervised training neural networks adapted to automatically determine the properties necessary for the implementation of the defect detection.

[0009] A first aspect of the invention relates to a computer-implemented method for detecting a defect on a metal part, the method comprising: • Obtain at least three images of the room, the images of the room being acquired via a camera and an artificial lighting source; • Detect the defect in the part by analyzing images of the part using a neural network, called a detection network. The detection network is a supervised training artificial neural network configured to detect the defect from the part images. The detection network is trained on a training database built using a first neural network and a second neural network. The first neural network is an artificial neural network configured to determine, for each reference image of a first plurality of reference images, a reference reflectance map including reference reflectance values ​​and a reference normal direction map including reference vectors of normal directions. The second neural network is an artificial neural network configured to determine, for each reference image of a first plurality of reference images, a reference vector of illumination direction and / or a luminous intensity of the artificial lighting source, each reference image of the first plurality of reference images being an image of a reference part among a plurality of reference parts, the first and second neural networks being self-supervised training and jointly optimized via minimization of a distance between the first plurality of reference images and a plurality of intermediate images, the plurality of intermediate images being constructed from the reference reflectance maps, the reference normal direction maps and the reference vectors of illumination directions.

[0010] The term "defect" means any type of defect detectable on the surface of the part, such as a crack or a deformation due to shock or impact.

[0011] “Artificial lighting” means a light source that is not a natural light source but is specially added to the scene to perform image acquisition.

[0012] A "map" is understood to mean a representation of the distribution of a specific property in the image, typically reflectance or normal direction with respect to the surface of the part. A map is therefore an image in which the value of each pixel (or a vector assigned to each pixel) corresponds to the value of said property (respectively, a vector of values ​​of said property) for the corresponding pixel in the image from which the map is derived. Thus, for each reference image, the image corresponding to the reference reflectance map represents how the part diffuses light in the reference image, while the image corresponding to the reference normal direction map indicates the orientation of the surfaces of the reference part in the associated reference image.

[0013] The term "reflectance" refers to the rate of reflection of light by a surface at a given wavelength. Typically, it is the rate of reflection of the surface of the part under artificial lighting. Reflectance is sensitive to the presence of a defect, in particular because such a defect significantly alters the luminous intensity and / or the direction of the light reflected locally by the part.

[0014] The term "normal direction" refers to the direction normal to a point on the surface of the part. It is therefore a purely geometric property of the part that can be determined from an image analysis. The normal direction is also sensitive to the presence of a defect, since this induces a local deformation, in the form of depressions and bumps, on the surface of the part.

[0015] By "self-supervised" means that the optimization, or learning, of the first and second neural networks is performed in an unsupervised manner by their own optimization mechanism directly by comparing the result of their joint prediction, i.e., the intermediate images, with the reference images. In other words, the first and second neural networks are optimized by iteratively comparing the intermediate images, formed from the reference reflectance value and the reference vectors of normal and illumination directions, with the reference images.

[0016] The term "illumination direction" refers to the principal direction of the light beam emitted by the artificial lighting source towards the surface of the room in the camera's frame of reference. It is therefore an intrinsic property of the artificial light source. Preferably, this property is given in the camera's frame of reference. The luminous intensity then corresponds to the intensity of the light emitted by the artificial lighting source in the illumination direction.

[0017] Thanks to the invention, it is possible to detect a defect on a metal part, particularly a part with a complex geometry, without contact, with improved reliability and robustness compared to known prior art methods. Indeed, the approach underlying the method of the invention makes it possible to efficiently exploit all the information produced through the use of directional lighting.

[0018] Thus, unlike other defect detection methods that use all acquired images or select a specific image based on certain criteria, the proposed approach provides the detection network with two specific pieces of information (for example, in the form of images): the reflectance of the part and the direction of the normals to the surface of the part. This information is estimated by the first and second neural networks dedicated to analyzing the acquired images, typically acquired by stereophotometry. Furthermore, by using a self-supervised training method, for example, based on a differentiable rendering function to construct the intermediate images, the first neural network learns to estimate the reflectance and normal directions accurately and without prior information about the acquisition and / or the part to be inspected.The network's performance is then evaluated by comparing the reconstructed images to the original images (i.e., the reference images) via a cost function based on the distance between these images. This function allows for backpropagation of the gradient, thus facilitating the updating of the weights of the first and second neural networks.

[0019] It is known that the synthesis of an image, i.e., here its reconstruction from reflectance and normal directions, typically by a rendering function, requires knowledge of the illumination direction of the light source, as well as the luminous intensity of the light source. Traditionally, these directions The intensity values ​​are obtained using conventional calibration methods, which have the drawback of relying on the assumption that the light source is a perfectly point source, which is not the case in reality. Furthermore, the calibration phase is tedious to perform, particularly in an industrial production context where acquisition parameters and conditions can vary from one acquisition to another, necessitating frequent calibrations to ensure the accuracy of the results.

[0020] To overcome these limitations, the present approach proposes to simultaneously estimate, in each reference image, using the first and second neural networks, not only the reflectance and normal directions, but also the illumination direction and / or the light intensity of the light source (the illumination direction and light intensity being one or both unknowns at the time of implementation of the method). The proposed method thus makes it possible to avoid the assumptions and simplifications associated with traditional models. In other words, the first and second neural networks are able to find the implicit model that best explains the observations and to infer the illumination direction and / or the light intensity more accurately and adaptively than by current methods.

[0021] Thus, incorporating the estimation of the illumination direction and / or light intensity (which is / are no longer measured) improves the robustness and accuracy of the results. This approach reduces the impact of errors related to traditional calibration and provides a more reliable estimate of the illumination direction and / or light intensity, resulting in a better representation of the physical properties of the inspected parts.

[0022] Finally, the use of reflectance and normal direction maps offers several advantages over other traditional approaches, notably by enabling more precise defect detection, typically in the presence of an impact or scratch. Indeed, such defects significantly alter the reflectance and normal direction values ​​contained in these maps. Moreover, these reflectance and normal direction maps encapsulate physical information relevant to defect detection, providing more complete information about the part and the scene (i.e., lighting conditions) than state-of-the-art methods for analyzing anomalous features in images of the part being inspected.

[0023] It is noted that the architecture of the first neural network is designed to simultaneously estimate the reflectance and normal direction maps for each reference image

[0024] In addition to the characteristics just mentioned, the process according to the first aspect of the invention may have one or more complementary characteristics from among the following, considered individually or according to all technically possible combinations.

[0025] In one embodiment, the metal part has a complex geometry.

[0026] The term "complex geometry" means that the external shape of the part has significant variations, such as a curvature of the surface of the part, such that the light reflected from it is not reflected uniformly or unidirectionally across its surface. This is typically an aircraft blade or an aircraft engine transmission component, typically a gear.

[0027] In one embodiment, the training database is augmented by generating a plurality of pairs of new reference reflectance maps and new reference normal direction maps, the new reference reflectance and reference normal direction maps of each pair of new maps being generated by selecting reference reflectance values ​​and reference normal direction vectors corresponding to a predetermined defect and taken respectively from a reference reflectance map and a reference normal direction map corresponding to a reference image of the first plurality of reference images including the predetermined defect, the augmentation being implemented by replacement, by the selected reference values ​​and reference vectors,of reflectance reference values ​​and normal direction reference vectors included in: , • A portion not corresponding to a predetermined defect in the respective reference reflectance and reference normal direction maps from which the reference values ​​and reference vectors for replacement are selected; or • A reference reflectance map and a reference normal direction map, respectively, corresponding to a reference image of the first plurality of reference images not containing any defects.

[0028] A "predetermined defect" is understood to mean a known defect on the reference part and identified in one or more reference images corresponding to said reference part. The term "predetermined" therefore refers, in this context, to the fact that the defect is detected and identified before the implementation of the method according to the invention.

[0029] Most methods in the art for detecting a defect on a metal part rely on deep learning. A large amount of data must therefore be used for the learning of these algorithms to allow a sufficiently reliable prediction. However, identified defects in such parts that could serve as a reference are rare, making it impossible to base learning solely on these few known defects.

[0030] It is known to use data augmentation techniques to improve learning. For example, it is known to generate new images using neural networks. One drawback is that these techniques do not take into account the interaction between light and matter, resulting in data that lacks realism and is too synthetic, thus limiting the reliability and repeatability of the tests. Other data augmentation techniques rely on the use of simulation tools. However, these techniques are time-consuming and only allow for limited variability in the augmented data, also limiting the reliability and repeatability of the tests.

[0031] The invention therefore proposes to remedy this drawback by increasing the training database from data constructed realistically based on existing and identified defects in the reference images, and not on simulations or on data obtained simply via mathematical transformations (rotations, deformations, enlargement, etc.), as is commonly done in known data augmentation approaches.

[0032] In one embodiment, the replacement by the selected reflectance reference values ​​and normal direction reference vectors is implemented by applying a geometric transformation of their distribution.

[0033] It is thus possible to generate other realistic defects from existing defects identified in the reference images.

[0034] In one embodiment, the detection network is configured to detect the defect from a reflectance map comprising reflectance values ​​and a normal direction map comprising directions normal to the part, the reflectance and normal direction maps being determined in the images of the part, the training database comprising the reference reflectance maps and the reference normal direction maps determined by the first neural network.

[0035] It is thus possible to detect a defect directly in the maps determined from the images of the part to be inspected. This embodiment is particularly advantageously compatible with a multi-source artificial lighting acquisition technique, typically stereophotometry.

[0036] In one embodiment, the reflectance mapping and normal directions to the part are determined in the images of the part via the first neural network.

[0037] It is thus possible to use the first and second neural networks to determine the image maps of the part to be inspected necessary for detecting a defect on that part. In other words, the first and second neural networks are also configured to determine the reflectance and normal direction maps for the images of the part to be inspected.

[0038] In one embodiment, the detection network is configured to detect the defect directly from the images of the part, the training database comprising a second plurality of reference images, the second plurality of reference images being constructed from the reference reflectance maps and the reference normal direction maps.

[0039] In this alternative embodiment, the defect is detected by the detection network directly in the images of the part to be inspected. The images of the third plurality of images are, for example, constructed via the differentiated rendering function used for the optimization of the first and second neural networks.

[0040] In one embodiment, the training database is augmented by generating a third plurality of reference images, each reference image of the third plurality of reference images being generated from the reference reflectance maps and reference normal directions of one of the reference images of the first plurality of reference images comprising a predetermined defect and a modified illumination direction reference vector, the illumination direction reference vector comprising at least two reference values, the modified illumination direction reference vector being obtained by modifying at least one of the reference values ​​of said illumination direction reference vector,said at least one modified reference value being selected from a predefined range of values ​​relating to a dimension corresponding to said reference value to be modified and including the reference value to be modified.

[0041] In one embodiment, the training database is augmented by generating a fourth plurality of reference images, each reference image of the fourth plurality of reference images being generated from the new reference reflectance maps and reference normal directions of a pair of new maps from the plurality of pairs of new maps, and a modified illumination direction reference vector, the illumination direction reference vector comprising at least two reference values, the modified illumination direction reference vector being obtained by modifying at least one of the reference values ​​of said illumination direction reference vector, said at least one modified reference value being selected from a predefined range of values ​​pertaining to a dimension corresponding to said reference value to be modified and including the reference value to be modified of the illumination direction reference vector.

[0042] In both of these embodiments, the database is further augmented by the generation of new reference images. The idea here is to generate the images from existing maps by modifying the illumination direction associated with these maps. In other words, such an approach makes it possible to generate new "views" of the room, that is, new images as if the room were illuminated by the light source from a different direction. These embodiments are particularly advantageous when the number of artificial lighting sources is small (typically between 1 and 10 sources). Indeed, this data augmentation mechanism makes it possible to realistically expand the database without having to reacquire images with new artificial lighting sources.

[0043] In one embodiment, each reference image comprises a plurality of pixels, the first neural network accepting as input a predefined position of each pixel of the plurality of pixels relative to an artificial light source illuminating the reference piece corresponding to the reference image during the acquisition of said reference image, and wherein the second neural network accepts as input said reference image.

[0044] In one embodiment, for each of the reference parts of the plurality of reference parts, the first and second neural networks are jointly optimized from each of the reference images of said reference part among the first plurality of reference images.

[0045] Thus, the first and second neural networks are both simultaneously and jointly optimized for each of the reference parts, independently of the other reference parts. Therefore, there is a joint optimization of the first and second neural networks for each of the reference parts.

[0046] Furthermore, all images acquired for the same reference part are used to perform the training. The objective is therefore not to generalize the training from one reference part to another, but rather to encapsulate the geometric and photometric information specific to the acquisition of images for a specific reference part.

[0047] Thus, the first and second neural networks are intentionally trained to overlearn the details of the reference images of a given reference part, by exploiting the set of reference images available for that reference part.

[0048] A second aspect of the invention relates to a device for detecting a defect on a metal part with complex geometry, the device being configured to implement the method according to the first aspect.

[0049] A third aspect of the invention relates to a computer program product comprising instructions which, when the program is executed on a computer, lead the latter to implement the steps of the process according to the first aspect.

[0050] A fourth aspect of the invention relates to a computer-readable recording medium comprising instructions which, when executed by a computer, lead the computer to carry out the steps of the process according to the first aspect.

[0051] The invention and its various applications will be better understood by reading the following description and examining the accompanying figures. BRIEF DESCRIPTION OF THE FIGURES

[0052] The figures are presented for illustrative purposes only and are in no way limiting of the invention. • The [Fig. 1] is a synoptic diagram illustrating a method for detecting defects on a metal part according to an embodiment of the invention. • Fig. 2 is a synoptic diagram illustrating the optimization of neural networks according to one embodiment of the invention. • Fig. 3 is a synoptic diagram illustrating the augmentation of a training database according to one embodiment of the invention. • Fig. 4 is a synoptic diagram illustrating a variant implementation of the process according to Fig. 1. • Fig. 5 is a synoptic diagram illustrating the increase in the training database according to another embodiment of the invention. • Fig. 6 is a synoptic diagram illustrating the increase in the training database according to another embodiment of the invention, following the increase in data from Fig. 3. • Fig. 7 is a schematic representation of a defect detection device on a metal part according to an embodiment of the invention. • Fig. 8 is a synoptic diagram illustrating a method for augmenting a database. DETAILED DESCRIPTION

[0053] Unless otherwise specified, the same element appearing on different figures has a unique reference.

[0054] The present invention proposes a method for detecting a surface defect on a metal part, that is to say, a part whose external surface is reflective and whose geometry is potentially complex. This method is based on the use of a network of neurons, called a detection network, specifically trained to detect such a defect, either directly by analyzing images of the part in question acquired via a camera and under illumination by artificial lighting, or by analyzing properties of the part and acquisition conditions, determined via the images of the part.

[0055] The proposed approach has the advantage of not requiring prior information on the acquisition or on the part thanks to the joint use of two self-supervised training neural networks to form the training basis necessary for the supervised training of the detection network.

[0056] In this respect, and in connection with [Fig. 1], one aspect of the invention relates to a method 100 for detecting a defect on a metal part. This method 100 can be implemented by computer. The defect can be any type of defect observable on the surface of the metal part. The metal part can be any part made of any reflective metallic material.

[0057] In particular, the metal part may have a complex geometry, that is to say, it may have an external shape such that its external surface exhibits significant variations, causing the light reflected from it to be neither uniformly nor unidirectionally reflected by its surface. This is typically an aircraft blade or an aircraft engine transmission component, such as a gear.

[0058] The process 100 includes a step 110 of obtaining at least three images of the part. Hereafter, for the sake of brevity, the phrase "images of the part" refers to "at least three images of the part".

[0059] The images of the room are or have been acquired through the use of a camera and an artificial light source. The camera and the artificial light source are, for example, included in an acquisition system.

[0060] Depending on the application, several artificial lighting sources can be used, for example when the acquisition system is based on a stereo-photometry technique, aimed at acquiring several images of the room to be controlled under various illuminations, generated via the activation and / or deactivation of these different artificial lighting sources.

[0061] The camera can be any device capable of capturing one or more images of the room, typically via a lens. The acquired images can be in any format and be color images or grayscale images. Preferably, the acquired images are grayscale or are color images converted to grayscale before being obtained in step 110. The camera is sensitive to the wavelength(s) emitted by the artificial light source.

[0062] The artificial light source can be any type of artificial light source, such as a polychromatic or monochromatic light source. The light source is, for example, a point source of artificial light. In In the case of stereo-photometric acquisition, the artificial lighting sources are preferentially point sources of artificial lighting.

[0063] The process 100 then includes a step 120 of detecting the defect in the images of the part to be inspected. This defect is detected by analyzing the images of the part using an artificial neural network, called a "detection network." The detection network is therefore configured to detect the defect from the images of the part. The detection network is a supervised training artificial neural network.

[0064] The detection network is built by learning on a database, called the "training database". Since the training of the detection network is supervised, the training database is a database where the data it contains are annotated, that is to say, they are annotated via a label indicating the characteristic that we seek to predict via the learning network, in this case the presence or absence of a defect.

[0065] The distinctive feature of this database is that it is constructed using two neural networks in conjunction. More specifically, this database is built using a first neural network and a second neural network. These neural networks are used to generate the data for the training database or to generate data that is then transformed to form the training database. More precisely, the database is formed through the joint optimization of the first and second neural networks.

[0066] The first and second neural networks are trained (or optimized) in a self-supervised manner to extract information from a first plurality of reference images. The reference images are images of reference parts, where each reference image is an image of one of the reference parts among a plurality of reference parts. It is noted that the reference parts may or may not be of the same type (blade, bearing, piston, fin, etc.); that is to say, they may be parts of the same type or parts of different types, for all or part of the reference parts.

[0067] Several reference images may be images of the same reference part. This is the case, for example, when these different reference images of the same reference part are acquired with different artificial lighting sources.

[0068] The term "reference part" means a metal part for which it is already known whether or not there is a defect on its surface, which will have been previously detected and identified; that is to say, such a defect is predetermined. Thus, for each reference image, it is already known whether this reference image This corresponds to a part with a defect and whether the defect of that part is present in the relevant reference image. In other words, each reference image is labeled (i.e., annotated) with a label (or annotation) indicating whether the predetermined defect of the corresponding reference part is present in that reference image or whether the reference part in question is defect-free. These labels, or annotations, are predetermined by an operator.

[0069] Within the framework of the invention, the first and second neural networks are used to determine in the reference images the reflectance of the reference parts and the directions normal to the surface of the reference parts, as well as the direction of illumination and / or the light intensity of the source used to acquire each of the reference images.

[0070] In particular, the first neural network is an artificial neural network that is configured to determine, for each reference image of the first plurality of reference images, a reference reflectance map and a reference normal direction map.

[0071] The reference reflectance map includes reference reflectance values. This map reflects the distribution of this reflectance property of the reference part in the reference image from which it is determined. For example, this map is an image of the same size that includes the same number of pixels as the corresponding reference image, such that each pixel of the reference reflectance map includes a reference reflectance value of the reference part for the corresponding pixel in the reference image. In other words, the reflectance is calculated for each pixel of the reference image, thus forming an image of the distribution of this reflectance, called the reference reflectance map.

[0072] The reference normal direction map comprises reference vectors of normal directions. This map reflects the distribution of the normal direction at different positions on the surface of the reference part, in the reference image from which it is determined. For example, this map is an image of the same size that includes the same number of pixels as the corresponding reference image, such that each pixel of the reference normal direction map includes a vector, called a reference vector, corresponding to the normal direction at that pixel; that is, a vector indicating the normal direction of the reference part for the corresponding pixel in the reference image. In other words, the normal direction is calculated for each pixel of the reference image, thus forming an image of the distribution of this normal direction, called the reference normal direction map.The normal direction reference vector includes at least two values, called . reference values, each corresponding to a dimension in space. Typically, the normal direction reference vector includes one value corresponding to an azimuth of the normal direction and one value corresponding to an inclination of the normal direction, relative to the object. Alternatively, the normal direction reference vector can include three reference values ​​corresponding to the three dimensions of a Euclidean space. For a given pixel, the normal direction is therefore defined by the normal direction reference vector corresponding to that pixel.

[0073] The second neural network, for its part, is an artificial neural network configured to determine, for each reference image in the first plurality of reference images, the direction of illumination of the source relative to the reference part corresponding to that reference image, for example, in the camera's coordinate system. As detailed in one embodiment of the invention, the second neural network can also be configured to determine the light intensity of the source in the direction of illumination. However, for the sake of illustration, the light intensity is considered, in this embodiment, to be known at the time of inspection of the part, that is, it is known before the implementation of method 100, unlike the direction of illumination, which is not known and must be determined.

[0074] In particular, the second neural network determines a reference vector corresponding to (i.e., indicating) the direction of illumination. The reference vector for the direction of illumination comprises at least two reference values, each corresponding to a dimension in space. Typically, the reference vector for the direction of illumination comprises one value corresponding to an azimuth of the direction of illumination and one value corresponding to an inclination of the direction of illumination relative to the room. Alternatively, the reference vector for the direction of illumination may comprise three reference values ​​corresponding to the three dimensions of a Euclidean space. The direction of illumination is thus defined by this reference vector for the direction of illumination.

[0075] Thus, for each reference image of the first plurality of reference images, a reference reflectance map, a reference normal direction map and the illumination direction are determined by the first and second neural networks.

[0076] The training, also called "optimization," of the first and second neural networks is jointly implemented in a self-supervised manner; that is, these neural networks learn on their own to accurately and reliably produce the maps and the direction of illumination, and not from labeled (i.e., annotated) data. This training is performed by constructing an image, called an intermediate image, from the reference reflectance map, of the mapping of normal reference directions and illumination direction which are determined from one of the reference images.

[0077] Once constructed, this intermediate image is compared to the reference image corresponding to the maps and illumination direction used to form the intermediate image. This comparison is notably performed by calculating a distance between this intermediate image and the relevant reference image.

[0078] The distance is, for example, equal to the difference between the pixel values ​​of the intermediate image and the corresponding reference image. Typically, the distance can be a distance determined according to the L1 or L2 norm between the reference image and the intermediate image. Indeed, if we take, for example, the absolute mean difference, the distance is equal to 1 ,, ** , where M corresponds to Pn >11 I the reference image and M corresponds to the intermediate image, with p and n the number of pixels of the reference and intermediate images according to each of the dimensions of these images, respectively (these two images being of the same size).

[0079] The distance thus calculated between the two images serves as a cost function for training the first and second neural networks. These first and second neural networks are therefore trained through iterative optimization aimed at minimizing this distance.

[0080] More precisely, this optimization is performed by making this comparison for a plurality of intermediate images, each of which is produced from the reference reflectance map, the reference normal direction map, and the illumination direction, which are determined from one of the reference images in the first plurality of reference images. In other words, an intermediate image is constructed for each of the reference images. Thus, the optimization of the first and second neural networks is jointly performed by minimizing the calculated distance between each of the intermediate images and the corresponding reference images.

[0081] In other words, the first and second neural networks are self-supervised training and are jointly optimized via a minimization of a distance between the first plurality of reference images and the plurality of intermediate images, the plurality of intermediate images being constructed from the reference reflectance maps, the reference normal direction maps and the reference illumination direction vectors.

[0082] The parameters of the first and second neural networks can be initialized by any known method, for example randomly.

[0083] These parameters can also be optimized by any minimization method based on a cost function, here the distance calculated between the Reference images and intermediate images are typically iteratively optimized until the calculated distance is less than or equal to a predefined threshold. This predefined threshold is set prior to training the first and second neural networks using any known approach, for example, automatically or manually, such as by an operator based on their knowledge and / or experience.

[0084] An aspect of the invention therefore also relates, in connection with [Fig.2], to a mechanism for training the first and second neural networks.

[0085] The training 200 includes a step 210 of determination, by the first neural network, of the reference reflectance maps and reference normal directions for each of the reference images of the first plurality of reference images.

[0086] Training 200 also includes a step 220 of determination, by the second neural network, of the direction of illumination, typically the reference vector of direction of illumination, of the artificial lighting source for each reference image.

[0087] The training 200 also includes a step 230 of constructing the intermediate image from the reference reflectance map, the reference normal direction map and the illumination direction (typically the reference vector of the illumination direction) for each of the reference images of the first plurality of reference images.

[0088] Training 200 also includes a step 240 of determining the distance between the intermediate images and the reference images.

[0089] When the distance is strictly greater than the predefined threshold, the parameters of the first and second neural networks are modified and the training steps 200 are implemented again. For this purpose, training 200 may also include a step for modifying the parameters of the first and second neural networks.

[0090] On the contrary, when the distance is less than or equal to the predefined threshold, it is considered that the training of the first and second neural networks is finished and the training steps are not then implemented again.

[0091] Training 200 can be implemented during the implementation of process 100, before the implementation of step 120 for defect detection, or even before the implementation of step 110 for obtaining images of the part to be inspected. Alternatively, training 200 can be implemented prior to process 100, and therefore independently of it.

[0092] Training 200 may also include an initiation step of the parameters of the first and second neural networks before step 210 of determining the maps.

[0093] One advantage of using such an approach to optimize the first neural network is that the reflectance of the part can be determined without relying on strong assumptions about the assumed shape of the part's reflectance function, unlike known approaches in the art. This approach is therefore particularly suitable for reflective parts with complex geometries, whereas known methods in the art are not, and are rather suited to Lambertian surfaces.

[0094] In one embodiment, it is possible to augment the training database by generating new reference reflectance and normal direction maps. These new maps are generated based on maps or portions of maps in which there are no defects and by replacing certain values ​​in these maps with reference reflectance values ​​and / or normal direction reference vectors corresponding to defects in the reference parts in the reference images. This replacement of reference reflectance values ​​and / or normal direction reference vectors in certain maps with other reference reflectance values ​​and / or normal direction reference vectors is also called "overlaying".

[0095] In other words, these new maps are generated by embedding portions of maps corresponding to actual defects of reference parts into maps where there is no defect.

[0096] More specifically, it is possible to augment the training database by generating a plurality of pairs of new reference reflectance maps and new reference normal direction maps. Each pair of new maps comprises a new reference reflectance map and a new reference normal direction map.

[0097] The new reference reflectance and reference normal direction maps for each pair of new maps are then generated by selecting reference reflectance values ​​and reference normal direction vectors that correspond to a predetermined defect and that come from a reference reflectance map and a reference normal direction map, respectively. These maps, from which these selected reference values ​​and reference vectors originate, correspond to a reference image of the first plurality of reference images containing the predetermined defect. That is to say, an image of the predetermined defect is included in these reference images, for example in a portion of each or part of these reference images.

[0098] The training database is augmented by replacing, with selected reference values ​​and reference vectors, reflectance reference values ​​and normal direction reference vectors located in a portion not corresponding to the predetermined defect in the respective reference reflectance and normal direction maps from which the reference values ​​and reference vectors for replacement are selected. That is, the overlay is performed in the same maps from which the selected reference values ​​and reference vectors originate.

[0099] Alternatively, the augmentation of the training database is thus implemented by replacing, with the selected reference values ​​and reference vectors, the reflectance reference values ​​and normal direction reference vectors contained in a reference reflectance map and a reference normal direction map, respectively, corresponding to a reference image from the first plurality of reference images not containing any defects. That is to say, the overlay is performed in maps other than those from which the selected reference values ​​and reference vectors are derived.

[0100] To this end, in connection with [Fig.3], another aspect of the invention relates to a mechanism for increasing the database by inset.

[0101] The augmentation 300 includes a step 310 of selecting, for each pair of new maps, the reference reflectance values ​​and reference normal direction vectors corresponding to the predefined defect in a reference reflectance map and in a reference normal direction map, respectively. These two maps are determined from the same reference image of the reference part including the predefined defect.

[0102] In particular, since for each reference part containing a defect, this defect is predetermined, its position in the part and on the reference images is known. Consequently, the position of this predetermined defect is also known in the maps corresponding to each of the reference images of this reference part. It is therefore possible to precisely identify the pixels that correspond to the predetermined defect in the reference reflectance maps and associated reference normal direction maps, and to select the reference reflectance values ​​and reference normal direction vectors that correspond to this predetermined defect in these maps.

[0103] The increase 300 also includes a step 320 of generating pairs of new reference maps by replacing, with the values ​​of reference and selected reference vectors, reflectance reference values ​​and normal direction reference vectors included in the same reference maps in a portion without defects or in other reference maps that do not include defects, as detailed above.

[0104] The overlay of the selected reference values ​​and reference vectors is performed while preserving the distribution pattern of these values ​​in their respective maps. That is to say, the distribution pattern of these values, which is induced by the shape of the predetermined defect, is reproduced in the overlay of these selected reference values ​​and reference vectors. In this way, data augmentation is performed in a manner that is more realistic and representative of the physics of defects encountered in actual production than conventional methods.

[0105] In one embodiment, it is possible to apply a mathematical transformation to this distribution pattern during the overlay process. In other words, the replacement with the selected reference values ​​and reference vectors can be implemented by applying a geometric transformation to their distribution. This makes it possible to increase the diversity of the new maps while maintaining the realistic character of the predetermined defect. To this end, it is also possible to apply several different mathematical transformations to the same selected reference values ​​and reference vectors to form different pairs of new maps.

[0106] The mathematical transformation can be any type of transformation, for example, enlargement, rotation, Gaussian noise, interpolation, etc. Preferably, such a mathematical transformation is a non-rigid spatial deformation applying a displacement field to the selected reference values ​​and reference vectors to be embedded. By way of example, the mathematical transformation can be defined on the basis of a statistical estimate, obtained empirically and / or by simulations, of the variations in the predetermined defects of the reference parts.

[0107] Augmentation 300 can be implemented during the execution of process 100 after training 200 and before the execution of step 120 for defect detection, or even before the execution of step 110 for obtaining images of the part to be inspected. Alternatively, augmentation 300 can be implemented prior to process 100, and therefore independently of it, typically after the execution of training 200 prior to process 100.

[0108] In one embodiment, it is possible to apply smoothing to the selected reference values ​​and reference vectors after their embedding in order to to homogenize the selected reference values ​​and reference vectors with the reference values ​​and reference vectors already present in the mapping where the selected reference values ​​and reference vectors are embedded.

[0109] In an example implementation of method 100, the detection network is configured to detect the defect from reflectance and light direction maps. Specifically, the detection network detects the defect in a reflectance map and a normal direction map that are determined from images of the part to be inspected. Similar to the reference reflectance and normal direction maps, the reflectance map includes reflectance values ​​and the normal direction map includes directions normal to the part.

[0110] The process 100 thus includes a step 115 of determining the reflectance mapping and the normal direction mapping.

[0111] The reflectance mapping and the normal direction mapping corresponding to the images of the part to be inspected can be determined via any technique known per se. For example, in one embodiment, these two maps are determined by the first neural network, by applying the learning described above (i.e., the joint learning of the first and second neural networks), but applying this learning to the images of the part to be inspected instead of the reference images.

[0112] In this embodiment, the training database comprises the reference reflectance maps and the reference normal direction maps determined by the first neural network. Since the training database is annotated, the reference maps it contains are labeled to indicate whether these maps contain a predetermined defect, i.e., whether these maps originate from an image of a reference part containing the predetermined defect and whether the defect is included in said reference image.

[0113] In other words, in the training database, each reference reflectance map is labeled according to whether the reference image from which it is derived includes the predetermined defect of the associated reference part, or not. Furthermore, each reference normal direction map is labeled according to whether the reference image from which it is derived includes the predetermined defect of the associated reference part, or not.

[0114] The label assigned to each reference map is, for example, a binary indication showing whether or not it contains a defect. The detection network then indicates whether or not there is a defect in the images of the part to be inspected.

[0115] Alternatively, the label assigned to each reference map is, for example, a segmentation of the defect in said map. The segmentation of a A predetermined defect in each reference reflectance map and in each reference normal direction map is determined by any known method. The detection network then segments the defect's position in the images of the part to be inspected, when such a defect exists. Defect detection is then performed by segmenting it.

[0116] The training of the first neural network is carried out on all the images of the plurality of images of the part to be controlled.

[0117] In another example of the implementation of method 100, related to [Fig. 1], the detection network is configured to detect the defect directly from the images of the part to be inspected. The training database then includes a second plurality of reference images, which is constructed from the reference reflectance maps and the reference normal direction maps.

[0118] In particular, each image of the second plurality of reference images is constructed from the reference reflectance mapping and the reference normal direction mapping from one of the reference images of the first plurality of reference images.

[0119] Each reference image of the second plurality of reference images is labeled with the corresponding label of the reference image of the first plurality of reference images from which the maps used to construct it originate.

[0120] In an alternative embodiment of this embodiment, the database is augmented by means of the augmentation 200 described above or by another augmentation method, such as one of those described below.

[0121] In one embodiment, the training database used in the second implementation example of method 100 (i.e., when the training database comprises the second plurality of images) can be augmented by generating a third plurality of reference images. In this embodiment, the reference images of the third plurality of images are constructed from the reference maps obtained from the first plurality of images by varying the illumination direction.

[0122] In particular, each reference image of the third plurality of reference images is generated from the reference reflectance maps and reference normal directions of one of the reference images of the first plurality of reference images, which includes a predetermined defect. The construction of each reference image of the third plurality of reference images is further constructed from a modified illumination direction reference vector. This modified illumination direction reference vector is obtained by modification of at least one of the reference values ​​it comprises, said at least one of the modified reference values ​​being selected from a predefined range of values ​​pertaining to the dimension corresponding to the reference value to be modified. Said predefined range of values ​​is defined such that it includes the reference value to be modified of the illumination direction reference vector. For example, this predefined range of values ​​extends from 80%, or even 85% or 90%, of the reference value to be modified, up to 110%, or even 115%, or even 120%, of the reference value to be modified.

[0123] In other words, each reference image of the third plurality of reference images is constructed using the reference reflectance map and the reference normal direction map of a reference image from the first plurality of reference images, which includes a predetermined defect in the relevant reference part, but applying a different illumination direction than that calculated by the second neural network for said reference image from the first plurality of reference images. This different illumination direction is chosen, via any known method, from the predefined range of values. This predefined range of values ​​is defined via any known technique.Preferably, this predefined range of values ​​is defined so as to augment the training database realistically, that is, by preserving the realism of the reference images in the first plurality of reference images.

[0124] Thus, in this embodiment, the training database includes the second plurality of reference images and the third plurality of reference images.

[0125] Each reference image of the third plurality of reference images is labeled with the label indicating that this image includes a defect.

[0126] In connection with [Fig.5], one aspect of the invention thus relates to a mechanism for the generation 400 of the third plurality of reference images.

[0127] This generation 400 of the third plurality of reference images includes a step 410 of selecting the modified reference value of the modified illumination direction reference vector for each reference image of the third plurality of reference images. The predefined range of values ​​from which the modified reference value of the modified illumination direction reference vector is selected may be the same or different for all or some of the reference images of the third plurality of reference images to be formed. The modified reference value of the modified illumination direction reference vector is, for example, chosen randomly from the predefined range of values.

[0128] The generation 400 of the third plurality of reference images also includes a step 420 of generating the reference images of the third plurality of reference images, each of these reference images being generated from the reference reflectance mapping and the reference normal direction mapping from the same reference image of the first plurality of reference images, and the modified reference value of the modified illumination direction reference vector corresponding to the reference image in question from the third plurality of reference images.

[0129] The generation 400 of the third plurality of reference images can be implemented during the implementation of process 100 after training 200, or even after augmentation 300, and before the implementation of step 120 for defect detection, or even before the implementation of step 110 for obtaining images of the part to be inspected. Alternatively, this generation 400 can be implemented prior to process 100, and therefore independently of it, typically after the implementation of training 200, or even after the implementation of augmentation 300, prior to process 100.

[0130] In one embodiment, the training database used in the second implementation example of method 100 (i.e., when the training database comprises the second plurality of images) can be augmented by generating a fourth plurality of reference images. In this embodiment, the reference images of the fourth plurality of images are constructed from the new reference maps resulting from the augmentation 300, and by varying the illumination direction.

[0131] In particular, each reference image of the fourth plurality of reference images is generated from the new reference reflectance maps and reference normal directions of a pair of new maps from the plurality of pairs of new maps. The construction of each reference image of the fourth plurality of reference images is further constructed from a modified illumination direction reference vector. This modified illumination direction reference vector is obtained by modifying at least one of the reference values ​​it comprises, said at least one of the modified reference values ​​being selected from a predefined range of values ​​pertaining to the dimension corresponding to said reference value to be modified.Said predefined range of values ​​is defined such that it includes the reference value to be modified of the illumination direction reference vector, determined in the reference image of the first plurality of reference images from which the new reference reflectance maps and reference normal directions of said pair are determined (i.e., the reference image not including any predetermined defect and in the reference maps of which are embedded the reference values ​​and vectors selected during the 300 augmentation). For example, this predefined value range extends from 80%, or even 85% or 90%, of the reference value in question, up to 110%, or even 115%, or even 120%, of said reference value.

[0132] In other words, each reference image of the fourth plurality of reference images is constructed using the new reference reflectance mapping and the new reference normal direction mapping of a pair of new maps of the plurality of pairs of new maps (i.e., maps in which selected reference values ​​and reference vectors corresponding to a predetermined defect have been embedded), but applying a different illumination direction than that calculated by the second neural network for said reference image of the first plurality of reference images from which these new maps are formed (in this case, the reference image of the first plurality of reference images in whose maps the selected reference values ​​and reference vectors are embedded).This different illumination direction is chosen, via any known method, from the predefined range of values. This predefined range of values ​​is defined via any known technique. Preferably, this predefined range of values ​​is defined so as to augment the training database realistically, that is, while preserving the realism of the reference images in the first plurality of reference images.

[0133] Thus, in this embodiment, the training database comprises the second plurality of reference images and the fourth plurality of reference images. By enriching the diversity of defect examples, this mechanism significantly improves the performance, accuracy, and efficiency of defect detection by the detection network, making it more robust in the face of different visualization conditions and variations in defects.

[0134] Each reference image of the fourth plurality of reference images is labeled with the label indicating that this image includes a defect.

[0135] In connection with [Fig.6], one aspect of the invention thus relates to a mechanism for the generation 500 of the fourth plurality of reference images.

[0136] This generation 500 of the third plurality of reference images includes a step 510 of selecting the modified reference value of the modified illumination direction reference vector for each reference image of the fourth plurality of reference images. The predefined range of values ​​from which the modified reference value of the modified illumination direction reference vector is selected may be the same or different for all or some of the reference images of the fourth plurality of reference images to be formed. The modified reference value of the modified illumination direction reference vector is, for example, chosen randomly from the predefined range of values.

[0137] The generation 500 of the fourth plurality of reference images also includes a step 520 of generating the reference images of the fourth plurality of reference images, each of these reference images being generated from the new reference reflectance map and the new reference normal direction map from the same pair of new maps, as well as the modified reference value of the modified illumination direction reference vector corresponding to the reference image in question of the fourth plurality of reference images.

[0138] Generation 500 of the fourth plurality of reference images can be implemented during the implementation of process 100 after training 200, or even after augmentation 300, and before the implementation of step 120 for defect detection, or even before the implementation of step 110 for obtaining images of the part to be inspected. Alternatively, this generation 500 can be implemented prior to process 100, and therefore independently of it, typically after the implementation of training 200, or even after the implementation of augmentation 300, prior to process 100.

[0139] In one embodiment, the training database comprises the second plurality of reference images, the third plurality of reference images, and the fourth plurality of reference images. That is, generation 400 of the third plurality of reference images and generation 500 of the fourth plurality of reference images are both implemented, either during the implementation of process 100 or prior to process 100, as detailed above.

[0140] It is noted that the order in which the 400th generation of the third plurality of reference images and the 500th generation of the fourth plurality of reference images are carried out is indifferent.

[0141] Similarly, it is noted that the fourth plurality of images can alternatively be generated by applying the 300 augmentation by overlay to the third plurality of data. That is to say, the overlay is, in this case, performed after the generation of the third plurality of images by modifying the illumination direction reference vector.

[0142] In one embodiment, each reference image comprises a plurality of pixels and the first neural network accepts as input a predefined position of each pixel of the plurality of pixels relative to an artificial light source illuminating the reference room corresponding to the reference image during the acquisition of said reference image.

[0143] In other words, in this embodiment, the first neural network is trained on the coordinates of the position of each pixel of the reference image with respect to the artificial light source in the camera frame.

[0144] In one embodiment, the second neural network accepts a reference image as input. The second neural network is thus directly trained on the reference images.

[0145] In one embodiment, the training of the first and second neural networks is performed jointly for each of the reference parts, independently of the other reference parts. In this embodiment, for each reference part, the first and second neural networks are jointly optimized from each of the reference images in the first plurality of reference images corresponding to said reference part. In other words, for each of the reference parts in the plurality of reference parts, the first and second neural networks are jointly optimized from each of the reference images of said reference part among the first plurality of reference images.

[0146] In one embodiment, related to Figures 1 and 4, the method 100 also includes a step 130 of issuing an alert regarding the detected defect. The alert indicates, for example, that a defect has been detected and may optionally include additional information such as an identifier corresponding to the inspected part and / or the location of the defect on the part.

[0147] The alert can be established and issued via any known method and can be of any type and format.

[0148] In one embodiment, each intermediate image is constructed by applying a rendering function, for example a differentiable rendering function. This rendering function takes as arguments the reference reflectance map and the reference normal direction map as well as the reference illumination direction vector determined for one of the reference images of the first plurality of reference images.

[0149] The rendering function is, for example, such as = ep(^ Z)jnax(nrJ, (}), where ^ is the amplitude of one of the pixels in the intermediate image to be constructed, e is the light intensity emitted by the artificial lighting source, l is the reference vector of the illumination direction, n is the reference vector of the direction normal to the surface of the part from the pixel of the reference normal direction mapping corresponding to the pixel of the intermediate image considered, and is the value of reference reflectance from the pixel of the reference reflectance map corresponding to the pixel of the intermediate image under consideration.

[0150] The reference images of the second plurality of reference images, the third plurality of reference images and / or the fourth plurality of reference images can also be determined by applying said rendering function, from the related maps.

[0151] In one embodiment, the reflectance determined by the first neural network is a bidirectional reflectance, from the English "Bidirectional Reflectance Distribution Function" or "BRDF". The first neural network therefore has an architecture adapted to allow the determination of this bidirectional reflectance.

[0152] In an example implementation, the first neural network comprises shared and specialized fully connected layers. By way of illustration, the first neural network comprises four shared fully connected layers with 256 neurons, and then a branching pattern is used to specialize, on the one hand, in determining the reference reflectance map and, on the other hand, in mapping reference normal directions. Typically, the first neural network comprises four further specialized fully connected layers with 256 neurons to focus on estimating the reflectance map and four further specialized fully connected layers with 256 neurons to focus on estimating the normal direction map.

[0153] The input of the first neural network receives the coordinates of each pixel of the image encoded by a positional encoding technique, which serves to transform each 2D input coordinate into a higher-dimensional space (typically by applying a ten-level Fourier positional encoding model). The network output is twofold: the estimation of the reference reflectance map and the estimation of the reference normal direction map, with respective sizes H x IV x 1 and H x W x 3, where the afferent reference image has a size of H x VF x 1, H being the number of pixels in the reference image in a first dimension and VF the number of pixels in the reference image in a second dimension.

[0154] In one example implementation, the second neural network has seven convolutional layers, each followed by a ReLU-type activation function, and then three fully connected layers with 64 neurons.

[0155] In one embodiment, the second neural network is further adapted to produce, for each reference image of the first plurality of reference images, the light intensity of the artificial lighting source used for acquire said reference image. This is particularly advantageous in cases where the light intensity is not calibrated or differs from one acquisition and / or light source to another. In other words, when the light intensity is unknown, it is determined by the second neural network.

[0156] In one embodiment, the second neural network is adapted to produce, for each reference image in the first plurality of reference images, the light intensity of the artificial lighting source used to acquire said reference image, without producing the direction of illumination. Indeed, it is quite possible that the direction of illumination is known at the time of inspection, that is, it is known before the implementation of method 100, unlike the light intensity, which is not known and must be determined by means of the second neural network.

[0157] In one embodiment, the third and / or fourth plurality of reference images can also be generated by artificially varying the light intensity. Modifying the light intensity can be implemented similarly to modifying one of the reference values ​​of the illumination direction reference vector, i.e., by selecting a modified light intensity value from a predefined range. For example, this predefined range extends from 80%, 85%, or even 90% of the reference light intensity value up to 110%, 115%, or even 120% of the reference light intensity value. The reference light intensity value

[0158] is the value of light intensity emitted by the artificial lighting source used during the acquisition of the corresponding reference image of the first plurality of reference images. In one embodiment, the BRDF function consists of two elements. The first is a Lambertian component Pj, which depends neither on the direction of the lighting nor on the local normal to the surface of the room. The second is a specular component that depends on the direction normal to the surface of the room and the direction of illumination. In other words, the BRDF function is such that, for a pixel of a reference image, the reference reflectance value is given by p(n, l) - pd + ps(n,l) = pd + £ps^ of reference of the direction of illumination, n is the reference vector of the normal direction to the surface of the part from the pixel of the reference image considered, r is the roughness of the part material and v is the viewing direction (i.e., the direction from which the camera captured the image). The viewing direction is typically the same when it is assumed that the images are taken in orthographic views.

[0159] Thus, the first neural network can either directly produce the reference value of reflectance(n, l), or separately produce the Lambertian component Pj and the specular component, which are then summed to obtain the reflectance reference value.

[0160] In one embodiment, it is possible to perform an overlay of simulated reflectance reference values ​​and / or simulated normal direction and / or illumination direction reference vectors, typically via a numerical simulation tool configured to generate such simulated reference values ​​and / or vectors.

[0161] In one embodiment, the defect detection is performed only for the pixels of the images of the part to be inspected whose gray level value, on a scale from 0 to 255 (for an 8-bit encoded image), is greater than or equal to 5, or even greater than or equal to 10, and is less than or equal to 245, or even less than or equal to 240. This makes it possible to perform the defect detection only in the area of ​​each of the images of the part to be inspected where the camera has a linear response in light intensity, and therefore to limit the noise generated by the non-linearity of the camera.

[0162] In one embodiment, the distance between the intermediate images and the reference images of the first plurality of reference images is determined only for the pixels of these images whose intensity exceeds a predefined intensity threshold. This threshold can be defined by any method, for example by the operator based on their knowledge and experience in this area.

[0163] In one embodiment, related to [Fig.8], the method according to the invention uses a 600 operation of augmenting the training database for training the detection network. Such an operation makes it possible to improve the learning of the training network on new data by having a reduced number of experimental data, i.e., the reference images of the first plurality of reference images.

[0164] This operation 600 includes a step 610 of obtaining the first plurality of reference images. These reference images are acquired via one or more cameras and one or more artificial lighting sources, for example, via the same camera and the same artificial lighting source(s) as those used to acquire the images of the part to be inspected. Preferably, for the same reference part, the reference images of the first plurality of reference images are acquired via the same camera.

[0165] This operation 600 also includes one or more of the augmentation mechanisms detailed previously. In particular, this operation may include augmentation 300 by embedding the selected reference values ​​and reference vectors, generation 400 of the third plurality of reference images and / or generation 500 of the fourth plurality of reference images.

[0166] For example, when the detection network detects the defect in the reflectance and normal direction maps from the images of the part to be inspected, operation 600 includes only the increase 300.

[0167] Alternatively, when the detection network detects the defect in the images of the part to be inspected, operation 600 includes the generation 400 of the third plurality of reference images and / or the generation 500 of the fourth plurality of reference images, the latter requiring the preliminary implementation of augmentation 300.

[0168] Furthermore, it is noted that operation 600 of augmenting the training database can be implemented as such, independently of process 100. This operation 600 is then typically implemented by computer as process 600 of augmenting the training database.

[0169] Another aspect of the invention relates to a device for detecting a defect on a metal part. This device is configured to implement the method 100 for detecting the defect on the metal part.

[0170] In relation to [Fig.7], this device 10 may include a processor 11 and a memory 12. Instructions may be stored in this memory 12 which, when executed by the processor 11, lead the latter to implement the process 100.

[0171] The device 10 may also include an input interface 13 and / or an output interface 14. The input interface 13 can typically be used to obtain images of the part to be inspected, for example, when these images are produced by a third-party system, such as the acquisition system. The input interface 13 is therefore suitable for receiving the images of the part to be inspected. The output interface 14 can typically be used for issuing the alert. The output interface 14 is therefore suitable for issuing said alert.

[0172] In one embodiment, the device 10 is further or alternatively configured to use the training database augmentation operation 600 for training the detection network. For example, for this purpose, the device 10 may include in its memory 12 instructions which, when executed by the processor 11, cause the processor 11 to implement the augmentation operation 600. The input interface 13 can thus be used to obtain of the first plurality of reference images. The input interface 13 is then adapted to receive the first plurality of reference images.

[0173] Device 10 can be included in the acquisition system.

[0174] Another aspect of the invention relates to a computer program product comprising instructions which, when the program is executed on a computer, cause the computer to implement the steps of operation 600 of increasing the training database for training the detection network.

[0175] Another aspect of the invention relates to a computer-readable recording medium comprising instructions which, when executed by a computer, cause the computer to carry out the steps of operation 600 of augmenting the training database for training the detection network.

Claims

1. Demands A computer-implemented method (100) for detecting a defect on a metal part, the method (100) comprising: - Obtain (110) at least three images of the room, the images of the room being acquired via a camera and an artificial light source; - Detect (120) the defect in the part by analyzing the images of the part via a neural network, called a detection network, the detection network being a supervised training artificial neural network configured to detect the defect from the images of the part, the detection network being trained (200) on a training database constructed by means of a first neural network and a second neural network, the first neural network being an artificial neural network configured to determine (210), for each reference image of a first plurality of reference images, a reference reflectance map comprising reference reflectance values ​​and a reference normal direction map comprising reference vectors of normal directions, and the second neural network being an artificial neural network configured to determine (220),for each reference image of a first plurality of reference images, a reference vector of illumination direction and / or a luminous intensity of the artificial lighting source, each reference image of the first plurality of reference images being an image of a reference part among a plurality of reference parts, the first and second neural networks being self-supervised and jointly optimized via a minimization of a distance between the first plurality of reference images and a plurality of intermediate images, the plurality of intermediate images being constructed (230) from the reference reflectance maps, the,

2.

3.

4. maps of normal reference directions and reference vectors of illumination directions. A method (100) according to claim 1, wherein the training database is augmented (300) by generating (320) a plurality of pairs of new reference reflectance maps and new reference normal direction maps, the new reference reflectance and reference normal direction maps of each pair of new maps being generated by selecting (310) reference reflectance values ​​and reference normal direction vectors corresponding to a predetermined defect and originating respectively from a reference reflectance map and a reference normal direction map corresponding to a reference image of the first plurality of reference images comprising the predetermined defect, the augmentation being implemented by replacement, with the selected reference values ​​and reference vectors,of reflectance reference values ​​and normal direction reference vectors included in:, - A portion not corresponding to a predetermined defect in the respective reference reflectance and reference normal direction maps from which the reference values ​​and reference vectors for replacement are selected; or - A reference reflectance map and a reference normal direction map, respectively, corresponding to a reference image of the first plurality of reference images not containing any defects. Method (100) according to claim 2, wherein the replacement by the selected reference reflectance values ​​and reference vectors of normal directions is implemented by applying a geometric transformation of their distribution. A method (100) according to any one of the preceding claims, wherein the detection network is configured to detect (120) the defect from a reflectance map comprising reflectance values ​​and a normal direction map including directions normal to the part, the reflectance and normal direction maps being determined (115) in the images of the part, the training database including the reference reflectance maps and the reference normal direction maps determined by the first neural network.

5. Method (100) according to claim 4, wherein the reflectance mapping and normal directions to the part are determined in the part images via the first neural network.

6. A method (100) according to any one of claims 2 to 3, wherein the detection network is configured to detect (120) the defect directly from the part images, the training database comprising a second plurality of reference images, the second plurality of reference images being constructed from the reference reflectance maps and the reference normal direction maps.

7. A method (100) according to claim 6, wherein the training database is augmented by generating (400) a third plurality of reference images, each reference image of the third plurality of reference images being generated (420) from the reference reflectance maps and reference normal directions of one of the reference images of the first plurality of reference images comprising a predetermined defect and a modified illumination direction reference vector, the illumination direction reference vector comprising at least two reference values, the modified illumination direction reference vector being obtained by modifying at least one of the reference values ​​of said illumination direction reference vector,said at least one modified reference value being selected (410) from a predefined range of values ​​relating to a dimension corresponding to said reference value to be modified and including the reference value to be modified.

8. A method (100) according to any one of claims 2 to 3 and according to any one of claims 6 to 7, wherein the training database is augmented (500) by generating (520) a fourth plurality of reference images, each reference image of the fourth plurality of reference images being generated from the new reference reflectance maps and reference normal directions of a pair of new maps of the plurality of pairs of new maps, and a modified illumination direction reference vector, the illumination direction reference vector comprising at least two reference values, the modified illumination direction reference vector being obtained by modifying at least one of the reference values ​​of said illumination direction reference vector, said at least one modified reference value being selected (510) from a predefined range of values ​​pertaining to a dimension corresponding to said reference value to be modified and comprising the reference value to be modified of the illumination direction reference vector.

9. A method (100) according to any one of the preceding claims, wherein each reference image comprises a plurality of pixels, the first neural network accepting as input a predefined position of each pixel of the plurality of pixels relative to an artificial light source illuminating the reference piece corresponding to the reference image during the acquisition of said reference image, and wherein the second neural network accepts as input said reference image.

10. A method (100) according to any one of the preceding claims, wherein, for each of the reference parts in the plurality of reference parts, the first and second neural networks are jointly optimized from each of the reference images of said reference part among the first plurality of reference images.

Citation Information

Patent Citations

  • Appearance defect detection system and method based on rapid three-dimensional reconstruction

    CN116678826A