Foreign matter detection method and device of 3D printer, computer equipment and readable storage medium

By acquiring images in a 3D printer and using image recognition models for automated foreign object detection, the problems of high difficulty and low reliability in foreign object detection in existing technologies are solved, achieving efficient and reliable foreign object detection and ensuring print quality.

CN122008548APending Publication Date: 2026-05-12SHENZHEN ANYCUBIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN ANYCUBIC TECH CO LTD
Filing Date
2025-12-08
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In existing 3D printing technologies, foreign object detection is difficult and unreliable, leading to print quality problems. In particular, if foreign objects are not detected and cleaned in time before printing, FDM printers may suffer from print head damage, model misalignment, and poor interlayer bonding.

Method used

By acquiring an image of the target part at the target detection height in a 3D printer, an automated foreign object detection is performed using a pre-trained image recognition model, generating foreign object detection results, identifying whether there are foreign objects on the heated bed, and achieving automated and routine detection.

Benefits of technology

It improves the reliability and versatility of foreign object detection, avoids missed detections caused by human error, and ensures the safety and efficiency of the printing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122008548A_ABST
    Figure CN122008548A_ABST
Patent Text Reader

Abstract

The invention discloses a foreign matter detection method and device for a 3D printer, computer equipment and a readable storage medium, and relates to the technical field of 3D printing, when a target part in the 3D printer is at a target detection height, a hot bed is shot to obtain a to-be-detected image, the to-be-detected image is input into a pre-trained image recognition model, and the to-be-detected image is recognized; hot bed identification information is obtained, a foreign matter detection result is generated according to the hot bed identification information, and the foreign matter detection result is used for indicating whether foreign matter exists on the hot bed or not in the foreign matter detection process. Whether the foreign matter exists on the hot bed is automatically detected through a computer vision algorithm, missing detection caused by manual negligence is effectively avoided, the hot bed is recognized based on the image recognition model, whether the foreign matter exists is deduced by analyzing hot bed recognition information, specific features of the foreign matter do not need to be defined or learned in advance, and the efficiency is improved. Foreign matters of various types, sizes and appearances can be widely detected, and the universality and robustness of foreign matter detection are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of 3D printing technology, and in particular to a foreign object detection method, apparatus, computer equipment, and readable storage medium for a 3D printer. Background Technology

[0002] In the field of 3D (Three Dimensions) printing technology, FDM (Fused Deposition Modeling) is a mainstream printing process that has been widely used in many industries and fields due to its advantages such as low cost, simple operation, and wide material applicability. FDM 3D printing involves heating and melting thermoplastic materials, then depositing them layer by layer according to a preset model path to ultimately build a three-dimensional solid model.

[0003] However, print quality is affected by a variety of factors, among which foreign objects in the printing environment are one of the key factors affecting print quality. If foreign objects are not detected and removed in time before printing, it may cause the print head to collide with foreign objects and be damaged, or cause a series of problems such as model misalignment, poor interlayer bonding, and printing failure during the printing process, which seriously affect the quality of the printed product.

[0004] In related technologies, foreign object detection is performed by visual inspection. Users need to frequently intervene and check the printing process, which increases the difficulty and burden of use. It is also easy for foreign objects to be missed due to oversights in manual inspection, resulting in low detection reliability. Summary of the Invention

[0005] In view of this, this application provides a method, apparatus, computer device and readable storage medium for foreign object detection in printers, with the main purpose of solving the problems of high difficulty and low reliability of foreign object detection for users.

[0006] According to a first aspect of this application, a foreign object detection method for a 3D printer is provided, the method comprising: Acquire the image to be detected; the image to be detected is obtained by taking a picture of the heated bed in the 3D printer when the target part in the 3D printer is at the target detection height. The image to be detected is input into a pre-trained image recognition model to obtain hot bed recognition information; Based on the heated bed identification information, a foreign object detection result is generated; the foreign object detection result is used to indicate whether a foreign object was detected on the heated bed during this foreign object detection process.

[0007] According to a second aspect of this application, a foreign object detection device for a 3D printer is provided, the device comprising: The acquisition module is used to acquire the image to be detected; the image to be detected is obtained by taking a picture of the heated bed in the 3D printer when the target part in the 3D printer is at the target detection height. The recognition module is used to input the image to be detected into a pre-trained image recognition model to obtain hot bed recognition information; The detection result generation module is also used to generate a foreign object detection result based on the heated bed identification information; the foreign object detection result is used to indicate whether a foreign object was detected on the heated bed during the current foreign object detection process.

[0008] According to a third aspect of this application, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in any of the first aspects above.

[0009] According to a fourth aspect of this application, a readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any one of the first aspects above.

[0010] By employing the above technical solution, this application provides a method, apparatus, computer device, and readable storage medium for foreign object detection in a 3D printer. The method involves acquiring an image of the heated bed when the target part in the 3D printer is at the target detection height, inputting the image into a pre-trained image recognition model to obtain heated bed identification information, and generating a foreign object detection result based on this information. This result indicates whether a foreign object was detected on the heated bed during the detection process. Thus, by automatically detecting the presence of foreign objects on the heated bed using computer vision algorithms, the detection process can be automated and normalized, effectively avoiding missed detections due to human error and improving detection reliability. Furthermore, by identifying the heated bed based on an image recognition model and then analyzing the heated bed identification information to infer the presence of foreign objects, there is no need to pre-define or learn the specific characteristics of the foreign object's shape, structure, color, etc. This allows for the broad detection of foreign objects of various types, sizes, and appearances, enhancing the versatility and robustness of foreign object detection.

