Image processing method, device and equipment, computer readable storage medium and computer program product
By loading an online editor in the browser and using the image processing model for batch processing, the problem of high workload and high probability of errors when professional designers manually process images is solved, and the efficiency and ease of use of image processing are achieved.
Patent Information
- Application Number
- CN202411813321.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-25
AI Technical Summary
In the prior art, professional designers need to manually process images containing backgrounds, resulting in large workloads, high probability of errors and low processing efficiency, especially during large holiday events or live broadcast sessions.
An image processing method is provided, by loading an online editor in the browser, adding images using an image addition portal, and when the batch processing conditions are met, the image is batch processed through an image processing model associated with the online editor.
This improves image processing efficiency, allowing users without professional image processing knowledge to easily perform batch processing, simplifies operational processes, and reduces technical thresholds and costs.
Smart Images

Figure CN119693501A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to computer technology, and in particular to an image processing method, apparatus, device, storage medium and program product. Background Art
[0002] In scenarios such as business operations, live broadcasts, and customer service consultants, images that do not meet the needs of the target users are often used, such as images of users, celebrities, customer service staff, etc. with non-transparent or non-solid backgrounds. In order to obtain such images, the target users need to find professional designers to manually process the images, such as cutting out and configuring avatars for images containing backgrounds. This results in a large workload for professional designers, especially in situations where there are many images for large-scale holiday events, large-scale live broadcasts, etc. The workload of designers in manual processing and configuration is large, the probability of errors is high, and the image processing efficiency is low. Summary of the invention
[0003] The embodiments of the present application provide an image processing method, device, electronic device, computer-readable storage medium, and computer program product, which can improve image processing efficiency.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] The present application provides an image processing method, including:
[0006] Loading an online editor in a browser, wherein the online editor includes an image adding entry;
[0007] In response to an image adding operation triggered based on the image adding entry, adding at least two images to the online editor;
[0008] In response to satisfying the batch processing condition, the at least two images are batch processed by the image processing model associated with the online editor, and image processing results obtained by processing each of the images are output.
[0009] The present application provides an image processing device, including:
[0010] A loading module, used to load an online editor in a browser, wherein the online editor includes an image adding entry;
[0011] an adding module, configured to add at least two images to the online editor in response to an image adding operation triggered based on the image adding entry;
[0012] The processing module is used for, in response to meeting the batch processing condition, performing batch processing on the at least two images through the image processing model associated with the online editor, and outputting image processing results obtained by processing each of the images.
[0013] In the above scheme, before the at least two images are batch processed by the image processing model associated with the online editor, the device also includes: a determination module, used to determine that the batch processing conditions are met in response to a trigger operation on a batch processing control in the online editor; or, in response to the online editor being associated with a scheduled task for batch processing, determining that the batch processing conditions are met when the execution time specified by the scheduled task is reached; or, in response to the number of images added to the online editor reaching a quantity threshold, determining that the batch processing conditions are met.
[0014] In the above scheme, the processing module is also used to display a model selection entrance in the online editor; in response to a trigger operation on the model selection entrance, display multiple image processing models associated with the online editor; in response to the model selection operation, batch process the at least two images through the selected image processing model.
[0015] In the above scheme, the processing module is also used to determine the matching degree between each selected image processing model and each image in response to the number of selected image processing models being multiple; based on the matching degree, determine the image processing model with the maximum matching degree corresponding to each image; and perform image processing on the corresponding image through the image processing model with the maximum matching degree corresponding to each image.
[0016] In the above solution, the processing module is further used to display the model selection entrance corresponding to each of the images, wherein one image corresponds to one model selection entrance;
[0017] In response to the model selection operation triggered by the model selection entry, the selected image processing model corresponding to each of the images is determined; and image processing is performed on the corresponding image through the selected image processing model corresponding to each of the images.
[0018] In the above scheme, the processing module is also used to determine the matching degree between each image processing model and each image in response to the online editor being associated with multiple image processing models; based on the matching degree, determine the image processing model with the maximum matching degree corresponding to each image; and perform image processing on the corresponding image through the image processing model with the maximum matching degree corresponding to each image.
[0019] In the above scheme, the processing module is also used to determine the influencing parameters that affect the matching degree between the image processing model and the image, wherein the influencing parameters include at least one of the following: the similarity between the image features of the image and the model features of the image processing model, and the evaluation index of the processing result of the image processing model for the image, and the evaluation index includes at least one of the following: precision and recall rate; based on the influencing parameters, the matching degree between each image processing model and each image is predicted by a first machine learning model; wherein the first machine learning model is trained based on the influencing parameters of sample pairs and the use labels annotated by the sample pairs, and the sample pairs include image processing model samples and image samples.
[0020] In the above scheme, the processing module is also used to batch process the at least two images by combining image processing models in response to the number of image processing models associated with the online editor being multiple; wherein the combined image processing model is determined in the following manner: the image processing models associated with the online editor are combined; the features of multiple candidate combined image processing models are used to call the second machine learning model to calculate the usage probability of each candidate combined image processing model, and the candidate combined image processing model with the maximum usage probability is selected; wherein the second machine learning model is trained in the following manner: the second machine learning model is called to predict based on the features of multiple combined image processing model samples to obtain the probability of each combined image processing model sample, and back propagation is performed based on the difference between the probability of each combined image processing model sample and the actual selected result label to update the parameters of the second machine learning model.
[0021] In the above scheme, the processing module is also used to perform the following operations for each of the images: perform image processing on the image by combining each image processing model in the image processing model to obtain a sub-processing result of each image processing model in the combined image processing model for the image; fuse the sub-processing results of each image processing model in the combined image processing model for the image, and output the fusion result as the image processing result obtained by processing the image by the combined image processing model.
[0022] In the above scheme, the processing module is also used to obtain an influencing factor that affects the processing priority of each of the images, and the influencing factor includes at least one of the following: resolution, a legitimacy detection result of the image, and a repeatability detection result of the image; based on the influencing factor, a third machine learning model is used to predict and determine the processing priority of each of the images; wherein the third machine learning model is trained based on the influencing factor of the image sample and the priority of the image sample annotation; based on the processing priority, a target number of images are screened out from the at least two images, and the target number of images are batch processed through the image processing model associated with the online editor.
[0023] In the above scheme, the image processing model is used to perform cutout processing on the image, and the processing module is also used to perform the following operations on each of the images through the image processing model associated with the online editor: performing mask prediction on the image through the image processing model to obtain a mask image of the image, and the background part of the mask image is transparent; synthesizing the image and the mask image, and using the synthesized result as the image processing result obtained by processing the image.
[0024] In the above scheme, the processing module is also used to downsample the image through the image processing model to obtain a downsampled image; perform semantic feature extraction on the downsampled image to obtain the semantic features of the image, and perform detail feature extraction on the image based on the semantic features to obtain the detail features of the image; fuse the semantic features and the detail features to obtain fused features, and perform mask prediction based on the fused features to obtain a mask image of the image.
[0025] In the above scheme, the image processing model is used to classify the images, and the processing module is also used to respond to the number of image processing models associated with the online editor being multiple, to classify each image through each image processing model to obtain the category to which the image belongs and the probability of the category; and select the category corresponding to the maximum probability as the image processing result obtained by processing each image.
[0026] In the above scheme, the processing module is also used to perform restoration processing on the image in response to the image processing model associated with the online editor, and batch image restoration processing is performed on the at least two images through the image processing model; and to perform style conversion processing on the image in response to the image processing model associated with the online editor, and batch style conversion processing is performed on the at least two images through the image processing model.
[0027] In the above scheme, the processing module is also used to respond to the online editor being associated with an accelerator, and batch process the at least two images through the image processing model associated with the online editor and the accelerator; wherein the efficiency of batch processing the at least two images through the accelerator is higher than the efficiency of batch processing the at least two images without the accelerator.
[0028] In the above scheme, the processing module is also used to verify the authority of the current account, and when the verification result indicates that the current account has the processing authority of the at least two images, the at least two images are batch processed through the image processing model associated with the online editor.
[0029] An embodiment of the present application provides an electronic device, including:
[0030] A memory for storing computer executable instructions or computer programs;
[0031] The processor is used to implement the image processing method provided in the embodiment of the present application when executing the computer executable instructions or computer program stored in the memory.
[0032] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions or a computer program for implementing the image processing method provided in the embodiment of the present application when executed by a processor.
[0033] An embodiment of the present application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, the image processing method provided by the embodiment of the present application is implemented.
[0034] The embodiments of the present application have the following beneficial effects:
[0035] By applying the embodiment of the present application, an online editor is loaded in a browser, at least two images are added to the online editor through the image adding entry provided by the online editor, and when the batch processing conditions are met, at least two images are batch processed through the image processing model associated with the online editor, and the image processing results obtained by processing each image are output; in this way, since the online editor provides an intuitive user interface (such as an image adding entry), the operation process is simplified, so that users without professional image processing knowledge can also easily perform batch processing, and the image processing efficiency is improved by batch processing the images to be processed through the online editor. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 is a schematic diagram of the architecture of an image processing system 100 provided in an embodiment of the present application;
[0037] Figure 2 is a schematic diagram of the structure of an electronic device 500 provided in an embodiment of the present application;
[0038] Figure 3 is a flowchart of an image processing method provided in an embodiment of the present application;
[0039] Figure 4 is a schematic diagram of an interface for image processing provided in an embodiment of the present application;
[0040] Figure 5 is a schematic diagram of an interface for image processing provided in an embodiment of the present application;
[0041] Figure 6 is a schematic diagram of an interface for image processing provided in an embodiment of the present application;
[0042] Figure 7 is a schematic diagram of an interface for image processing provided in an embodiment of the present application;
[0043] Figure 8 is a schematic diagram of image processing results provided by an embodiment of the present application;
[0044] Fig. 9 It is a schematic diagram of the image processing flow provided by the embodiment of the present application;
[0045] Fig.10 It is a schematic diagram of the image processing flow provided by the embodiment of the present application;
[0046] Fig.11 It is a flowchart of the cutout processing provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0048] It is understandable that in the embodiments of the present application, related data such as user information is involved. When the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards.
[0049] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0050] In the following description, the terms "first\second..." are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second..." can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0051] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0053] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0054] 1) Client: an application running in the terminal to provide various services, such as a video player client, a game client, etc.
[0055] 2) In response, it is used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed may be in real time or have a set delay. Unless otherwise specified, there is no restriction on the order of execution of the multiple operations executed.
[0056] The embodiments of the present application provide an image processing method, device, electronic device, computer-readable storage medium and computer program product, which can improve the efficiency of image processing. The exemplary application of the electronic device provided by the embodiment of the present application is described below. The electronic device provided by the embodiment of the present application can be implemented as a laptop computer, a tablet computer, a desktop computer, a set-top box, a mobile device (for example, a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable gaming device), a smart phone, a smart speaker, a smart watch, a smart TV, a vehicle-mounted terminal, an augmented reality (AR, AugmentedReality) device and a virtual reality (VR, Virtual Reality) device and other types of user terminals, and can also be implemented as a server. Below, an exemplary application when the device is implemented as a terminal will be described.
[0057] See also Figure 1 , Figure 1 It is a schematic diagram of the architecture of the image processing system 100 provided in an embodiment of the present application. To support an exemplary application, the terminal (terminal 400-1 and terminal 400-2 are shown as examples) is connected to the server 200 via the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.
[0058] In some embodiments, a browser or client with image processing function is running on the terminal. Server 200 is a background server corresponding to the browser or client, which can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. The terminal and the server can be directly or indirectly connected by wired or wireless communication, which is not limited in the embodiments of the present application.
[0059] In actual applications, when a user processes an image through a browser, the terminal loads an online editor in the browser, wherein the online editor includes an image adding entry; in response to an image adding operation triggered based on the image adding entry, at least two images are added to the online editor; the server 200 detects whether the batch processing conditions are met, and when it is determined that the batch processing conditions are met, obtains the image processing model associated with the online editor, and sends the image processing model associated with the online editor to the browser, and batch processes at least two images in the browser through the image processing model associated with the online editor, and outputs the image processing results obtained by processing each image.
[0060] See also Figure 2 , Figure 2 is a schematic diagram of the structure of an electronic device 500 provided in an embodiment of the present application, taking the electronic device 500 as Figure 1 For example, the terminal in Figure 2 The electronic device 500 shown includes: at least one processor 510, a memory 550, at least one network interface 520 and a user interface 530. The various components in the electronic device 500 are coupled together via a bus system 540. It is understood that the bus system 540 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 540 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 540 is not described in detail. Figure 2 Various buses are labeled as bus system 540 .
[0061] The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0062] The memory 550 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 550 described in the embodiment of the present application is intended to include any suitable type of memory. The memory 550 optionally includes one or more storage devices that are physically far away from the processor 510.
[0063] In some embodiments, the memory 550 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0064] The operating system 551 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic businesses and processing hardware-based tasks; a network communication module 552 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 520. Exemplary network interfaces 520 include: Bluetooth, wireless compatibility certification (WiFi), and a universal serial bus (USB, UniversalSeria1 Bus), etc.
[0065] In some embodiments, the image processing device provided in the embodiments of the present application can be implemented in software. The image processing device provided in the embodiments of the present application can be provided as various software embodiments, including various forms including applications, software, software modules, scripts or codes. Figure 2 An image processing device 555 stored in a memory 550 is shown, which may be software in the form of a program and a plug-in, and includes a series of modules, including a loading module 5551, an adding module 5552, and a processing module 5553. These modules are logical, and therefore may be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.
[0066] In other embodiments, the device provided in the embodiments of the present application can be implemented in hardware. As an example, the device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the image processing method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application specific integrated circuits (Application Specific Integrated Circuit, ASIC), digital signal processors (Digital Signal Processor, DSP), programmable logic devices (Programmable Logic Device, PLD), complex programmable logic devices (Complex Programmable Logic Device, CPLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other electronic components.
[0067] In some embodiments, the terminal or server can implement the image processing method provided by the embodiment of the present application by running various computer executable instructions or computer programs. For example, computer executable instructions can be commands, machine instructions or software instructions at the microprogram level. The computer program can be a native program or software module in the operating system; it can be a native (Native) application (APPlication, APP), that is, a program that needs to be installed in the operating system to run, such as an instant messaging APP, a live broadcast APP; it can also be a small program that can be embedded in any APP, that is, a program that can be run only by downloading it to a browser environment. In short, the above-mentioned computer executable instructions can be instructions in any form, and the above-mentioned computer program can be an application, module or plug-in in any form.
[0068] As mentioned above, the image processing method provided in the embodiment of the present application can be implemented by various types of electronic devices, for example, Figure 1The terminal and the server 200 in the embodiment can be executed by either one of them separately, or by Figure 1 The terminal and server 200 in the embodiment cooperate to execute. Figure 1 The terminal in the embodiment alone executes the image processing method provided in the present application as an example for explanation. Figure 3 , Figure 3 is a flowchart of the image processing method provided in the embodiment of the present application, which will be combined with Figure 3 The steps shown are explained.
[0069] Step 101: The terminal loads an online editor in a browser, wherein the online editor includes an image adding entry.
[0070] In actual applications, before processing images through a browser, you need to configure the browser environment first. For example, when building a visual image processing application in a browser, you need to build a browser interface (i.e., a Web interface) to allow users to upload images through the Web interface and view the image processing results in real time. The following are the basic steps to build such an application: 1) Create a Web project: For example, use HTML, CSS, and JavaScript (or frameworks such as React, Vue, etc.) to create a Web project; 2) Introduce Transformers.js and ONNX Runtime Web: Introduce Transformers.js and ONNX Runtime in the Web project Web library; 3) Create an upload interface: Create an interface that allows users to upload images, which includes an image addition entry for uploading images; 4) Load the model: Use Transformers.js to load the corresponding image processing model, where the image processing model is related to the specific image processing scenario, such as an image processing model that can be an image cutout model (used to cut out images, such as MODNet or RMBG-1.4 models), or an image restoration model (used to restore clear images from damaged or noisy images, such as image denoising and restoration models based on deep learning, image denoising based on generative adversarial networks (GANs) and adversarial models that learn to remove noise from images through adversarial training); it can also be an image style conversion model (used to change the image style, such as applying one image style to another image, such as models based on generative adversarial networks and unsupervised image-to-image conversion models, etc.); 5) Image processing: After the user uploads the image, the image processing model is used to perform real-time image processing on the image; 6) Display the result: Display the processed image on the interface to achieve a WYSIWYG image processing effect.
[0071] Among them, ONNX Runtime is a cross-platform, high-performance machine learning inference and training accelerator. Using the tools provided by the ONNX platform, image processing models trained by different deep learning frameworks can be converted into ONNX models, and then different ONNX Runtimes can be used to enable the converted ONNX models to run on different platforms; ONNX Runtime uses its extensible Execution Providers program framework in conjunction with different hardware acceleration libraries to optimally execute ONNX models on hardware platforms. This approach enables application developers to flexibly deploy their ONNX models in different environments such as the cloud and edge, and use the computing capabilities of the platform to optimize execution.
[0072] Transformers.js is used to build a browser (Web) application that allows users to upload images and use the image processing model integrated by Transformers.js (such as MODNet or RMBG-1.4 model, etc.) to perform image processing in real time in the browser; this method can implement the most advanced machine learning models in the Web browser without the need for a server. It provides pre-trained models and familiar high-level application programming interfaces (APIs) that support tasks in natural language processing, computer vision, audio, and multimodal fields; developers can use Transformers.js to run image processing tasks directly in the browser.
[0073] In actual applications, additional corresponding configurations are required according to specific image processing tasks. For example, when setting up the environment, Node.js, Puppeteer, and node-schedule for batch cutouts need to be installed in the system. Node.js, as the runtime environment for JavaScript, allows running Puppeteer scripts to control the browser. Puppeteer and node-schedule are a Node.js library. Puppeteer provides an API to control the browser through the DevTools protocol. For example, when creating a batch processing script, write a script using Puppeteer, which will automatically open the browser, load the online cutout application, and perform the cutout operation. When setting up task scheduling, you can use the node-schedule library to set scheduled tasks to achieve scheduled batch cutouts.
[0074] In the above manner, batch processing of images through the online editor in the browser has at least the following beneficial effects: 1) Convenience: Users do not need to download or install any software, they only need to open the browser to access the online editor for batch processing of images; 2) Cross-platform compatibility: Online editors can usually run on different operating systems and devices, whether the operating system is a desktop device such as Windows, macOS, Linux or a mobile device such as Android, iOS, etc., as long as there is browser support, the online editor in the browser can be used to batch process images; 3) Easy to share and collaborate: The online editor can be easily shared with team members or friends, and multiple people can edit and process images at the same time, which improves collaboration. 4) Low threshold and high efficiency: The online editor provides an intuitive user interface and simple operation process, so that users without professional image processing knowledge can also easily perform batch processing; batch processing of images through the image batch processing function provided by the online editor can save a lot of time and improve image processing efficiency; 5) High image processing accuracy: The image processing model integrated in the online editor can be quickly updated and iteratively optimized, and the image batch processing is improved through the latest functions to improve the image processing effect; 6) Save storage space and cost: Since image processing is performed in the browser or server, the user's local storage space will not be reduced due to downloading and installing software, and the cost is reduced because there is no need to purchase or upgrade local image processing software. In short, batch processing of images through the online editor in the browser provides flexibility, efficiency and convenience, while also reducing technical barriers and costs, and is suitable for the needs of the majority of users.
[0075] Step 102: In response to an image adding operation triggered by an image adding entry, at least two images are added to the online editor.
[0076] Here, an image adding portal is provided in the online editor of the browser, through which one or more images can be uploaded or added to the online editor, so as to perform batch image processing on the uploaded or added images.
[0077] See also Figure 4 , Figure 4It is a schematic diagram of the interface of image processing provided by an embodiment of the present application, wherein an image adding entrance (such as an add image button) 401 is displayed in the online editor, and in response to a trigger operation on the image adding entrance 401, an image selection interface is displayed, and multiple images to be selected can be displayed in the image selection interface, and the images to be selected can be images stored in the system album of the terminal, or images displayed in the browser. After one or more images are selected through the image selection interface, in response to a confirmation operation on the selected images, the selected images are uploaded or added to the online editor, so that the uploaded or added images are batch processed through the online editor; in this way, by adding multiple images at a time, the image adding efficiency is improved, which is beneficial to improving the overall efficiency of image processing.
[0078] Step 103: In response to the batch processing condition being met, batch processing is performed on at least two images using an image processing model associated with the online editor, and image processing results obtained by processing each image are output.
[0079] In actual applications, before the terminal performs batch processing on at least two images through the image processing model associated with the online editor, it can determine whether the batch processing conditions are met in the following ways: in response to a trigger operation on a batch processing control in the online editor, it is determined that the batch processing conditions are met; or, in response to a scheduled task for batch processing associated with the online editor, when the execution time specified by the scheduled task is reached, it is determined that the batch processing conditions are met; or, in response to the number of images added to the online editor reaching a quantity threshold, it is determined that the batch processing conditions are met.
[0080] In actual applications, batch processing conditions can be preset and configured. When there are multiple batch processing conditions, multiple triggering methods can be used to trigger the batch processing conditions. For example, a batch processing control is displayed in the online editor. When the user manually triggers the batch processing control, it is determined that the batch processing conditions are met. Another example is to write a scheduled task script in advance through the online editor. When the execution time specified by the scheduled task arrives, it is determined that the batch processing conditions are met. Another example is to preset a number threshold for triggering batch processing conditions through the online editor. When the number of images added in the online editor reaches the preset number threshold, it is determined that the batch processing conditions are met. When the batch processing conditions are met, multiple images added in the online editor can be batch processed.
[0081] See also Figure 5 , Figure 5It is a schematic diagram of the interface for image processing provided in an embodiment of the present application. Taking the case where a user actively triggers a batch processing condition as an example, a batch processing control 501 is displayed in the online editor. The user can select one by one from the images imported from the online editor or select multiple images with one click and then trigger the batch processing control (such as a start processing button) 501. The terminal responds to the trigger operation, automatically performs batch processing on the selected multiple images, and displays the image processing results corresponding to each image after the batch processing is completed. In this way, the image processing efficiency is improved by performing batch processing on multiple images.
[0082] In some embodiments, the terminal may perform batch processing on at least two images through an image processing model associated with an online editor in the following manner: in response to the online editor being associated with multiple image processing models, determining the degree of matching between each image processing model and each image; based on the degree of matching, determining the image processing model with the maximum matching degree corresponding to each image; and performing image processing on the corresponding images through the image processing model with the maximum matching degree corresponding to each image.
[0083] In actual applications, when the terminal performs batch processing on at least two images through the image processing model associated with the online editor, if there is one image processing model associated with the online editor, the at least two images can be directly processed in batches through the one image processing model; if there are multiple image processing models associated with the online editor, the multiple images can be automatically processed in batches through one or more of the multiple image processing models associated with the online editor. The matching degree between each image processing model and each image can also be determined first, and based on each matching degree, the image processing model with the maximum matching degree corresponding to each image is determined, and the corresponding image is processed through the image processing model with the maximum matching degree corresponding to each image.
[0084] For example, the image processing models associated with the online editor include image processing model 1, image processing model 2, and image processing model 3, and the images to be processed include image 1, image 2, and image 3. The terminal first determines the matching degree between each image processing model and each image, such as the matching degree between image processing model 1 and image 1 is a1, the matching degree between image processing model 2 and image 1 is b1, the matching degree between image processing model 3 and image 1 is c1, the matching degree between image processing model 1 and image 2 is a2, the matching degree between image processing model 2 and image 2 is b2, and the matching degree between image processing model 3 and image 2 is c3. The matching degree is c2, the matching degree between image processing model 1 and image 3 is a3, the matching degree between image processing model 2 and image 3 is b3, and the matching degree between image processing model 3 and image 3 is c3. Assuming a1<b1<c1, c2<a2<b2, c3<b3<a3, when the three images are batch processed by the three image processing models, image 1 is processed by the image processing model 3 corresponding to c1, image 2 is processed by the image processing model 2 corresponding to b2, and image 3 is processed by the image processing model 1 corresponding to a3.
[0085] Through the above method, when batch processing is performed on multiple images, the most matching image processing model corresponding to each image is used to process the corresponding image, which not only improves the image processing efficiency, but also improves the accuracy of image processing.
[0086] It should be noted that an image processing model can process multiple images in batches in either serial or parallel processing. Serial processing means that the image processing model processes each image in turn, and starts processing the next image after completing the processing of one image. This method is simple and easy to manage. Parallel processing means that the image processing model processes multiple images at the same time, which usually requires more computing resources because the processing of each image requires a certain amount of memory and central processing unit (CPU) time. Parallel processing can significantly improve image processing efficiency, but attention should be paid to the reasonable allocation of resources to avoid overload.
[0087] In some embodiments, the degree of match between each image processing model and each image can be determined in the following manner: determining influencing parameters for affecting the degree of match between the image processing model and the image, wherein the influencing parameters include at least one of the following: similarity between image features of the image and model features of the image processing model, evaluation indicators of the processing results of the image processing model for the image, and the evaluation indicators include at least one of the following: precision, recall rate; based on the influencing parameters, predicting the degree of match between each image processing model and each of the images through a first machine learning model; wherein the first machine learning model is trained based on the influencing parameters of sample pairs and the use of labels for annotating sample pairs, and the sample pairs include image processing model samples and image samples.
[0088] In practical applications, if there are multiple image processing models associated with the online editor, different image processing models may be applicable to different types of images. Taking the image processing model as an image cutout model (i.e., the image processing model is used to cut out images) as an example, the MODNet model is good at processing the situation where the foreground and background contrast in the original image is high and the foreground shape is complex. For example, the MODNet model is usually applicable to the following types of images: images with complex backgrounds (i.e., images with a background containing multiple colors and textures), character images (even if the character and the background color are similar or the background contains complex patterns), and high-resolution images; the RMBG-1.4 model is good at processing the situation where the foreground and background color contrast in the original image is obvious and the foreground edge is clear. For example, the RMBG-1.4 model is usually applicable to the following types of images: images with simple backgrounds and uniform colors, product images (it is often used in the field of e-commerce to remove the background of product images for display on websites), and real-time application images (RMBG-1.4 can be used in real-time applications, such as real-time cutouts in mobile applications).
[0089] In the case where the above-mentioned online editor is associated with multiple image processing models, in order to improve the accuracy of image processing, when determining the matching degree between each image processing model and each image, an influencing parameter that affects the matching degree between the image processing model and the image is obtained. When the influencing parameter includes the similarity between the image features of the image and the model features of the image processing model, the image features of the image to be processed (used to characterize the type of the image to be processed, the complexity of the foreground or background, the application scenario, the resolution, etc.) and the model features of the image processing model (i.e., the image type, the complexity of the foreground or background, the application scenario, the resolution, etc. applicable to the model) can be extracted, and the similarity between the image features and the model features (such as cosine similarity) is calculated. Generally, the greater the similarity between the two, the greater the matching degree between the corresponding image processing model and the image; when the influencing parameter includes an evaluation index of the processing result of the image processing model for the image, after each image processing model processes the image, the evaluation index can be determined based on the image processing result. The so-called evaluation index is used to indicate the precision or recall rate of the image processing result. Generally, the higher the precision or the lower the recall rate, the greater the matching degree between the corresponding image processing model and the image. After determining the influencing parameters that affect the matching degree between the image processing model and the image, prediction processing is performed in the first machine learning model trained with the influencing parameters to obtain the matching degree between each image processing model and each image, which can make the prediction more accurate.
[0090] Among them, the first machine learning model is trained based on the influencing parameters of sample pairs (the sample pairs include image processing model samples and image samples) and the usage labels annotated by the sample pairs. For example, based on the similarity between the image processing model samples and the image samples in the sample pairs, the first machine learning model is called to perform prediction to obtain the matching degree between the image model samples and the image samples. Back propagation is performed based on the difference between the predicted matching degree and the annotated usage label (or matching label, matching or usage is 1, indicating that the image model sample is actually used to process the image sample, and mismatching or non-use is 0, indicating that the image model sample is not actually used to process the image sample) to update the parameters of the first machine learning model. For example, after determining the value of the loss function of the first machine learning model based on the difference between the predicted matching degree and the actual usage label (or matching label, matching or usage is 1, and mismatching or non-use is 0), it can be determined whether the value of the loss function exceeds a preset threshold. When the value of the loss function exceeds the preset threshold, the error signal of the first machine learning model is determined based on the loss function, the error signal is back propagated in the first machine learning model, and the parameters of each layer are updated during the propagation process.
[0091] Among them, the embodiments of the present application do not limit the model structure of the machine learning model (including the first machine learning model and the subsequent second machine learning model and the third machine learning model). For example, the machine learning model may be a convolutional neural network, a deep neural network, etc.; it is not limited to the form of the loss function, for example, it may be a cross entropy loss function, an L2 loss function, etc. Here, back propagation is explained. The training sample data is input into the input layer of the neural network model, passes through the hidden layer, and finally reaches the output layer and outputs the result. This is the forward propagation process of the neural network model. Since there is an error between the output result of the neural network model and the actual result, the error between the output result and the actual value is calculated, and the error is backpropagated from the output layer to the hidden layer until it propagates to the input layer. In the process of back propagation, the value of the model parameter is adjusted according to the error, that is, the loss function is constructed according to the error between the output result and the actual value, and the partial derivatives of the loss function with respect to the model parameters are calculated layer by layer to generate the gradient of the loss function with respect to the model parameters of each layer. Since the direction of the gradient indicates the direction of error expansion, the gradient of the model parameters is inverted and summed with the original parameters of each layer model. The summed result is used as the updated model parameters of each layer, thereby reducing the error caused by the model parameters, and the above process is continuously iterated until convergence.
[0092] In some embodiments, the terminal can batch process at least two images through the image processing model associated with the online editor in the following manner: a model selection entrance is displayed in the online editor; in response to a trigger operation on the model selection entrance, multiple image processing models associated with the online editor are displayed; in response to the model selection operation, at least two images are batch processed through the selected image processing model.
[0093] See also Figure 6 , Figure 6 It is a schematic diagram of the interface of image processing provided in an embodiment of the present application. If there are multiple image processing models associated with the online editor, a model selection entry (such as selecting a model) 601 may be provided in the online editor. In response to the triggering operation on the model selection entry 601, multiple image processing models associated with the online editor are displayed, such as image processing model 1, image processing model 2 and image processing model 3. When the user triggers a certain image processing model, relevant information of the image processing model may be displayed, such as model volume, operation speed, processing effect, etc. In response to the model selection operation, if only one image processing model is selected, at least two images may be directly processed in batches through the selected image processing model. If the user selects image processing model 3, multiple images may be processed in batches through image processing model 3. In this way, the pertinence and initiative of image processing are improved through the user's independent selection of image processing models.
[0094] In some embodiments, the terminal may perform batch processing on at least two images through a selected image processing model in the following manner: in response to the number of selected image processing models being multiple, determining the degree of matching between each selected image processing model and each image; based on the degree of matching, determining the image processing model with the maximum matching degree corresponding to each image; and performing image processing on the corresponding images through the image processing model with the maximum matching degree corresponding to each image.
[0095] In actual applications, when there are still multiple image processing models selected by the user, when multiple images are batch processed through the selected multiple image processing models, the direct matching degree between each selected image processing model and each image to be processed can be determined (the method for determining the matching degree will be explained later), and based on each matching degree, the image processing model with the maximum matching degree corresponding to each image is determined, and the corresponding images are processed through the image processing model with the maximum matching degree corresponding to each image. For example, the user selects image processing model 1 and image processing model 2, and the images to be processed include image 1, image 2, and image 3. Then, the matching degree between image processing model 1 and image 1 is determined to be a1, the matching degree between image processing model 2 and image 1 is b1, the matching degree between image processing model 1 and image 2 is a2, the matching degree between image processing model 2 and image 2 is b2, the matching degree between image processing model 1 and image 3 is a3, and the matching degree between image processing model 2 and image 3 is b3. If a1<b1, a2<b2, b3<a3, then when three images are batch processed by two image processing models, image 1 is processed by image processing model 2 corresponding to b1, image 2 is processed by image processing model 2 corresponding to b2, and image 3 is processed by image processing model 1 corresponding to a3.
[0096] Through the above method, when batch processing is performed on multiple images, the most matching image processing model corresponding to each image is used to process the corresponding image, which not only improves the image processing efficiency, but also improves the accuracy of image processing.
[0097] In some embodiments, the terminal can batch process at least two images through a selected image processing model in the following manner: display a model selection entrance at an associated position of each image, wherein one image corresponds to one model selection entrance; determine a selected image processing model corresponding to each image in response to a model selection operation triggered based on the model selection entrance; and perform image processing on the corresponding images through the selected image processing model corresponding to each image.
[0098] See also Figure 7 , Figure 7It is a schematic diagram of the interface for image processing provided in an embodiment of the present application. For multiple images to be processed displayed in an online editor, a model selection entry corresponding to each image can be displayed, that is, one image corresponds to a model selection entry, and an image processing model is selected for the corresponding image through each model selection entry. For example, in response to a trigger operation on image 1, an interface for image processing for image 1 is displayed, and a model selection entry 701 corresponding to image 1 is displayed in the interface. In response to a trigger operation on model selection entry 701, multiple image processing models associated with the online editor are displayed. These multiple image processing models can be all image processing models associated with the online editor, or they can be selected from all processing models and have a matching degree with image 1 exceeding a matching degree threshold. For the convenience of users in selecting the image processing model that best suits image 1, different display styles (such as different display orders, different display colors, different display brightness, different display text prompts, etc.) can be used to display each image processing model according to the different matching degrees between each image processing model and image 1. When the user selects an image processing model, the terminal responds to the model selection operation and uses the selected image processing model as the image processing model corresponding to image 1. Based on the same method, corresponding image processing models can be selected one by one for other images to be processed. After determining the image processing models corresponding to all images to be processed, the corresponding images can be processed by the selected image processing models corresponding to each image.
[0099] In practical applications, since the application scenarios of the same batch of images to be processed are often the same or similar, after the user selects an image processing model for the first image (such as image 1 mentioned above), the terminal automatically matches the scenes of the remaining images with the first image, and when the scenes match, the terminal automatically uses the image processing model selected for the first image (such as image 1 mentioned above) as the image processing model corresponding to the remaining images. The user does not need to manually select image processing models for the remaining images one by one. This not only ensures that the image processing model of each image meets user needs and improves the targeted image processing, but also improves image processing efficiency by shortening the image processing model selection process.
[0100] In some embodiments, the terminal may perform batch processing on at least two images through an image processing model associated with an online editor in the following manner: in response to the number of image processing models associated with the online editor being multiple, batch processing is performed on at least two images through a combined image processing model; wherein the combined image processing model is determined in the following manner: the image processing models associated with the online editor are combined; the features of multiple candidate combined image processing models are used to call a second machine learning model to calculate the usage probability of each candidate combined image processing model, and the candidate combined image processing model with the maximum usage probability is selected; wherein the second machine learning model is trained in the following manner: the second machine learning model is called to predict based on the features of multiple combined image processing model samples to obtain the probability of each combined image processing model sample, and back propagation is performed based on the difference between the probability of each combined image processing model sample and the actual selected result label to update the parameters of the second machine learning model.
[0101] In practical applications, when an online editor is associated with multiple image processing models, the image processing model ultimately used for batch processing of images may be a combination of multiple image processing models associated with the online editor. For example, several image processing models with different characteristics and advantages may be selected. These models may have better processing capabilities for different image types (such as portraits, natural scenes, etc.) or different background types (such as complex backgrounds, simple backgrounds, etc.). The selected image processing models are combined to obtain a combined image processing model, and the images are processed in batches through the combined image processing model, so as to combine the advantages of different image processing models to improve the overall image processing quality and accuracy.
[0102] In addition, multiple image processing models associated with the online editor can be combined in a permutation and combination manner to obtain multiple candidate combined image processing models, and the characteristics of each candidate combined image processing model (such as applicable image type, model volume, operation speed, processing effect, etc.) can be obtained, and the second machine learning model can be called to calculate the usage probability of each candidate combined image processing model, and the candidate combined image processing model with the maximum usage probability can be selected as the final combined image processing model for batch processing of multiple images. Among them, the second machine learning model is trained in the following manner: based on the features of multiple combined image processing model samples, the second machine learning model is called to predict to obtain the probability of each combined image processing model sample, and back propagation is performed based on the difference between the probability of each combined image processing model sample and the actual selection result label (such as 1 for selection and 0 for not used) to update the parameters of the second machine learning model. For example, after determining the value of the loss function of the second machine learning model based on the difference between the predicted probability of each combined image processing model sample and the actual selection result label (such as 1 for selection and 0 for not used), it can be determined whether the value of the loss function exceeds the preset threshold. When the value of the loss function exceeds the preset threshold, the error signal of the second machine learning model is determined based on the loss function, the error signal is back propagated in the second machine learning model, and the parameters of each layer are updated during the propagation process.
[0103] In some embodiments, the terminal can batch process at least two images through a combined image processing model in the following manner: perform the following operations for each image: perform image processing on the image through each image processing model in the combined image processing model, and obtain sub-processing results for the image by each image processing model in the combined image processing model; accordingly, the terminal can output the image processing results obtained for each image by the following manner: fuse the sub-processing results for the image by each image processing model in the combined image processing model, and output the fused result as the image processing result obtained by processing the image by the combined image processing model.
[0104] Here, when batch processing is performed on multiple images through a combined image model, the processing process for each image is consistent. Here, the processing of an image through a combined image model is taken as an example to illustrate. The image is processed by each image processing model in the combined image model to obtain a sub-processing result of each image processing model for the image. Then, the sub-processing results of each image processing model for the image are fused, and the fusion result is used as the image processing result obtained by processing the image with the combined image processing model.
[0105] Among them, there are many ways to fuse the sub-processing results of each image processing model for an image, such as voting on the sub-processing results of each pixel of the image, and selecting the sub-processing result with the largest number of occurrences as the final fusion result; for example, assigning a weight to each sub-processing result, performing weighted summation on each sub-processing result based on the weight, and taking the weighted summation result as the fusion result; for example, an additional neural network can be used to learn how to combine different sub-processing results, and a deep learning model can be used to fuse multiple sub-processing results to obtain a fusion result; after obtaining the fusion result, the fusion result can also be post-processed according to actual needs (such as edge smoothing and filling small holes) to optimize the final image processing result.
[0106] By combining multiple image processing models in the above manner and taking into account the advantages of different image processing models, the quality and accuracy of the overall image processing can be improved.
[0107] In some embodiments, the terminal may perform batch processing on at least two images through an image processing model associated with an online editor in the following manner: obtaining an influencing factor affecting the processing priority of each image, the influencing factor including at least one of the following: type, application scenario, resolution, legitimacy detection result of the image, and repeatability detection result of the image; based on the influencing factor, determining the processing priority of each image through prediction by a third machine learning model; wherein the third machine learning model is trained based on the influencing factor of the image sample and the priority of the image sample annotation; based on the processing priority, screening out a target number of images from at least two images, and performing batch processing on the target number of images through the image processing model associated with the online editor.
[0108] In actual applications, after the user selects multiple images to be processed, when the terminal processes these multiple images to be processed in batches through the image processing model, the processing priorities corresponding to different images are different. The terminal obtains the influencing factors that affect the processing priority of each image, wherein the influencing factors include at least one of the following: type (such as whether it contains a complex background, whether it is a person image or a commodity image, etc.), application scenario (such as a live dynamic scene or a static scene), resolution, image legitimacy detection results (used to indicate whether there is sensitive or illegal information in the image, and filter out images with sensitive or illegal information), image repeatability detection results (i.e., whether there are repeated images or images with a repetition rate greater than the repetition rate threshold among the multiple images selected by the user, and for images with repeated images or images with a repetition rate greater than the repetition rate threshold, select a good quality image for subsequent processing). After determining the influencing factors that affect the processing priority of each image, the third machine learning model is used to predict and determine the processing priority of each image, and a target number of images with higher processing priority are screened out from the multiple images to be processed selected by the user, so as to perform batch processing on the screened target number of images.
[0109] Through the above manner, a target number of images with higher processing priorities are screened out from a plurality of to-be-processed images selected by a user for subsequent batch processing, thereby further improving the image processing efficiency.
[0110] In some embodiments, when the image processing model is used to perform cutout processing on an image, the terminal can batch process at least two images through the image processing model associated with the online editor in the following manner: perform the following operations on each image through the image processing model associated with the online editor: perform mask prediction on the image through the image processing model to obtain a mask image of the image, and the background portion of the mask image is transparent; synthesize the image (i.e., the original image) and the mask image, and use the synthesized result as the image processing result obtained by processing the image.
[0111] Here, when the image processing model is used to perform a matting process on an image, the image processing model can be used to perform batch matting processing on multiple images. Specifically, the image processing model performs mask prediction on each image to obtain a mask image for each image, wherein the mask image is a grayscale image that identifies the transparency information of the foreground and background parts. Usually, the transparency of the foreground and background parts in the mask image is different. For example, the foreground part in the mask image is usually white or close to white, indicating opacity, and the background part is black or close to black, indicating transparency. After obtaining the mask image of each image, the original image and the corresponding mask image are synthesized according to the transparency information of the mask image, and the synthesized result is used as the image processing result, that is, the synthesized result is the final matting image.
[0112] See also Figure 8 , Figure 8 This is a schematic diagram of the image processing results provided in an embodiment of the present application. After the user imports the image 1 and image 2 to be processed into the online editor, the image 1 and image 2 with the background are batch-cut out through the image processing model, and the corresponding cutout results are output, thereby improving the image processing efficiency.
[0113] Image cutouts are widely used. For example, in e-commerce, online retailers often use cutout technology to remove the background of product images, making it easier to highlight products. This can create a unified product display page and improve the customer's shopping experience. In advertising design, cutouts can be used to place product images on different backgrounds or combine multiple product images together to create eye-catching visual effects. When users share images on social media, they may use cutout applications to remove unwanted background elements and keep only the main foreground content. In VR and AR applications, cutout technology can be used to blend real-world people or objects into virtual environments. In game development, cutouts can be used to create seamless background stitching or dynamically insert or remove characters and objects in game scenes. In film and television production, cutout technology is used to place actors or scene elements on different backgrounds to achieve scene replacement or special effects synthesis. In educational materials, teachers may use cutout technology to create clear images to more effectively convey information in presentations or teaching materials. Individual users may use mobile apps or online services to quickly remove cluttered backgrounds from photos to improve the appearance of photos. In autonomous driving technology, image cutout can be used to identify and separate elements such as vehicles and pedestrians from real-time images captured by cameras. With the continuous advancement of technology, cutout technology is becoming more and more automated and accurate, thus playing an increasingly important role in various fields.
[0114] In some embodiments, the terminal may perform mask prediction on an image through an image processing model to obtain a mask image of the image in the following manner: downsample the image through the image processing model to obtain a downsampled image; perform semantic feature extraction on the downsampled image to obtain semantic features of the image, and perform detail feature extraction on the image based on the semantic features to obtain detail features of the image; fuse the semantic features and detail features to obtain fused features, and perform mask prediction based on the fused features to obtain a mask image of the image.
[0115] In practical applications, when the image processing model is used to perform matting processing on an image, the image processing model includes a semantic estimation layer, a detail prediction layer, and a fusion layer, and the architecture is used to achieve high-quality foreground and background separation. Among them, the semantic estimation layer operates on the low-resolution branch. The low-resolution branch is a path in the network, which processes the low-resolution version of the image. The purpose of this branch is to capture the global semantic information of the image, that is, to identify the general content and structure in the image, rather than specific details. In the low-resolution branch, the image is downsampled by the semantic estimation layer (which can be a deep convolutional network that can capture the global information of the image) to obtain a downsampled image, reduce the size of the image, thereby reducing the amount of calculation and extracting more abstract semantic features; then the downsampled image is semantically estimated to obtain the semantic features of the image. Subsequently, the enhanced atrous spatial pyramid pooling (e-ASPP) can be used to further process the semantic features and enhance their semantic representation. e-ASPP increases the receptive field through atrous convolutions of different sizes to help the model recognize more complex semantic information.
[0116] The detail prediction layer operates on the high-resolution branch, which is another path in the network that processes a high-resolution version of the image. This branch focuses on capturing local detail information of the image and can identify small features and textures in the image. In the high-resolution branch, the image remains at its original size or is only slightly scaled to preserve details. This branch usually involves more complex processing, such as sophisticated convolution operations and feature extraction. The implementation method is that the detail prediction layer generates detail features by fusing low-resolution semantic features from the semantic estimation layer. This fusion is usually done by concatenating or adding elements of the features. Since the high-resolution branch can directly process the detail information of the image, the detail prediction layer can better preserve the foreground details of the image.
[0117] The fusion layer is used to fuse the outputs of the semantic estimation layer and the detail prediction layer to obtain the final mask image. The implementation method is that the fusion layer fuses the semantic features and the detail features, usually through a decoder or a specific fusion layer. The fused features obtained after fusion are sent to an output layer, which is responsible for generating mask prediction, that is, predicting a mask image representing the foreground and background transparency information; in addition, the mask image can also be post-processed, such as binarization, denoising, etc., to obtain the final mask image (i.e., foreground mask).
[0118] It should be noted that the low-resolution branch and the high-resolution branch usually work in parallel, each capturing information at different scales. In the above way, after obtaining the mask image, the mask image can be synthesized with the original image to obtain a cutout result with the foreground and background separated. This structure allows the image processing model to capture and process image information at different scales, while integrating semantic and detail information, thereby achieving good results in the image cutout task.
[0119] In some embodiments, when the image processing model is used to classify images, the terminal can batch process at least two images through the image processing model associated with the online editor in the following manner: in response to the number of image processing models associated with the online editor being multiple, each image is classified through each image processing model to obtain the category to which the image belongs and the probability of the category; the category corresponding to the maximum probability is selected as the image processing result obtained for processing each image.
[0120] In practical applications, when image processing is image classification, image classification is widely used. For example, social media platforms use image classification to filter and identify inappropriate content, such as violent or hateful images, to maintain community safety and compliance. E-commerce platforms use image classification to automatically classify and label product images to facilitate user search and recommendation systems to provide more accurate product recommendations. In the medical field, image classification can be used to analyze medical images such as X-rays and MRI scans to assist in the diagnosis of diseases. Self-driving cars use image classification technology to identify vehicles, pedestrians, traffic signs and lights on the road to make driving decisions. In security and authentication systems, image classification can be used to identify and verify personal identities. Image classification in games can be used to identify and classify game assets, such as characters, props, and environmental elements.
[0121] When an image processing model is used to classify images, when batch classification processing is performed on multiple images through the image processing model associated with an online editor, if there are multiple image processing models associated with the online editor, each image is classified through each image processing model to obtain the category to which the image belongs and the probability of the category; the category corresponding to the maximum probability is selected as the image processing result obtained for each image to improve the accuracy of image classification.
[0122] In some embodiments, the terminal may perform batch processing on at least two images through an image processing model associated with an online editor in the following manner: in response to the image processing model associated with the online editor being used to perform image restoration processing, batch image restoration processing is performed on at least two images through the image processing model; in response to the image processing model associated with the online editor being used to perform style conversion processing on images, batch style conversion processing is performed on at least two images through the image processing model.
[0123] In practical applications, when image processing is image restoration, at least two images are restored in batches through the image processing model (a model for image restoration) associated with the online editor. Image restoration refers to restoring the original image from a degraded image, including deblurring, denoising, color correction, etc. The application scenarios of image restoration are also relatively wide. For example, photographers and image editors use image restoration technology to repair old photos, eliminate noise, and correct overexposure or underexposure to restore the original appearance of the image. In the medical field, image restoration can be used to improve the quality of images such as X-rays and MRI scans, making them clearer, thereby helping doctors make more accurate diagnoses. In video detection systems, image restoration can be used to remove blur and blur in images captured by cameras and improve the clarity of detection images.
[0124] When the image processing is style transfer processing, the image is style transferred by the image processing model (used to implement image style transfer) associated with the online editor to apply the style of one image to another image to create a new visual effect. The application scenarios of this technology are very wide. For example, artists and designers can use image style transfer technology to create novel works of art, apply the style of classic paintings to their own works, or convert modern photos into paintings with classical art styles; photographers can use image style transfer technology in post-processing to add specific artistic effects to photos and enhance the visual effects of their works; social media users like to use various filters and effects to beautify their photos; advertising designers can use image style transfer technology to create eye-catching posters and advertising images to increase the appeal of products; in VR and AR applications, image style transfer can be used to change the user's visual experience, for example, convert the surrounding environment into an artistic style to provide an immersive artistic experience; game designers can use image style transfer technology to add unique artistic styles to game characters and environments to create personalized gaming experiences; in the field of education, image style transfer can be used to create teaching materials, for example, convert historical images into versions with different artistic styles to help students better understand historical periods and cultural backgrounds.
[0125] In some embodiments, the terminal can batch process at least two images through the image processing model associated with the online editor in the following manner: in response to the online editor being associated with an accelerator, batch process at least two images through the image processing model associated with the online editor and the accelerator; wherein the efficiency of batch processing at least two images through the accelerator is higher than the efficiency of batch processing at least two images without the accelerator. Here, the image processing efficiency can be further improved by using the accelerator.
[0126] In some embodiments, the terminal may perform batch processing on at least two images through an image processing model associated with an online editor in the following manner: perform permission verification on the current account, and when the verification result indicates that the current account has permission to process at least two images, perform batch processing on at least two images through the image processing model associated with the online editor.
[0127] Here, each image can be preset with processing permissions, and only users with permissions can process the corresponding image. Especially in application scenarios where multiple people are editing online, this can improve the security and pertinence of collaborative processing.
[0128] Below, an exemplary application of the embodiment of the present application in an actual application scenario will be described. Taking the use of an image processing model for image cutout as an example, the embodiment of the present application uses Transformers.js to build a single, batch WYSIWYG online editing cutout tool in the browser based on ONNX RuntimeWeb using the MODNet model or the RMBG-1.4 model, and cooperates with the Puppeteer framework API and node-schedule to perform batch cutout tasks to solve the problem of large workload, cumbersome process, and high probability of error in manual cutout and configuration.
[0129] The image processing method provided in the embodiment of the present application can be used by B-end users (enterprises, businesses and other organizations), C-end users (individual consumers) and administrators. The image processing method provided in the embodiment of the present application will be described below from the user and administrator sides respectively.
[0130] Take the image processing method provided by the embodiment of the present application as an example, see Fig. 9 , Fig. 9 : is a schematic diagram of an image processing flow provided by an embodiment of the present application, the method comprising:
[0131] Step 201: The terminal loads the online editor in the browser.
[0132] In actual applications, before processing images through a browser, you need to configure the browser environment first. For example, when building a visual image processing application in a browser, you need to build a browser interface (i.e., a Web interface) to allow users to upload images through the Web interface and view the image processing results in real time. When creating a Web project, you can use HTML, CSS, and JavaScript (or frameworks such as React, Vue, etc.) to create a Web project, and introduce the Transformers.js and ONNX Runtime Web libraries in the Web project, and use Transformers.js to load the corresponding image processing model, such as the MODNet model or the RMBG-1.4 model; in addition, you also need to create an interface in the project that allows users to upload images, such as building an image addition entry.
[0133] When a B-end user or a C-end user browses an image through a browser and needs to perform cutout processing on the image, an online editor can be loaded in the browser of the terminal. Loading the online editor is to load the Transformers framework, wherein the online editor is associated with the above-constructed image addition entry and image processing model.
[0134] Step 202: In response to an image adding operation triggered by an image adding entry, an image is added to the online editor.
[0135] Here, users can add one or more images at a time to the online editor.
[0136] Step 203: In response to the batch processing operation, load the image processing model associated with the online editor.
[0137] Here, a batch processing control is built in the online editor. When the user selects one by one or selects multiple images with one click from the images imported from the online editor, the batch processing control can be triggered to trigger the batch processing operation. In response to the batch processing operation, the terminal automatically loads the image processing model associated with the online editor.
[0138] Step 204: batch cutout processing is performed on multiple images through an image processing model.
[0139] Here, the essence of performing image clipping processing is to render the image. Because the graphics processing unit (GPU) can usually provide higher performance than the CPU when it comes to image rendering tasks, the terminal transfers the computing task from the CPU to the GPU for execution, that is, the rendering is set to GPU rendering. When based on GPU rendering, batch clipping processing is performed on multiple images through the image processing model associated with the online editor.
[0140] Step 205: Output the cutout results corresponding to each image.
[0141] Here, after the batch cutout processing of multiple images is completed through the image processing model, the cutout results corresponding to each image can be output and displayed.
[0142] Through the above method, users do not need to download or install any software, they only need to open the browser to access the online editor to perform image clipping processing, which improves image processing efficiency.
[0143] Take the image processing method provided by the embodiment of the present application as an example, see Fig.10 , Fig.10 : is a schematic diagram of an image processing flow provided by an embodiment of the present application, the method comprising:
[0144] Step 301: The terminal detects a scheduled task, and when the execution time specified by the scheduled task arrives, obtains a plurality of images to be processed and accesses a web page controller.
[0145] Here, in order to improve the automation of image processing, when creating a batch processing script, the administrator can write a script that uses a web controller (such as Puppeteer), which will automatically open the browser, load the online cutout application and perform the cutout operation; when setting the task scheduling, the node-schedule library can be used to set the scheduled task. When the execution time indicated by the scheduled task arrives, multiple images to be processed are obtained, and the browser is opened through the web controller, such as by accessing Puppeteer to open the browser, so as to implement scheduled batch cutout in Puppeteer.
[0146] Step 302: Load the online editor in the web page controller.
[0147] Here, a browser is opened in a script based on a web controller (such as Puppeteer) and the online editor is loaded, that is, the Transformers framework is loaded.
[0148] Step 303: In response to the image adding operation triggered by the image adding entry, add the image to the online editor.
[0149] Here, the administrator can add one or more images at a time to the online editor.
[0150] Step 304: In response to the batch processing operation, load the image processing model associated with the online editor.
[0151] Here, a batch processing control is built in the online editor. When the administrator selects multiple images from the images imported in the online editor, the batch processing control can be triggered to trigger the batch processing operation. In response to the batch processing operation, the terminal automatically loads the image processing model associated with the online editor.
[0152] Step 305: batch cutout processing is performed on multiple images through an image processing model.
[0153] Here, the actual processing of image matting is image rendering. Since GPU can usually provide higher performance than CPU when it comes to image rendering tasks, the computing task is transferred from CPU to GPU for execution, that is, rendering is set to GPU rendering. When rendering based on GPU, batch matting of multiple images is performed through the image processing model associated with the browser.
[0154] Step 306: Output the cutout results corresponding to each image.
[0155] Here, after the batch cutout processing of multiple images is completed through the image processing model, the cutout results corresponding to each image can be output and displayed.
[0156] Through the above method, the administrator opens the browser through the web controller (such as Puppeteer) to realize batch image clipping processing and improve image processing efficiency.
[0157] Next, the image cutout process in the above steps 205 and 306 is described. Fig.11 , Fig.11 : is a schematic diagram of a process of cutting out a picture provided by an embodiment of the present application, the method comprising:
[0158] Step 401: The image processor loads the original image.
[0159] Here, the image processor loads the corresponding image according to the image URL.
[0160] Step 402: pre-process the original image.
[0161] Here, before the original image is cut out, at least one of the preprocessing steps of resizing, cropping, denoising, contrast enhancement, etc. may be performed on the original image to reduce noise, improve image quality, and highlight the boundary between the foreground and the background, thereby achieving the purpose of improving the accuracy and efficiency of the cut out.
[0162] Step 403: Perform mask prediction on the original image through the image processing model to obtain a mask image.
[0163] The transparency of the foreground part and the background part in the mask image is different, and the background part is usually transparent.
[0164] Step 404: resize the mask image.
[0165] Here, the mask is resized to the same size as the original image.
[0166] Step 405: synthesize the original image and the mask image to obtain a synthesized image.
[0167] Here, the original image and the mask image are synthesized to obtain a synthesized image, and the synthesized image is used as a matting result obtained by matting the original image.
[0168] Through the above method, at least two images are added to the online editor through the image adding entry provided by the online editor, and when the batch processing conditions are met, at least two images are batch processed through the image processing model associated with the online editor, and the image processing results obtained by processing each image are output; in this way, since the online editor provides an intuitive user interface and simplifies the operation process, users without professional image processing knowledge can also easily perform batch processing, and batch processing of the images to be processed is performed through the online editor, thereby improving the image processing efficiency.
[0169] So far, the image processing method provided by the embodiment of the present application has been described in combination with the exemplary application and implementation of the electronic device provided by the embodiment of the present application. The following will continue to describe the cooperation of various modules in the image processing device 555 provided by the embodiment of the present application to implement the image processing solution.
[0170] A loading module 5551 is used to load an online editor in a browser, wherein the online editor includes an image adding entry; an adding module 5552 is used to add at least two images to the online editor in response to an image adding operation triggered based on the image adding entry; a processing module 5553 is used to batch process the at least two images through an image processing model associated with the online editor in response to meeting a batch processing condition, and output an image processing result obtained by processing each of the images.
[0171] In some embodiments, before the at least two images are batch processed by the image processing model associated with the online editor, the device also includes: a determination module for determining that a batch processing condition is satisfied in response to a trigger operation on a batch processing control in the online editor; or, in response to a scheduled task for batch processing being associated with the online editor, determining that the batch processing condition is satisfied when the execution time specified by the scheduled task is reached; or, in response to the number of images added to the online editor reaching a quantity threshold, determining that the batch processing condition is satisfied.
[0172] In some embodiments, the processing module is also used to display a model selection entry in the online editor; in response to a trigger operation on the model selection entry, display multiple image processing models associated with the online editor; in response to the model selection operation, batch process the at least two images through the selected image processing model.
[0173] In some embodiments, the processing module is also used to determine the degree of matching between each selected image processing model and each image in response to the number of selected image processing models being multiple; based on the degree of matching, determine the image processing model with the maximum matching degree corresponding to each image; and perform image processing on the corresponding image using the image processing model with the maximum matching degree corresponding to each image.
[0174] In some embodiments, the processing module is further used to display a model selection entry corresponding to each of the images, wherein one image corresponds to one model selection entry;
[0175] In response to the model selection operation triggered by the model selection entry, the selected image processing model corresponding to each of the images is determined; and image processing is performed on the corresponding image through the selected image processing model corresponding to each of the images.
[0176] In some embodiments, the processing module is also used to determine the degree of matching between each image processing model and each image in response to the online editor being associated with multiple image processing models; based on the degree of matching, determine the image processing model with the maximum matching degree corresponding to each image; and perform image processing on the corresponding image through the image processing model with the maximum matching degree corresponding to each image.
[0177] In some embodiments, the processing module is also used to determine influencing parameters that affect the degree of match between the image processing model and the image, wherein the influencing parameters include at least one of the following: the similarity between the image features of the image and the model features of the image processing model, and the evaluation index of the processing result of the image processing model for the image, and the evaluation index includes at least one of the following: precision and recall rate; based on the influencing parameters, the degree of match between each image processing model and each image is predicted by a first machine learning model; wherein the first machine learning model is trained based on the influencing parameters of sample pairs and the labels annotated with the sample pairs, and the sample pairs include image processing model samples and image samples.
[0178] In some embodiments, the processing module is also used to batch process the at least two images by combining image processing models in response to the number of image processing models associated with the online editor being multiple; wherein the combined image processing model is determined in the following manner: the image processing models associated with the online editor are combined; the features of multiple candidate combined image processing models are used to call a second machine learning model to calculate the usage probability of each candidate combined image processing model, and the candidate combined image processing model with the maximum usage probability is selected; wherein the second machine learning model is trained in the following manner: the second machine learning model is called to predict based on the features of multiple combined image processing model samples to obtain the probability of each combined image processing model sample, and back propagation is performed based on the difference between the probability of each combined image processing model sample and the actual selected result label to update the parameters of the second machine learning model.
[0179] In some embodiments, the processing module is also used to perform the following operations for each of the images: performing image processing on the image by combining each image processing model in the image processing model to obtain a sub-processing result of the image by each image processing model in the combined image processing model; fusing the sub-processing results of the image by each image processing model in the combined image processing model, and outputting the fusion result as the image processing result obtained by processing the image by the combined image processing model.
[0180] In some embodiments, the processing module is also used to obtain an influencing factor that affects the processing priority of each of the images, and the influencing factor includes at least one of the following: resolution, a legitimacy detection result of the image, and a repeatability detection result of the image; based on the influencing factor, a third machine learning model is used to predict and determine the processing priority of each of the images; wherein the third machine learning model is trained based on the influencing factor of the image sample and the priority of the image sample annotation; based on the processing priority, a target number of images are screened out from the at least two images, and the target number of images are batch processed through the image processing model associated with the online editor.
[0181] In some embodiments, the image processing model is used to perform cutout processing on the image, and the processing module is also used to perform the following operations on each of the images through the image processing model associated with the online editor: perform mask prediction on the image through the image processing model to obtain a mask image of the image, and the background portion of the mask image is transparent; synthesize the image and the mask image, and use the synthesized result as the image processing result obtained by processing the image.
[0182] In some embodiments, the processing module is also used to downsample the image through the image processing model to obtain a downsampled image; perform semantic feature extraction on the downsampled image to obtain semantic features of the image, and perform detail feature extraction on the image based on the semantic features to obtain detail features of the image; fuse the semantic features and the detail features to obtain fused features, and perform mask prediction based on the fused features to obtain a mask image of the image.
[0183] In some embodiments, the image processing model is used to classify the images, and the processing module is also used to, in response to the number of image processing models associated with the online editor being multiple, classify each of the images through each of the image processing models to obtain the category to which the image belongs and the probability of the category; and select the category corresponding to the maximum probability as the image processing result obtained by processing each of the images.
[0184] In some embodiments, the processing module is also used to perform restoration processing on the image in response to the image processing model associated with the online editor, and perform batch image restoration processing on the at least two images through the image processing model; and perform style conversion processing on the image in response to the image processing model associated with the online editor, and perform batch style conversion processing on the at least two images through the image processing model.
[0185] In some embodiments, the processing module is also used to, in response to the online editor being associated with an accelerator, batch process the at least two images through the image processing model associated with the online editor and the accelerator; wherein the efficiency of batch processing the at least two images through the accelerator is higher than the efficiency of batch processing the at least two images without the accelerator.
[0186] In some embodiments, the processing module is also used to verify the permissions of the current account, and when the verification result indicates that the current account has the processing permissions for the at least two images, the at least two images are batch processed through the image processing model associated with the online editor.
[0187] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer-readable storage medium. The processor of the electronic device reads the computer executable instruction from the computer-readable storage medium, and the processor executes the computer executable instruction, so that the electronic device performs the above-mentioned image processing method of the embodiment of the present application.
[0188] The present application embodiment provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions or computer programs are stored. When the computer-executable instructions or computer programs are executed by a processor, the processor will be caused to execute the image processing method provided by the present application embodiment, for example, Figure 3 The image processing method is shown.
[0189] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.
[0190] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0191] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0192] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0193] In the above manner, batch processing of images through the online editor in the browser has at least the following beneficial effects: 1) Convenience: Users do not need to download or install any software, they only need to open the browser to access the online editor for batch processing of images; 2) Cross-platform compatibility: Online editors can usually run on different operating systems and devices, whether the operating system is a desktop device such as Windows, macOS, Linux or a mobile device such as Android, iOS, etc., as long as there is browser support, the online editor in the browser can be used to batch process images; 3) Easy to share and collaborate: The online editor can be easily shared with team members or friends, and multiple people can edit and process images at the same time, which improves collaboration. 4) Low threshold and high efficiency: The online editor provides an intuitive user interface and simple operation process, so that users without professional image processing knowledge can also easily perform batch processing; batch processing of images through the image batch processing function provided by the online editor can save a lot of time and improve image processing efficiency; 5) High image processing accuracy: The image processing model integrated in the online editor can be quickly updated and iteratively optimized, and the image batch processing is improved through the latest functions to improve the image processing effect; 6) Save storage space and cost: Since image processing is performed in the browser or server, the user's local storage space will not be reduced due to downloading and installing software, and the cost is reduced because there is no need to purchase or upgrade local image processing software. In short, batch processing of images through the online editor in the browser provides flexibility, efficiency and convenience, while also reducing technical barriers and costs, and is suitable for the needs of the majority of users.
[0194] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. An image processing method, characterized in that: The method comprises: Loading an online editor in a browser, wherein the online editor includes an image adding entry; In response to an image adding operation triggered based on the image adding entry, adding at least two images to the online editor; In response to satisfying the batch processing condition, the at least two images are batch processed by the image processing model associated with the online editor, and image processing results obtained by processing each of the images are output.
2. The method according to claim 1, characterized in that Before batch processing the at least two images using the image processing model associated with the online editor, the method further includes: In response to a trigger operation on a batch processing control in the online editor, determining that a batch processing condition is satisfied; or, In response to the online editor being associated with a scheduled task for batch processing, when the execution time specified by the scheduled task is reached, determining that a batch processing condition is satisfied; or, In response to the number of the images added to the online editor reaching a number threshold, it is determined that a batch processing condition is satisfied.
3. The method according to claim 1, characterized in that: The batch processing of the at least two images by using the image processing model associated with the online editor includes: A model selection entry is displayed in the online editor; In response to a trigger operation on the model selection entry, displaying a plurality of image processing models associated with the online editor; In response to the model selection operation, the at least two images are batch processed by the selected image processing model.
4. The method according to claim 3, characterized in that The batch processing of the at least two images by using the selected image processing model includes: In response to the number of selected image processing models being multiple, determining a degree of matching between each of the selected image processing models and each of the images; Based on the matching degree, determining the image processing model with the maximum matching degree corresponding to each of the images; The corresponding images are processed by using the image processing model with the maximum matching degree corresponding to each of the images.
5. The method according to claim 1, characterized in that The batch processing of the at least two images by using the image processing model associated with the online editor includes: Displaying the model selection entrance corresponding to each of the images, wherein one image corresponds to one model selection entrance; In response to a model selection operation triggered by the model selection entry, determining a selected image processing model corresponding to each of the images; The corresponding image is processed by using the selected image processing model corresponding to each of the images.
6. The method according to claim 1, characterized in that The batch processing of the at least two images by using the image processing model associated with the online editor includes: In response to the online editor being associated with a plurality of image processing models, determining a degree of matching between each of the image processing models and each of the images; Based on the matching degree, determining the image processing model with the maximum matching degree corresponding to each of the images; The corresponding images are processed by using the image processing model with the maximum matching degree corresponding to each of the images.
7. The method according to claim 6, characterized in that The determining the matching degree between each of the image processing models and each of the images comprises: Determining an influencing parameter for influencing the matching degree between the image processing model and the image, wherein the influencing parameter comprises at least one of the following: similarity between image features of the image and model features of the image processing model, and an evaluation index of a processing result of the image processing model for the image, wherein the evaluation index comprises at least one of the following: precision and recall rate; Based on the influencing parameters, a first machine learning model is used to predict the degree of match between each image processing model and each image; wherein the first machine learning model is trained based on the influencing parameters of sample pairs and labels annotated with the sample pairs, and the sample pairs include image processing model samples and image samples.
8. The method according to claim 1, characterized in that The batch processing of the at least two images by using the image processing model associated with the online editor includes: In response to the number of image processing models associated with the online editor being multiple, batch processing is performed on the at least two images by combining the image processing models; wherein the combined image processing model is determined in the following manner: Combining the image processing models associated with the online editor to obtain; The features of multiple candidate combined image processing models are used to call a second machine learning model to calculate the use probability of each candidate combined image processing model, and the candidate combined image processing model with the maximum use probability is selected; wherein the second machine learning model is trained in the following manner: Based on the features of multiple combined image processing model samples, the second machine learning model is called to predict to obtain the probability of each combined image processing model sample, and back propagation is performed based on the difference between the probability of each combined image processing model sample and the actual selected result label to update the parameters of the second machine learning model.
9. The method according to claim 8, characterized in that The batch processing of the at least two images by combining the image processing model comprises: For each of the images, perform the following operations: By combining each image processing model in the image processing model, performing image processing on the image, and obtaining a sub-processing result of each image processing model in the combined image processing model for the image; The output of the image processing results obtained by processing each of the images includes: The sub-processing results of each image processing model in the combined image processing model for the image are fused, and the fusion result is output as the image processing result obtained by the combined image processing model for processing the image.
10. The method according to claim 1, characterized in that The batch processing of the at least two images by using the image processing model associated with the online editor includes: Acquire an influencing factor for influencing the processing priority of each of the images, the influencing factor comprising at least one of the following: type, application scenario, resolution, a legitimacy detection result of the image, and a repeatability detection result of the image; Based on the influencing factors, a processing priority of each of the images is determined by prediction using a third machine learning model; wherein the third machine learning model is trained based on the influencing factors of the image samples and the priorities of the image sample annotations; Based on the processing priority, a target number of images are screened out from the at least two images, and the target number of images are processed in batches through an image processing model associated with the online editor.
11. The method according to claim 1, characterized in that: The image processing model is used to perform cutout processing on the image, and the image processing model associated with the online editor performs batch processing on the at least two images, including: The following operations are performed on each of the images through the image processing model associated with the online editor: Performing mask prediction on the image through the image processing model to obtain a mask image of the image, wherein the background portion of the mask image is transparent; The image and the mask image are synthesized, and a synthesis result is used as an image processing result obtained by processing the image.
12. The method according to claim 11, characterized in that The step of performing mask prediction on the image by using the image processing model to obtain a mask image of the image includes: Down-sampling the image by using the image processing model to obtain a down-sampled image; Extracting semantic features from the downsampled image to obtain semantic features of the image, and extracting detail features from the image based on the semantic features to obtain detail features of the image; The semantic features and the detail features are fused to obtain fused features, and mask prediction is performed based on the fused features to obtain a mask image of the image.
13. The method according to claim 1, characterized in that The image processing model is used to classify the images, and the image processing model associated with the online editor performs batch processing on the at least two images, including: In response to the number of image processing models associated with the online editor being multiple, classifying each of the images using each of the image processing models to obtain a category to which the image belongs and a probability of the category; The category corresponding to the maximum probability is selected as the image processing result obtained by processing each of the images.
14. The method according to claim 1, characterized in that The batch processing of the at least two images by using the image processing model associated with the online editor includes: In response to the image processing model associated with the online editor being used to perform restoration processing on the image, performing batch image restoration processing on the at least two images through the image processing model; In response to the image processing model associated with the online editor being used to perform style conversion processing on the image, batch style conversion processing is performed on the at least two images through the image processing model.
15. The method according to claim 1, characterized in that The batch processing of the at least two images by using the image processing model associated with the online editor includes: In response to the online editor being associated with an accelerator, batch processing is performed on the at least two images by using an image processing model associated with the online editor and the accelerator; The efficiency of batch processing of the at least two images by the accelerator is higher than the efficiency of batch processing of the at least two images without the accelerator.
16. The method according to claim 1, characterized in that The batch processing of the at least two images by using the image processing model associated with the online editor includes: The current account is authenticated, and when the authentication result indicates that the current account has the processing authority for the at least two images, the at least two images are processed in batches through the image processing model associated with the online editor.
17. An image processing device, characterized in that: The device comprises: A loading module, used to load an online editor in a browser, wherein the online editor includes an image adding entry; an adding module, configured to add at least two images to the online editor in response to an image adding operation triggered based on the image adding entry; The processing module is used for, in response to meeting the batch processing condition, performing batch processing on the at least two images through the image processing model associated with the online editor, and outputting image processing results obtained by processing each of the images.
18. An electronic device, characterized in that: include: A memory for storing computer executable instructions or computer programs; A processor, configured to implement the image processing method according to any one of claims 1 to 16 when executing the computer executable instructions or computer program stored in the memory.
19. A computer-readable storage medium, characterized in that: Computer executable instructions or computer programs are stored, and when the computer executable instructions or computer programs are executed by a processor, the image processing method according to any one of claims 1 to 16 is implemented.
20. A computer program product comprising a computer program or computer executable instructions, characterized in that When the computer program or computer executable instructions are executed by a processor, the image processing method according to any one of claims 1 to 16 is implemented.