Casting defect detection method and device, program product and electronic equipment
By performing three-dimensional model voxelization processing and image information fusion detection on locomotive castings, the problems of low detection efficiency and poor accuracy in the prior art are solved, automated detection is realized, and detection efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202411551117.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-02-18
AI Technical Summary
The existing magnetic powder flaw detection detection methods have low detection efficiency and poor accuracy on locomotive castings, and are greatly affected by manual experience, which is prone to errors and missed inspections, resulting in quality hazards.
By determining the three-dimensional model of the casting to be detected, voxelization is performed to obtain voxel information, and combining the image information to perform fusion detection processing through the defect detection model, defect detection of the casting is automatically completed.
It improves the efficiency and accuracy of casting inspection, reduces manual intervention, avoids detection errors caused by insufficient experience, and significantly improves the reliability of the detection results.
Smart Images

Figure CN119477844A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of casting detection, and in particular to a casting defect detection method, device, program product and electronic equipment. Background Art
[0002] At present, magnetic particle flaw detection of locomotive castings is an important process to ensure the quality of locomotive castings.
[0003] However, due to the complex structure and poor surface condition of locomotive castings, the existing magnetic particle inspection requires the full participation of the inspection staff in the magnetic trace determination. The entire inspection process is relatively long and requires a high level of experience from the inspection staff. As a result, the inspection results are greatly affected by human factors and there may be certain errors and omissions in inspection, which poses a hidden danger to the quality of locomotive castings. Summary of the invention
[0004] The present disclosure provides a casting defect detection method, a casting defect detection device, a computer program product and an electronic device, so as to at least to some extent solve the problems of low casting detection efficiency and poor detection accuracy.
[0005] According to a first aspect of the present disclosure, a casting defect detection method is provided, the method comprising:
[0006] Determine the three-dimensional model of the casting to be inspected;
[0007] Performing voxel processing on the three-dimensional model to obtain voxel information of the casting to be inspected;
[0008] The defect detection model is used to perform fusion detection processing on the voxel information and image information of the casting to be detected, so as to obtain the defect information of the casting to be detected.
[0009] According to a second aspect of the present disclosure, there is provided a casting defect detection device, the device comprising:
[0010] A three-dimensional model determination unit, used for determining a three-dimensional model of a casting to be inspected;
[0011] A voxel processing unit, used for performing voxel processing on the three-dimensional model to obtain voxel information of the casting to be detected;
[0012] The defect detection unit is used to perform fusion detection processing on the voxel information and image information of the casting to be detected through a defect detection model to obtain the defect information of the casting to be detected.
[0013] According to a third aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the method of the first aspect and possible implementations thereof are implemented.
[0014] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the method of the above-mentioned first aspect and its possible implementation methods by executing the executable instructions.
[0015] The technical solution disclosed in this disclosure has the following beneficial effects:
[0016] In the disclosed embodiment, the three-dimensional model of the casting to be detected can be determined first, and then the three-dimensional model can be voxelized to obtain the voxel information of the casting to be detected, that is, to obtain the information containing the spatial direction of the casting to be detected. Furthermore, the voxel information containing the spatial direction and the image information in the plane direction are fused and detected by the defect detection model to obtain the final defect detection information. It can be seen that the entire detection process of the casting to be detected in the disclosed embodiment is automated, thereby improving the detection efficiency of the casting to a certain extent. In addition, since the voxel information containing the spatial direction and the image information in the plane direction are combined, and the defects of the casting are comprehensively determined by the defect detection model, compared with the method of manually determining defects based on experience, the occurrence of defect detection errors caused by insufficient manual experience is avoided, thereby greatly improving the accuracy of defect detection.
[0017] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or be understood by practicing the present disclosure. The purpose and other advantages of the present disclosure can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments of the present disclosure will be briefly introduced below. Obviously, the drawings introduced below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 A schematic diagram of an application scenario in this exemplary embodiment is shown;
[0020] Figure 2 A system architecture diagram in this exemplary embodiment is shown;
[0021] Figure 3 A flow chart showing a casting defect detection method in this exemplary embodiment;
[0022] Figure 4A schematic diagram showing a process of constructing a three-dimensional model of a casting in this exemplary embodiment;
[0023] Figure 5 A schematic diagram showing a process of obtaining a dense depth map in this exemplary embodiment is shown;
[0024] Figure 6 A schematic diagram of a process for obtaining defect information of a casting to be inspected in this exemplary embodiment is shown;
[0025] Figure 7 A schematic structural diagram of a casting defect detection device in this exemplary embodiment is shown;
[0026] Figure 8 A schematic structural diagram of an electronic device in this exemplary embodiment is shown. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solutions and advantages of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure. In the absence of conflict, the embodiments in the present disclosure and the features in the embodiments can be arbitrarily combined with each other. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.
[0028] The term "comprising" and any variations thereof in the specification and claims of the present disclosure are intended to cover non-exclusive protection. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0029] In the embodiments of the present disclosure, one or more, "many" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or plural.
[0030] It should be noted that the terms "first", "second", "third", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order, sequence, size, and priority. For example, the first feature set and the second feature set in the embodiment of the present disclosure are only used to distinguish different feature sets. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0031] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, which are schematic diagrams of the present disclosure and are not necessarily drawn to scale. Some of the block diagrams shown in the accompanying drawings may be functional entities, which do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in hardware modules or integrated circuits, or in networks, processors or microcontrollers. The implementation method can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein. The features, structures or characteristics described in the present disclosure may be combined in one or more implementations in any suitable manner. In the following description, many specific details are provided to provide a full description of the implementation methods of the present disclosure. However, those skilled in the art should be aware that one or more specific details may be omitted when implementing the technical solution of the present disclosure, or one or more specific details may be replaced by other methods, components, devices, steps, etc.
[0032] It should be noted that in the embodiments of the present disclosure, some existing solutions in the industry such as software, components, models, etc. may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of implementing the technical solution of the present disclosure, but it does not mean that the applicant has or will necessarily use the solution. In the technical solution of the present disclosure, the collection, dissemination, and use of casting data are in compliance with relevant national laws and regulations.
[0033] In the related art, a casting is a metal molded object obtained by various casting methods. Specifically, the smelted liquid metal is poured into a pre-prepared mold by casting methods such as pouring and suction. After cooling and undergoing various processing methods, an object with a certain shape, size and performance can be obtained. This object can be called a casting. In general, castings are mainly used as machine parts or blanks of parts. For example, when a casting is a part of a locomotive, for the sake of convenience, this type of casting is called a locomotive casting.
[0034] Due to the complex structure and poor surface condition of locomotive castings, the existing magnetic particle inspection, that is, the defect detection of locomotive castings, mainly relies on the experience and sense of responsibility of the flaw detector. In other words, the defect detection results of locomotive castings are greatly affected by human factors, and the identification and evaluation of defective magnetic traces require a high level of operation of the flaw detection tools. It can be seen that the existing detection method has certain errors and omissions, which easily bury hidden dangers to the quality of locomotive castings.
[0035] It can be seen that in the related art magnetic particle flaw detection technology solution for locomotive castings based on manual inspection, the step of inspecting magnetic traces of surface defects of castings requires full human participation, which has problems such as high workload, low efficiency, and easy to cause errors and omissions in inspection.
[0036] In view of one or more of the above problems, an exemplary embodiment of the present disclosure provides a casting defect detection method, through which the three-dimensional model of the casting to be detected can be first determined, and then the three-dimensional model can be voxelized to obtain the voxel information of the casting to be detected, that is, to obtain information containing the spatial direction of the casting to be detected. Further, the voxel information containing the spatial direction and the image information in the plane direction are fused and detected by the defect detection model to obtain the final defect detection information. It can be seen that the entire detection process of the casting to be detected in the embodiment of the present disclosure is automated, thereby improving the detection efficiency of the casting to a certain extent. In addition, since the voxel information containing the spatial direction and the image information in the plane direction are combined, and the defects of the casting are comprehensively determined by the defect detection model, compared with the method of manually determining defects based on experience, the occurrence of defect detection errors caused by insufficient manual experience is avoided, thereby greatly improving the accuracy of defect detection.
[0037] In order to better understand the technical solutions provided by the embodiments of the present disclosure, the following briefly introduces the application scenarios to which the technical solutions provided by the embodiments of the present disclosure are applicable. It should be noted that the application scenarios introduced below are only used to illustrate the embodiments of the present disclosure and are not intended to limit the present disclosure. In specific implementation, the technical solutions provided by the embodiments of the present disclosure can be flexibly applied according to actual needs.
[0038] In the embodiments of the present disclosure, the defect detection technology can be applied to steel castings, iron castings, copper castings, aluminum castings, magnesium castings, zinc castings, titanium castings, door handles, door locks, radiators, water pipes, iron pots, gas stove racks, irons, locomotive castings, and other business scenarios that require casting defect detection. For example, the business scenario of casting defect detection in locomotive castings is not limited to this in the embodiments of the present disclosure.
[0039] See also Figure 1 As shown, Figure 1 This is an application scenario to which the technical solution of the embodiment of the present disclosure can be applied. In the scenario diagram, multiple acquisition devices 101 and electronic devices 102 are included. Among them, acquisition devices 101-1, acquisition devices 101-2, ..., acquisition devices 101-n can be used by different users, so that different castings can be acquired, and then defect detection services can be provided for multiple castings, and each acquisition device in the multiple acquisition devices can acquire RGB images of castings. Among them, R refers to red, G refers to green, and B refers to blue. In practice, each color can be synthesized with different proportions of red, green and blue in terms of visual effect. Each pixel of the color image is represented by different proportions of R, G, and B. Such a color image is called an RGB image.
[0040] Optionally, the acquisition device 101 is, for example, an electrical device, and the electrical device is, for example, a six-degree-of-freedom robotic arm or other robotic arms, which is not limited in the embodiments of the present disclosure.
[0041] The acquisition device 101 and the electronic device 102 , as well as each acquisition device 101 , may be directly or indirectly connected to each other through one or more networks 103 .
[0042] In the disclosed embodiment, the user can determine the casting to be detected, and control the acquisition device 101 to acquire multiple views of the casting to be detected, such as a left view, a main view, and a top view, so that the acquisition device 101 can send the multiple views of the casting to be detected to the electronic device 102, and the electronic device 102 can construct a three-dimensional model of the casting to be detected based on at least one of the multiple views of the casting to be detected, thereby determining the three-dimensional model of the casting to be detected. Further, the electronic device 102 can voxelize the three-dimensional model to obtain the voxel information of the casting to be detected, and perform fusion detection processing on the voxel information and image information of the casting to be detected through the defect detection model to obtain the defect information of the casting to be detected. Optionally, the electronic device 102 can send an acquisition instruction to the acquisition device 101 to receive the image information of the casting to be detected sent by the acquisition device 101.
[0043] in, Figure 1 Each acquisition device 101 is, for example, an electrical device, such as a six-degree-of-freedom robotic arm or other robotic arms, but is not limited thereto. In other words, various electrical devices that have the function of supporting the acquisition of casting images can be used as the acquisition device 101.
[0044] as well as, Figure 1 The electronic device 102 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), as well as big data and artificial intelligence platforms, but is not limited to these.
[0045] Of course, the method provided in the embodiment of the present disclosure is not limited to Figure 1 The application scenarios shown can also be used in other possible application scenarios, such as application scenarios where the casting defect detection method is implemented only by electronic devices, and the embodiments of the present disclosure are not limited thereto.
[0046] See also Figure 2 As shown, Figure 2 The system architecture diagram of the operating environment of this exemplary embodiment is shown. The system architecture may include an electrical device 201 and an algorithm server 202. The electrical device 201 includes a first acquisition unit 2011 and a second acquisition unit 2012. The algorithm server 202 includes a three-dimensional model construction unit 2021, a path planning algorithm unit 2022, a defect detection algorithm unit 2023, and a defect marking unit 2024.
[0047] In the disclosed embodiment, the first acquisition unit 2011 is used to acquire multiple views of the casting to be detected, such as at least two of the left view, the right view, the top view, the front view, the bottom view, and the back view, and send the acquired multiple views of the casting to be detected to the three-dimensional model construction algorithm unit 2021, and then the three-dimensional model construction algorithm unit 2021 can reconstruct the three-dimensional model of the casting to be detected. After obtaining the three-dimensional model of the casting to be detected, the three-dimensional model can also be voxelized to obtain the voxel information of the casting to be detected, and the voxel information is sent to the path planning algorithm unit 2022, the defect detection algorithm unit 2023 and the defect marking unit 2024.
[0048] In the embodiment of the present disclosure, after the path planning algorithm unit 2022 determines the target path for capturing the image of the casting to be inspected, the information containing the target path can be sent to the second acquisition unit 2012, and then the second acquisition unit shoots the casting to be inspected according to the target path, obtains the image information of the casting to be inspected, and sends the image information to the defect detection algorithm unit 2023, so that the defect detection algorithm unit 2023 can perform fusion detection processing based on the obtained voxel information and image information to obtain the defect information of the casting to be inspected.
[0049] In one implementation, the defect marking unit 2024 may perform defect marking on the three-dimensional model of the casting to be inspected based on the defect information, thereby obtaining the three-dimensional model of the casting to be inspected with the defect marking.
[0050] To further illustrate the technical solution provided by the embodiments of the present disclosure, this is described in detail below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of the present disclosure provide method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiments of the present disclosure. The method may be executed in the order of the method shown in the embodiments or drawings or in parallel during the actual processing process or when the device is executed.
[0051] See also Figure 3 , Figure 3 FIG. 1 is a flow chart of a casting defect detection method in an embodiment of the present disclosure. The flow of the method can be executed by an electronic device, for example, and the electronic device can be Figure 1 The electronic device 102 or Figure 2 The algorithm server 202 in the embodiment of the present invention, the specific implementation process of the method is as follows:
[0052] Step 301: Determine a three-dimensional model of a casting to be inspected.
[0053] Step 302: voxelize the three-dimensional model to obtain voxel information of the casting to be inspected.
[0054] Step 303: fusing the voxel information and image information of the casting to be inspected with the defect detection model to obtain defect information of the casting to be inspected.
[0055] exist Figure 3 In the method shown, the three-dimensional model of the casting to be detected is first determined, and then the three-dimensional model is voxelized to obtain the voxel information of the casting to be detected, that is, to obtain the information containing the spatial direction of the casting to be detected. Further, the voxel information containing the spatial direction and the image information in the plane direction are fused and detected by the defect detection model to obtain the final defect detection information. It can be seen that the entire detection process of the casting to be detected in the embodiment of the present disclosure is automated, thereby improving the detection efficiency of the casting to a certain extent. In addition, since the voxel information containing the spatial direction and the image information in the plane direction are combined, and the defects of the casting are comprehensively determined by the defect detection model, compared with the method of manually determining defects based on experience, the occurrence of defect detection errors caused by insufficient manual experience is avoided, thereby greatly improving the accuracy of defect detection.
[0056] Below Figure 3 Provide detailed instructions for each step.
[0057] In step 301, a three-dimensional model of a casting to be inspected is determined.
[0058] The three-dimensional model of the casting to be inspected is a digital model representing the three-dimensional structure of the casting to be inspected.
[0059] In one embodiment, a staff member may edit a three-dimensional model in computer graphics software according to the three-dimensional structure of the casting to be inspected.
[0060] In the disclosed embodiment, the electronic device can receive multiple views of the casting to be detected based on different viewing angles sent by the electrical device or the acquisition device. For example, the main view, the left view, the top view, the right view, the bottom view and the rear view, etc. After the electronic device receives multiple views of the casting to be detected based on different viewing angles, the multiple views of the casting to be detected based on different viewing angles can be respectively subjected to two-dimensional convolution processing to obtain stacked feature maps corresponding to the multiple views of the casting to be detected based on different viewing angles; the stacked feature maps corresponding to the multiple views can be subjected to three-dimensional convolution processing to obtain a sparse depth map of the casting to be detected; and the three-dimensional model of the casting to be detected can be determined based on the sparse depth map and the multiple views.
[0061] In the embodiment of the present disclosure, in order to better introduce the process of determining the three-dimensional model of the casting to be inspected, an exemplary example is used for further explanation. Figure 4 , Figure 4 A schematic diagram showing a process of constructing a three-dimensional model of a casting according to this exemplary embodiment.
[0062] In the disclosed embodiment, the electronic device can obtain a top view, a front view, and a left view of the casting to be detected. The top view, the front view, and the left view can be RGB images, or images based on other color modes such as HSV, or grayscale images. For ease of description, the top view, the front view, and the left view of the casting to be detected can also be referred to as a top view RGB image, a front view RGB image, and a left view RGB image (i.e., Figure 4 RGB image of top view, front view and left view in the figure).
[0063] In the disclosed embodiment, after the electronic device obtains the top view RGB image, the main view RGB image and the left view RGB image, the top view RGB image, the main view RGB image and the left view RGB image are respectively input into the two-dimensional convolution module to obtain the stacked feature images corresponding to the top view RGB image, the main view RGB image and the left view RGB image. Since the two-dimensional convolution module can process the top view RGB image, the main view RGB image and the left view RGB image, the two-dimensional convolution module can also be called a shared two-dimensional convolution module, that is, Figure 4 Further, the electronic device can input the stacked feature maps corresponding to the top view RGB image, the main view RGB image, and the left view RGB image into Figure 4 The three-dimensional convolution module in the image is used to perform three-dimensional convolution processing on the stacked feature maps corresponding to the top-view RGB image, the main-view RGB image, and the left-view RGB image, respectively, to obtain a sparse depth map of the casting to be inspected.
[0064] In the disclosed embodiment, the electronic device can input the top view RGB image, the front view RGB image, the left view RGB image, and the sparse depth image of the casting to be detected into the depth image expansion module, thereby obtaining a dense depth image. Further, the top view RGB image, the front view RGB image, and the left view RGB image are input into the depth image expansion module, thereby obtaining a three-dimensional model of the casting to be detected. Optionally, the working principle of the depth image expansion module can be found in the following text. Figure 5 The corresponding embodiments will be described in detail and will not be introduced here.
[0065] In one embodiment, the electronic device determines the three-dimensional model of the casting to be inspected based on the sparse depth map and the multiple views, which may be performed by but not limited to the following steps:
[0066] Step A: Preset processing is performed on the sparse depth map and multiple views to obtain a dense depth map of the casting to be inspected.
[0067] In one embodiment, when the electronic device executes step A, it can perform neighbor sampling processing on the sparse depth map to obtain a neighbor sampling depth map, and perform convolution operation processing on the neighbor sampling depth map to obtain depth map features; perform feature fusion processing on at least one view in multiple views to obtain view features; and perform fusion processing on the depth map features and the view features to obtain a dense depth map of the casting to be detected. Optionally, the electronic device can expand the depth information of the sparse depth map according to the multiple views to obtain a dense depth map of the casting to be detected. Alternatively, the depth information of at least one view in the multiple views can be reconstructed according to the sparse depth map to obtain a dense depth map of the casting to be detected.
[0068] For example, see Figure 5 , Figure 5 A schematic diagram of a process for obtaining a dense depth map in this exemplary embodiment is shown.
[0069] In the disclosed embodiment, the electronic device may first perform neighbor sampling processing on the sparse depth map to obtain a neighbor sampling depth map. Specifically, the neighbor sampling processing on the sparse depth map is to obtain context information in a larger space; the neighbor sampling operation is implemented by a feature map spatial filter with learnable weights, and the calculation formula is as follows:
[0070]
[0071] in, is the normalization term, N(p) is the neighboring points in the m*m area around p, D(q) is the sparse depth map, W (p,q) is the weight obtained through learning. Figure 5 As shown, the size of the sparse depth map and the nearest sampling depth map are both 1*W*H.
[0072] In the embodiment of the present disclosure, after the electronic device obtains the neighbor sampling depth map, it can perform an accelerated convolution img2col operation on the neighbor sampling depth map, so that the values of the m*m area around each point can be written into the channel in sequence, and then the neighbor sampling depth map and the weight are vertically expanded into a column and multiplied to obtain m 2 * The characteristic vector of WH, that is, Figure 4 The depth map features shown, that is, at this moment, the feature map of size 1*W*H has been converted to a feature map of size m 2 *W*H feature map.
[0073] In the disclosed embodiment, the electronic device can input the top view RGB image, the main view RGB image and the left view RGB image into the two-dimensional convolution module respectively to extract the features of the top view RGB image, the main view RGB image and the left view RGB image, and then perform weighted summation on the extracted features to obtain the initial view features, that is, convert the three feature maps of size 1*W*H into feature maps of size m. 2 *W*H feature map. Then the size is m 2 *W*H's feature map is reshaped to m 2 *View features of WH.
[0074] In the embodiment of the present disclosure, the electronic device performs dot product processing on the depth map feature and the view feature to obtain a size m 2 *WH's initial dense depth feature map. Further, each point m in the initial dense depth map 2 The values of the channels are summed to obtain a feature vector of size WH, and then the feature vector size is resized to a feature map of 1*W*H, which is used as a dense depth map.
[0075] Step B: Expand and process the dense depth map and multiple views to obtain a three-dimensional model of the casting to be inspected.
[0076] In the disclosed embodiment, the electronic device may perform expansion processing on the dense depth map and the multiple views in the same manner as the aforementioned processing on the sparse depth map, thereby obtaining a three-dimensional model of the casting to be inspected.
[0077] In step 302, voxel processing is performed on the three-dimensional model to obtain voxel information of the casting to be inspected.
[0078] In the disclosed embodiment, the electronic device can voxelize the three-dimensional model to obtain voxel information of the casting to be detected. Specifically, voxelization is to convert the geometric form representation of the casting to be detected into a voxel representation form that is closest to the casting to be detected, and generate a volume data set, i.e., the aforementioned voxel information. The voxel information not only contains the surface information of the three-dimensional model of the casting to be detected, but also describes the internal properties of the three-dimensional model.
[0079] In the disclosed embodiment, after obtaining voxel information of the casting to be inspected, the electronic device may determine a target path for acquiring image information of the casting to be inspected in order to more efficiently and quickly obtain complete image information of the casting to be inspected.
[0080] In one embodiment, the electronic device can construct a three-dimensional grid of the casting to be detected based on the voxel information of the casting to be detected; determine the target path for collecting image information of the casting to be detected according to the three-dimensional grid and the starting point and arrival point of collecting the image of the casting to be detected preset in the three-dimensional grid; the target path is a shooting path for collecting image information of the casting to be detected, and the starting point and arrival point are the starting point and arrival point of the target path; shoot the casting to be detected according to the target path to obtain image information of the casting to be detected. Optionally, when shooting the casting to be detected according to the target path, the path point can be moved each time to shoot the image of the path point and its surroundings, and the image information of the casting to be detected can be determined based on the shooting time or other information of the multiple images obtained.
[0081] In one embodiment, the electronic device can determine the first neighboring path points adjacent to the starting point in the three-dimensional grid of the casting to be inspected; based on a preset cost function, determine the cost function values corresponding to the starting point and the adjacent first neighboring path points in the three-dimensional grid; and filter out the target first neighboring path points whose cost function values meet the filtering conditions from the first neighboring path points; if the target first neighboring path point is not the arrival point, determine the target second neighboring path point adjacent to the target first neighboring path point, until the target Nth neighboring path point adjacent to the target N-1th neighboring path point is the arrival point; N is a positive integer not less than 2; the starting point, the target first neighboring path point to the target Nth neighboring path point are connected in sequence to determine the target path for collecting image information of the casting to be inspected.
[0082] In an embodiment of the present disclosure, the electronic device can mark the path starting point Start state as Open, calculate the value of the cost function between the starting point and the first adjacent path point adjacent to it, and then select the first target adjacent path point with the smallest cost function from the adjacent path points adjacent to the starting point.
[0083] In one implementation, if the selected path point, ie, the first target adjacent path point, is the arrival point, ie, the end point End, the path state is marked as Closed, and the path planning algorithm unit 2022 stops executing the path planning algorithm.
[0084] In one embodiment, if the selected path point, i.e., the first target neighboring path point, is not the arrival point, the path point is marked as Closed, and then the cost function value of the path point and its second neighboring path point is calculated. If the second neighboring path point of the path point is not marked as Closed, its state is marked as Open; if the state is already marked as Closed, but the recalculated cost function value is smaller than the original one, the cost function value is updated and re-marked as Open, and the second target neighboring path point is searched again until the optimal path from the starting point to the end point, i.e., the target path, is found.
[0085] Optionally, the preset cost function is:
[0086]
[0087] Among them, T i,j =(X i,j ,Y i,j ,Z i,j ) is used to represent the three-dimensional spatial position of the jth path point in the i-th path; P i Used to represent paths, each path contains a three-dimensional array of n path points; || T i,j T i,j+1 || represents the Euclidean distance between two path points, and i and n are both positive integers.
[0088] For example, assuming that the starting point is recorded as point A, and the first neighboring path points adjacent to the starting point are point B and point C, respectively, then the first cost function value corresponding to point A and point B, and the second cost function value corresponding to point A and point C can be calculated respectively, that is, the cost function value of the path from point A to point B and the cost function value of the path from point A to point C are calculated. When it is determined that the first cost function value is less than the second cost function value, point B is taken as the target first neighboring path point, and it is determined whether point B is the arrival point. When it is determined that point B is not the arrival point, the second neighboring path points adjacent to point B are further determined. The second neighboring path points are point V, point K, and point F, respectively. Then, the third cost function value corresponding to point B and point V, the fourth cost function value corresponding to point B and point K, and the fifth cost function value corresponding to point B and point F can be calculated respectively. When the fifth cost function value is determined to be the smallest among the third cost function value, the fourth cost function value and the fifth cost function value, point F can be determined as the second adjacent path point of the target, and it can be judged whether point F is the arrival point. If point F is the arrival point, the path connecting points A, B and F in sequence is taken as the target path, and the casting to be inspected is photographed along the target path to obtain image information of the casting to be inspected.
[0089] In step 303, the voxel information and image information of the casting to be inspected are fused and inspected by the defect detection model to obtain defect information of the casting to be inspected.
[0090] See also Figure 6 , Figure 6 A schematic diagram of a process for obtaining defect information of a casting to be inspected in this exemplary embodiment is shown.
[0091] In the disclosed embodiment, the electronic device can perform feature extraction processing on the image information of the casting to be inspected through a first feature extraction module in the defect detection model to obtain a first feature set; extract and process the voxel information of the casting to be inspected through a second feature extraction module in the defect detection model to obtain a second feature set; fuse the first feature set and the second feature set through a fusion module in the defect detection model to obtain fused feature information; perform defect processing on the fused features through a classification module in the defect detection model to obtain defect features of the casting to be inspected; and decode the defect features through a decoding module in the defect detection model to obtain defect information of the casting to be inspected.
[0092] For example, the aforementioned defect detection model is based on the general target detection model YOLOv8, and is trained by the Lite-PointNet branch of the lightweight voxel data feature extraction model after the model topology structure is trimmed. Specifically, the RGB image acquired by the six-degree-of-freedom robot arm, that is, the image information of the aforementioned casting to be detected, can be input into the Backbone (CSPDarknet) of YOLOv8 for feature extraction to obtain a first feature set, and at the same time, the corresponding three-dimensional voxel data, that is, the voxel information of the aforementioned casting to be detected, can be input into Lite-PointNet for feature extraction to obtain a second feature set. Then, a dot product operation is performed on the first feature set obtained by the CSPDarknet, i.e., the first feature extraction module, and the second feature set obtained by the LitePointNet, i.e., the second feature extraction module, to obtain a dot product structure, and then the dot product result is input into the YOLOv8Neck (PAN-FPN), i.e., the aforementioned fusion module, and the PAN-FPN outputs a feature tensor, i.e., the fused feature information, and the feature tensor is input into the YOLOv8Head, i.e., the aforementioned classification module, to obtain the tensor output by the YOLOv8Head, i.e., the defect features of the casting to be detected, and then the defect features of the casting to be detected are input into the decoding module (DecodingModule), and the defect features are decoded to obtain.
[0093] In one embodiment, the defect information of the casting to be detected includes the category, coordinates and confidence information of the defect. The category of the defect is, for example, cracks, inclusions, pores, sand holes, etc. The confidence information can be understood as the probability of a certain type, for example, the confidence information is 90%, or the confidence information is 75%, which is not limited in the embodiments of the present disclosure.
[0094] In the embodiment of the present disclosure, after obtaining the defect information of the casting to be inspected, the electronic device can also determine the various defects indicated by the defect information of the casting to be inspected, and determine the defect position information corresponding to each defect in the three-dimensional model; and mark each defect in the three-dimensional model based on the obtained defect position information.
[0095] The exemplary embodiment of the present disclosure also provides a casting defect detection device. Figure 7 As shown, the casting defect detection device 700 includes the following program modules:
[0096] A three-dimensional model determination unit 701 is used to determine a three-dimensional model of a casting to be inspected;
[0097] A voxel processing unit 702 is used to perform voxel processing on the three-dimensional model to obtain voxel information of the casting to be detected;
[0098] The defect detection unit 703 is used to perform fusion detection processing on the voxel information and image information of the casting to be detected through a defect detection model to obtain defect information of the casting to be detected.
[0099] In one implementation, the three-dimensional model determining unit 701 is used to:
[0100] Performing two-dimensional convolution processing on the multiple views of the casting to be inspected based on different viewing angles, respectively, to obtain stacked feature maps corresponding to the multiple views of the casting to be inspected based on different viewing angles;
[0101] Performing three-dimensional convolution processing on the stacked feature maps corresponding to each of the multiple views to obtain a sparse depth map of the casting to be inspected;
[0102] A three-dimensional model of the casting to be inspected is determined according to the sparse depth map and the multiple views.
[0103] In one implementation, the three-dimensional model determining unit 701 is used to:
[0104] Performing preset processing on the sparse depth map and the multiple views to obtain a dense depth map of the casting to be inspected;
[0105] The dense depth map and the multiple views are expanded to obtain a three-dimensional model of the casting to be inspected.
[0106] In one implementation, the three-dimensional model determining unit 701 is used to:
[0107] Expanding the depth information of the sparse depth map according to the multiple views to obtain a dense depth map of the casting to be inspected; or,
[0108] Depth information of at least one of the multiple views is reconstructed according to the sparse depth map to obtain a dense depth map of the casting to be inspected.
[0109] In one implementation, the three-dimensional model determining unit 701 is used to:
[0110] Performing a neighbor sampling process on the sparse depth map to obtain a neighbor sampling depth map, and performing a convolution operation process on the neighbor sampling depth map to obtain a depth map feature;
[0111] Performing feature fusion processing on at least one of the multiple views to obtain view features;
[0112] The depth map features and the view features are fused to obtain a dense depth map of the casting to be inspected.
[0113] In one embodiment, the device further comprises a processing unit, configured to:
[0114] Based on the voxel information of the casting to be detected, constructing a three-dimensional grid of the casting to be detected;
[0115] Determine a target path for collecting image information of the casting to be detected according to the three-dimensional grid and the starting point and the arrival point for collecting the image of the casting to be detected preset in the three-dimensional grid; the target path is a shooting path for collecting image information of the casting to be detected, and the starting point and the arrival point are the starting point and the arrival point of the target path;
[0116] The casting to be inspected is photographed according to the target path to obtain image information of the casting to be inspected.
[0117] In one embodiment, the device further comprises a processing unit, configured to:
[0118] In the three-dimensional grid of the casting to be inspected, first neighboring path points adjacent to the starting point are respectively determined;
[0119] Based on a preset cost function, respectively determine the cost function values corresponding to the starting point and the adjacent first neighbor path points in the three-dimensional grid; and filter out the target first neighbor path points whose cost function values meet the filtering conditions from the first neighbor path points;
[0120] If the target first neighboring path point is not the arrival point, determine the target second neighboring path point adjacent to the target first neighboring path point, until the target Nth neighboring path point adjacent to the target N-1th neighboring path point is the arrival point; N is a positive integer not less than 2;
[0121] The starting point, the target first adjacent path point and the target Nth adjacent path point are sequentially connected to determine a target path for collecting image information of the casting to be inspected.
[0122] In one implementation, the preset cost function is:
[0123]
[0124] Among them, T i,j =(X i,j ,Y i,j ,Z i,j ) is used to represent the three-dimensional spatial position of the jth path point in the i-th path; P i Used to represent paths, each path contains a three-dimensional array of n path points; || T i,j T i,j+1 || represents the Euclidean distance between two path points, and i and n are both positive integers.
[0125] In one implementation, the defect detection unit 703 is used to:
[0126] Performing feature extraction processing on the image information of the casting to be detected by a first feature extraction module in the defect detection model to obtain a first feature set;
[0127] Extracting and processing the voxel information of the casting to be detected by a second feature extraction module in the defect detection model to obtain a second feature set;
[0128] The first feature set and the second feature set are fused by a fusion module in the defect detection model to obtain fused feature information;
[0129] Performing defect processing on the fused features through the classification module in the defect detection model to obtain defect features of the casting to be detected;
[0130] The defect features are decoded by the decoding module in the defect detection model to obtain the defect information of the casting to be detected.
[0131] In one embodiment, the device further comprises a marking unit, which is used to:
[0132] Determine each defect indicated by the defect information of the casting to be inspected, and determine defect position information corresponding to each defect in the three-dimensional model;
[0133] According to the obtained defect position information, each defect is marked in the three-dimensional model.
[0134] The specific details of each part of the above-mentioned device have been described in detail in the implementation method of the method part. The undisclosed details can be found in the implementation method of the method part, so they will not be repeated here.
[0135] It should be noted that Figure 2 Three-dimensional model construction algorithm unit 2021 and Figure 7 The three-dimensional model determining unit 701 in Figure 2 The path planning algorithm unit 2022 and the processing unit, Figure 2 Defect detection algorithm unit 2023 and Figure 7 The defect detection unit 703 and Figure 2 The defect marking unit 2024 and the marking unit in the embodiment can be understood as the same unit module.
[0136] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0137] The exemplary embodiments of the present disclosure also provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, the casting defect detection method is implemented.
[0138] In one embodiment, the computer program product may be a tangible product containing a computer program, such as a computer-readable storage medium storing a computer program. The readable storage medium may be a storage medium based on electrical, magnetic, optical, electromagnetic, infrared, or other signals, including but not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory (Flash), mechanical hard disk (HDD), solid-state drive (SSD), and the like. Exemplarily, the computer program product may be implemented as a non-volatile storage medium storing a computer program, such as a read-only memory, a NAND flash memory, and the like.
[0139] In one embodiment, the computer program product may be an intangible product including a computer program. Exemplarily, the computer program product may be implemented as a virtual digital product, such as a digital file storing an executable file, an installation package, etc. of the computer program.
[0140] The code of the computer program can be written in one or more programming languages. Programming languages such as C language, Java, C++, etc. The program code can be executed entirely on the user computing device, or partially on the user computing device, or as a separate software package, or partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, such as a local area network (LAN), a wide area network (WAN), etc., or can be connected to an external computing device (e.g., an Internet connection provided by an operator).
[0141] The computer program may be carried or transmitted via electrical, magnetic, optical, electromagnetic, infrared, or other signals. The electronic device may convert the signal carrying the computer program into a digital signal, thereby running the computer program. When the computer program runs on an electronic device, its code is used to enable the electronic device to execute (more specifically, enable the processor of the electronic device to execute) the method steps of various exemplary embodiments of the present disclosure, such as the above-mentioned casting defect detection method, which includes the following steps:
[0142] Step 301: determine the three-dimensional model of the casting to be detected; step 302: voxelize the three-dimensional model to obtain voxel information of the casting to be detected; step 303: fuse the voxel information and image information of the casting to be detected through the defect detection model to obtain the defect information of the casting to be detected.
[0143] By implementing the above method steps through a computer program, the three-dimensional model of the casting to be detected can be first determined, and then the three-dimensional model can be voxelized to obtain the voxel information of the casting to be detected, that is, to obtain information containing the spatial direction of the casting to be detected. Further, the voxel information containing the spatial direction and the image information in the plane direction are fused and detected by the defect detection model to obtain the final defect detection information. It can be seen that the entire detection process of the casting to be detected in the embodiment of the present disclosure is automated, thereby improving the detection efficiency of the casting to a certain extent. In addition, since the voxel information containing the spatial direction and the image information in the plane direction are combined, and the defects of the casting are comprehensively determined by the defect detection model, compared with the method of manually determining defects based on experience, the occurrence of defect detection errors caused by insufficient manual experience is avoided, thereby greatly improving the accuracy of defect detection.
[0144] The exemplary embodiments of the present disclosure also provide an electronic device, which may include a processor and a memory. The memory stores executable instructions of the processor, such as a computer program. The processor executes the method steps of various exemplary embodiments of the present disclosure by executing the executable instructions.
[0145] Reference below Figure 8 , the electronic device is exemplarily described in the form of a general-purpose computing device. It should be understood that Figure 8 The electronic device 800 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0146] like Figure 8 As shown, the electronic device 800 may include: a processor 810 , a memory 820 , a bus 830 , an I / O (input / output) interface 840 , a network adapter 850 , and a display 880 .
[0147] The memory 820 may include a volatile memory, such as a RAM 821, a cache unit 822, and may also include a non-volatile memory, such as a ROM 823. The memory 820 may also include one or more program modules 824, such program modules 824 include but are not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or a combination thereof may include the implementation of a network environment. For example, the program module 824 may include each module in the above-mentioned device.
[0148] The processor 810 may include one or more processing units. For example, the processor 810 may include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor and / or an NPU (Neural-Network Processing Unit), etc.
[0149] The processor 810 can be used to execute executable instructions stored in the memory 820, such as the above-mentioned casting defect detection method, which includes the following steps: Step 301: determine the three-dimensional model of the casting to be detected; Step 302: voxelize the three-dimensional model to obtain voxel information of the casting to be detected; Step 303: perform fusion detection processing on the voxel information and image information of the casting to be detected through the defect detection model to obtain the defect information of the casting to be detected.
[0150] By executing the above method steps through the processor 810, the three-dimensional model of the casting to be detected can be determined first, and then the three-dimensional model can be voxelized to obtain the voxel information of the casting to be detected, that is, to obtain the information containing the spatial direction of the casting to be detected. Further, the voxel information containing the spatial direction and the image information in the plane direction are fused and detected by the defect detection model to obtain the final defect detection information. It can be seen that the entire detection process of the casting to be detected in the embodiment of the present disclosure is automated, thereby improving the detection efficiency of the casting to a certain extent. In addition, since the voxel information containing the spatial direction and the image information in the plane direction are combined, and the defects of the casting are comprehensively determined by the defect detection model, compared with the method of manually determining defects based on experience, the occurrence of defect detection errors caused by insufficient manual experience is avoided, thereby greatly improving the accuracy of defect detection.
[0151] The bus 830 is used to realize the connection between different components of the electronic device 800, and may include a data bus, an address bus, and a control bus.
[0152] The electronic device 800 can communicate with one or more external devices 900 (eg, a keyboard, a mouse, an external controller, etc.) through the I / O interface 840 .
[0153] The electronic device 800 can communicate with one or more networks through the network adapter 850. For example, the network adapter 850 can provide mobile communication solutions such as 3G / 4G / 5G, or wireless communication solutions such as wireless LAN, Bluetooth, near field communication, etc. The network adapter 850 can communicate with other modules of the electronic device 800 through the bus 830.
[0154] The electronic device 800 may display a graphical user interface, such as relevant content of the casting search result, through the display 880 .
[0155] although Figure 8 Not shown, other hardware and / or software modules may also be provided in the electronic device 800, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0156] As can be seen from the above, the technical solution of the present disclosure can be implemented as a method, an apparatus, a system, a computer program product, a storage medium, an electronic device, etc. Those skilled in the art can understand that various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software, such as being respectively referred to as a "circuit", "module" or "system".
[0157] It should be understood that the present disclosure is not limited to the specific method steps or structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope thereof. Those skilled in the art will easily think of other embodiments based on the specific embodiments provided by the present disclosure. Therefore, the specific embodiments provided by the present disclosure are only exemplary, and the scope and spirit of the present disclosure are indicated by the claims, and any variations, uses or adaptive changes of the present disclosure should be covered, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the technical field that are not disclosed in the present disclosure.
Claims
1. A casting defect detection method, characterized in that: The method comprises: Determine the three-dimensional model of the casting to be inspected; Performing voxel processing on the three-dimensional model to obtain voxel information of the casting to be inspected; The defect detection model is used to perform fusion detection processing on the voxel information and image information of the casting to be detected, so as to obtain the defect information of the casting to be detected.
2. The method according to claim 1, characterized in that Determining the three-dimensional model of the casting to be inspected includes: Performing two-dimensional convolution processing on the multiple views of the casting to be inspected based on different viewing angles, respectively, to obtain stacked feature maps corresponding to the multiple views of the casting to be inspected based on different viewing angles; Performing three-dimensional convolution processing on the stacked feature maps corresponding to each of the multiple views to obtain a sparse depth map of the casting to be inspected; A three-dimensional model of the casting to be inspected is determined according to the sparse depth map and the multiple views.
3. The method according to claim 2, characterized in that Determining the three-dimensional model of the casting to be inspected according to the sparse depth map and the multiple views includes: Performing preset processing on the sparse depth map and the multiple views to obtain a dense depth map of the casting to be inspected; The dense depth map and the multiple views are expanded to obtain a three-dimensional model of the casting to be inspected.
4. The method according to claim 3, characterized in that The step of performing preset processing on the sparse depth map and the multiple views to obtain a dense depth map of the casting to be inspected includes: Expanding the depth information of the sparse depth map according to the multiple views to obtain a dense depth map of the casting to be inspected; or, Depth information of at least one of the multiple views is reconstructed according to the sparse depth map to obtain a dense depth map of the casting to be inspected.
5. The method according to claim 3, characterized in that: The step of performing preset processing on the sparse depth map and the multiple views to obtain a dense depth map of the casting to be inspected includes: Performing a neighbor sampling process on the sparse depth map to obtain a neighbor sampling depth map, and performing a convolution operation process on the neighbor sampling depth map to obtain a depth map feature; Performing feature fusion processing on at least one of the multiple views to obtain view features; The depth map features and the view features are fused to obtain a dense depth map of the casting to be inspected.
6. The method according to any one of claims 1 to 5, characterized in that: After obtaining the voxel information of the casting to be detected, the method further includes: Based on the voxel information of the casting to be detected, constructing a three-dimensional grid of the casting to be detected; Determine a target path for collecting image information of the casting to be detected according to the three-dimensional grid and the starting point and the arrival point for collecting the image of the casting to be detected preset in the three-dimensional grid; the target path is a shooting path for collecting image information of the casting to be detected, and the starting point and the arrival point are the starting point and the arrival point of the target path; The casting to be inspected is photographed according to the target path to obtain image information of the casting to be inspected.
7. The method according to claim 6, characterized in that Determining a target path for collecting image information of the casting to be detected based on the three-dimensional grid and a starting point and an arrival point for collecting the image of the casting to be detected preset in the three-dimensional grid includes: In the three-dimensional grid of the casting to be inspected, first neighboring path points adjacent to the starting point are respectively determined; Based on a preset cost function, respectively determine the cost function values corresponding to the starting point and the adjacent first neighbor path points in the three-dimensional grid; and filter out the target first neighbor path points whose cost function values meet the filtering conditions from the first neighbor path points; If the target first neighboring path point is not the arrival point, determine the target second neighboring path point adjacent to the target first neighboring path point, until the target Nth neighboring path point adjacent to the target N-1th neighboring path point is the arrival point; N is a positive integer not less than 2; The starting point, the target first adjacent path point and the target Nth adjacent path point are sequentially connected to determine a target path for collecting image information of the casting to be inspected.
8. The method according to claim 7, characterized in that The preset cost function is: Among them, T i,j =(X i,j ,Y i,j ,Z i,j ) is used to represent the three-dimensional spatial position of the jth path point in the i-th path; P i Used to represent paths, each path contains a three-dimensional array of n path points; || T i,j T i,j+1 || represents the Euclidean distance between two path points, and i and n are both positive integers.
9. The method according to claim 1, characterized in that: The defect detection model is used to fuse the voxel information and the image information of the casting to be detected to obtain the defect information of the casting to be detected, including: Performing feature extraction processing on the image information of the casting to be detected by a first feature extraction module in the defect detection model to obtain a first feature set; Extracting and processing the voxel information of the casting to be detected by a second feature extraction module in the defect detection model to obtain a second feature set; The first feature set and the second feature set are fused by a fusion module in the defect detection model to obtain fused feature information; Performing defect processing on the fused features through the classification module in the defect detection model to obtain defect features of the casting to be detected; The defect features are decoded by the decoding module in the defect detection model to obtain the defect information of the casting to be detected.
10. The method according to claim 1, characterized in that After obtaining the defect information of the casting to be inspected, the method further includes: Determine each defect indicated by the defect information of the casting to be inspected, and determine defect position information corresponding to each defect in the three-dimensional model; According to the obtained defect position information, each defect is marked in the three-dimensional model.
11. A casting defect detection device, characterized in that: The device comprises: A three-dimensional model determination unit, used for determining a three-dimensional model of a casting to be inspected; A voxel processing unit, used for performing voxel processing on the three-dimensional model to obtain voxel information of the casting to be detected; The defect detection unit is used to perform fusion detection processing on the voxel information and image information of the casting to be detected through a defect detection model to obtain the defect information of the casting to be detected.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.
13. An electronic device, characterized in that: include: processor; A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 10 by executing the executable instructions.