[0011] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0012] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This illustration shows an application environment diagram of a foreign object detection method for a 3D printer provided in an embodiment of this application; Figure 2 This illustration shows a flowchart of a foreign object detection method for a 3D printer provided in an embodiment of this application. Figure 3 This illustration shows a schematic diagram of determining whether to divide the data into blocks, according to an embodiment of this application. Figure 4 This illustration shows a schematic diagram of a method for determining whether a structure is hollow, provided by an embodiment of this application. Figure 5 This illustration shows a schematic diagram of determining the convex hull ratio according to an embodiment of this application; Figure 6 This paper illustrates a flowchart of another foreign object detection method for 3D printers provided in an embodiment of this application. Figure 7 This illustration shows a structural schematic diagram of a foreign object detection device for a 3D printer provided in an embodiment of this application; Figure 8 A schematic diagram of the device structure of a computer device provided in an embodiment of this application is shown. Detailed Implementation

[0013] Exemplary embodiments of the present application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this application will be thorough and complete, and will fully convey the scope of the present application to those skilled in the art.

[0014] To facilitate understanding of the technical implementation of this application, an example of its application environment is provided: This application can be applied to the field of 3D printing, and the application environment can be as follows: Figure 1 As shown, it includes a 3D printer 110 and a computer device 120, which are communicatively connected.

[0015] Specifically, when the target part in the 3D printer is at the target detection height, a camera device captures an image of the heated bed in the 3D printer to obtain an image to be detected. The computer device 120 acquires the image to be detected, inputs it into a pre-trained image recognition model to obtain heated bed recognition information, and generates a foreign object detection result based on the heated bed recognition information. The foreign object detection result is used to indicate whether a foreign object was detected on the heated bed during this foreign object detection process.

[0016] The computer device 120 can be a server, which can be implemented using a standalone server or a server cluster composed of multiple servers. The computer device 120 can also be a control terminal, which can be, but is not limited to, various desktop computers, laptops, tablets, IoT devices, and smartphones, as long as it can meet the corresponding computing power requirements.

[0017] In other embodiments, if the controller of the 3D printer can meet the corresponding computing power requirements, the computer device 120 can be eliminated in the application environment. Accordingly, the image recognition model can be deployed on the 3D printer 110, and the foreign object detection process can be completed directly by the 3D printer 110. The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be noted that the method provided in this application is used in the following description. Figure 1 The method is illustrated using computer device 120 as an example, but this is only an illustrative example and is not limited to the fact that only computer device 120 can perform the method.

[0018] This application provides a method for foreign object detection in a 3D printer, such as... Figure 2 As shown, the method includes the following steps: S10: Acquire the image to be detected.

[0019] The image to be inspected is obtained by taking a picture of the heated bed in the 3D printer when the target part in the 3D printer is at the target inspection height.

[0020] A 3D printer can be an FDM type 3D printer, specifically a gantry-type 3D printer or a CoreXY type 3D printer (usually with a box-type structure, referred to as a box printer below). The target component refers to the actuator that moves along the Z-axis during the printing process. The target component is either the print head or the heated bed. Specifically, for gantry-type printers, the heated bed is usually fixed during printing, while the print head moves up and down along the Z-axis to adjust the printing height; in this case, the target component is the print head. For box printers, the print head moves in the XY plane, but its position along the Z-axis is usually fixed; instead, the heated bed as a whole moves up and down along the Z-axis; in this case, the target component is the heated bed.

[0021] The image to be detected is used for foreign object detection and can be captured by a camera device. The camera device can be mounted on the 3D printer, and its position on the printer can be determined based on the printer's structure. It needs to capture as much of the heated bed area as possible. For example, for a gantry-type 3D printer, the camera device can be positioned at one end of the X-axis, facing the heated bed, thus capturing the heated bed from a top-down angle. Alternatively, it can be positioned near the bottom center of the X-axis, capturing the heated bed from a top-down angle. As the X-axis moves up and down along the Z-axis, the camera device moves accordingly, and its field of view changes accordingly. For example, for a box-type printer, the camera device can be mounted on a fixed frame above the top of the Z-axis on the side of the printer near the box door. In this case, the camera's field of view is fixed. In other embodiments, the camera device can also be placed outside the 3D printer, as long as it can capture the required heated bed area.

[0022] The target detection height is a pre-set coordinate system located at a specific position along the Z-axis of the 3D printer. During the foreign object detection process, when the target part is at the target detection height along the Z-axis, a camera is triggered to capture an image of the heated bed, thereby obtaining the image to be detected corresponding to that target detection height. In one specific embodiment, one foreign object detection may correspond to one target detection height. When multiple foreign object detections are required, multiple different target detection heights can be used. Specifically, the camera can be triggered to capture an image of the heated bed when the target part is at different target detection heights to obtain the corresponding image to be detected.

[0023] Furthermore, the image to be inspected can be acquired after the 3D printer receives the start printing command. Specifically, after the user executes the start printing operation through the control interface or control buttons, the 3D printer receives the start printing command. Then, with the target part at the target detection height, the camera device takes a picture of the heated bed in the 3D printer to obtain the image to be inspected. The 3D printer then sends the image to the computer device for foreign object detection.

[0024] S20: Input the image to be detected into a pre-trained image recognition model to obtain hot bed recognition information.

[0025] Image recognition models are artificial intelligence models with segmentation capabilities, capable of segmenting the target region representing the hotbed itself from an image to be detected. Specifically, image recognition models can be implemented using various neural network architectures with segmentation capabilities, such as the single-stage object detection model RTMDet, or two-stage mask detection models like CMask R-CNN and MaskScoring R-CNN, or models based on the Transformer architecture such as Mask Transformer and SwinTransformer. Furthermore, the training methods for image recognition models can be implemented using any applicable methods, which will not be elaborated upon here.

[0026] After the image to be detected is input into a pre-trained image recognition model, the model outputs hotbed identification information, which specifically includes hotbed contour information and hotbed confidence score. Hotbed contour information describes the geometric extent of the hotbed in the image to be detected. At the computer data level, hotbed contour information can be represented as an ordered set of points forming a closed polygon, or as a binary mask identifying pixels in the hotbed region. Hotbed confidence score evaluates the probability that the hotbed region identified by the model (i.e., the region corresponding to the hotbed contour information) belongs to a real hotbed.

