Image processing method, machine, system and medium for laser processing
By receiving the user's text description information and original pictures, and using the image processing model to generate candidate pictures, the problem of difficult picture editing in laser processing is solved, and a more efficient picture editing and laser processing process is achieved.
Patent Information
- Application Number
- CN202311299011.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-08
- Publication Date
- 2025-04-08
AI Technical Summary
It is difficult for users to modify or replace picture materials during laser processing, especially for users who are not familiar with professional photo editing software, improving editing convenience and efficiency is a challenge.
By receiving the text description information and original pictures input by the user, input them into the image processing model, generating candidate pictures, and importing candidate pictures into the laser processing process, automatic modification of pictures is achieved.
It saves users time to modify pictures, ensures that the modified candidate pictures meet user needs, and improves the efficiency of laser processing and the convenience of user editing.
Smart Images

Figure CN119784890A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of laser processing technology, and in particular to an image processing method, a computer numerical control machine, a computing system and a storage medium for laser processing. Background Art
[0002] When users use laser processing equipment to engrave pictures on processing materials, they usually download the picture materials to the local computer and then import them into the canvas of the laser software for use. When users want to modify or replace some content in the picture materials to make them more perfect, or make the materials richer in details, it is difficult for users who do not know how to use professional photo editing software to achieve the above goals. Summary of the invention
[0003] One purpose of the present application is to propose an image processing method, a computer numerical control machine, a computing system and a storage medium for laser processing, so as to improve the convenience and efficiency of users in editing pictures when performing laser processing.
[0004] According to one aspect of an embodiment of the present application, there is provided an image processing method for laser processing, comprising:
[0005] Receiving text description information and an original picture input by a user, wherein the text description information indicates that the original picture is to be modified;
[0006] Inputting the text description information and the original image into an image processing model to obtain a candidate image;
[0007] The candidate images are introduced into the laser processing process.
[0008] According to one aspect of an embodiment of the present application, a computer numerical control machine is provided, the computer numerical control machine comprising:
[0009] Slide rails;
[0010] a movable head, the movable head being slidably disposed on the slide rail;
[0011] A communication component, the communication component is used to receive the candidate image or the target image obtained by the steps of the method provided in the above embodiment;
[0012] A controller is provided for controlling the movable head to move on the slide rail to process the surface of a processing material based on the candidate image or the target image.
[0013] According to one aspect of an embodiment of the present application, there is provided a computing system, the computing system comprising at least one computer numerical control machine and at least one processor;
[0014] The processor is used to execute the steps of the method described in the above embodiment;
[0015] The computer numerical control machine transmits electromagnetic energy to a processing material disposed inside the computer numerical control machine based on the candidate image or the target image obtained by the processor.
[0016] According to one aspect of an embodiment of the present application, a computer program medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes the methods provided in the above-mentioned various optional implementations.
[0017] In the present application, text description information and an original picture input by a user are received, and the text description information indicates that the original picture is to be modified; the text description information and the original picture are input into an image processing model to obtain a candidate picture, and the candidate picture is a picture modified according to the text description information. The user only needs to input the text description information, and the image processing model modifies the original picture to modify it into a candidate picture that is consistent with the text description information. This can save the user's time in modifying the picture, and at the same time ensure that the modified candidate picture meets the user's needs. The user can edit the original picture in a more convenient way, which helps to improve the efficiency of laser processing.
[0018] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0019] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The above and other objects, features and advantages of the present application will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings.
[0021] Figure 1 A schematic diagram showing a flow chart of an image processing method for laser processing according to an embodiment of the present application
[0022] Figure 2 A schematic diagram of a usage scenario of the image processing method for laser processing provided in this embodiment is shown.
[0023] Figure 3 A schematic diagram of a scenario for generating a picture generation request provided in this embodiment is shown.
[0024] Figure 4 A schematic diagram of a scene of the image processing method for laser processing provided in this embodiment is shown.
[0025] Figure 5A schematic diagram of a scene of the image processing method for laser processing provided in this embodiment is shown.
[0026] Figure 6 A structural schematic diagram of a numerical control device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0027] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of the present application will be more comprehensive and complete and the concepts of the example embodiments will be fully conveyed to those skilled in the art. The accompanying drawings are only schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0028] In addition, the described features, structures or characteristics may be combined in one or more example embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the example embodiments of the present application. However, those skilled in the art will appreciate that the technical solution of the present application may be practiced while omitting one or more of the specific details, or other methods, components, steps, etc. may be adopted. In other cases, known structures, methods, implementations or operations are not shown or described in detail to avoid obscuring the present application and making the various aspects of the present application obscure.
[0029] Some of the blocks shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0030] Figure 1 A schematic flow chart of an image processing method for laser processing according to an embodiment of the present application is shown, and the method comprises the following steps:
[0031] S100, receiving text description information and an original picture input by a user, wherein the text description information indicates to modify the original picture.
[0032] Specifically, the image generation request may include text description information and the original image.
[0033] Furthermore, the text description information may be information corresponding to text directly input by the user, or may be information corresponding to voice input by the user, which is not limited here.
[0034] When the text description information is in voice form, firstly, voice data in the text description information is acquired, and the voice data is converted into text to obtain text data, and then the text data is processed.
[0035] The algorithm for converting speech data into text may be speech-to-text conversion based on a parameter model, a conversion algorithm based on deep learning, etc., which is not limited here. Specifically, a pre-trained model may be trained to convert speech data into text data.
[0036] The pre-trained model can be RNN, LSTM, etc., which is not limited here.
[0037] Users can generate description information for the images to be generated in a variety of forms to meet the convenience of users.
[0038] The user uploads the original image to the server, and generates text description information for the original image. The text description information is used to represent the user's modification intention for the original image and describe how to modify the original image, that is, to give the processing range of the original image.
[0039] For example, the text description information is: addacat. The text description information indicates that the element [cat] is added to the original image, and the final generated image is a combination of the original image and the element in the text description information.
[0040] S200, input the text description information and the original image into the image processing model to obtain candidate images.
[0041] Before the text description information and the original picture are input into the image processing model, they need to be encoded and then the encoded information is input into the image processing model.
[0042] Specifically, because the text description information and the original image are of different types, the text description information and the original image need to be encoded separately.
[0043] Optionally, the text description information is composed of fields, and the text description information is encoded by a text encoder to generate a text vector. After encoding each word constituting the text description information, a token of each word is generated, and each token constitutes a text vector.
[0044] The text vector and the original image are input into the image processing model, and processed by the image processing model to generate candidate images. The image processing model may include a deep learning model composed of an attention mechanism and a scheduling algorithm (Scheduling), which are not limited here.
[0045] In this embodiment, the image processing model adopts a deep learning model based on a diffusion model (DiffusionModel).
[0046] S300, importing the candidate image into the laser processing process.
[0047] Optionally, the laser processing process may be a process run by the terminal device software (displaying the target image on the page), or may include a process of processing the target image through a laser processing device, which is not limited here.
[0048] Optionally, the candidate image is imported into the laser processing process by displaying the candidate image in a work area of the laser processing program, in which the image size of the candidate image can be adjusted and the processing parameters of the laser processing can be modified.
[0049] The image size may include the length, width or pixels of the target image; the processing parameters of laser processing include the shape parameters, clarity, grayscale, smoothness, engraving density, engraving speed, engraving power, etc. of the target image, which are not limited here.
[0050] In this embodiment, by importing the candidate image into the laser processing process, the candidate image can be used as the material and laser processing can be performed on the processing material. In the whole process, the user only needs to upload the original image and enter the text description information, and does not need to master professional image editing software. The original image is edited through the image processing model to generate a candidate image that matches the text description information, which improves the convenience of users in editing images for laser processing.
[0051] Figure 2 A schematic diagram of a usage scenario of the image processing method for laser processing provided in this embodiment is shown.
[0052] like Figure 2 As shown, the user 10 operates the terminal device 11, inputs text description information and the original picture through the terminal device 11, and the terminal device 11 sends the text description information and the original picture to the server 12 through the Internet. The image processing model is called in the server 12, and the image processing method for laser processing provided in the above embodiment is executed to obtain a candidate picture.
[0053] The server 12 returns the candidate image to the terminal device 11, displays the candidate image on the terminal device 11, and executes the step of importing the candidate image into the laser processing process.
[0054] The terminal device 11 can be various electronic devices with a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Eperts Group Audio Layer III, Moving Picture Experts Compression Standard Audio Layer 3), MP4 (Moving Picture Eperts Group Audio Layer IV, Moving Picture Experts Compression Standard Audio Layer 4) players, laptop computers and desktop computers, etc.
[0055] The server 12 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal device 11 .
[0056] In a possible embodiment, the terminal device 11 can also execute the image processing method for laser processing provided in the embodiment of the present application, that is, the terminal device 11 generates and receives text description information and original pictures, calls the image processing model, executes the image processing method for laser processing provided in the above embodiment, and obtains candidate pictures.
[0057] Figure 3 A schematic diagram of a scene of the image processing method for laser processing provided in this embodiment is shown.
[0058] like Figure 3 As shown, 210 is an area for users to edit text description information and upload original pictures. 210a is used to display the original pictures uploaded by users. 210b is used to input text description information, such as Figure 2 As shown, the text description information is: two dogs.
[0059] Combination Figure 2 It can be seen that the original picture only includes one dog, and the user wants to modify the original picture into two dogs.
[0060] After the user uploads the original image and edits the text description information, he can click the control at 210c to upload the original image and text description information to the server. Figure 2 In the process shown, the candidate image generated by the image processing model is displayed at 220a at 220. It can be seen that the candidate image at this time includes two dogs, which corresponds to the content of the text description information.
[0061] Optionally, the user may click the control at 220b to import the candidate image into the laser processing process.
[0062] In this embodiment, text description information and the original picture are received, and the text description information is used to instruct the user to modify the original picture; the text description information and the original picture are input into the image processing model to obtain a candidate picture, and the candidate picture is a picture modified according to the text description information. The user only needs to input the text description information and upload the original picture, and the image processing model automatically modifies the original picture to modify it into a candidate picture corresponding to the text description information, which can save the user's time in modifying the picture, and at the same time ensure that the modified candidate picture meets the user's needs. The user can edit the original picture in a more convenient way, which helps to improve the efficiency of laser processing.
[0063] In one embodiment, S200, inputting text description information and the original image into an image processing model to obtain candidate images includes:
[0064] S210, pre-process the text description information and the original image to obtain a text vector and a latent image.
[0065] S220, input the text vector and the potential image into the image processing model, perform denoising operation on the potential image, and output image coding information.
[0066] S230, decode the image coding information to generate candidate pictures.
[0067] Specifically, the text description information and the original image are preprocessed respectively, and the preprocessing may refer to encoding the text description information and the original image.
[0068] The text description information is encoded to obtain a text vector, and the original image is encoded to obtain a latent image.
[0069] The text description information and the original image are input into the image processing model, the potential image is denoised by the text vector, the image coding information is output, and the image coding information is decoded to generate a candidate image.
[0070] In this embodiment, the text description information and the original image are preprocessed to obtain a text vector and a potential image, and the text vector and the potential image are input into an image processing model. The potential image is denoised using the text vector, so that the image processing model can predict the noise of the generated image during the denoising process to output a candidate image.
[0071] In one embodiment, S220, inputting the text vector and the potential image into an image processing model, performing a denoising operation on the potential image, and outputting image encoding information includes:
[0072] S221, encode the text description information to obtain a text vector.
[0073] S222, extract features from the original image to obtain image features.
[0074] S223, adding Gaussian noise to the image features to obtain a latent image.
[0075] Specifically, a text encoder is used to encode the text description information. The tokenizer in the text encoder converts the text description information into characters, also called tokens, and labels each character to form a text vector.
[0076] Labeling is the process of converting each character or token into an embedding to form a text vector in the form of a matrix vector.
[0077] The text encoder is built based on the transformer model and can convert the text in the text description information into a text vector.
[0078] Tokenization of characters or characters is the process of converting text into a form that computers can understand.
[0079] As an implementation method, a conditional denoising autoencoder is used to extract features from the original image. In this step, the original image is processed into a form that can run in an image processing model, and noise is added to the image features by adding Gaussian noise.
[0080] During this process, the denoising strength parameter can be set to control the amount of noise added. A denoising strength parameter of 0 means no noise is added; a denoising strength parameter of 1 means adding the maximum amount of noise to make the latent image a complete random tensor so that the image processing model can make image predictions based on the latent image.
[0081] In this embodiment, the text description information is encoded so that the image processing model can guide the image prediction process according to the encoded text description information, thereby making the finally generated candidate image consistent with the text description information, so that the characteristics of the candidate image meet the user's search needs, which is conducive to improving the user experience.
[0082] Based on the above embodiment, S220 further includes:
[0083] S224, input the text vector into the deep learning model and output the first predicted noise.
[0084] S225, subtract the potential image from the first predicted noise to obtain an image noise residual.
[0085] S226: Output image coding information based on the image noise residual.
[0086] Specifically, the text vector is input into the deep learning model in the form of a matrix, and the text vector is converted into a first prediction noise in the deep learning model. The denoising process of the potential image is guided and predicted by the first prediction noise. The matrix of the potential image is subtracted from the matrix of the first prediction noise to perform a denoising operation to obtain an image noise residual. If the noise amount represented in the current image noise residual has met the requirements, the current image noise residual is output as image coding information.
[0087] In this embodiment, the text vector is processed to generate the first prediction noise, which is then used to diffuse the potential image, thereby reducing the amount of noise in the final output and improving the clarity of the final generated candidate image. After decoding, a candidate image with higher clarity can be obtained, and the noise points of the candidate image will not affect the effect of laser processing during laser processing.
[0088] Specifically, the text vector includes at least one character. S224, inputting the text vector into a deep learning model and outputting a first predicted noise includes:
[0089] Process at least one character through the attention mechanism to obtain a two-dimensional array.
[0090] Input a 2D array into the deep learning model and output the first predicted noise.
[0091] Specifically, the deep learning model may include a convolution layer, a downsampling layer, a pooling layer, a deconvolution layer, an upsampling layer, and an activation function.
[0092] Among them, the attention mechanism can be a cross-attention mechanism or a self-attention mechanism, which is not limited here.
[0093] The deep learning model may be a U-NET network, or may be other deep learning models such as CNN and DNN that can realize image prediction, which is not limited here.
[0094] Exemplarily, the U-NET network is a commonly used image segmentation network architecture, including a downsampling path and an upsampling path.
[0095] The U-NET network uses semantic segmentation for image prediction, and the U-shaped convolution module can better sample image features.
[0096] In this embodiment, the image coding information is processed by the U-NET network, which can improve the accuracy of the predicted image on the one hand, and improve the efficiency of generating the image on the other hand.
[0097] The downsampling path, namely the downsampling layer, consists of multiple convolutional layers and maximum pooling layers, which gradually reduces the size of the input data and increases the abstraction level of the data features, and can effectively extract the contextual information of the image.
[0098] The upsampling path, namely the upsampling layer, consists of multiple deconvolution layers and convolution layers, which are used to restore the data features to their original size.
[0099] Furthermore, the deep learning model may also include an attention mechanism, which is used to retain contextual information in the text description information.
[0100] For example, the text description information includes: a blue cat and a black dog are added;
[0101] The attention mechanism pairs the vector corresponding to [blue] with the vector corresponding to [cat], and the vector corresponding to [black] with the vector corresponding to [dog] to form a two-dimensional array.
[0102] When the deep learning model generates the first prediction noise, it guides the predicted image noise residual into the content represented by the text description information according to the two-dimensional array generated by the text vector.
[0103] In this embodiment, the deep learning model is combined with the attention mechanism to retain the contextual information in the text description information, and the deep features are sampled through the deep learning model, so that the finally generated candidate images are highly consistent with the text description information, which can meet user needs and ensure user experience.
[0104] At S226, based on the image noise residual, outputting image coding information also includes:
[0105] S2261, inputting the image noise residual into the deep learning model to generate a second predicted noise;
[0106] S2262, subtracting the image noise residual from the second prediction noise to obtain a new image noise residual;
[0107] S2263, input the new image noise residual into the deep learning model to generate new prediction noise, and cyclically execute the process of subtracting the new image noise residual output from the previous cycle from the new prediction noise until the number of cycles reaches the preset condition, and then output the image coding information, which is the image noise residual output from the last cycle.
[0108] S2261-S2263 refers to the image processing model gradually restoring the image corresponding to the text vector through sampling, that is, the candidate image.
[0109] One cycle process represents the sampling process of the image processing model. The specific process is to generate new prediction noise based on the image noise residual generated in the previous cycle, and then subtract the image noise residual output in the previous cycle from the new prediction noise to output a new image noise residual.
[0110] As an implementation manner, subtracting the image noise residual from the second prediction noise to obtain a new image noise residual refers to subtracting a matrix corresponding to the image noise residual from a matrix corresponding to the new prediction noise to obtain a new image noise residual.
[0111] Exemplarily, in the first cycle, a second prediction noise is generated according to the image noise residual, and then the image noise residual is subtracted from the second prediction noise to obtain a new image noise residual.
[0112] In the second cycle, new prediction noise is generated according to the image noise residual output in the first cycle, and then the image noise residual output in the first cycle is subtracted from the new prediction noise to output a new image noise residual.
[0113] The value of the new image noise residual outputted in the current cycle is different from the value of the image noise residual outputted in the previous cycle, and the value of the new image noise residual is smaller than the value of the image noise residual outputted in the previous cycle.
[0114] When the number of cycles reaches a preset condition, the image noise residual output from the last cycle is output as image coding information.
[0115] The implementation process of the cycle can be described by the following formula:
[0116]
[0117] X t represents the image noise residual output by the image processing model at the tth cycle, X t-1 Represents the image noise residual output by the image processing model at the t+1th cycle. Represents the prediction noise generated by the image processing model at the current number of cycles.
[0118] When t=1, X0 refers to the image noise residual output after the last cycle, also known as image coding information.
[0119] Optionally, the preset condition may be a preset number of cycles, which may be set within 20-50 times, such as 27 times, 30 times, 35 times, or 48 times. The preset number of cycles may be set by the user or may be preset by the image processing model during training.
[0120] In this embodiment, the process of denoising the potential image by predicting the noise is cyclically executed, so that the image encoding information finally outputted includes the content of the text description information, and the clarity of the decoded candidate image is better, which can effectively meet the needs of users.
[0121] In one embodiment, at least one candidate image is included. Before the candidate image is imported into the laser processing process at S300, the following steps are further included:
[0122] S30a, detecting a click operation on a candidate image, determining at least one candidate image corresponding to the click operation, and the at least one candidate image corresponding to the click operation is a target image.
[0123] S30b, generating a laser processing preview image according to the target image;
[0124] The step of importing the candidate image into the laser processing process comprises:
[0125] Importing the target image corresponding to the click operation in the candidate image into the laser processing process.
[0126] Figure 4 FIG. 1 is a schematic diagram showing a scene of an image processing method for laser processing provided by this embodiment. Figure 2 Based on the above, the image processing model generates at least one candidate image, and the terminal device 11 displays all candidate images to the user 10. The user 10 clicks to select a target image from all candidate images, and generates a laser processing preview image according to the target image.
[0127] Specifically, when the number of candidate images exceeds one, the user can select one of the candidate images as the target image in the display interface of the candidate images.
[0128] Optionally, a reminder message is generated to remind the user to select a target image from the candidate images, so as to receive a click operation from the user and use the object of the click operation as the target image.
[0129] When receiving the user's click operation, the target image is displayed according to the parameter requirements of the laser processing.
[0130] The laser processing preview image refers to the image after the target image is laser processed on the processing material.
[0131] The laser processing preview image is generated based on the display effect of the target image on the processed image.
[0132] After importing the laser processing preview image into the laser processing process, it actually determines that the target image will be the object of laser processing. The user can import the laser processing preview image into the laser processing process to perform the processing task.
[0133] In this embodiment, after the target image is determined, a laser processing preview image is generated based on the target image to show the user the results of the target image processing. The user can determine whether the target image can be used as an object of laser processing based on the laser processing preview image to avoid the result after the laser processing does not meet the expectations, thereby improving the user experience of laser processing to a certain extent.
[0134] In one embodiment, after generating a laser processing preview image according to the target image at S30b, the method further includes:
[0135] Get the image modification information, which is used to represent the user's modification intention on the target image.
[0136] Generate a new target image according to the target image and the image modification information.
[0137] After determining the target image and generating a laser engraving image according to the target image, the image modification information of the user for the target image may be obtained, and the image modification information is used to indicate modification elements for further processing the target image.
[0138] The prediction is performed again based on the image modification information and the target image to generate a new target image.
[0139] In this embodiment, by generating a laser engraving preview image, the user can determine whether to modify the target image according to the laser engraving preview image, thereby avoiding the laser processing efficiency being reduced due to the processing result not meeting expectations.
[0140] In one embodiment, a distributed node receives image generation requests initiated by multiple requesting parties, the image generation requests include text description information and original images, and the distributed nodes are constructed based on clustering technology.
[0141] The text description information and the original image are sent to the service node, and the image processing model is called through the service node to generate the corresponding candidate image.
[0142] Figure 5 A schematic diagram of a scene of the image processing method for laser processing provided in this embodiment is shown.
[0143] like Figure 5 As shown, user 10 inputs text description information and uploads original pictures, which are transmitted to distributed nodes. The distributed nodes send the text description information and original pictures to service nodes, process the text description information and original pictures through image processing models set on multiple clusters, and return the generated candidate pictures to user 10.
[0144] Optionally, the distributed nodes are arranged in the computer numerical control machine provided in this embodiment.
[0145] Distributed nodes are deployed based on Kubernetes technology, and the text description information and original images entered by users are received through multiple distributed nodes to ensure that requests initiated by users can be responded to in a timely manner.
[0146] The service node is used to receive the text description information and the original image sent by the distributed node, and implement the image processing method for laser processing provided in the above embodiment based on the text description information and the original image.
[0147] The present application embodiment provides a computer numerical control machine, which is used to execute the method provided in the above embodiment. The computer numerical control machine includes:
[0148] Slide rails;
[0149] A movable head, the movable head being slidably disposed on the slide rail;
[0150] A communication component, the communication component is used to receive the candidate image or the target image obtained by the steps of the method provided in the above embodiment;
[0151] The controller controls the movable head to move on the slide rail to process the surface of the processing material based on the candidate image or the target image.
[0152] According to one aspect of an embodiment of the present application, there is provided a computing system, the computing system comprising at least one computer numerical control machine and at least one processor;
[0153] The processor is used to execute the steps of the method provided in the above embodiment;
[0154] The computer numerical control machine transmits electromagnetic energy to a processing material disposed inside the computer numerical control machine based on the candidate image or the target image obtained by the processor.
[0155] Reference below Figure 6 To describe a numerical control device 40 provided according to an embodiment of the present application. Figure 6 The numerical control device 40 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0156] like Figure 6 As shown, the numerical control device 40 is in the form of a general computing device. The components of the numerical control device 40 may include but are not limited to: at least one processing unit 410, at least one storage unit 420, and a bus 430 connecting different system components (including the storage unit 420 and the processing unit 410).
[0157] The storage unit stores program codes, which can be executed by the processing unit 410, so that the processing unit 410 performs the steps according to various exemplary embodiments of the present application described in the description of the exemplary method described above in this specification. For example, the processing unit 410 can perform the following steps: Figure 1 The steps shown in .
[0158] The storage unit 420 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 4201 and / or a cache storage unit 4202 , and may further include a read-only storage unit (ROM) 4203 .
[0159] The storage unit 420 may also include a program / utility 4204 having a set (at least one) of program modules 4205, such program modules 4205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0160] Bus 430 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0161] The numerical control device 40 may also communicate with one or more external devices 500 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the numerical control device 40, and / or may communicate with any device that enables the numerical control device 40 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 450. The input / output (I / O) interface 450 is connected to a display unit 440. Furthermore, the numerical control device 40 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 360. As shown, the network adapter 460 communicates with other modules of the numerical control device 40 via a bus 430. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the numerical control device 40, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0162] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a mobile terminal, etc.) to execute the image processing method for laser processing according to the implementation of the present application.
[0163] In an exemplary embodiment of the present application, a computer-readable storage medium is also provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes the image processing method for laser processing described in the above method embodiment.
[0164] According to one embodiment of the present application, a program product for implementing the method in the above method embodiment is also provided, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0165] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0166] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0167] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0168] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages such as JAVA, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0169] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0170] In addition, although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0171] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a mobile terminal, etc.) to execute the method according to the implementation methods of the present application.
[0172] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the appended claims.
Claims
1. An image processing method for laser processing, characterized in that: include: Receiving text description information and an original picture input by a user, wherein the text description information indicates that the original picture is to be modified; Inputting the text description information and the original image into an image processing model to obtain a candidate image; The candidate images are introduced into the laser processing process.
2. The image processing method for laser processing according to claim 1, characterized in that: The step of inputting the text description information and the original image into an image processing model to obtain a candidate image includes: Preprocessing the text description information and the original image to obtain a text vector and a latent image; Inputting the text vector and the potential image into the image processing model, performing a denoising operation on the potential image, and outputting image coding information; The image coding information is decoded to generate the candidate picture.
3. The image processing method for laser processing according to claim 2, characterized in that: The preprocessing of the text description information and the original image to obtain a text vector and a potential image includes: Encoding the text description information to obtain the text vector; Performing feature extraction on the original image to obtain image features; Gaussian noise is added to the image features to obtain the latent image.
4. The image processing method for laser processing according to claim 3, characterized in that: The image processing model includes a deep learning model, and the step of inputting the text vector and the potential image into the image processing model, performing a denoising operation on the potential image, and outputting image coding information includes: Inputting the text vector into a deep learning model and outputting a first prediction noise; Subtracting the potential image from the first predicted noise to obtain an image noise residual; Based on the image noise residual, the image coding information is output.
5. The image processing method for laser processing according to claim 4, characterized in that: The outputting the image coding information based on the image noise residual comprises: Inputting the image noise residual into the deep learning model to generate a second predicted noise; Subtracting the image noise residual from the second prediction noise to obtain a new image noise residual; The new image noise residual is input into the deep learning model to generate new prediction noise, and the process of subtracting the new image noise residual output in the previous cycle from the new prediction noise is cyclically performed until the number of cycles reaches a preset condition, and then the image coding information is output, and the image coding information is the image noise residual output in the last cycle.
6. The image processing method for laser processing according to claim 4, characterized in that: The text vector includes at least one character, and the step of inputting the text vector into a deep learning model and outputting a first prediction noise includes: Processing the at least one character through an attention mechanism to obtain a two-dimensional array; The two-dimensional array is input into the deep learning model, and the first predicted noise is output.
7. The image processing method for laser processing according to claim 1, characterized in that: The number of the candidate images is at least one, and before the candidate images are introduced into the laser processing process, the method further includes: Detecting a click operation on the candidate image, determining at least one candidate image corresponding to the click operation, wherein the at least one candidate image corresponding to the click operation is a target image; Generate a laser processing preview image according to the target image; The step of importing the candidate image into the laser processing process comprises: Importing the target image corresponding to the click operation in the candidate image into the laser processing process.
8. The image processing method for laser processing according to claim 7, characterized in that: After generating a laser processing preview image according to the target image, the method further includes: Acquire image modification information, where the image modification information is used to represent the user's modification intention on the target image; A new target picture is generated according to the target picture and the picture modification information.
9. The image processing method for laser processing according to claim 1, characterized in that: Before inputting the text description information and the original picture into an image processing model to obtain a candidate picture, the method further includes: Receiving, through a distributed node, image generation requests initiated by multiple requesting parties, wherein the distributed node is constructed based on clustering technology, and the image generation request includes the text description information and the original image; The image generation request is sent to a service node, and the image processing model is called through the service node to generate a corresponding candidate image.
10. A computer numerically controlled machine, characterized in that The computer numerically controlled machine comprises: Slide rails; a movable head, the movable head being slidably disposed on the slide rail; A communication component, the communication component is used to receive the candidate image or the target image obtained by the steps of the method according to any one of claims 1-9; A controller is provided for controlling the movable head to move on the slide rail to process the surface of a processing material based on the candidate image or the target image.
11. A computing system, characterized in that: The computing system includes at least one computer numerically controlled machine and at least one processor; The processor is used to perform the steps of the method according to any one of claims 1 to 9; The computer numerical control machine transmits electromagnetic energy to a processing material disposed inside the computer numerical control machine based on the candidate image or the target image obtained by the processor.
12. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the image processing method for laser processing according to any one of claims 1 to 9.