Testing methods, systems and related equipment for 3D printing equipment
By using a YOLOv8 model in the central processing unit of a 3D printing device for printing information detection, the problems of low detection accuracy and privacy security are solved, achieving efficient printing anomaly detection and privacy protection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2026-04-03
AI Technical Summary
Existing 3D printing equipment inspection technologies suffer from low inspection accuracy, slow speed, and inability to effectively protect user privacy and security.
The Yolov8 model in the central processing unit is used for print information detection. It is trained using historical print anomaly and normal case data, and can be directly detected in the 3D printing device without the need for additional equipment or software. The dataset path is configured to a preset path to simplify the training process.
It improves detection accuracy and speed, can promptly stop printing anomalies, reduces detection costs, and protects user privacy and security.
Smart Images

Figure CN118893826B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of 3D printing technology, and in particular to a method, system and related equipment for testing 3D printing equipment. Background Technology
[0002] With the popularization of concepts such as intelligent manufacturing engineering and Industry 4.0, 3D printing technology is becoming increasingly widespread. 3D printing technology first appeared in the mid-1990s and is essentially a new rapid prototyping device utilizing techniques such as photopolymerization and paper lamination. Its working principle is basically the same as ordinary printing; the printer contains liquid or powder "printing materials," and after being connected to a computer, the computer controls the layering of these "printing materials" to ultimately transform the blueprint on the computer into a physical object. This printing technology is called 3D stereolithography.
[0003] In related technologies, 3D printing equipment detects whether any abnormalities occur during the printing process through detection software or an NPU chip installed on the 3D printing equipment. Most 3D printing detection software uses third-party apps for online detection, and the data is stored in the cloud, which may cause risks such as leakage of user video data and cannot effectively protect user privacy and security. Summary of the Invention
[0004] In view of this, this application provides a detection method, system and related equipment based on 3D printing equipment, which can accurately detect whether printing abnormalities occur during the printing process of 3D printing equipment, improve detection accuracy and speed, and effectively protect user privacy and security.
[0005] The first aspect of this application provides a method for detecting a 3D printing device. The 3D printing device includes a central processing unit (CPU) and a YOLOv8 model for data inference. The detection method includes: acquiring printing information of the 3D printing device, wherein the printing information includes video data or image data of the 3D printing device; transmitting the printing information to the YOLOv8 model, so that the YOLOv8 model detects whether there is a printing anomaly in the 3D printing device based on the printing information, and stopping the printing of the object to be printed when a printing anomaly is detected; wherein the YOLOv8 model is trained using historical printing anomaly data and historical printing normal data, both of which are stored in a folder located in a preset path, and the dataset path required for the YOLOv8 model to run is configured as the preset path.
[0006] Compared with related technologies, the embodiments of this application have at least the following advantages: By setting a YOLOv8 model for data inference in the central processing unit, when the 3D printing equipment obtains printing information, it can directly transmit the printing information to the YOLOv8 model, so that the YOLOv8 model can detect whether there are printing abnormalities in the 3D printing equipment based on the printing information. On the one hand, detection by the YOLOv8 model improves detection accuracy and speed, and can immediately stop printing the object to be printed when a printing abnormality is detected, thus improving the reliability of the 3D printing equipment. On the other hand, this detection method does not require additional third-party equipment or software, reducing detection costs and effectively protecting user privacy and security. In addition, since historical printing abnormality data and historical printing normality data are both stored in folders located in preset paths, the dataset path required for the YOLOv8 model to run is configured to a preset path, ensuring that the YOLOv8 model can automatically obtain training data from the folder located in the preset path during model training, simplifying the YOLOv8 model training process.
[0007] In some possible implementations, before transmitting the printing information to the YOLOv8 model, the method further includes: performing model quantization on the YOLOv8 model and then performing model inference reconstruction to obtain a target algorithm model; wherein, the model quantization is used to convert the model accuracy of the YOLOv8 model into a preset model accuracy that can accelerate the model data inference process, and the model inference reconstruction is used to reduce the space occupied by the YOLOv8 model; the step of transmitting the printing information to the YOLOv8 model so that the YOLOv8 model can detect whether there is a printing abnormality in the 3D printing device based on the printing information includes: transmitting the printing information to the target algorithm model so that the target algorithm model can detect whether there is a printing abnormality in the 3D printing device based on the printing information.
[0008] In some possible implementations, the Yolov8 model is quantized as follows: Based on a preset quantization calibration table, the model parameters of the Yolov8 model are converted into fixed-point representations, wherein the quantization calibration table includes at least the number of quantization bits, the quantization method, and the quantization range; the accuracy of the Yolov8 model after the model parameters are converted into fixed-point representations is detected; if the accuracy does not meet the preset requirements, the quantization calibration table is adjusted and the Yolov8 model is quantized again until the accuracy of the quantized Yolov8 model meets the preset requirements.
[0009] In some possible implementations, the Yolov8 model includes multiple hierarchical structures; the model inference reconstruction of the quantized Yolov8 model is performed in the following ways: the input value of the quantized Yolov8 model is modified according to the size of the data captured by the 3D printing device; non-maximum suppression is performed on the output value of the quantized Yolov8 model for reconstruction; and the data dimension is reshaped on the last three hierarchical structures of the quantized Yolov8 model.
[0010] In some possible implementations, the central processing unit has multiple threads; before transmitting the printing information to the YOLOv8 model, the detection method further includes: acquiring resource usage information of each of the multiple threads; determining a target thread among the multiple threads that meets preset data processing requirements based on the resource usage information of each thread; transmitting the printing information to the YOLOv8 model so that the YOLOv8 model can detect whether the 3D printing device has printing abnormalities based on the printing information includes: transmitting the printing information to the YOLOv8 model so that the YOLOv8 model can detect whether the 3D printing device has printing abnormalities through the target thread.
[0011] In some possible implementations, after transmitting the printing information to the YOLOv8 model, the method further includes: obtaining the data inference time corresponding to the printing information; detecting whether the data inference time is less than or equal to a preset data inference time, and whether the current resource utilization of the central processing unit is greater than a preset utilization rate; the YOLOv8 model detecting whether the 3D printing device has printing abnormalities through the target thread, including: when the data inference time is detected to be less than or equal to the preset data inference time, the YOLOv8 model detecting whether the 3D printing device has printing abnormalities through the target thread; when the data inference time is detected to be greater than the preset data inference time, and the current resource utilization of the central processing unit is greater than the preset utilization rate, the YOLOv8 model suspends detecting whether the 3D printing device has printing abnormalities until the current resource utilization of the central processing unit is detected to be less than or equal to the preset utilization rate, at which point the YOLOv8 model detects whether the 3D printing device has printing abnormalities through the target thread.
[0012] In some possible implementations, the 3D printing device further includes an imaging component, a printing platform, and sensors. The sensors are used to sense the pressure data exerted on the printing platform during printing. The historical printing anomaly data is obtained by: controlling the imaging component to capture historical working images of the 3D printing device during its historical printing process, and acquiring historical sensing data from the sensors; determining historical initial anomaly sensing data from the historical sensing data; and filtering the historical initial anomaly sensing data based on the historical working images to obtain the historical printing anomaly data.
[0013] A second aspect of this application discloses a detection system for a 3D printing device, comprising: a central processing unit (CPU), a data acquisition module, and a data transmission module. The CPU includes a YOLOv8 model for data inference. The data acquisition module acquires printing information from the 3D printing device, including video or image data. The data transmission module transmits the printing information to the YOLOv8 model. The YOLOv8 model detects whether the 3D printing device exhibits printing anomalies based on the printing information. The CPU further stops printing the object to be printed when printing anomalies are detected. The YOLOv8 model is trained using historical printing anomaly data and historical printing normal data, both stored in a folder located at a preset path. The dataset path required for the YOLOv8 model to run is configured as the preset path.
[0014] A third aspect of this application discloses an electronic device, which includes a processor and a memory. The memory is used to store instructions, and the processor is used to call the instructions in the memory to cause the electronic device to execute the detection method of the 3D printing device described above.
[0015] The fourth aspect of this application discloses a storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the aforementioned detection method for a 3D printing device.
[0016] Understandably, the detection system of the 3D printing equipment in the second aspect, the electronic device in the third aspect, and the storage medium in the fourth aspect all correspond to the method in the first aspect. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A flowchart of a testing method for a 3D printing device provided in an embodiment of this application.
[0019] Figure 2 A flowchart of a testing method for a 3D printing device provided in an embodiment of this application.
[0020] Figure 3 A flowchart of a testing method for a 3D printing device provided in an embodiment of this application.
[0021] Figure 4 A flowchart of a testing method for a 3D printing device provided in an embodiment of this application.
[0022] Figure 5 This is a schematic diagram of the functional modules of the detection system of a 3D printing device provided in an embodiment of this application.
[0023] Figure 6 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0024] To better understand the above-mentioned objectives, features, and advantages of this application, the application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0025] The following description sets forth many specific details to provide a full understanding of this application. The described embodiments are only some, not all, of the embodiments of this application.
[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application.
[0027] It should be further noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0028] In this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, or B exists alone, where A and B can be singular or plural.
[0029] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0030] For ease of understanding, some concepts related to the embodiments of this application are illustrated and explained by way of example for reference.
[0031] 3D printing equipment, also known as three-dimensional printers or stereo printers, is a rapid prototyping process that typically uses digital technology to print materials. 3D printing equipment is commonly used in mold making, industrial design, and other fields to create models or parts.
[0032] Please refer to Figure 1 This is a flowchart of a detection method for a 3D printing device according to an embodiment of this application. This embodiment is applied to a 3D printing device, which includes a central processing unit (CPU) and a Yolov8 model for data inference. The detection method includes the following steps:
[0033] Step 101: Obtain printing information from the 3D printing equipment.
[0034] In some embodiments, the printing information includes video data or image data from the 3D printing device. It is understood that the 3D printing device includes a camera assembly, and the central processing unit controls the camera assembly to capture video data or image data of the printing process while the 3D printing device is printing a 3D model.
[0035] In some embodiments, the printing information of the 3D printing equipment is obtained before or during the printing of a 3D model.
[0036] It's worth noting that before printing a 3D model, various tools, such as pliers, scrapers, or screwdrivers, may remain on the printing platform of the 3D printer, or the previously printed 3D model may not have been removed. This can cause abnormal collisions between the 3D printer and the previously printed model, damaging the 3D printer. Therefore, by acquiring the printing information of the 3D printer before printing and performing anomaly detection based on this information in subsequent steps, printing anomalies can be avoided before printing begins, improving the reliability of the 3D printer.
[0037] It should also be noted that during the 3D model printing process, issues such as print warping, model collapse, support structure failure, insufficient interlayer adhesion, inappropriate temperature settings, and excessively high printing speeds may occur. Therefore, by acquiring printing information from the 3D printing equipment during the printing process and performing anomaly detection based on this information in subsequent steps, 3D printing can be immediately stopped when abnormalities occur, thereby further improving the reliability of the 3D printing equipment.
[0038] In some embodiments, the shooting method of the shooting component is not specifically limited. For example, when the shooting component shoots video data of the printing process, it can shoot 20-second video data every 1 minute or 50-second video data every 2 minutes. This embodiment does not specifically limit the shooting interval and shooting duration when the shooting component shoots video.
[0039] For example, when the imaging component captures image data of the printing process, it can take a picture every 10 seconds or every 20 seconds. This embodiment does not specifically limit the shooting interval when the imaging component captures images.
[0040] Step 102: Transmit the printing information to the YOLOv8 model so that the YOLOv8 model can detect whether there are any printing abnormalities in the 3D printing equipment based on the printing information.
[0041] In some embodiments, the YOLOv8 model is trained using historical printing anomaly data and historical printing normal data. Both historical printing anomaly data and historical printing normal data are stored in a folder located in a preset path. The dataset path required for the YOLOv8 model to run is configured as a preset path.
[0042] Specifically, the sample size of both historical printing anomaly data and historical printing normal data is around 10,000 images. By setting a large number of training sample data, the accuracy of the trained Yolov8 model can be ensured.
[0043] More specifically, this embodiment modifies the data.yaml file of the Yolov8 model. The data.yaml file contains the dataset path, number of categories, and category names required for the Yolov8 model to run. For example, in this embodiment, the number of categories is 2, the category names are historical printing anomaly data and historical printing normal data, and the dataset path is a preset path. The preset path can be set according to actual needs, such as the C drive.
[0044] In some embodiments, the 3D printing device further includes an imaging component, a printing platform, and a sensor. The sensor is used to sense pressure data on the printing platform during printing. The historical printing anomaly data is obtained by: controlling the imaging component to capture historical working images of the 3D printing device during its historical printing process, and acquiring historical sensing data from the sensor; determining historical initial anomaly sensing data from the historical sensing data; and filtering the historical initial anomaly sensing data based on the historical working images to obtain the historical printing anomaly data.
[0045] Specifically, the sensor is a pressure sensor, and the 3D printing equipment also includes a nozzle assembly, which is used to spray printing material onto the printing platform to print the 3D model. During the process of the nozzle assembly spraying printing material onto the printing platform, the printing platform is subjected to pressure, and the sensor can sense the pressure data of the printing platform in real time; the pressure data is also the sensor's sensing data.
[0046] It should be noted that warping may occur during the 3D printing process. Therefore, by acquiring sensor data during the printing process and performing anomaly detection based on this data in subsequent steps, and since the sensors continuously monitor the pressure on the printing platform—which will be abnormally high when warping occurs—the 3D printing process can be immediately stopped upon detection of warping, thus further improving the reliability of the 3D printing equipment.
[0047] The central processing unit in this embodiment also includes a vision model that filters historical initial anomaly sensing data based on historical working images. This includes: inputting historical working images into the vision model; detecting whether the 3D printing equipment has printing anomalies based on the output of the vision model; when the output of the vision model indicates that the 3D printing equipment has printing anomalies, and the historical sensing data at the time the historical working image was captured is historical initial anomaly sensing data, using the historical initial anomaly sensing data as historical anomaly sensing data; and when the output of the vision model indicates that the 3D printing equipment does not have printing anomalies, and the historical sensing data at the time the historical working image was captured is historical initial anomaly sensing data, filtering the historical initial anomaly sensing data. This method improves the accuracy of historical printing anomaly data, thereby improving the model accuracy of the Yolov8 model trained using historical printing anomaly data.
[0048] In some embodiments, multiple graphics cards are used on a server to train the Yolov8 model, thereby accelerating the training speed of the Yolov8 model.
[0049] In some embodiments, before training the Yolov8 model, the historical printing anomaly data and the historical printing normal data are preprocessed to obtain target training data. The data preprocessing includes at least data analysis, data cleaning, and data augmentation. The target training data is then input into the original Yolov8 model for training. The original Yolov8 model after training is used as the Yolov8 model. The original Yolov8 model is an algorithm model whose model size is lower than a preset value and whose required computing power is lower than a preset computing power.
[0050] Specifically, the original Yolov8 model is a model in the field of object detection that ensures the required detection accuracy while having a small model size and requires less computing power and memory. It can ensure that the detection is performed on the central processing unit while having a small impact on the motion control process of the 3D printing equipment.
[0051] To facilitate understanding, the following is a detailed explanation of how data preprocessing is performed in this embodiment:
[0052] 1. Define 3D printing anomalies, such as foreign objects on the platform, failed model printing, filamentous objects, etc., and collect historical printing anomaly data for different anomaly conditions. It's understandable that, to ensure the accuracy of the subsequently trained Yolov8 model, multiple historical printing anomaly data points will be provided for each type of anomaly.
[0053] 2. Perform data analysis on historical printing anomaly data, including visualizing the distribution of sample labels using scatter plots to understand the distribution, central tendency, and dispersion of historical printing anomaly data. Count the total number of all historical printing anomaly data and perform data equalization. Specifically, after equalization, the number of historical printing anomaly data for each type of anomaly is the same, or all within a certain range, thus further ensuring the accuracy of the subsequently trained Yolov8 model.
[0054] 3. Automatically orient the labeled areas of historical printing anomaly data. For example, if the anomaly type is "foreign object on the platform" and the corresponding historical printing anomaly data is data A, then the labeled area of data A will be automatically oriented to the printing platform.
[0055] 4. Automatically orient the marked area and then perform data cleaning and enhancement on the historical printing anomaly data. Specifically, data cleaning involves removing problematic data from the historical printing anomaly data, such as distorted image data; data enhancement involves increasing or decreasing the brightness, saturation, and exposure of the historical printing anomaly data to match the imaging effect of the actual camera model.
[0056] 5. Randomly add a preset percentage of noisy data to the historical printed anomaly data after data cleaning and data augmentation to improve the robustness of the subsequently trained Yolov8 model.
[0057] Step 103: If a printing abnormality is detected in the 3D printing equipment, stop printing the object to be printed.
[0058] In some embodiments, when the YOLOv8 model detects a printing anomaly in the 3D printing equipment, the central processing unit controls the nozzle assembly of the 3D printing equipment to stop printing the object to be printed.
[0059] In some embodiments, after the 3D printing equipment stops printing the object to be printed, it will also send a warning message to the user to remind the user of the printing abnormality so that the user can deal with it in time, thereby improving the stability of the 3D printing equipment.
[0060] In some embodiments, the types of warning messages include, but are not limited to, voice reminders, text reminders, etc., and users can set the type of warning message according to their actual needs.
[0061] Compared with related technologies, the embodiments of this application have at least the following advantages: By setting a YOLOv8 model for data inference in the central processing unit, when the 3D printing equipment obtains printing information, it can directly transmit the printing information to the YOLOv8 model, so that the YOLOv8 model can detect whether there are printing abnormalities in the 3D printing equipment based on the printing information. On the one hand, detection by the YOLOv8 model improves detection accuracy and speed, and can immediately stop printing the object to be printed when a printing abnormality is detected, thus improving the reliability of the 3D printing equipment. On the other hand, this detection method does not require additional third-party equipment or software, reducing detection costs and effectively protecting user privacy and security. In addition, since historical printing abnormality data and historical printing normality data are both stored in folders located in preset paths, the dataset path required for the YOLOv8 model to run is configured to a preset path, ensuring that the YOLOv8 model can automatically obtain training data from the folder located in the preset path during model training, simplifying the YOLOv8 model training process.
[0062] Please refer to Figure 2 This is a flowchart illustrating a detection method for a 3D printing device according to an embodiment of this application. This embodiment is a further improvement upon the aforementioned embodiments, primarily in that: in this embodiment, the Yolov8 model is further quantized before model inference reconstruction to obtain a target algorithm model. The target algorithm model is then used to detect whether the 3D printing device exhibits printing anomalies. Through this method, model quantization accelerates the data inference process of the target algorithm model, thereby reducing the consumption of central processing unit resources. Model inference reconstruction reduces the space occupied by the target algorithm model, thus ensuring that the target algorithm model can operate normally on the central processing unit.
[0063] The specific process of this embodiment is as follows: Figure 2 As shown, the method applied to 3D printing equipment includes the following steps:
[0064] Step 201: Perform model quantization on the Yolov8 model and then perform model inference reconstruction to obtain the target algorithm model.
[0065] In some embodiments, the YOLOv8 model is quantized as follows: The model parameters of the YOLOv8 model are converted into fixed-point representations according to a preset quantization calibration table, wherein the quantization calibration table includes at least the number of quantization bits, the quantization method, and the quantization range; the accuracy of the YOLOv8 model after the model parameters are converted into fixed-point representations is detected; if the accuracy does not meet the preset requirements, the quantization calibration table is adjusted and the YOLOv8 model is quantized again until the accuracy of the YOLOv8 model after quantization meets the preset requirements.
[0066] Specifically, there are several ways to test the accuracy of a YOLOv8 model, such as using divergence indices, performing model diagnostics, and sensitivity analysis. Taking model diagnostics as an example, residual analysis, heteroscedasticity tests, and multicollinearity tests are performed on the YOLOv8 model whose parameters are converted to fixed-point representations to assess whether there are any problems with the YOLOv8 model whose parameters are converted to fixed-point representations. If no problems are detected, it indicates that the accuracy of the YOLOv8 model meets the preset requirements.
[0067] It is worth mentioning that model quantization of the Yolov8 model can reduce the model's storage requirements and improve the inference speed on the embedded side of the central processing unit: model quantization converts floating-point model parameters into fixed-point representations, thereby reducing the space occupied by the Yolov8 model on the storage medium, memory bandwidth, and memory overhead; at the same time, quantized models can take advantage of the higher computational efficiency of integer operations on the central processing unit compared to floating-point operations, enabling more efficient computation on embedded hardware.
[0068] To facilitate understanding, the following is a detailed explanation of how to perform model quantization on the Yolov8 model in this embodiment: The core of model quantization lies in converting the Yolov8 model format to ONNX format using the ONNX open-source library. This facilitates better model deployment and rapid exchange and porting between different frameworks and platforms, improving the model's utility and usability. The ONNX format file of the Yolov8 model is then quantized using the NCNN framework. The specific quantization steps are as follows:
[0069] 1. Create a quantization calibration table to specify the quantization parameters and settings. The calibration table file is a text file that contains the parameters required for quantization, such as the quantization method, quantization bit depth, and quantization range. In this embodiment, the parameters are set as mean = [104, 117, 123]; norm = [0.017, 0.017, 0.017]; shape = [320, 320, 3]; pixel = BGR; thread = 8; method = kl.
[0070] 2. Calculate the quantization calibration table to maintain accuracy: In order to maintain a certain accuracy of the model after quantization, it is necessary to collect the histogram of activation values for each layer, generate different quantization distributions based on different thresholds, then calculate the relative entropy of each distribution with the original distribution, and then select the one with the least entropy, that is, the one most similar to the original distribution, as the output scale to ensure quantization accuracy.
[0071] 3. Quantization activation value: Multiply the model input by the scale result of the quantization calibration table to match the quantization parameters, and then truncate it to int8.
[0072] 4. Evaluation and Adjustment: After quantization training is complete, the accuracy of the quantization model needs to be evaluated. If the model's accuracy does not meet the requirements, further adjustments and fine-tuning can be made, such as adjusting the range of quantization parameters or retraining a portion of the model's layers.
[0073] In some embodiments, the Yolov8 model includes multiple hierarchical structures; the Yolov8 model after model quantization is reconstructed for inference by: modifying the input values of the Yolov8 model after model quantization based on the size of the data captured by the 3D printing device; reconstructing the output values of the Yolov8 model after model quantization by performing nonmaximum suppression; and reshaping the data dimensions of the last three hierarchical structures of the Yolov8 model after model quantization.
[0074] Specifically, by modifying the input values of the quantized YOLOv8 model based on the size of the data captured by the 3D printing equipment, the accuracy of the YOLOv8 model can be ensured. By reconstructing the output values of the quantized YOLOv8 model through non-maximum suppression, the output values can be reordered, thereby further reducing the algorithm complexity. By reshaping the data dimensions of the last three layers of the quantized YOLOv8 model, for example, by using Reshape to set 0=1600 to suppress the first dimension (usually the batch size) to 1600 and suppress it to -1, the detection performance of the YOLOv8 model can be maintained while reducing the size of the model.
[0075] Step 202: Obtain printing information from the 3D printing equipment.
[0076] Step 203: Transmit the printing information to the target algorithm model so that the target algorithm model can detect whether there are any printing abnormalities in the 3D printing equipment based on the printing information.
[0077] Step 204: If a printing abnormality is detected in the 3D printing equipment, stop printing the object to be printed.
[0078] Steps 202 to 204 in this embodiment are similar to steps 101 to 103 in the previous embodiment. To avoid repetition, they will not be described again here.
[0079] Compared with related technologies, the embodiments of this application have at least the following advantages: By setting a YOLOv8 model for data inference in the central processing unit, when the 3D printing equipment obtains printing information, it can directly transmit the printing information to the YOLOv8 model, so that the YOLOv8 model can detect whether there are printing abnormalities in the 3D printing equipment based on the printing information. On the one hand, detection by the YOLOv8 model improves detection accuracy and speed, and can immediately stop printing the object to be printed when a printing abnormality is detected, thus improving the reliability of the 3D printing equipment. On the other hand, this detection method does not require additional third-party equipment or software, reducing detection costs and effectively protecting user privacy and security. In addition, since historical printing abnormality data and historical printing normality data are both stored in folders located in preset paths, the dataset path required for the YOLOv8 model to run is configured to a preset path, ensuring that the YOLOv8 model can automatically obtain training data from the folder located in the preset path during model training, simplifying the YOLOv8 model training process.
[0080] Please refer to Figure 3 This is a flowchart illustrating a detection method for a 3D printing device according to an embodiment of this application. This embodiment is a further improvement upon the aforementioned embodiment, primarily in that it also detects the resource usage information of each thread in the central processing unit (CPU), and selects the thread that meets preset data processing requirements as the target thread for data inference using the Yolov8 model. This approach enables reasonable resource scheduling, thereby improving the CPU's resource utilization and ensuring its normal operation.
[0081] The specific process of this embodiment is as follows: Figure 3 As shown, the method applied to 3D printing equipment includes the following steps:
[0082] Step 301: Obtain printing information from the 3D printing equipment.
[0083] Step 302: Obtain the resource usage information of each of the current multiple threads.
[0084] Step 303: Based on the resource usage information of each thread, determine the target thread among the multiple threads that meets the preset data processing requirements.
[0085] In some embodiments, if a thread is not currently processing a task, it indicates that the thread meets the preset data processing requirements.
[0086] Step 304: Transmit the printing information to the YOLOv8 model so that the YOLOv8 model can detect whether there are any printing abnormalities in the 3D printing equipment through the target thread.
[0087] In some embodiments, the target thread executes a task where the Yolov8 model detects printing anomalies in the 3D printing equipment based on printing information. This approach utilizes idle threads to perform Yolov8 model inference tasks, improving the resource utilization of the central processing unit.
[0088] Step 305: If a printing abnormality is detected in the 3D printing equipment, stop printing the object to be printed.
[0089] Compared with related technologies, the embodiments of this application have at least the following advantages: By setting a YOLOv8 model for data inference in the central processing unit, when the 3D printing equipment obtains printing information, it can directly transmit the printing information to the YOLOv8 model, so that the YOLOv8 model can detect whether there are printing abnormalities in the 3D printing equipment based on the printing information. On the one hand, detection by the YOLOv8 model improves detection accuracy and speed, and can immediately stop printing the object to be printed when a printing abnormality is detected, thus improving the reliability of the 3D printing equipment. On the other hand, this detection method does not require additional third-party equipment or software, reducing detection costs and effectively protecting user privacy and security. In addition, since historical printing abnormality data and historical printing normality data are both stored in folders located in preset paths, the dataset path required for the YOLOv8 model to run is configured to a preset path, ensuring that the YOLOv8 model can automatically obtain training data from the folder located in the preset path during model training, simplifying the YOLOv8 model training process.
[0090] Please refer to Figure 4 This is a flowchart illustrating a detection method for a 3D printing device according to an embodiment of this application. This embodiment is a further improvement upon the aforementioned embodiment, primarily in that: in this embodiment, it also detects whether the data inference time corresponding to the printing information is less than or equal to a preset data inference time, and whether the current resource utilization rate of the central processing unit (CPU) is greater than a preset utilization rate. If the data inference time is greater than the preset data inference time, and the current resource utilization rate of the CPU is greater than the preset utilization rate, the YOLOv8 model pauses its detection of whether the 3D printing device has printing anomalies. This method further reduces the resources required for model inference, ensures the normal operation of the CPU, and thus improves the stability of the 3D printing device.
[0091] The specific process of this embodiment is as follows: Figure 3As shown, the method applied to 3D printing equipment includes the following steps:
[0092] Step 401: Obtain printing information from the 3D printing equipment.
[0093] Step 402: Obtain the resource usage information of each of the current multiple threads.
[0094] Step 403: Based on the resource usage information of each thread, determine the target thread among the multiple threads that meets the preset data processing requirements.
[0095] Step 404: Transmit the printed information to the Yolov8 model and obtain the data inference time corresponding to the printed information.
[0096] In some embodiments, after receiving the print information, the central processing unit determines the time required to process the print information, i.e., the data inference time.
[0097] Step 405: When the data inference time is detected to be less than or equal to the preset data inference time, the YOLOv8 model detects whether there is a printing abnormality in the 3D printing equipment through the target thread.
[0098] In some embodiments, if the data inference time is less than or equal to the preset data inference time, it indicates that the inference task corresponding to the printing information will not consume too much resource utilization. In this case, the Yolov8 model directly detects whether there is a printing abnormality in the 3D printing device in the target thread based on the printing information.
[0099] In some embodiments, the preset data inference time can be set according to actual needs, and this embodiment does not specifically limit the duration of the preset data inference time. For example, the preset inference time can be the average processing time of the central processing unit when inferring historical resources.
[0100] Step 406: When the data inference time is detected to be greater than the preset data inference time and the current resource utilization of the central processing unit is greater than the preset utilization rate, the YOLOv8 model pauses the detection of whether there is a printing abnormality in the 3D printing equipment until the current resource utilization of the central processing unit is detected to be less than or equal to the preset utilization rate. Then, the YOLOv8 model detects whether there is a printing abnormality in the 3D printing equipment through the target thread.
[0101] In some embodiments, when the current resource utilization rate of the central processing unit is detected to be greater than the preset utilization rate, it indicates that the central processing unit process is busy. If the data inference time is greater than the preset data inference time, the central processing unit needs more time and resources to process the inference task corresponding to the printed information. By performing thread sleep processing on the inference task corresponding to the printed information, the intensive use of the central processing unit can be reduced, thereby further reducing the resources required for model inference.
[0102] In some embodiments, the preset utilization rate can be set according to actual needs. For example, the preset utilization rate can be set to 80%, 85%, etc. It is only necessary to ensure that the CPU process is busy when the current resource utilization rate of the CPU is greater than the preset utilization rate.
[0103] Step 407: If a printing abnormality is detected in the 3D printing equipment, stop printing the object to be printed.
[0104] Compared with related technologies, the embodiments of this application have at least the following advantages: By setting a YOLOv8 model for data inference in the central processing unit, when the 3D printing equipment obtains printing information, it can directly transmit the printing information to the YOLOv8 model, so that the YOLOv8 model can detect whether there are printing abnormalities in the 3D printing equipment based on the printing information. On the one hand, detection by the YOLOv8 model improves detection accuracy and speed, and can immediately stop printing the object to be printed when a printing abnormality is detected, thus improving the reliability of the 3D printing equipment. On the other hand, this detection method does not require additional third-party equipment or software, reducing detection costs and effectively protecting user privacy and security. In addition, since historical printing abnormality data and historical printing normality data are both stored in folders located in preset paths, the dataset path required for the YOLOv8 model to run is configured to a preset path, ensuring that the YOLOv8 model can automatically obtain training data from the folder located in the preset path during model training, simplifying the YOLOv8 model training process.
[0105] Please refer to Figure 5 This is a functional module diagram of the detection system for a 3D printing device provided in an embodiment of this application. The detection system 100 for the 3D printing device includes: a central processing unit 1, a data acquisition module 2, and a data transmission module 3, wherein the central processing unit 1 includes a Yolov8 model 10 for data inference.
[0106] The data acquisition module 2 is used to acquire the printing information of the 3D printing device, wherein the printing information includes video data or image data of the 3D printing device; the data transmission module 3 is used to transmit the printing information to the YOLOv8 model 10; the YOLOv8 model 10 is used to detect whether there is a printing abnormality in the 3D printing device 100 according to the printing information, and when a printing abnormality is detected, it stops printing the object to be printed; wherein the YOLOv8 model 10 is trained by historical printing abnormality data and historical printing normality data, both of which are stored in a folder located in a preset path, and the dataset path required for the YOLOv8 model 10 to run is configured as the preset path.
[0107] Please refer to Figure 6 This is a schematic diagram of the hardware structure of the electronic device 1000 provided in an embodiment of this application. Figure 6 As shown, the electronic device 1000 may include a processor 1001 and a memory 1002. The memory 1002 is used to store one or more computer programs 1003. The one or more computer programs 1003 are configured to be executed by the processor 1001. The one or more computer programs 1003 include instructions that can be used to implement the detection method of the 3D printing device described above in the electronic device 1000.
[0108] It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 1000. In other embodiments, the electronic device 1000 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements.
[0109] Processor 1001 may include one or more processing units, such as application processors (APs), modems, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0110] The processor 1001 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 1001 is a cache memory. This memory can store instructions or data that the processor 1001 has just used or that are used repeatedly. If the processor 1001 needs to use the instruction or data again, it can retrieve it directly from this memory. This avoids repeated accesses, reduces the waiting time of the processor 1001, and thus improves the efficiency of the system.
[0111] In some embodiments, the processor 1001 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM interface, and / or a USB interface, etc.
[0112] In some embodiments, memory 1002 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0113] This embodiment also provides a computer-readable storage medium storing computer instructions. When the instructions are executed on an electronic device, the electronic device performs the aforementioned method steps to implement the 3D printing device detection method in the above embodiment.
[0114] In this embodiment, the detection system, electronic device, and storage medium based on 3D printing equipment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.
[0115] In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0116] In the several embodiments provided in this application, the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are illustrative. For instance, the division of modules or units is a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0117] The unit described as a separate component may or may not be physically separate. The component shown as a unit can be one physical unit or multiple physical units, that is, it can be located in one place or distributed in multiple different places. Some or all of the units can be selected to achieve the purpose of the solution in this embodiment according to actual needs.
[0118] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0119] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0120] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be covered within the scope of protection of this application.
Claims
1. A method for detecting 3D printing equipment, characterized in that, The 3D printing equipment includes a central processing unit (CPU), which includes a Yolov8 model for data inference; the detection method includes: Obtain the printing information of the 3D printing equipment, wherein the printing information includes video data or image data of the 3D printing equipment; The printing information is transmitted to the YOLOv8 model so that the YOLOv8 model can detect whether there is a printing abnormality in the 3D printing equipment based on the printing information, and stop printing the object to be printed when the printing abnormality is detected. The Yolov8 model is trained using historical printing anomaly data and historical printing normal data. Both the historical printing anomaly data and the historical printing normal data are stored in a folder located in a preset path. The dataset path required for the Yolov8 model to run is configured as the preset path. The 3D printing equipment also includes an imaging component, a printing platform, and a sensor, wherein the sensor is used to sense the pressure data exerted on the printing platform during the printing process of the 3D printing equipment. The historical printing anomaly data was obtained through the following methods: During the historical printing process of the 3D printing equipment, the imaging component is controlled to capture historical working images of the 3D printing equipment and acquire historical sensing data from the sensors. Determine the initial historical abnormal sensing data from the historical sensing data; The historical initial anomaly sensing data is filtered based on the historical working images to obtain the historical printing anomaly data.
2. The detection method for 3D printing equipment as described in claim 1, characterized in that, Before transmitting the printed information to the Yolov8 model, the following steps are also included: The Yolov8 model is quantized and then reconstructed for inference to obtain the target algorithm model. The model quantization is used to convert the model accuracy of the Yolov8 model into a preset model accuracy that can accelerate the model data inference process, and the model inference reconstruction is used to reduce the space occupation of the Yolov8 model. The step of transmitting the printing information to the YOLOv8 model so that the YOLOv8 model can detect whether there are printing abnormalities in the 3D printing equipment based on the printing information includes: The printing information is transmitted to the target algorithm model so that the target algorithm model can detect whether there is a printing abnormality in the 3D printing device based on the printing information.
3. The testing method for 3D printing equipment as described in claim 2, characterized in that, The Yolov8 model is quantized using the following method: According to the preset quantization calibration table, the model parameters of the Yolov8 model are converted into fixed-point representation, wherein the quantization calibration table includes at least the number of quantization bits, the quantization method, and the quantization range; The accuracy of the Yolov8 model, converted from the model parameters to fixed-point representation, is assessed. If the accuracy does not meet the preset requirements, the quantization calibration table is adjusted and the Yolov8 model is quantized again until the accuracy of the quantized Yolov8 model meets the preset requirements.
4. The detection method for 3D printing equipment as described in claim 2, characterized in that, The Yolov8 model comprises multiple hierarchical structures; the model inference reconstruction of the quantized Yolov8 model is performed using the following method: Based on the size of the data captured by the 3D printing equipment, the input value of the quantized Yolov8 model is modified. The output value of the quantized Yolov8 model is reconstructed by nonmaximum suppression. The last three levels of the quantized Yolov8 model are reshaped in terms of data dimensions.
5. The detection method for the 3D printing equipment as described in claim 1, characterized in that, The central processing unit has multiple threads; before transmitting the printed information to the Yolov8 model, the detection method further includes: Obtain the resource usage information of each of the multiple threads currently being processed; Based on the resource usage information of each thread, a target thread that meets the preset data processing requirements is determined among the multiple threads; The step of transmitting the printing information to the YOLOv8 model so that the YOLOv8 model can detect whether there are printing abnormalities in the 3D printing equipment based on the printing information includes: The printing information is transmitted to the YOLOv8 model so that the YOLOv8 model can detect whether there are any printing abnormalities in the 3D printing device through the target thread.
6. The detection method for the 3D printing equipment as described in claim 5, characterized in that, After transmitting the printed information to the Yolov8 model, the process also includes: Obtain the data inference time corresponding to the printed information; The system detects whether the data inference time is less than or equal to a preset data inference time, and whether the current resource utilization rate of the central processing unit is greater than a preset utilization rate. The Yolov8 model detects whether there are printing anomalies in the 3D printing device through the target thread, including: When the data inference time is detected to be less than or equal to the preset data inference time, the Yolov8 model detects whether there is a printing abnormality in the 3D printing device through the target thread; When the data inference time is detected to be greater than the preset data inference time and the current resource utilization rate of the central processing unit is greater than the preset utilization rate, the YOLOv8 model pauses the detection of whether there is a printing abnormality in the 3D printing equipment until the current resource utilization rate of the central processing unit is detected to be less than or equal to the preset utilization rate. Then, the YOLOv8 model detects whether there is a printing abnormality in the 3D printing equipment through the target thread.
7. A detection system for a 3D printing device, characterized in that, include: The system includes a central processing unit, a data acquisition module, and a data transmission module, wherein the central processing unit includes a Yolov8 model for data inference; The data acquisition module is used to acquire the printing information of the 3D printing equipment, wherein the printing information includes video data or image data of the 3D printing equipment; The data transmission module is used to transmit the printing information to the Yolov8 model; The YOLOv8 model is used to detect whether there is a printing abnormality in the 3D printing equipment based on the printing information. The central processing unit is also used to stop printing the object to be printed when there is a printing abnormality in the 3D printing equipment. The Yolov8 model is trained using historical printing anomaly data and historical printing normal data. Both the historical printing anomaly data and the historical printing normal data are stored in a folder located in a preset path. The dataset path required for the Yolov8 model to run is configured as the preset path. The 3D printing equipment also includes an imaging component, a printing platform, and a sensor, wherein the sensor is used to sense the pressure data exerted on the printing platform during the printing process of the 3D printing equipment. The historical printing anomaly data was obtained through the following methods: During the historical printing process of the 3D printing equipment, the imaging component is controlled to capture historical working images of the 3D printing equipment and acquire historical sensing data from the sensors. Determine the initial historical abnormal sensing data from the historical sensing data; The historical initial anomaly sensing data is filtered based on the historical working images to obtain the historical printing anomaly data.
8. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory being used to store instructions, and the processor being used to invoke the instructions in the memory, causing the electronic device to execute the detection method of the 3D printing device according to any one of claims 1 to 6.
9. A storage medium, characterized in that, The device includes computer instructions that, when executed on an electronic device, cause the electronic device to perform a detection method for a 3D printing device as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Detection method and system of 3D printing equipment and related equipment
CN118238419A