[0027] Furthermore, it should be noted that the hotbed recognition information output by the image recognition model can be visualized. For example, through a separate visualization module, the hotbed recognition information output by the image recognition model can be read, and then the corresponding visualization information (such as hotbed outline, hotbed area filling, text labels, etc.) can be overlaid and rendered onto the original input image, thereby generating a new labeled image that is easy for relevant personnel to understand, so as to help relevant personnel verify the recognition accuracy of the image recognition model.

[0028] It should be noted that after acquiring the image to be detected, image defect detection and image repair processing can be performed first. Only images that are deemed qualified after detection and processing are input into the image recognition model. If the images are not qualified, they are discarded and new images to be detected are acquired again.

[0029] S30: Generate foreign object detection results based on heated bed identification information.

[0030] The foreign object detection result indicates whether a foreign object was detected on the heated bed during the current foreign object detection process. After obtaining the heated bed identification information, the computer equipment will determine whether a foreign object exists on the heated bed based on the heated bed identification information, and thus obtain the corresponding foreign object detection result.

[0031] Specifically, for a single foreign object detection, the detection result may be a first foreign object detection result, indicating that a foreign object was detected on the heated bed during this detection process; or it may be a second foreign object detection result, indicating that no foreign object was detected on the heated bed during this detection process. Here, "foreign object" refers to an object that is not part of the heated bed surface itself, such as a printed model that was not removed during the previous printing, tools left behind by the user, or printer parts that have fallen onto the heated bed surface.

[0032] The first foreign object detection result can be used to instruct the target device to issue a foreign object alert. Specifically, after generating the first foreign object detection result indicating that a foreign object was detected on the heated bed during the current foreign object detection process, the target device is instructed to issue a foreign object alert. The foreign object alert can be at least one of the following: an audio alert, a visual alert, or a content alert (such as an image or text message). The target device can be a component of the 3D printer, such as a sound-generating device, status light, or display screen on the 3D printer, or it can be another device besides the 3D printer, such as a device that can issue a foreign object alert via a user's mobile app.

[0033] It can be understood that a foreign object detection can refer to the process where a target component moves to the target detection position, triggers a camera device to capture an image of the heated bed, obtains the image to be detected, the image recognition model processes the image to output heated bed identification information, and the heated bed identification information is analyzed to finally obtain a complete foreign object detection result indicating whether a foreign object is detected on the heated bed.

[0034] Specifically, from the moment the 3D printer receives the start-up command to the point where the printer's heated bed contacts the print head (completing Z-axis zeroing), a single foreign object detection can be performed. The result of this single detection determines whether to control the print head's contact with the heated bed, thus improving detection efficiency. Alternatively, multiple foreign object detections can be performed, and the results of these multiple detections determine whether to control the print head's contact with the heated bed, thereby improving detection reliability.

[0035] Furthermore, it should be noted that in related technologies, when using artificial intelligence models for anomaly analysis, the AI ​​model learns the characteristics of predetermined anomalies in advance, and then determines whether a certain predetermined anomaly exists in the image to be detected, thereby obtaining the corresponding anomaly recognition result. However, this method requires pre-learning the characteristics of the anomaly, and in actual detection, it can only identify predetermined anomalies, resulting in significant limitations. In contrast, in this application, foreign object detection results are generated based on hotbed identification information. Hotbed identification information can determine the geometric properties of the hotbed. Accordingly, there is no need to pre-define or learn the specific characteristics of the foreign object's shape, structure, color, etc. Figuratively speaking, it is not necessary to know the appearance of the foreign object in advance, but rather to infer it from the geometric properties that the hotbed should have in the absence of foreign objects. As long as the foreign object disrupts the corresponding geometric properties of the hotbed, regardless of what the foreign object is, this method has a high probability of capturing it.

[0036] The foreign object detection method for 3D printers provided in this application involves acquiring an image of the heated bed when the target part in the 3D printer is at the target detection height. This image is then input into a pre-trained image recognition model to obtain heated bed identification information. Based on this information, a foreign object detection result is generated, indicating whether a foreign object was detected on the heated bed during the detection process. This automatic detection of foreign objects on the heated bed using computer vision algorithms automates and normalizes the detection process, effectively avoiding missed detections due to human error and improving detection reliability. Furthermore, by identifying the heated bed based on an image recognition model and analyzing the identification information to infer the presence of a foreign object, there is no need to pre-define or learn the specific features of the foreign object's shape, structure, color, etc. This allows for the detection of a wide range of foreign objects of various types, sizes, and appearances, enhancing the versatility and robustness of foreign object detection.

[0037] In some embodiments, after generating a foreign object detection result based on the heated bed identification information, the method includes: determining whether the foreign object detection termination condition is met; if met, controlling the print head of the 3D printer to contact the heated bed; if not met, controlling the target component to move to a new target detection height and returning to the step of acquiring the image to be detected, until the foreign object detection termination condition is met.

[0038] In this embodiment, from the moment the 3D printer receives the start printing command to the point where the printer's heated bed contacts the print head, after each foreign object detection result is generated, it is determined whether the foreign object detection termination condition is met. If the foreign object detection termination condition is met, the foreign object detection process ends, and the 3D printer's print head is controlled to contact the heated bed. However, if the condition is not met, the target part is controlled to move to a new target detection height, and the next foreign object detection begins. This involves returning to the step of acquiring the image to be detected and executing subsequent steps such as inputting the image to be detected into a pre-trained image recognition model and generating a foreign object detection result based on the heated bed recognition information, until the foreign object detection termination condition is met.

[0039] The printer controls the print head to contact the heated bed, completing the Z-axis zeroing and preparing for actual printing. Specifically, as described above, for gantry-type printers, after determining that the foreign object detection end condition is met, the printer controls the print head to descend along the Z-axis until it contacts the heated bed. For box-type printers, the printer controls the heated bed to rise along the Z-axis until it contacts the print head.

[0040] This enables accurate detection of foreign objects on the heated bed surface before printing begins, effectively preventing collision risks and improving the safety and efficiency of printing operations.

