Image processing method and device
The terminal device reports attribute parameters to the server, and the server selects a suitable model, making the shooting effects of different terminal devices diverse, solving the problem of single photos or video effects caused by the storage restrictions of sticker models, and increasing the fun of shooting.
Patent Information
- Application Number
- CN201910841280.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-06
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2040-06-18
AI Technical Summary
Since the terminal device cannot store all sticker models locally, when the stickers selected by the user are not pre-stored locally, the model needs to be requested from the server, resulting in a single effect of photos or videos taken by different terminal devices and poor fun.
By allowing the terminal device to report its attribute parameters to the server, the server selects different target models based on these parameters, so that different terminal devices can take photos or videos with different effects, increasing interest.
It realizes the diversity and fun of the effects of different terminal devices when taking photos or videos, and avoids low-performance devices crashing due to running high-performance models.
Smart Images

Figure CN112464691B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of electronic technology, and in particular, to an image processing method and device. Background Art
[0002] With the continuous development of electronic technology, the functions of terminal devices such as mobile phones are becoming more and more powerful. Users can easily realize the shooting function through mobile phones, and can add various styles of stickers to the photos or videos taken to increase the fun, thereby achieving more shooting effects. Among them, stickers can also be called props.
[0003] Generally speaking, a sticker corresponds to at least one detection algorithm, such as a face detection algorithm, a blink detection algorithm, etc., and different stickers may correspond to different detection algorithms. The detection algorithm is usually included in the model corresponding to the sticker. That is to say, when taking a photo or video, adding a sticker is essentially running the detection algorithm in the model corresponding to the sticker. Taking a kitten sticker as an example, the effect of the sticker is to add the whiskers and ears of the kitten to the appropriate position of the face. The process of adding stickers is essentially the process of using the face detection algorithm in the model to recognize the face in the shooting frame and add the whiskers and ears of the kitten to the corresponding position. Due to the large number of stickers, it is impossible for the terminal device to store the models of all stickers locally. When a user needs to take a photo or video with a sticker added, if the sticker selected by the user is not a sticker pre-stored locally on the terminal device, the terminal device requests the sticker from the server, that is, requests the model corresponding to the sticker. After the terminal obtains the sticker, it can take a photo or video with the sticker added.
[0004] When the sticker logos reported by different terminal devices are the same, the server pushes the same model to these terminal devices, so that the stickers added to the photos or videos taken by these terminal devices are the same, which results in the photos or videos taken by each terminal device having a single effect and poor interest. Summary of the invention
[0005] The disclosed embodiments provide an image processing method and apparatus, in which different terminal devices report their own attribute parameters to a server, so that the server selects different target models for different terminal devices according to the attribute parameters of the terminal devices, thereby enabling different terminal devices to capture photos or videos with different effects, thereby increasing interest.
[0006] In a first aspect, an embodiment of the present disclosure provides an image processing method, including:
[0007] The server receives the identification of the sticker selected by the user and the attribute parameters of the terminal device sent by the terminal device, where the attribute parameters are used to indicate the performance of the terminal device;
[0008] The server determines a model set according to the identifier, the model set comprising at least one model, the models in the model set comprising a detection algorithm corresponding to the sticker, the grades of the models being different, and the grades being positively correlated with the performance;
[0009] The server determines a target model from the model set according to the attribute parameters;
[0010] The server sends the target model to the terminal device.
[0011] In a feasible design, the sticker corresponds to multiple categories of detection algorithms, one category of detection algorithms in the multiple categories of detection algorithms has multiple detection algorithms at different levels, and algorithms at the same level in the multiple categories of detection algorithms are included in the same model.
[0012] In a feasible design, the sticker corresponds to multiple categories of detection algorithms, one category of detection algorithms in the multiple categories of detection algorithms includes multiple detection algorithms of different levels, and algorithms at the same level in the multiple categories of detection algorithms are included in different models.
[0013] In a feasible design, the server determines the model set according to the identifier, including:
[0014] The server determines, according to the identifier, a plurality of detection algorithms corresponding to the sticker;
[0015] The server determines a model of detection algorithms of different levels included in each of the multiple types of detection algorithms to obtain the model set.
[0016] In a feasible design, the server determines the target model from the model set according to the attribute parameters, including:
[0017] The server groups the models in the model set to obtain a plurality of model groups, each of the plurality of model groups comprising models of different categories of detection algorithms, and algorithms corresponding to different models in the same model group have the same level;
[0018] The server determines the performance level of the terminal device according to the attribute parameters;
[0019] The server queries a mapping table according to the performance level to determine the level of the detection algorithm, wherein the mapping table stores a correspondence between the performance level and the level of the detection algorithm;
[0020] The server determines that the model included in the model group corresponding to the level of the detection algorithm is the target model.
[0021] In a second aspect, the present disclosure provides an image processing method, including:
[0022] The terminal device receives a request instruction sent by a user, wherein the request instruction is used to request adding a sticker selected by the user to an image displayed on a user interface of the terminal device;
[0023] The terminal device sends the identification of the sticker and the attribute parameters of the terminal device to the server, where the attribute parameters are used to indicate the performance of the terminal device;
[0024] The terminal device receives a target model sent by the server, where the target model is determined by the server according to the identifier and the attribute parameter;
[0025] The terminal device runs a detection algorithm included in the target model to add the sticker to the image;
[0026] The terminal device displays the image to which the sticker is added.
[0027] In a feasible design, the sticker corresponds to multiple categories of detection algorithms, one category of detection algorithms in the multiple categories of detection algorithms includes multiple detection algorithms of different levels, and algorithms at the same level in the multiple categories of detection algorithms are included in the same model.
[0028] In a feasible design, the sticker corresponds to multiple categories of detection algorithms, one category of detection algorithms in the multiple categories of detection algorithms includes multiple detection algorithms of different levels, and algorithms at the same level in the multiple categories of detection algorithms are included in different models.
[0029] In a feasible design, the attribute parameters include one or more of the terminal model of the terminal device, the version number of the operating system of the terminal device, the hardware version number of the terminal device, and the network information of the terminal device.
[0030] In a third aspect, an embodiment of the present disclosure provides an image processing device, including:
[0031] A receiving unit, used for receiving an identifier of a sticker selected by a user and an attribute parameter of the terminal device sent by a terminal device, wherein the attribute parameter is used for indicating the performance of the terminal device;
[0032] a processing unit, configured to determine a model set according to the identifier, the model set comprising at least one model, the models in the model set comprising a detection algorithm corresponding to the sticker, the grades of the models being different, the grades being positively correlated with the performance, and determining a target model from the model set according to the attribute parameters;
[0033] A sending unit is used to send the target model to the terminal device.
[0034] In a feasible design, the sticker corresponds to multiple categories of detection algorithms, one category of detection algorithms in the multiple categories of detection algorithms has multiple detection algorithms at different levels, and algorithms at the same level in the multiple categories of detection algorithms are included in the same model.
[0035] In a feasible design, the sticker corresponds to multiple categories of detection algorithms, one category of detection algorithms in the multiple categories of detection algorithms includes multiple detection algorithms of different levels, and algorithms at the same level in the multiple categories of detection algorithms are included in different models.
[0036] In a feasible design, the processing unit is used to determine the multiple categories of detection algorithms corresponding to the sticker according to the identification, and determine the models of detection algorithms of different levels included in each category of detection algorithms in the multiple categories of detection algorithms to obtain the model set.
[0037] In a feasible design, the processing unit is used to group the models in the model set to obtain multiple model groups, each of the multiple model groups contains models of different categories of detection algorithms, and the levels of algorithms corresponding to different models in the same model group are the same. The performance level of the terminal device is determined according to the attribute parameters, and a mapping table is queried according to the performance level to determine the level of the detection algorithm, and the mapping table stores the correspondence between the performance level and the level of the detection algorithm; the model contained in the model group corresponding to the level of the detection algorithm is determined to be the target model.
[0038] In a fourth aspect, an embodiment of the present disclosure provides an image processing device, including:
[0039] A receiving unit, configured to receive a request instruction sent by a user, wherein the request instruction is used to request adding a sticker selected by the user to an image displayed on a user interface of the terminal device;
[0040] A sending unit, used for sending the identification of the sticker and the attribute parameters of the terminal device to the server, wherein the attribute parameters are used to indicate the performance of the terminal device;
[0041] The receiving unit is further configured to receive a target model sent by the server, wherein the target model is determined by the server according to the identifier and the attribute parameter;
[0042] a processing unit, configured to run a detection algorithm included in the target model to add the sticker to the image;
[0043] A display unit is used to display the image with the sticker added.
[0044] In a feasible design, the sticker corresponds to multiple categories of detection algorithms, one category of detection algorithms in the multiple categories of detection algorithms includes multiple detection algorithms of different levels, and algorithms at the same level in the multiple categories of detection algorithms are included in the same model.
[0045] In a feasible design, the sticker corresponds to multiple categories of detection algorithms, one category of detection algorithms in the multiple categories of detection algorithms includes multiple detection algorithms of different levels, and algorithms at the same level in the multiple categories of detection algorithms are included in different models.
[0046] In a feasible design, the attribute parameters include one or more of the terminal model of the terminal device, the version number of the operating system of the terminal device, the hardware version number of the terminal device, and the network information of the terminal device.
[0047] In a fifth aspect, an embodiment of the present invention provides a terminal device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method in the first aspect or various possible implementations of the first aspect is implemented.
[0048] In a sixth aspect, an embodiment of the present invention provides a server, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method in the second aspect or various possible implementations of the second aspect is implemented.
[0049] In a seventh aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a terminal device, enables the terminal device computer to execute the method in the above-mentioned first aspect or various possible implementations of the first aspect.
[0050] In an eighth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a server, enables the server to execute the method in the above-mentioned second aspect or various possible implementations of the second aspect.
[0051] In a ninth aspect, an embodiment of the present application provides a storage medium, in which instructions are stored. When the storage medium is executed on a terminal device, the terminal device executes a method as described in the first aspect or various possible implementations of the first aspect.
[0052] In a tenth aspect, an embodiment of the present application provides a storage medium, in which instructions are stored. When the storage medium is run on a server, the server executes a method as described in the second aspect or various possible implementations of the second aspect.
[0053] In the image processing method and apparatus provided by the embodiments of the present disclosure, after the terminal device receives a request instruction sent by the user to add a sticker selected by the user to the image, the sticker identifier and the attribute parameters of the terminal device are sent to the server. The server determines the models of each level corresponding to the identifier from a large number of models to obtain a model set, and determines the target model from the model set according to the attribute parameters. In this process, even if multiple terminal devices simultaneously request the model of the same sticker from the server, since the attribute parameters sent by different terminal devices are different, the target models matched by the server according to different attribute parameters are different, so that different terminal devices can take photos or videos with different effects, which increases the fun. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0055] Figure 1 is a schematic diagram of a network architecture applicable to the image processing method provided in the embodiment of the present disclosure;
[0056] Figure 2 is a flow chart of an image processing method provided by an embodiment of the present disclosure;
[0057] Figure 3 is a schematic diagram of a user interface of a terminal device in an image processing method provided by an embodiment of the present disclosure;
[0058] Figure 4 is a schematic diagram of a detection algorithm in an image processing method provided by an embodiment of the present disclosure;
[0059] Figure 5 is another schematic diagram of a detection algorithm in the image processing method provided by an embodiment of the present disclosure;
[0060] Figure 6 A schematic diagram of the structure of an image processing device provided by an embodiment of the present disclosure;
[0061] Figure 7 A schematic diagram of the structure of another image processing device provided by an embodiment of the present disclosure;
[0062] Figure 8 A schematic diagram of the structure of another image processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0064] With the rapid development of shooting technology and electronic equipment technology, shooting function has become a standard feature of terminal devices, and more and more applications for shooting have been generated, such as beauty, adding stickers, filters, etc. Among them, adding stickers means adding decorations to the appropriate position of photos or videos. During the adding process, the user selects the sticker and clicks the shooting button to get the photo or video with the sticker added. A sticker corresponds to at least one detection algorithm, such as a face detection algorithm, a blink detection algorithm, etc., which can be included in the same or different models. The process of adding stickers is essentially the process of running the detection algorithm in the model. Due to the large number and variety of stickers, it is impossible for the terminal device to store the models of all stickers locally. When the user needs to take a photo or video with a sticker added, if the sticker selected by the user is not a sticker pre-stored locally in the terminal device, the terminal device requests the sticker from the server, that is, requests the model corresponding to the sticker. After the terminal obtains the sticker, it can take a photo or video with the sticker added.
[0065] Generally, since the detection algorithm is dependent on the performance of the terminal device, for example, some detection algorithms can run on high-performance terminal devices, but are prone to freezes when running on low-performance terminal devices. If the two terminal devices both request the model corresponding to the sticker from the server, the special effects of the photos or videos taken by the two terminal devices will be the same, and the low-performance terminal device may crash.
[0066] In view of this, the embodiments of the present disclosure provide an image processing method and apparatus, whereby different terminal devices report their own attribute parameters to a server, so that the server selects different target models for different terminal devices according to the attribute parameters of the terminal devices, thereby enabling different terminal devices to capture photos or videos with different effects, thereby increasing interest.
[0067] Figure 1 This is a schematic diagram of a network architecture applicable to the image processing method provided in the embodiment of the present disclosure. Figure 1 , Figure 1 Schematic diagram of the operating environment of the light effect rendering method provided by the embodiment of the present disclosure. Figure 1, the terminal device 10 establishes a network connection with the server 20. The terminal device 10 has the ability to take photos or videos, and can take photos or images with stickers added. Models corresponding to various stickers are stored on the server. During the shooting process, if the sticker selected by the user is not a sticker pre-stored locally in the terminal device 10, the terminal device 10 reports the sticker's identifier and its own attribute parameters to the server. The server determines the model set corresponding to the identifier based on the identifier, and then determines the target model from the model set based on the attribute parameters of the terminal device, and sends the target model to the terminal device. After the terminal device receives the target model, it can run the target model to add stickers to the image. The image can be an image in a photo or video. Since there may be multiple detection algorithms corresponding to a sticker, when there are multiple detection algorithms, the terminal device can request multiple detection algorithms. These detection algorithms can be included in one target model or in different target models.
[0068] In the embodiment of the present disclosure, the terminal device 10 may be, for example, a user's computer, notebook, mobile phone, etc., which is not limited in the embodiment of the present disclosure. The server 20 may be, for example, a server of each video sharing platform.
[0069] Below, in the above Figure 1 Based on this, the image processing method described in the embodiment of the present disclosure is described in detail. For example, see Figure 2 . Figure 2 : is a flowchart of an image processing method provided by an embodiment of the present disclosure. This embodiment is described from the perspective of interaction between a terminal device and a server. This embodiment includes:
[0070] 101. The terminal device receives a request instruction sent by a user.
[0071] The request instruction is used to request to add a sticker selected by the user to the image displayed on the user interface of the terminal device. Figure 3 .
[0072] Figure 3 is a schematic diagram of a user interface of a terminal device in an image processing method provided by an embodiment of the present disclosure. Figure 3, the user opens an application (application, APP) with a shooting function on the terminal device. The APP can be a system APP that comes with the terminal device, such as a camera, or a third-party APP downloaded by the user on the terminal device. After the APP is opened, the user interface of the terminal device is a viewfinder, and the image to be shot is displayed in the viewfinder. At the same time, the user interface also displays operation buttons such as stickers and upload. After the user clicks the sticker button, some stickers for the user to choose pop up on the user interface. These stickers are varied, as shown in the small squares in the figure. The user interface can also display tags for the user to choose, such as popular, latest, decorative, novel, funny, etc. The user clicks on a tag and can select various stickers under the tag. Taking the popular tag as an example, after the user selects a specific sticker under the popular tag, the sticker is not stored locally on the terminal device. At this time, the terminal device sends the sticker identifier and the attribute parameters of the terminal device to the server.
[0073] 102. The terminal device sends the identification of the sticker and the attribute parameters of the terminal device to the server.
[0074] Correspondingly, the server receives the sticker identification and the attribute parameters of the terminal device.
[0075] The attribute parameter is used to indicate the performance of the terminal device.
[0076] Exemplarily, after the terminal device detects that the user has selected a sticker that is not stored locally on the terminal device, it sends the sticker identifier and the attribute parameters of the terminal device to the server. The server may be, for example, a service server corresponding to the APP, or a server specifically used to provide sticker services. The attribute parameters may be one or more of the terminal model of the terminal device, the version number of the operating system of the terminal device, the hardware version number of the terminal device, the network information of the terminal device, and the like.
[0077] 103. The server determines a model set according to the identifier.
[0078] Among them, the model set includes at least one model, the model set includes at least one model, the models in the model set include the detection algorithm corresponding to the sticker, the level of each model is different, and the level is positively correlated with the performance.
[0079] Exemplarily, for each sticker, the server pre-stores models of different levels corresponding to the sticker. Taking one sticker corresponding to one detection algorithm as an example, at least two models are stored on the server, and the levels of detection algorithms in different models are different, and the performance of detection algorithms of different levels are different. Taking the detection algorithm as a face detection algorithm as an example, the higher the level of the face detection algorithm, the higher the accuracy, and the lower the level of the face detection algorithm, the lower the accuracy. This is reflected in the user interface in that the effect of adding the same sticker to terminal devices with different performance is different. After receiving the sticker identifier, the server determines all levels of models corresponding to the identifier from a large number of models to obtain a model set.
[0080] 104. The server determines a target model from the model set according to the attribute parameters.
[0081] Exemplarily, different attribute parameters correspond to models of different levels, and the server may determine a model of a corresponding level from the model set as a target model according to the attribute parameters.
[0082] 105. The server sends the target model to the terminal device.
[0083] Correspondingly, the terminal device receives the target model.
[0084] 106. The terminal device runs a detection algorithm included in the target model to add the sticker to the image.
[0085] 107. The terminal device displays the image with the sticker added.
[0086] Exemplarily, the terminal device runs the algorithm included in the target model to add the sticker selected by the user to the image in the viewfinder.
[0087] In the image processing method provided by the embodiment of the present disclosure, after the terminal device receives a request instruction sent by the user to add a sticker selected by the user to the image, the sticker identifier and the attribute parameters of the terminal device are sent to the server. The server determines the models of each level corresponding to the identifier from a large number of models to obtain a model set, and determines the target model from the model set according to the attribute parameters. In this process, even if multiple terminal devices simultaneously request the model of the same sticker from the server, since the attribute parameters sent by different terminal devices are different, the target models matched by the server according to different attribute parameters are different, so that different terminal devices can take photos or videos with different effects, which increases the fun.
[0088] In the above embodiment, the detection algorithms corresponding to a sticker include multiple types, and each type includes detection algorithms of different levels. Next, when a sticker corresponds to multiple types of detection algorithms, how the server determines the model set according to the attribute parameters is described in detail.
[0089] In a feasible implementation, stickers correspond to multiple categories of detection algorithms, one category of detection algorithms in the multiple categories of detection algorithms includes multiple detection algorithms of different levels, and algorithms at the same level in the multiple categories of detection algorithms are included in the same model.
[0090] For example, please refer to Figure 4 , Figure 4 is a schematic diagram of the detection algorithm in the image processing method provided by the embodiment of the present disclosure. Figure 4 , the detection algorithms corresponding to a sticker include face recognition, blink detection, gesture detection, and mouth opening detection. Each type of detection algorithm includes three levels of detection algorithms: high, medium, and low. Each level of detection algorithm is included in the same model. For example, the high-level face detection algorithm, high-level blink detection algorithm, high-level jewelry detection algorithm, and high-level mouth opening detection algorithm are included in model 1; the medium-level face detection algorithm, medium-level blink detection algorithm, medium-level jewelry detection algorithm, and medium-level mouth opening detection algorithm are included in model 2; the low-level face detection algorithm, low-level blink detection algorithm, low-level jewelry detection algorithm, and low-level mouth opening detection algorithm are included in model 3. The model set determined by the server according to the identification of the sticker includes model 1, model 2, and model 3. Afterwards, the server determines the target model according to the attribute parameters. For example, when the attribute parameters indicate that the terminal device is a high-performance terminal device, the target model is model 1; when the attribute parameters indicate that the terminal device is a medium-performance terminal device, the target model is model 2; when the attribute parameters indicate that the terminal device is a low-performance terminal device, the target model is model 3.
[0091] In a feasible implementation, the sticker corresponds to multiple categories of detection algorithms, one category of detection algorithms in the multiple categories of detection algorithms includes multiple detection algorithms of different levels, and algorithms at the same level in the multiple categories of detection algorithms are included in different models.
[0092] For example, please refer to Figure 5 , Figure 5 is another schematic diagram of the detection algorithm in the image processing method provided by the embodiment of the present disclosure. Figure 5, the detection algorithms corresponding to a sticker include face recognition, blink detection, gesture detection, and mouth opening detection. Each type of detection algorithm includes three levels of detection algorithms: high, medium, and low. Each level of detection algorithm is included in different models. For example, the high-level face detection algorithm, the medium-level face detection algorithm, and the low-level face detection algorithm are included in model a, model b, and model c respectively; the high-level blink detection algorithm, the medium-level blink detection algorithm, and the low-level blink detection algorithm are included in model d, model e, and model f respectively; the high-level gesture detection algorithm, the medium-level gesture detection algorithm, and the low-level gesture detection algorithm are included in model g, model h, and model i respectively; the high-level mouth opening detection algorithm, the medium-level mouth opening detection algorithm, and the low-level mouth opening detection algorithm are included in model j, model k, and model l respectively. The model set determined by the server according to the sticker identification includes model a to model l. Afterwards, the server determines the target model based on the attribute parameters. For example, when the attribute parameters indicate that the terminal device is a high-performance terminal device, the target models are model a, model d, model g and model j; when the attribute parameters indicate that the terminal device is a medium-performance terminal device, the target models are model b, model e, model h and model k; when the attribute parameters indicate that the terminal device is a low-performance terminal device, the target models are model c, model f, model i and model l.
[0093] When algorithms at the same level in multiple categories of detection algorithms are included in different models, when the server determines the model set, it determines the multiple categories of detection algorithms corresponding to the sticker according to the identifier, and then determines the model containing the detection algorithms of different levels contained in each category of detection algorithms in the multiple categories of detection algorithms to obtain the model set. Next, how the server determines the target model from the model set according to the attribute parameters is described.
[0094] Exemplarily, for each type of detection algorithm, the server can use the attribute parameter level of the terminal device to determine the target model from the models of different levels corresponding to the detection algorithm of this type, and then determine multiple target models. Alternatively, the server can group the models in the model set to obtain multiple model groups, each of the multiple model groups contains models of different types of detection algorithms, and the algorithms corresponding to different models in the same model group have the same level; the server determines the performance level of the terminal device based on the attribute parameters; the server queries a mapping table based on the performance level to determine the level of the detection algorithm, and the mapping table stores the correspondence between the performance level and the level of the detection algorithm; the server determines that the model contained in the model group corresponding to the level of the detection algorithm is the target model.
[0095] Please refer to Figure 5, the server determines the model set including model a to model l according to the identification of the sticker. Afterwards, the server groups the models and divides the models of the same level in the models of different categories of detection algorithms into a model group, thereby obtaining model group A, model group B and model group C. When the attribute parameters of the terminal device indicate that the performance level of the terminal device is an advanced terminal device, the server determines the target model to be the model included in model group C; when the attribute parameters of the terminal device indicate that the performance level of the terminal device is an intermediate terminal device, the server determines the target model to be the model included in model group B; when the attribute parameters of the terminal device indicate that the performance level of the terminal device is an advanced terminal device, the server determines the target model to be the model included in model group A.
[0096] In addition, in other feasible implementations, the server may pre-classify the models with the same identifier according to the level. After receiving the identifier and the attribute parameters, the server first determines multiple model groups according to the identifier, and then determines the target model group according to the attribute parameters.
[0097] The following are embodiments of the device disclosed herein, which can be used to execute the method embodiments disclosed herein. For details not disclosed in the device embodiments disclosed herein, please refer to the method embodiments disclosed herein.
[0098] Figure 6 FIG. 1 is a schematic diagram of the structure of an image processing device provided by an embodiment of the present disclosure, and the image processing device can be implemented by software and / or hardware. Figure 6 As shown, the image processing device 100 includes:
[0099] A receiving unit 11, configured to receive an identifier of a sticker selected by a user and an attribute parameter of the terminal device sent by a terminal device, wherein the attribute parameter is used to indicate the performance of the terminal device;
[0100] A processing unit 12 is used to determine a model set according to the identifier, the model set includes at least one model, the models in the model set include a detection algorithm corresponding to the sticker, each model has a different level, and the level is positively correlated with the performance, and determine a target model from the model set according to the attribute parameter;
[0101] The sending unit 13 is used to send the target model to the terminal device.
[0102] In a feasible design, the sticker corresponds to multiple categories of detection algorithms, one category of detection algorithms in the multiple categories of detection algorithms has multiple detection algorithms at different levels, and algorithms at the same level in the multiple categories of detection algorithms are included in the same model.
[0103] In a feasible design, the sticker corresponds to multiple categories of detection algorithms, one category of detection algorithms in the multiple categories of detection algorithms includes multiple detection algorithms of different levels, and algorithms at the same level in the multiple categories of detection algorithms are included in different models.
[0104] In a feasible design, the processing unit 12 is used to determine the multiple categories of detection algorithms corresponding to the sticker according to the identification, and determine the models of detection algorithms of different levels included in each category of detection algorithms in the multiple categories of detection algorithms to obtain the model set.
[0105] In a feasible design, the processing unit 12 is used to group the models in the model set to obtain multiple model groups, each of the multiple model groups contains models of different categories of detection algorithms, and the levels of algorithms corresponding to different models in the same model group are the same. The performance level of the terminal device is determined according to the attribute parameters, and a mapping table is queried according to the performance level to determine the level of the detection algorithm, and the mapping table stores the correspondence between the performance level and the level of the detection algorithm; the model contained in the model group corresponding to the level of the detection algorithm is determined to be the target model.
[0106] Figure 7 FIG. 1 is a schematic diagram of the structure of another image processing device provided by an embodiment of the present disclosure, and the image processing device can be implemented by software and / or hardware. Figure 7 As shown, the image processing device 200 includes:
[0107] A receiving unit 21, configured to receive a request instruction sent by a user, wherein the request instruction is used to request adding a sticker selected by the user to an image displayed on a user interface of the terminal device;
[0108] A sending unit 22, configured to send the identification of the sticker and the attribute parameters of the terminal device to a server, wherein the attribute parameters are used to indicate the performance of the terminal device;
[0109] The receiving unit 21 is further configured to receive a target model sent by the server, wherein the target model is determined by the server according to the identifier and the attribute parameter;
[0110] A processing unit 23, configured to run a detection algorithm included in the target model to add the sticker to the image;
[0111] The display unit 24 is used to display the image with the sticker added.
[0112] In a feasible design, the sticker corresponds to multiple categories of detection algorithms, one category of detection algorithms in the multiple categories of detection algorithms includes multiple detection algorithms of different levels, and algorithms at the same level in the multiple categories of detection algorithms are included in the same model.
[0113] In a feasible design, the sticker corresponds to multiple categories of detection algorithms, one category of detection algorithms in the multiple categories of detection algorithms includes multiple detection algorithms of different levels, and algorithms at the same level in the multiple categories of detection algorithms are included in different models.
[0114] In a feasible design, the attribute parameters include one or more of the terminal model of the terminal device, the version number of the operating system of the terminal device, the hardware version number of the terminal device, and the network information of the terminal device.
[0115] Figure 8 FIG. 2 is a schematic diagram of the structure of another image processing device provided by an embodiment of the present invention. Figure 8 As shown, the image processing device 300 includes:
[0116] at least one processor 31 and a memory 32;
[0117] The memory 32 stores computer-executable instructions;
[0118] The at least one processor 31 executes the computer-executable instructions stored in the memory 32, so that the at least one processor 31 executes the image processing method corresponding to the above terminal device or server.
[0119] The specific implementation process of the processor 31 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0120] Optionally, the image processing device 300 further includes a communication component 33 , wherein the processor 31 , the memory 32 and the communication component 33 may be connected via a bus 34 .
[0121] An embodiment of the present invention further provides a storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the image processing method for a terminal device or a server as described above.
[0122] An embodiment of the present invention further provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes the image processing method as described above.
[0123] An embodiment of the present invention further provides a computer program product. When the computer program product is run on a server, the server executes the above-mentioned image processing method.
[0124] In the above embodiments, it should be understood that the described devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0125] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0126] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each module may exist physically separately, or two or more modules may be integrated into one unit. The above-mentioned module-composed unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0127] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium and includes a number of instructions for enabling an image processing device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present invention.
[0128] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0129] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0130] The bus may be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present invention is not limited to only one bus or one type of bus.
[0131] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0132] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in a terminal or server.
[0133] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An image processing method, characterized in that: include: The server receives the identification of the sticker selected by the user and the attribute parameters of the terminal device sent by the terminal device, where the attribute parameters are used to indicate the performance of the terminal device; The server determines a model set according to the identifier, the model set includes at least one model, the models in the model set include a detection algorithm corresponding to the sticker, the detection algorithm is an algorithm for running the models in the model set, the grades of the models are different, and the grades are positively correlated with the performance; The server determines a target model from the model set according to the attribute parameters; The server sends the target model to the terminal device; The server determines a model set according to the identifier, including: The server determines, according to the identifier, a plurality of detection algorithms corresponding to the sticker; The server determines a model of detection algorithms of different levels included in each of the multiple types of detection algorithms to obtain the model set; The server determines the target model from the model set according to the attribute parameters, including: The server groups the models in the model set to obtain a plurality of model groups, each of the plurality of model groups comprising models of different categories of detection algorithms, and algorithms corresponding to different models in the same model group have the same level; The server determines the performance level of the terminal device according to the attribute parameters; The server queries a mapping table according to the performance level to determine the level of the detection algorithm, wherein the mapping table stores a correspondence between the performance level and the level of the detection algorithm; The server determines that the model included in the model group corresponding to the level of the detection algorithm is the target model.
2. The method according to claim 1, characterized in that The sticker corresponds to multiple categories of detection algorithms, one category of detection algorithms in the multiple categories of detection algorithms has multiple detection algorithms at different levels, and algorithms at the same level in the multiple categories of detection algorithms are included in the same model.
3. The method according to claim 1, characterized in that The sticker corresponds to multiple categories of detection algorithms, one category of detection algorithms in the multiple categories of detection algorithms includes multiple detection algorithms of different levels, and algorithms at the same level in the multiple categories of detection algorithms are included in different models.
4. An image processing method, characterized in that: include: The terminal device receives a request instruction sent by a user, wherein the request instruction is used to request adding a sticker selected by the user to an image displayed on a user interface of the terminal device; The terminal device sends the identification of the sticker and the attribute parameters of the terminal device to the server, where the attribute parameters are used to indicate the performance of the terminal device; The terminal device receives a target model sent by the server, wherein the target model is determined by the server according to the identifier and the attribute parameters, wherein the server determines multiple types of detection algorithms corresponding to the sticker according to the identifier; the server determines models of detection algorithms of different levels contained in each type of detection algorithm in the multiple types of detection algorithms to obtain the model set; the server groups the models in the model set to obtain multiple model groups, each of the multiple model groups contains models of different types of detection algorithms, and the algorithms corresponding to different models in the same model group have the same level; the server determines the performance level of the terminal device according to the attribute parameters; the server queries a mapping table according to the performance level to determine the level of the detection algorithm, and the mapping table stores the correspondence between the performance level and the level of the detection algorithm; the server determines that the model contained in the model group corresponding to the level of the detection algorithm is the target model; The terminal device runs a detection algorithm included in the target model to add the sticker to the image, wherein the detection algorithm is an algorithm for running a model in the model set; The terminal device displays the image to which the sticker is added.
5. The method according to claim 4, characterized in that The sticker corresponds to multiple categories of detection algorithms, one category of detection algorithms in the multiple categories of detection algorithms includes multiple detection algorithms of different levels, and algorithms at the same level in the multiple categories of detection algorithms are included in the same model.
6. The method according to claim 4, characterized in that The sticker corresponds to multiple categories of detection algorithms, one category of detection algorithms in the multiple categories of detection algorithms includes multiple detection algorithms of different levels, and algorithms at the same level in the multiple categories of detection algorithms are included in different models.
7. The method according to any one of claims 4 to 6, characterized in that: The attribute parameters include one or more of the terminal model of the terminal device, the version number of the operating system of the terminal device, the hardware version number of the terminal device, and the network information of the terminal device.
8. An image processing device, characterized in that: include: A receiving unit, used for receiving an identifier of a sticker selected by a user and an attribute parameter of the terminal device sent by a terminal device, wherein the attribute parameter is used for indicating the performance of the terminal device; a processing unit, configured to determine a model set according to the identifier, the model set including at least one model, the models in the model set including a detection algorithm corresponding to the sticker, the detection algorithm being an algorithm for running the models in the model set, the grades of the models being different, the grades being positively correlated with the performance, and determining a target model from the model set according to the attribute parameters; A sending unit, configured to send the target model to the terminal device; When determining the model set according to the identifier, the processing unit is specifically configured to: The server determines the multiple detection algorithms corresponding to the sticker according to the identifier; The server determines a model of detection algorithms of different levels included in each of the multiple types of detection algorithms to obtain the model set; When the server determines the target model from the model set according to the attribute parameters, the processing unit is specifically used to: The server groups the models in the model set to obtain a plurality of model groups, each of the plurality of model groups comprising models of different categories of detection algorithms, and algorithms corresponding to different models in the same model group have the same level; The server determines the performance level of the terminal device according to the attribute parameters; The server queries a mapping table according to the performance level to determine the level of the detection algorithm, wherein the mapping table stores a correspondence between the performance level and the level of the detection algorithm; The server determines that the model included in the model group corresponding to the level of the detection algorithm is the target model.
9. An image processing device, characterized in that: include: A receiving unit, configured to receive a request instruction sent by a user, wherein the request instruction is used to request adding a sticker selected by the user to an image displayed on a user interface of a terminal device; A sending unit, used for sending the identification of the sticker and the attribute parameters of the terminal device to the server, wherein the attribute parameters are used to indicate the performance of the terminal device; The receiving unit is further used to receive a target model sent by the server, wherein the target model is determined by the server according to the identifier and the attribute parameters, wherein the server determines multiple types of detection algorithms corresponding to the sticker according to the identifier; the server determines models of detection algorithms of different levels contained in each type of detection algorithm in the multiple types of detection algorithms to obtain the model set; the server groups the models in the model set to obtain multiple model groups, each of the multiple model groups contains models of different types of detection algorithms, and the levels of algorithms corresponding to different models in the same model group are the same; the server determines the performance level of the terminal device according to the attribute parameters; the server queries a mapping table according to the performance level to determine the level of the detection algorithm, and the mapping table stores the correspondence between the performance level and the level of the detection algorithm; the server determines that the model contained in the model group corresponding to the level of the detection algorithm is the target model; a processing unit, configured to run a detection algorithm included in the target model to add the sticker to the image, wherein the detection algorithm is an algorithm for running a model in the model set; A display unit is used to display the image with the sticker added.
10. An image processing device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 3 is implemented.
11. An image processing device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 4 to 7 is implemented.
12. A storage medium, characterized in that: The storage medium stores instructions, which, when executed on a terminal device, enable the terminal device to execute the method according to any one of claims 1 to 3.
13. A storage medium, characterized in that: The storage medium stores instructions, which, when executed on the server, enable the server to execute the method according to any one of claims 4 to 7.
Citation Information
Patent Citations
Sticker obtaining method, device, storage medium and electronic device
CN109086401A
Video processing method and device, electronic equipment and storage medium
CN109640167A