[0041] In some embodiments, the foreign object detection method for a 3D printer provided in this application includes the following termination conditions: the foreign object detection result indicates that no foreign object was detected on the heated bed this time, and the number of foreign object detections has reached a predetermined number of detections; and / or, the foreign object detection result indicates that a foreign object was detected on the heated bed this time, and target indication information is obtained, the target indication information being used to indicate that the foreign object on the heated bed has been removed.

[0042] In this embodiment, if the foreign object detection result indicates that no foreign object was detected on the heated bed this time, and the predetermined number of foreign object detections has been reached, then the foreign object detection termination condition is determined to be met. The predetermined number of detections can be set based on actual needs, for example, it can be set to 3 times.

[0043] If the foreign object detection result indicates that a foreign object was detected on the heated bed and target indication information is obtained (indicating that the foreign object has been removed), the foreign object detection termination condition is met. Specifically, if the foreign object detection result is the first result, indicating that a foreign object was detected on the heated bed, a foreign object alert can be issued. After receiving the alert, the user can remove the foreign object from the heated bed and then perform corresponding operations on the relevant control interface, such as clicking the "Continue" button. The computer then obtains the target indication information to continue the subsequent process.

[0044] In this embodiment, the foreign object detection termination condition can be set as a dual verification mechanism, that is, the detection is terminated when the detection result confirms that there are no foreign objects in the hot bed and the preset number of detections has been reached, or when foreign objects are detected but confirmation of removal has been obtained, so as to effectively balance detection efficiency and accuracy.

[0045] In some embodiments, in the foreign object detection method for 3D printers provided in this application, there is a target height difference between two adjacent target detection heights, and the target height difference is determined based on the height of the target component at the end of the last printing by the 3D printer.

[0046] In this embodiment, the target height difference can be determined based on the height of the target component at the end of the previous printing cycle by the 3D printer. The height of the target component at the end of the previous printing cycle reflects the distance between the print head and the heated bed at the end of the previous printing cycle. The target height difference can be positively correlated with this distance; that is, the smaller this distance, the smaller the target height difference should be, to avoid collisions with foreign objects before the required number of foreign object detection cycles are completed, or the print head already contacting the heated bed.

[0047] In some embodiments, in the foreign object detection method for the 3D printer provided in this application, the target detection height corresponding to the first foreign object detection is the reference height or the height of the target component when the 3D printer finishes the last printing. The reference height is the height of the target component when the 3D printer completes the Z-axis reverse zeroing operation.

[0048] In one specific embodiment, after obtaining the start printing command, before the first foreign object detection, the height of the target component at the end of the last printing of the 3D printer can be directly read as the target detection height corresponding to the first foreign object detection.

[0049] In one specific embodiment, after receiving the start printing command, before the first foreign object detection, the Z-axis can be reversed to zero, causing the target component to move along the Z-axis to a reference height (i.e., the maximum height value of the Z-axis). This reference height is used as the target detection height for the first foreign object detection. This approach minimizes the risk of collisions with foreign objects or the print head contacting the heated bed before the required number of foreign object detections are completed. Furthermore, it ensures that the computer equipment has a clear starting position, guaranteeing accurate calculation of the area threshold later.

[0050] In some embodiments, the foreign object detection method for 3D printers provided in this application further includes at least one of the following before acquiring the image to be detected: The first item: control the print head of the 3D printer to move horizontally to the target avoidance position; the target avoidance position is used to ensure that the camera on the 3D printer is not blocked by the print head when photographing the heated bed; The second item: control the heated bed to move horizontally to the target shooting position; when the heated bed is in the target shooting position, the range of the heated bed captured by the camera device meets the target range condition.

[0051] In this embodiment, in order to optimize the acquisition quality of the image to be detected, two preprocessing operations are performed: First, the print head of the 3D printer is controlled to move horizontally to the target avoidance position. This position is pre-calculated and set to ensure that the print head will not block the field of view of the camera device, thereby ensuring the complete capture of the heated bed image as much as possible.

[0052] Secondly, the heated bed is controlled to move horizontally to the target shooting position. When the heated bed is at the target shooting position, the range of the heated bed captured by the camera device meets the target range condition. The target range condition can be: when the heated bed is at the target shooting position, the range of the heated bed captured by the camera device is greater than the range of the heated bed captured by the camera device when the heated bed is at multiple candidate shooting positions. The multiple candidate shooting positions can include multiple test positions within the Y-axis travel range. Specifically, the target shooting position can be determined by: controlling the heated bed to move within multiple test positions within the Y-axis travel range, and capturing images of the heated bed by the camera device respectively, selecting the test position with the largest shooting range as the target shooting position. In other embodiments, the target range condition can also be: the proportion of the captured heated bed range to the actual total area of ​​the heated bed exceeds a preset proportion, such as 80%. These two operations, through the coordinated optimization of mechanical positioning and image acquisition, can effectively eliminate the interference of physical obstruction and improper shooting range on the detection results, significantly improve the accuracy and reliability of foreign object detection, and lay the foundation for subsequent automated processing.

[0053] In some embodiments, in the foreign object detection method for a 3D printer provided in this application, the heated bed identification information includes heated bed contour information and heated bed confidence level; generating a foreign object detection result based on the heated bed identification information includes: determining the heated bed detection area of ​​the heated bed in the image to be detected based on the heated bed contour information; if the heated bed confidence level is greater than a confidence threshold and the heated bed detection area is less than or equal to an area threshold, generating a first foreign object detection result to indicate that a foreign object was detected on the heated bed during this foreign object detection process; wherein, the area threshold is determined based on the current target detection height.

[0054] In this embodiment, an abnormal size of the heated bed area means that there is an object obstructing the heated bed, and a low confidence level indicates that the image recognition model has low accuracy in recognizing the heated bed as an object. Therefore, the computer device will use the heated bed detection area or the heated bed confidence level for preliminary detection and evaluation.

[0055] Specifically, the computer equipment compares the obtained area with the area threshold, and at the same time compares the hot bed confidence with the confidence threshold, so as to achieve preliminary foreign object detection in the hot bed area.

[0056] If the confidence level of the heated bed is greater than the confidence threshold and the heated bed detection area is less than or equal to the area threshold, a first foreign object detection result is generated to indicate that a foreign object was detected on the heated bed during this foreign object detection process.

[0057] However, if the confidence level of the heated bed is greater than the confidence threshold and the detected area of ​​the heated bed is greater than the area threshold, it cannot be determined that no foreign object was detected on the heated bed during this foreign object detection process, and further fine inspection is required.

[0058] The area threshold is determined based on the current target detection height. Specifically, the normal thermal bed area (i.e., the thermal bed area in the image captured by the camera at this height without foreign objects) can be obtained in advance for multiple heights on the Z-axis (e.g., if the maximum height of the Z-axis is 260, then there are 260 heights). Based on these multiple heights and the normal thermal bed area corresponding to each height, a mapping relationship between height and normal thermal bed area is obtained. Subsequently, when the target component is at the target detection height, before comparing the thermal bed detection area in the image to be detected corresponding to the target detection height with the area threshold, the target detection height can be substituted into this mapping relationship to obtain the corresponding normal thermal bed area, which can then be used as the area threshold corresponding to the target detection height.

[0059] Taking the aforementioned 3D printer with a gantry structure as an example, the camera device can be set at one end of the X-axis of the 3D printer, and the camera device faces the heated bed on the 3D printer. In the case of shooting the heated bed from an oblique top-down perspective, the area threshold is smaller when the target detection height is higher and lower, and larger when the target detection height is in the middle.

[0060] In some embodiments, the method further includes: if the confidence level of the hot bed is greater than the confidence threshold and the detection area of ​​the hot bed is greater than the area threshold, determining the geometric analysis information of the hot bed based on the hot bed contour information, and generating the foreign object detection result based on the geometric analysis information of the hot bed.

[0061] As described above, if the confidence level of the hot bed is greater than the confidence threshold and the detection area of ​​the hot bed is greater than the area threshold, it cannot be determined that no foreign object was detected on the hot bed during the foreign object detection process and further fine inspection is required. In this case, the geometric analysis information of the hot bed can be determined based on the hot bed contour information, and the foreign object detection result can be generated based on the geometric analysis information of the hot bed.

[0062] The thermal bed geometry analysis information can be used to reflect the geometric characteristics of the thermal bed in the image to be detected, such as convex hull, segmentation, and hollowness. After preliminary detection using the thermal bed detection area and thermal bed confidence, the thermal bed geometry analysis information is used to finally confirm whether a foreign object is detected on the thermal bed during the foreign object detection process, which can improve the accuracy of foreign object detection.

[0063] In some embodiments, the thermal bed geometric analysis information includes thermal bed segmentation information; based on the thermal bed contour information, the thermal bed segmentation information corresponding to the thermal bed in the image to be detected is determined; the thermal bed segmentation information is used to indicate whether the thermal bed in the image to be detected is divided into multiple independent regions; when the thermal bed segmentation information indicates that the thermal bed in the image to be detected is divided into multiple independent regions, a first foreign object detection result is generated to indicate that a foreign object is detected on the thermal bed during this foreign object detection process.

[0064] In this embodiment, the heated bed segmentation information can specifically be the number of closed outer contours corresponding to the heated bed in the image to be detected. When the number of closed outer contours exceeds one, it indicates that the heated bed in the image to be detected has been divided into multiple independent regions due to the presence of foreign objects. For example... Figure 3 As shown, the heated bed is divided into two independent areas due to the presence of a long strip-shaped foreign object (marked in green) in the middle. Therefore, the first foreign object detection result is generated to indicate that a foreign object was detected on the heated bed during this foreign object detection process.

[0065] In this way, long, thin foreign objects can be accurately identified using the information from the heated bed segments, which helps to improve the reliability of foreign object detection.

[0066] In some embodiments, the thermal bed geometric analysis information includes hollow region information; based on the thermal bed contour information, the hollow region information corresponding to the thermal bed in the image to be detected is determined; the hollow region information is used to indicate whether there is a hollow region in the thermal bed in the image to be detected; when the hollow region information indicates that there is a hollow region in the thermal bed in the image to be detected, a first foreign object detection result is generated to indicate that a foreign object was detected on the thermal bed during this foreign object detection process.

[0067] In this embodiment, the hollow region information can specifically be the number of closed inner contours. When the number of closed inner contours is greater than or equal to one, a hollow region due to foreign objects exists within the heated bed in the image to be detected. For example... Figure 4 As shown, a hollow area appears in the heated bed due to the presence of a foreign object (the part marked in yellow) in the middle of the heated bed. Therefore, the first foreign object detection result is generated to indicate that a foreign object was detected in the heated bed during this foreign object detection process.

[0068] In this way, foreign objects located in the middle of the heated bed can be accurately identified through the hollow information, which helps to improve the reliability of foreign object detection.

[0069] In some embodiments, the thermal bed geometry analysis information includes the convex hull ratio; determining the thermal bed geometry analysis information based on the thermal bed contour information, and generating a foreign object detection result based on the thermal bed geometry analysis information, includes: determining the convex hull corresponding to the thermal bed in the image to be detected based on the thermal bed contour information, and obtaining the area of ​​the convex hull; obtaining the convex hull ratio based on the thermal bed detection area and the area of ​​the convex hull; if the convex hull ratio is less than or equal to a convex hull ratio threshold, generating a first foreign object detection result to indicate that a foreign object was detected on the thermal bed during this foreign object detection process.

[0070] In this embodiment, when the outline of a foreign object extends beyond the edge of the heated bed in the image to be detected, the outline of the heated bed will appear concave. The presence of a foreign object on the heated bed can be determined by calculating the convexity ratio.

[0071] Specifically, for example Figure 5 As shown, the hot bed detection area (the area enclosed by the red outline) can be obtained. Then, based on the hot bed outline information, the convex hull corresponding to the hot bed in the image to be detected can be determined, and the area of ​​the convex hull can be obtained (i.e., the sum of the area enclosed by the red outline and the area enclosed by the blue outline). The ratio of the hot bed detection area to the area of ​​the convex hull is obtained, i.e., the convex hull ratio.

[0072] If the convex hull ratio is less than or equal to the convex hull ratio threshold, a first foreign object detection result is generated to indicate that a foreign object was detected on the heated bed during this foreign object detection process. The convex hull ratio threshold can be set in conjunction with the imaging of the camera device, for example, it can be set to about 0.95. In addition, in a specific embodiment, the foreign object detection sensitivity can also be set, and the convex hull ratio threshold can correspond to the sensitivity. For example, if the sensitivity is set to high, medium, and low, the convex hull ratio threshold can be set to A1, A2, and A3, which increase sequentially.

[0073] In this way, foreign objects that extend beyond the edge of the heated bed can be accurately identified through hollow information, which helps to improve the reliability of foreign object detection.

[0074] In one specific embodiment, taking the aforementioned 3D printer with a gantry structure as an example, the camera device can be located at one end of the X-axis of the 3D printer, and the camera device faces the heated bed on the 3D printer, i.e., taking the heated bed as an example from an oblique top-down view. The logical process of the foreign object detection method proposed in this application is summarized as follows: See Figure 6 After detecting that the user clicks to start printing, the 3D printer controls the Z-axis to reverse and return to zero, so that the print head moves along the Z-axis to Zmax (that is, the maximum value in the vertical direction), while the X and Y axes return to zero, and the print head moves along the X-axis to the target avoidance position, and the heated bed moves along the Y-axis to the target shooting position.

[0075] Then, the 3D printer controls the camera device to capture images of the heated bed, obtaining the image to be inspected. The computer equipment then performs the first foreign object detection. The image to be detected is acquired and input into an image recognition model. After processing, the image recognition model obtains the hotbed contour information and hotbed confidence score. The hotbed detection area is calculated based on the hotbed contour information, and an area threshold is determined in conjunction with the current height. An initial detection is performed based on the hotbed detection area and hotbed confidence score. If the hotbed confidence score is greater than the confidence threshold and the hotbed detection area is less than or equal to the area threshold, a first foreign object detection result is generated to indicate that a foreign object was detected on the hotbed during this foreign object detection process.

[0076] If the confidence level of the heated bed is greater than the confidence threshold and the detected area of ​​the heated bed is greater than the area threshold, the heated bed segmentation information, hollow region information, and convex hull ratio are determined based on the heated bed contour information. A first foreign object detection result is generated when the heated bed segmentation information indicates that the heated bed in the image to be detected is divided into multiple independent regions, the hollow region information indicates that there is a hollow region in the heated bed in the image to be detected, and the convex hull ratio is less than or equal to the convex hull ratio threshold. This result indicates that a foreign object was detected on the heated bed during the current foreign object detection process. If none of the above three conditions are met, a second foreign object detection result is generated to indicate that no foreign object was detected on the heated bed during the current foreign object detection process.

[0077] Determine whether the foreign object detection termination conditions are met; the foreign object detection termination conditions include: the foreign object detection result indicates that no foreign object was detected on the heated bed this time, and the number of foreign object detections has reached the predetermined number of detections; and / or, the foreign object detection result indicates that a foreign object was detected on the heated bed this time, and target indication information is obtained, the target indication information is used to indicate that the foreign object on the heated bed has been removed; If the conditions are met, the foreign object detection process ends, and the 3D printer's print head is brought into contact with the heated bed. If the conditions are not met, a second foreign object detection is performed, the target component is moved to a new target detection height, and the process returns to the step of acquiring the image to be detected until the foreign object detection termination condition is met. There is a target height difference between two adjacent target detection heights, which is determined based on the height of the target component at the end of the previous printing by the 3D printer. The entire process revolves around the movement of the print head along the Z-axis, thereby performing multiple foreign object detections and feedback during the print head's movement to ensure that the printing process is free from interference from foreign objects.

[0078] Furthermore, as Figure 2 In terms of specific implementation, this application provides a foreign object detection device for a 3D printer, such as... Figure 7 As shown, the device includes: an acquisition module 701, an identification module 702, and a detection result generation module 703.

[0079] The acquisition module 701 is used to acquire the image to be detected; the image to be detected is obtained by taking a picture of the heated bed in the 3D printer when the target part in the 3D printer is at the target detection height. The recognition module 702 is used to input the image to be detected into a pre-trained image recognition model to obtain hot bed recognition information; The detection result generation module 703 is used to generate foreign object detection results based on the heated bed identification information; the foreign object detection results are used to indicate whether a foreign object was detected on the heated bed during this foreign object detection process.

[0080] The foreign object detection device for printers provided in this application acquires an image of the heated bed when the target part in the 3D printer is at the target detection height. This image is then input into a pre-trained image recognition model to obtain heated bed identification information. Based on this information, a foreign object detection result is generated, indicating whether a foreign object was detected on the heated bed during the detection process. This automatic detection of foreign objects on the heated bed using computer vision algorithms automates and normalizes the detection process, effectively avoiding missed detections due to human error and improving detection reliability. Furthermore, by identifying the heated bed based on an image recognition model and analyzing the identification information to infer the presence of a foreign object, there is no need to pre-define or learn the specific characteristics of the foreign object's shape, structure, color, etc. This allows for the detection of a wide range of foreign objects of various types, sizes, and appearances, enhancing the versatility and robustness of foreign object detection.

[0081] In specific application scenarios, the device also includes: The judgment module is used to determine whether the foreign object detection termination condition is met. If it is met, it controls the 3D printer's print head to contact the heated bed. If it is not met, it controls the target part to move to a new target detection height and returns to the step of acquiring the image to be detected until the foreign object detection termination condition is met.

[0082] In specific application scenarios, at least one of the following should be included: First item: The conditions for ending foreign object detection include: the foreign object detection result indicates that no foreign object was detected on the heated bed this time, and the number of foreign object detections has reached the predetermined number of detections; and / or, the foreign object detection result indicates that a foreign object was detected on the heated bed this time, and target indication information is obtained, which is used to indicate that the foreign object on the heated bed has been removed; Second item: There is a target height difference between two adjacent target detection heights, which is determined based on the height of the target component at the end of the previous print run by the 3D printer; Third item: The target detection height for the first foreign object detection is the reference height or the height of the target component when the 3D printer finished printing the last time. The reference height is the height of the target component when the 3D printer completes the Z-axis reverse zeroing operation.

[0083] In specific application scenarios, the device also includes a mobility module for at least one of the following: First item: Control the print head of the 3D printer to move horizontally to the target avoidance position; the target avoidance position is used to ensure that the camera on the 3D printer is not blocked by the print head when photographing the heated bed; Second item: Control the heated bed to move horizontally to the target shooting position; when the heated bed is at the target shooting position, the range of the heated bed captured by the camera device meets the target range condition.

[0084] In specific application scenarios, heated bed identification information includes heated bed contour information and heated bed confidence level; The detection result generation module 703 is used to determine the hot bed detection area in the image to be detected based on the hot bed contour information; if the hot bed confidence is greater than the confidence threshold and the hot bed detection area is less than or equal to the area threshold, a first foreign object detection result is generated to indicate that a foreign object is detected on the hot bed during this foreign object detection process; wherein, the area threshold is determined based on the current target detection height.

[0085] In specific application scenarios, the detection result generation module 703 is also used to determine the thermal bed geometric analysis information based on the thermal bed contour information and generate foreign object detection results based on the thermal bed geometric analysis information if the thermal bed confidence is greater than the confidence threshold and the thermal bed detection area is greater than the area threshold.

[0086] In specific application scenarios, the thermal bed geometric analysis information includes thermal bed segmentation information; based on the thermal bed contour information, the thermal bed segmentation information corresponding to the thermal bed in the image to be detected is determined; the thermal bed segmentation information is used to indicate whether the thermal bed in the image to be detected is divided into multiple independent regions; when the thermal bed segmentation information indicates that the thermal bed in the image to be detected is divided into multiple independent regions, a first foreign object detection result is generated to indicate that a foreign object was detected on the thermal bed during this foreign object detection process.

[0087] In specific application scenarios, the geometries of the heated bed include hollow region information; based on the heated bed contour information, the hollow region information corresponding to the heated bed in the image to be detected is determined; the hollow region information is used to indicate whether there is a hollow region in the heated bed in the image to be detected; when the hollow region information indicates that there is a hollow region in the heated bed in the image to be detected, a first foreign object detection result is generated to indicate that a foreign object was detected on the heated bed during this foreign object detection process.

[0088] In specific application scenarios, the geometries of the heated bed include the convex hull ratio. The detection result generation module 703 is used to determine the convex hull corresponding to the heated bed in the image to be detected based on the heated bed contour information, and to obtain the area of ​​the convex hull. Based on the heated bed detection area and the area of ​​the convex hull, the convex hull ratio is obtained. If the convex hull ratio is less than or equal to the convex hull ratio threshold, a first foreign object detection result is generated to indicate that a foreign object was detected on the heated bed during this foreign object detection process.

[0089] In specific application scenarios, at least one of the following should be included: First item: The camera on the 3D printer is located at the top of the X-axis of the 3D printer, and the camera faces the heated bed on the 3D printer; Second item: After generating the first foreign object detection result to indicate that a foreign object was detected on the heated bed during this foreign object detection process, the target display device displays a foreign object warning message.

[0090] The apparatus provided in this application acquires an image of the heated bed in a 3D printer when the target part is at the target detection height. This image is then input into a pre-trained image recognition model to obtain heated bed identification information. Based on this information, a foreign object detection result is generated to indicate whether a foreign object was detected on the heated bed during the current foreign object detection process. This not only allows for timely detection and feedback of abnormalities, ensuring users are aware of the printing status in real time, but also enables accurate detection of foreign objects on the heated bed before printing, protecting printer hardware and preventing material waste. Through intelligent and automated monitoring and feedback mechanisms, the apparatus reduces the difficulty and burden of using the printer for users, eliminating the need for frequent user intervention and checks during the printing process, thus improving printing efficiency.

[0091] It should be noted that other corresponding descriptions of the functional units involved in the foreign object detection device for a 3D printer provided in this application embodiment can be found in the following references. Figures 2 to 7 The corresponding description in [the document] will not be repeated here.

[0092] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0093] The above embodiments and the technical features in the embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0094] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

[0095] In an exemplary embodiment, see Figure 8 The invention also provides a computer device including a bus, a processor, a memory, and a communication interface. It may also include an input / output interface and a display device, wherein the various functional units can communicate with each other via the bus. The memory stores a computer program, and the processor executes the program stored in the memory to perform the foreign object detection method for the 3D printer described in the above embodiments.

[0096] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the foreign object detection method for the 3D printer.

[0097] The computer device and readable storage medium provided in this application acquire an image of the heated bed when the target part in the 3D printer is at the target detection height. This image is then input into a pre-trained image recognition model to obtain heated bed identification information. Based on this information, a foreign object detection result is generated, indicating whether a foreign object was detected on the heated bed during the detection process. Thus, by automatically detecting the presence of foreign objects on the heated bed using computer vision algorithms, the detection process can be automated and routine, effectively avoiding missed detections due to human error and improving detection reliability. Furthermore, by identifying the heated bed based on an image recognition model and then analyzing the identification information to infer the presence of foreign objects, there is no need to pre-define or learn the specific characteristics of the foreign object's shape, structure, color, etc. This allows for the broad detection of foreign objects of various types, sizes, and appearances, enhancing the versatility and robustness of foreign object detection.

[0098] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented in hardware or by using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) and includes several instructions to cause a computer device (such as a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0099] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application.

[0100] Those skilled in the art will understand that the modules in the apparatus of the implementation scenario can be distributed within the apparatus of the implementation scenario as described, or they can be located in one or more apparatuses different from this implementation scenario, with corresponding changes. The modules of the above-described implementation scenario can be combined into one module, or they can be further divided into multiple sub-modules.

[0101] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of the implementation scenario.

[0102] The above disclosures are only a few specific implementation scenarios of this application. However, this application is not limited to these. Any variations that can be conceived by those skilled in the art should fall within the protection scope of this application.

Claims

1. A method for foreign object detection in a 3D printer, characterized in that, The method includes: Acquire the image to be detected; the image to be detected is obtained by taking a picture of the heated bed in the 3D printer when the target part in the 3D printer is at the target detection height. The image to be detected is input into a pre-trained image recognition model to obtain hot bed recognition information; Based on the heated bed identification information, a foreign object detection result is generated; the foreign object detection result is used to indicate whether a foreign object was detected on the heated bed during this foreign object detection process.

2. The method according to claim 1, characterized in that, After generating the foreign object detection result based on the heated bed identification information, the process includes: Determine whether the foreign object detection termination condition is met; If the conditions are met, the print head of the 3D printer is controlled to contact the heated bed; If the conditions are not met, the target component is moved to a new target detection height, and the process returns to the step of acquiring the image to be detected, until the foreign object detection termination condition is met.

3. The method according to claim 2, characterized in that, Includes at least one of the following: First item: The foreign object detection termination conditions include: the foreign object detection result indicates that no foreign object was detected on the heated bed this time, and the number of foreign object detections has reached the predetermined number of detections; and / or, the foreign object detection result indicates that a foreign object was detected on the heated bed this time, and target indication information is obtained, the target indication information being used to indicate that the foreign object on the heated bed has been removed; Second item: There is a target height difference between two adjacent target detection heights, and the target height difference is determined based on the height of the target component at the end of the previous printing by the 3D printer; Third item: The target detection height corresponding to the first foreign object detection is the reference height or the height of the target component when the 3D printer finishes the last printing. The reference height is the height of the target component when the 3D printer completes the Z-axis reverse zeroing operation.

4. The method according to claim 1, characterized in that, Before acquiring the image to be detected, at least one of the following is also included: First item: The print head of the 3D printer is controlled to move horizontally to a target avoidance position; the target avoidance position is used to ensure that the camera device on the 3D printer is not blocked by the print head when photographing the heated bed; Second item: Control the heated bed to move horizontally to the target shooting position; When the heated bed is at the target shooting position, the range of the heated bed captured by the camera device meets the target range condition.

5. The method according to claim 1, characterized in that, The heated bed identification information includes heated bed contour information and heated bed confidence level; The step of generating foreign object detection results based on the heated bed identification information includes: Based on the hot bed contour information, the hot bed detection area in the image to be detected is determined; If the confidence level of the heated bed is greater than the confidence threshold and the detection area of ​​the heated bed is less than or equal to the area threshold, a first foreign object detection result is generated to indicate that a foreign object was detected on the heated bed during this foreign object detection process; wherein, the area threshold is determined based on the current target detection height.

6. The method according to claim 5, characterized in that, The method further includes: If the confidence level of the hot bed is greater than the confidence threshold and the detected area of ​​the hot bed is greater than the area threshold, the geometric analysis information of the hot bed is determined based on the hot bed contour information, and the foreign object detection result is generated based on the geometric analysis information of the hot bed.

7. The method according to claim 6, characterized in that, The thermal bed geometric analysis information includes thermal bed segmentation information; Based on the heated bed contour information, determine the heated bed block information corresponding to the heated bed in the image to be detected; The heated bed segmentation information is used to indicate whether the heated bed in the image to be detected is divided into multiple independent regions; When the hot bed segmentation information indicates that the hot bed in the image to be detected is divided into multiple independent regions, a first foreign object detection result is generated to indicate that a foreign object was detected on the hot bed during this foreign object detection process.

8. The method according to claim 6, characterized in that, The thermal bed geometric analysis information includes hollow region information; Based on the hot bed contour information, the hollow region information corresponding to the hot bed in the image to be detected is determined; The hollow region information is used to indicate whether a hollow region exists within the heated bed in the image to be detected; When the hollow region information indicates that a hollow region exists within the heated bed in the image to be detected, a first foreign object detection result is generated to indicate that a foreign object was detected on the heated bed during this foreign object detection process.

9. The method according to claim 6, characterized in that, The thermal bed geometry analysis information includes the convex hull ratio; The step of determining thermal bed geometric analysis information based on the thermal bed contour information, and generating foreign object detection results based on the thermal bed geometric analysis information, includes: Based on the heated bed contour information, the convex hull corresponding to the heated bed in the image to be detected is determined, and the area of ​​the convex hull is obtained; The convex hull ratio is obtained based on the detected area of ​​the heated bed and the area of ​​the convex hull. If the convex hull ratio is less than or equal to the convex hull ratio threshold, a first foreign object detection result is generated to indicate that a foreign object was detected on the heated bed during this foreign object detection process.

10. The method according to any one of claims 1-9, characterized in that, Includes at least one of the following: First item: The camera device on the 3D printer is located at the top of the X-axis of the 3D printer, and the camera device faces the heated bed on the 3D printer; Second item: After generating a first foreign object detection result indicating that a foreign object was detected on the heated bed during this foreign object detection process, the target device is instructed to issue a foreign object alert.

11. A foreign object detection device for a 3D printer, characterized in that, include: The acquisition module is used to acquire the image to be detected; the image to be detected is obtained by taking a picture of the heated bed in the 3D printer when the target part in the 3D printer is at the target detection height. The recognition module is used to input the image to be detected into a pre-trained image recognition model to obtain hot bed recognition information; The detection result generation module is also used to generate a foreign object detection result based on the heated bed identification information; the foreign object detection result is used to indicate whether a foreign object was detected on the heated bed during the current foreign object detection process.

12. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 10.

13. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 10.