Movatterモバイル変換


[0]ホーム

URL:


CN113781383A - Method, device, equipment and computer readable medium for processing image - Google Patents

Method, device, equipment and computer readable medium for processing image
Download PDF

Info

Publication number
CN113781383A
CN113781383ACN202110014835.2ACN202110014835ACN113781383ACN 113781383 ACN113781383 ACN 113781383ACN 202110014835 ACN202110014835 ACN 202110014835ACN 113781383 ACN113781383 ACN 113781383A
Authority
CN
China
Prior art keywords
image
article
perspective
qualified
training
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110014835.2A
Other languages
Chinese (zh)
Other versions
CN113781383B (en
Inventor
周梦迪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co LtdfiledCriticalBeijing Jingdong Century Trading Co Ltd
Priority to CN202110014835.2ApriorityCriticalpatent/CN113781383B/en
Publication of CN113781383ApublicationCriticalpatent/CN113781383A/en
Application grantedgrantedCritical
Publication of CN113781383BpublicationCriticalpatent/CN113781383B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The invention discloses a method, a device, equipment and a computer readable medium for processing images, and relates to the technical field of computers. One embodiment of the method comprises: receiving an uploaded item image; inputting the article image into an image segmentation model, wherein the image segmentation model is obtained by training according to the classification loss of an unmarked training image and the segmentation loss of an marked training image, the unmarked training image comprises an article image, the marked training image comprises the article image and an article perspective image of the article image, and the rest pixels except the article main body in the article perspective image are transparent; and obtaining the article perspective image of the uploaded article image output by the image segmentation model. This embodiment can improve the efficiency of processing images.

Description

Method, device, equipment and computer readable medium for processing image
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a computer-readable medium for processing an image.
Background
In the internet field, a large number of images which do not meet the display requirements exist in the images displayed to the user, and further the user behaviors are directly influenced, such as: click through rate.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art: the image which does not meet the display requirement needs to be manually processed, and the efficiency of processing the image is low.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a device, and a computer-readable medium for processing an image, which can improve efficiency of processing the image.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method of processing an image, including:
receiving an uploaded item image;
inputting the article image into an image segmentation model, wherein the image segmentation model is obtained by training according to the classification loss of an unmarked training image and the segmentation loss of an marked training image, the unmarked training image comprises an article image, the marked training image comprises the article image and an article perspective image of the article image, and the rest pixels except the article main body in the article perspective image are transparent;
and obtaining the article perspective image of the uploaded article image output by the image segmentation model.
After the obtaining of the item perspective of the uploaded item image output by the image segmentation model, the method further includes:
and determining that the article perspective of the uploaded article image is qualified according to the image recognition model, and storing the qualified article perspective in an article perspective database.
The image recognition model is obtained by adopting lightweight network model training.
Before the receiving the uploaded item image, the method comprises the following steps:
inputting the unmarked training image into an image segmentation training model to obtain an article perspective of the unmarked training image, and calculating the classification loss of the article perspective of the unmarked training image;
inputting the marked training image into the image segmentation training model to obtain a model object perspective of the marked training image, and calculating the segmentation loss of the marked training image according to the qualified object perspective of the marked training image and the model object perspective;
calculating the actual loss of the image segmentation training model according to the classification loss of the article perspective of the unmarked training image and the segmentation loss of the marked training image;
and on the basis of the actual loss, obtaining the image segmentation model by adopting a back propagation algorithm.
Before receiving the uploaded item image, the method further comprises:
acquiring an article image of the qualified article perspective image according to the stock unit of the qualified article perspective image;
and determining the qualified article perspective image and the article image of the qualified article perspective image as the marked training image, wherein the distance between the characteristic of the qualified article perspective image and the characteristic of the article image of the qualified article perspective image is smaller than a preset similar distance.
The distance between the feature of the qualified article perspective image and the feature of the article image of the qualified article perspective image is smaller than a preset similar distance, and the step of determining the article perspective image of the qualified article and the article image of the qualified article perspective image as the labeled training image comprises the following steps:
if the distance between the characteristic of the qualified article perspective image and the characteristic of the article image of the qualified article perspective image is smaller than the preset similar distance, processing the article image of the qualified article perspective image on the basis of the qualified article perspective image to obtain a corrected qualified article perspective image;
and taking the corrected qualified article perspective image and the article image of the qualified article perspective image as the marked training image.
The step of taking the corrected qualified article perspective image and the article image of the qualified article perspective image as the labeled training image comprises the following steps:
according to the image recognition model, determining that the perspective of the corrected qualified article is qualified;
and taking the corrected qualified article perspective image and the article image of the qualified article perspective image as the marked training image.
According to a second aspect of embodiments of the present invention, there is provided an apparatus for processing an image, comprising:
the receiving module is used for receiving the uploaded article image;
the processing module is used for inputting the article image into an image segmentation model, the image segmentation model is obtained by training according to the classification loss of an unmarked training image and the segmentation loss of an marked training image, the unmarked training image comprises an article image, the marked training image comprises the article image and an article perspective image of the article image, and the rest pixels except the article main body in the article perspective image are transparent;
and the output module is used for obtaining the article perspective image of the uploaded article image output by the image segmentation model.
According to a third aspect of embodiments of the present invention, there is provided an electronic apparatus that processes an image, including:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method as described above.
According to a fourth aspect of embodiments of the present invention, there is provided a computer readable medium, on which a computer program is stored, which when executed by a processor, implements the method as described above.
One embodiment of the above invention has the following advantages or benefits: receiving an uploaded item image; inputting the article image into an image segmentation model, wherein the image segmentation model is obtained by training according to the classification loss of an unmarked training image and the segmentation loss of an marked training image, the unmarked training image comprises an article image, the marked training image comprises the article image and an article perspective image of the article image, and the rest pixels except the article main body in the article perspective image are transparent; and obtaining the article perspective image of the uploaded article image output by the image segmentation model. The image segmentation model can be used for processing the uploaded article image and outputting the article perspective image, so that the efficiency of processing the image can be improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a main flow of a method of processing an image according to an embodiment of the invention;
FIG. 2 is a schematic flow chart of training an image segmentation training model according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart illustrating a process of determining an annotated training image according to an embodiment of the invention;
FIG. 4 is a schematic flow chart of a perspective view of a revised acceptable item according to an embodiment of the invention;
FIG. 5 is a flow diagram of a passthrough for confirming a modified qualifying item according to an embodiment of the invention;
FIG. 6 is a schematic diagram of an application flow of a method of processing an image according to an embodiment of the invention;
fig. 7 is a schematic diagram of a main structure of an apparatus for processing an image according to an embodiment of the present invention;
FIG. 8 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 9 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the internet domain, the quality of the displayed image directly affects the user behavior. Such as: due to the large number of violation markers in the item image. If the image of the article including the violation mark is directly displayed, the user can be greatly influenced to purchase the article. Thus, the image presented to the user is an item perspective.
In embodiments of the present invention, the item image is an image for displaying the body or details of the item. Besides the object main body, other marks are also arranged in the object image. Other identifications include marketing words and logos, etc. The item perspective is an image generated based on the item image that contains foreground and transparent channels. The other pixels except the article main body in the article perspective view are transparent. The foreground is the item in the image near the leading edge.
The article image is obtained by various colors through the variation of RGB three color channels and the superposition of the RGB three color channels. The transparent image of the article displays colors through a transparent channel on the basis of three RGB color channels. The transparent channel is used to indicate pixels whose color is transparent.
At present, most of the transparent drawings of the articles are manually scratched and then can be displayed after manual examination. As one example, the perspective view of the article may be obtained in any of the following ways.
The first method is as follows: interactive matting algorithm
The user is required to mark the edge information of the scratched object on the article image, and an article perspective image is generated according to the edge information and the article image. Because the interactive matting algorithm needs the user to label the edge information, the workload of the user is increased, and the user experience is influenced.
The second method comprises the following steps: end-to-end matting algorithm
The end-to-end matting algorithm does not need a user to input edge information, and an article perspective image is directly generated according to an article image.
Compared with an interactive matting algorithm, the matting effect of the end-to-end matting algorithm is poor. The main reason is that under the condition of less training data, it is difficult to distinguish which part of pixels are foreground without prior information.
Therefore, the image processing efficiency is low by adopting the mode of obtaining the through image of the article and then manually checking the through image.
In order to solve the technical problem of low efficiency of processing images, the following technical solutions in the embodiments of the present invention may be adopted.
Referring to fig. 1, fig. 1 is a schematic diagram of a main flow of a method for processing an image according to an embodiment of the present invention, and an image segmentation model obtained by pre-training is adopted to convert an article image into an article perspective. As shown in fig. 1, the method specifically comprises the following steps:
and S101, receiving the uploaded article image.
In the embodiment of the invention, the article image can be uploaded through the mobile terminal or other terminals. As one example, a user takes and uploads an image of an item via a cell phone.
The uploaded item image may be received over a network. The uploaded article image may be an original image of the article image, or a compressed article image.
In addition, the mobile terminal or other terminals can also directly receive the uploaded article image. That is to say, the execution subject of the technical solution of the embodiment of the present invention may be a mobile terminal or other terminals. Illustratively, after the mobile terminal collects the article image through the camera, the processor of the mobile terminal receives the article image uploaded by the processing image thread to further process the image.
The mobile terminal is used as an execution main body of the technical scheme of the embodiment of the invention, so that the image can be directly processed through the mobile terminal, and the article perspective image of the article image is output.
Of course, the execution subject of the technical solution of the embodiment of the present invention may also be a server. Compared with a mobile terminal or other equipment, the server has stronger computing power, so that the speed of processing the image can be improved.
S102, inputting the article image into an image segmentation model, wherein the image segmentation model is obtained through training according to the classification loss of an unmarked training image and the segmentation loss of an marked training image, the unmarked training image comprises the article image, the marked training image comprises the article image and an article perspective image of the article image, and the rest pixels except the article main body in the article perspective image are transparent.
In an embodiment of the invention, an image segmentation model is used to process an article image. And inputting the article image into the image segmentation model, and outputting the article perspective of the article image by the image segmentation model.
The image segmentation model is obtained by training according to the classification loss of the unmarked training image and the segmentation loss of the marked training image.
The following describes an exemplary process for training an image segmentation model with reference to the drawings.
Referring to fig. 2, fig. 2 is a schematic flowchart of a process of training an image segmentation training model according to an embodiment of the present invention, which specifically includes the following steps:
s201, inputting the unmarked training image into the image segmentation training model to obtain an article perspective of the unmarked training image, and calculating the classification loss of the article perspective of the unmarked training image.
And training the image segmentation training model by adopting the training data to obtain the image segmentation model. It is to be understood that the trained image segmentation trains the model, i.e., the image segmentation model.
The training data is the basis for training the image segmentation training model, and the training data needs to be determined before training the image segmentation training model. In the embodiment of the invention, the training data of the training image segmentation training model comprises two parts, wherein the first part is an unmarked training image, and the second part is an annotated training image.
The unmarked training image comprises an article image, and the marked training image comprises the article image and an article perspective image of the article image.
And (4) the label-free training image only comprises the article image, namely, the label-free training image is input into the image segmentation training model. And the image segmentation training model outputs an article perspective of the label-free training image. Then, it is necessary to determine whether the perspective of the article without the labeled training image is qualified.
If the item perspective of the unmarked training image is qualified, the classification loss of the item perspective of the unmarked training image is 0; and if the article perspective of the unmarked training image is not qualified, the classification loss of the article perspective of the unmarked training image is more than 0.
S202, inputting the marked training image into an image segmentation training model to obtain a model object perspective of the marked training image, and calculating the segmentation loss of the marked training image according to the qualified object perspective and the model object perspective of the marked training image.
The marked training image not only comprises the article image, but also comprises the article perspective of the article image. The article image and the article perspective of the article image have a corresponding relationship.
As one example, the item perspective of the item image is typically characterized by a transparent channel. That is, the annotated training image includes the item image and a transparent channel of the item image. Because, on the basis of the RGB channel of the object image, the transparent channel is combined, and the object perspective image can be obtained.
Then, the segmentation loss of the labeled training image can be calculated according to the qualified commodity perspective of the labeled training image and the model commodity perspective of the labeled training image output by the image segmentation training model.
Wherein, the segmentation loss is determined according to the L1 norm of the error, the L2 norm of the error and other preset loss functions.
And S203, calculating the actual loss of the image segmentation training model according to the classification loss of the article perspective of the unmarked training image and the segmentation loss of the marked training image.
Because the image segmentation training model is trained by adopting the unmarked training image and the marked training image, the actual loss of the image segmentation training model is calculated by combining the classification loss of the article perspective of the unmarked training image and the segmentation loss of the marked training image.
As an example, a classification loss weight of the item perspective of the unmarked training image and a segmentation loss weight of the marked training image are preset, and then the actual loss of the image segmentation training model is calculated. The weights may be preset according to actual application scenarios.
And S204, on the basis of actual loss, obtaining an image segmentation model by adopting a back propagation algorithm.
After the actual loss of the image segmentation training model is obtained through calculation, the image segmentation model can be obtained through a back propagation algorithm.
The back propagation algorithm is suitable for a learning algorithm of a multilayer neuron network and is based on a gradient descent method. The input-output relationship of the back propagation algorithm is essentially a mapping relationship, and the mapping has high nonlinearity. Its information processing ability comes from multiple composition of simple non-linear function, so it has strong function reproduction ability.
In the embodiment of fig. 2, the training image is segmented into the training models by the unmarked training images and the marked training images, and then the image classification model is obtained. And further the image classification model can accurately process the article image.
In the embodiment of the invention, the image segmentation training model needs to be trained by using the unmarked training image and the marked training image so as to obtain the image segmentation model. The label-free training images may be obtained from a perspective database of the item. The following description, with reference to the drawings, determines the labeled training image.
Referring to fig. 3, fig. 3 is a schematic flow chart of determining an annotated training image according to an embodiment of the present invention. In order to determine the labeled training images, the technical solution in fig. 3 may be adopted. The method specifically comprises the following steps:
s301, acquiring an article image of the qualified article perspective drawing according to the stock unit of the qualified article perspective drawing.
Stock Keeping Unit (SKU) is a short name for uniform numbering of articles, and each article corresponds to a unique SKU.
In embodiments of the present invention, an image of an item may be acquired based on a qualifying object perspective. Specifically, a plurality of qualified object perspective views are stored in the article perspective database. Each qualifying object is identified by a SKU.
Then, an item image of the qualifying item thumbnail is obtained based on the qualifying item thumbnail SKU. That is, an image of the item is acquired with the SKU as the basis.
S302, the distance between the characteristic of the qualified article perspective and the characteristic of the article image of the qualified article perspective is smaller than a preset similar distance, and the qualified article perspective and the article image of the qualified article perspective are determined to be used as a labeled training image.
In an embodiment of the invention, one or more item images of the qualifying item thumbnail are obtained based on the SKU of the qualifying item thumbnail. Then, one of the object images of the multiple qualified object perspective images needs to be selected as the labeled training image.
And selecting the article images of the qualified article perspective images according to the distance between the features of the qualified article perspective images and the features of the article images of the qualified article perspective images.
As one example, a general feature model is used to extract features of the qualifying item passthrough, and to extract features of the item image of the qualifying item passthrough. Then, the distance between the above-mentioned extracted features is calculated. Such as: the distance may be a cosine distance, a hamming distance, a euclidean distance, or a jaccard distance. And if the calculated distance is smaller than the preset similar distance, determining the qualified article perspective image and the article image of the qualified article perspective image as the labeled training image.
In practical application, when the distances between the same qualified product perspective view and the plurality of product images are smaller than the preset similar distances, the product image corresponding to the qualified product perspective view is manually confirmed from the plurality of product images.
In the embodiment of FIG. 3, the item image is captured according to the SKU, and the item image most similar to the perspective of the qualified object is further selected from the plurality of item images as the annotated training image. And then the quality of the marked training image is improved.
Therefore, the labeled training images can be mined according to the article mapping database to train the model. The pixel-level labeling is simplified to classification labeling.
Referring to fig. 4, fig. 4 is a schematic flow chart of correcting a perspective view of a qualified product according to an embodiment of the present invention, which specifically includes the following steps:
s401, if the distance between the characteristic of the qualified article perspective image and the characteristic of the article image of the qualified article perspective image is smaller than the preset similar distance, processing the article image of the qualified article perspective image on the basis of the qualified article perspective image to obtain the corrected qualified article perspective image.
The distance between the characteristic of the qualified article perspective and the characteristic of the article image of the qualified article perspective is smaller than the preset similar distance, and the qualified article perspective can be considered to be obtained on the basis of the article image of the qualified article perspective.
The qualified article perspective is obtained by matting on the basis of an article image of the qualified article perspective, and certain zooming and translation can be carried out. In order to avoid the influence of zooming and translation on the item perspective, the item image of the qualified item perspective can be processed on the basis of the qualified item perspective to obtain the corrected qualified item perspective.
Specifically, according to the transparent channel of the qualified product perspective image, processing is carried out on the product image of the qualified product perspective image, the corresponding pixel mark in the product image of the qualified product perspective image is transparent, and the corrected qualified product perspective image is obtained.
Because the corrected qualified article perspective is the direct processing of the article image, the situations of zooming and translation do not occur, and the similarity between the corrected qualified article perspective and the article image is larger.
S402, taking the corrected qualified product perspective and the product image of the qualified product perspective as a labeled training image.
The corrected qualified article perspective more accurately represents the characteristics of the article image, so that the corrected qualified article perspective and the article image of the qualified article perspective are used as labeled training images.
In the embodiment of fig. 4, in order to improve the accuracy of the labeled training images, the item perspective may be corrected.
In an embodiment of the present invention, in order to further improve the accuracy of the labeled training images, the technical solution in fig. 5 may also be adopted.
Referring to fig. 5, fig. 5 is a schematic flow chart of a perspective view of a qualified product for confirmation and modification according to an embodiment of the present invention, which specifically includes the following steps:
s501, determining that the corrected qualified article perspective is qualified according to the image recognition model.
The revised pass-through for the acceptable item may be a pass-through for the unacceptable item. In the embodiment of the invention, whether the corrected transparent image of the qualified article is qualified or not can be judged according to the image recognition model.
It should be noted that the image recognition model is obtained by training using a lightweight network model. It can be understood that the image recognition model is obtained by training the lightweight network model according to the labeled qualified article perspective and the labeled unqualified article perspective.
Illustratively, lightweight network models include the following: a mobilenet model, an efficientnet model and a shufflent model.
It should be noted that the image recognition model can be used to determine whether the product perspective is acceptable. Specifically, in S201 and S301, an image recognition model is used to determine whether the item perspective is acceptable.
And S502, taking the corrected qualified product perspective and the product image of the qualified product perspective as a labeled training image.
And under the condition that the corrected perspective view of the qualified product is qualified, taking the corrected perspective view of the qualified product and the product image of the perspective view of the qualified product as a labeled training image.
In the embodiment of fig. 5, the modified perspective view of the qualified item is qualified according to the image recognition model.
And obtaining the image segmentation model after the image segmentation training model completes training. The article image is input into the image segmentation model, and the article image is processed by the image segmentation model.
And S103, obtaining an article perspective image of the uploaded article image output by the image segmentation model.
And after the image segmentation model processes the article image, directly outputting the article perspective image of the uploaded article image. As one example, the image segmentation model inputs a transparent channel of the uploaded item image. And then combining the RGB channels of the uploaded article images with the transparent channels to obtain a transparent perspective view of the article images.
In one embodiment of the invention, to use item perspectives in multiple application scenarios, item perspectives for uploaded item images may be determined to qualify in accordance with an image recognition model. And then storing the qualified product perspective map in the product perspective database.
Thus, a large number of qualified item passthrough maps are included in the item passthrough database for later use. It can be understood that whether the object perspective is qualified or not can be judged through the image recognition model without manual judgment. And under the condition of improving the identification efficiency, a foundation is laid for processing the image.
One embodiment of the above invention has the following advantages or benefits: receiving an uploaded item image; inputting the article image into an image segmentation model, wherein the image segmentation model is obtained by training according to the classification loss of an unmarked training image and the segmentation loss of an marked training image, the unmarked training image comprises an article image, the marked training image comprises the article image and an article perspective image of the article image, and the rest pixels except the article main body in the article perspective image are transparent; and obtaining the article perspective image of the uploaded article image output by the image segmentation model. The image segmentation model can be used for processing the uploaded article image and outputting the article perspective image, so that the efficiency of processing the image can be improved.
Referring to fig. 6, fig. 6 is a schematic diagram of an application flow of a method for processing an image according to an embodiment of the present invention, which specifically includes the following steps:
and S601, uploading the article image.
In the field of electronic commerce, to present an item, a merchant may upload an image of the item.
And S602, processing the article image by the image segmentation model.
The article image is input into an image segmentation model, which processes the article image.
And S603, outputting an article perspective by the image segmentation model.
And the image segmentation model outputs an article perspective corresponding to the article image.
S604, returning the item perspective drawing, and judging whether the item perspective drawing is used.
And transmitting the item perspective output by the image segmentation model back to a merchant for confirmation so as to determine whether the item perspective is adopted. If the item transparency is adopted, executing S605; if the transparent map is not adopted, S601 is executed.
And S605, identifying whether the transparent image of the article is qualified or not by the image identification model.
And identifying whether the transparent image of the article is qualified or not by adopting an image identification model. If the article is qualified, executing S606; and if the transparent pattern of the article is not qualified, ending the process.
And S606, storing the article perspective map in an article perspective database.
And storing the qualified product perspective map in the product perspective database. Therefore, a plurality of qualified item perspective maps and scenes of commercial tenants or other required item perspective maps are stored in the item perspective database, and the qualified item perspective maps can be acquired from the item perspective database at any time according to the SKUs.
Referring to fig. 7, fig. 7 is a schematic diagram of a main structure of an apparatus for processing an image according to an embodiment of the present invention, where the apparatus for processing an image can implement a method for processing an image, and as shown in fig. 7, the apparatus for processing an image specifically includes:
areceiving module 701, configured to receive an uploaded item image;
aprocessing module 702, configured to input the article image into an image segmentation model, where the image segmentation model is obtained by training according to a classification loss of an unmarked training image and a segmentation loss of an annotated training image, the unmarked training image includes the article image, the annotated training image includes the article image and an article perspective view of the article image, and other pixels in the article perspective view except an article main body are transparent;
anoutput module 703 is configured to obtain an article perspective view of the uploaded article image output by the image segmentation model.
In an embodiment of the present invention, theoutput module 703 is further configured to determine that the item perspective map of the uploaded item image is qualified according to the image recognition model, and store the qualified item perspective map in the item perspective map database.
In an embodiment of the present invention, the image recognition model is obtained by training using a lightweight network model.
In an embodiment of the present invention, theprocessing module 702 is further configured to input the label-free training image into an image segmentation training model, obtain an item perspective of the label-free training image, and calculate a classification loss of the item perspective of the label-free training image;
inputting the marked training image into the image segmentation training model to obtain a model object perspective of the marked training image, and calculating the segmentation loss of the marked training image according to the qualified object perspective of the marked training image and the model object perspective;
calculating the actual loss of the image segmentation training model according to the classification loss of the article perspective of the unmarked training image and the segmentation loss of the marked training image;
and on the basis of the actual loss, obtaining the image segmentation model by adopting a back propagation algorithm.
In an embodiment of the present invention, theprocessing module 702 is further configured to obtain an item image of the qualified item perspective according to the stock quantity unit of the qualified item perspective;
and determining the qualified article perspective image and the article image of the qualified article perspective image as the marked training image, wherein the distance between the characteristic of the qualified article perspective image and the characteristic of the article image of the qualified article perspective image is smaller than a preset similar distance.
In an embodiment of the present invention, theprocessing module 702 is specifically configured to, if a distance between a feature of the qualified item thumbnail and a feature of the item image of the qualified item thumbnail is smaller than a preset similar distance, process the item image of the qualified item thumbnail on the basis of the qualified item thumbnail to obtain a corrected qualified item thumbnail;
and taking the corrected qualified article perspective image and the article image of the qualified article perspective image as the marked training image.
In an embodiment of the present invention, theprocessing module 702 is specifically configured to determine that the modified transparent image of the qualified article is qualified according to an image recognition model;
and taking the corrected qualified article perspective image and the article image of the qualified article perspective image as the marked training image.
Fig. 8 illustrates anexemplary system architecture 800 of a method of processing an image or an apparatus for processing an image to which embodiments of the present invention may be applied.
As shown in fig. 8, thesystem architecture 800 may includeterminal devices 801, 802, 803, anetwork 804, and aserver 805. Thenetwork 804 serves to provide a medium for communication links between theterminal devices 801, 802, 803 and theserver 805.Network 804 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use theterminal devices 801, 802, 803 to interact with aserver 805 over anetwork 804 to receive or send messages or the like. Theterminal devices 801, 802, 803 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
Theterminal devices 801, 802, 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
Theserver 805 may be a server that provides various services, such as a back-office management server (for example only) that supports shopping-like websites browsed by users using theterminal devices 801, 802, 803. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the method for processing images provided by the embodiment of the present invention is generally executed by theserver 805, and accordingly, an apparatus for processing images is generally disposed in theserver 805.
It should be understood that the number of terminal devices, networks, and servers in fig. 8 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 9, shown is a block diagram of acomputer system 900 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 9 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 9, thecomputer system 900 includes a Central Processing Unit (CPU)901 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)902 or a program loaded from astorage section 908 into a Random Access Memory (RAM) 903. In theRAM 903, various programs and data necessary for the operation of thesystem 900 are also stored. TheCPU 901,ROM 902, andRAM 903 are connected to each other via abus 904. An input/output (I/O)interface 905 is also connected tobus 904.
The following components are connected to the I/O interface 905: aninput portion 906 including a keyboard, a mouse, and the like; anoutput section 907 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; astorage portion 908 including a hard disk and the like; and acommunication section 909 including a network interface card such as a LAN card, a modem, or the like. Thecommunication section 909 performs communication processing via a network such as the internet. Thedrive 910 is also connected to the I/O interface 905 as necessary. Aremovable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on thedrive 910 as necessary, so that a computer program read out therefrom is mounted into thestorage section 908 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through thecommunication section 909, and/or installed from theremovable medium 911. The above-described functions defined in the system of the present invention are executed when the computer program is executed by a Central Processing Unit (CPU) 901.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a receiving module, a processing module, and an output module. Where the names of these modules do not in some cases constitute a limitation on the modules themselves, for example, a receiving module may also be described as a "receiving module for receiving uploaded item images".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
receiving an uploaded item image;
inputting the article image into an image segmentation model, wherein the image segmentation model is obtained by training according to the classification loss of an unmarked training image and the segmentation loss of an marked training image, the unmarked training image comprises an article image, the marked training image comprises the article image and an article perspective image of the article image, and the rest pixels except the article main body in the article perspective image are transparent;
and obtaining the article perspective image of the uploaded article image output by the image segmentation model.
According to the technical scheme of the embodiment of the invention, the uploaded article image is received; inputting the article image into an image segmentation model, wherein the image segmentation model is obtained by training according to the classification loss of an unmarked training image and the segmentation loss of an marked training image, the unmarked training image comprises an article image, the marked training image comprises the article image and an article perspective image of the article image, and the rest pixels except the article main body in the article perspective image are transparent; and obtaining the article perspective image of the uploaded article image output by the image segmentation model. The image segmentation model can be used for processing the uploaded article image and outputting the article perspective image, so that the efficiency of processing the image can be improved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

CN202110014835.2A2021-01-062021-01-06Method, apparatus, device and computer readable medium for processing imageActiveCN113781383B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202110014835.2ACN113781383B (en)2021-01-062021-01-06Method, apparatus, device and computer readable medium for processing image

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202110014835.2ACN113781383B (en)2021-01-062021-01-06Method, apparatus, device and computer readable medium for processing image

Publications (2)

Publication NumberPublication Date
CN113781383Atrue CN113781383A (en)2021-12-10
CN113781383B CN113781383B (en)2024-06-21

Family

ID=78835420

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202110014835.2AActiveCN113781383B (en)2021-01-062021-01-06Method, apparatus, device and computer readable medium for processing image

Country Status (1)

CountryLink
CN (1)CN113781383B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108229479A (en)*2017-08-012018-06-29北京市商汤科技开发有限公司The training method and device of semantic segmentation model, electronic equipment, storage medium
CN108596915A (en)*2018-04-132018-09-28深圳市未来媒体技术研究院A kind of medical image segmentation method based on no labeled data
CN109033220A (en)*2018-06-292018-12-18北京京东尚科信息技术有限公司Automatically selecting method, system, equipment and the storage medium of labeled data
WO2019061661A1 (en)*2017-09-302019-04-04平安科技(深圳)有限公司Image tamper detecting method, electronic device and readable storage medium
CN110379491A (en)*2019-06-182019-10-25平安科技(深圳)有限公司Identify glioma method, apparatus, equipment and storage medium
CN110543911A (en)*2019-08-312019-12-06华南理工大学 A Weakly Supervised Object Segmentation Method Combining Classification Tasks
CN111582388A (en)*2020-05-112020-08-25广州中科智巡科技有限公司Method and system for quickly labeling image data
CN111898613A (en)*2020-09-302020-11-06支付宝(杭州)信息技术有限公司Semi-supervised semantic segmentation model training method, recognition method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108229479A (en)*2017-08-012018-06-29北京市商汤科技开发有限公司The training method and device of semantic segmentation model, electronic equipment, storage medium
WO2019061661A1 (en)*2017-09-302019-04-04平安科技(深圳)有限公司Image tamper detecting method, electronic device and readable storage medium
CN108596915A (en)*2018-04-132018-09-28深圳市未来媒体技术研究院A kind of medical image segmentation method based on no labeled data
CN109033220A (en)*2018-06-292018-12-18北京京东尚科信息技术有限公司Automatically selecting method, system, equipment and the storage medium of labeled data
CN110379491A (en)*2019-06-182019-10-25平安科技(深圳)有限公司Identify glioma method, apparatus, equipment and storage medium
CN110543911A (en)*2019-08-312019-12-06华南理工大学 A Weakly Supervised Object Segmentation Method Combining Classification Tasks
CN111582388A (en)*2020-05-112020-08-25广州中科智巡科技有限公司Method and system for quickly labeling image data
CN111898613A (en)*2020-09-302020-11-06支付宝(杭州)信息技术有限公司Semi-supervised semantic segmentation model training method, recognition method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JOSEPH ENGUEHARD 等: "Semi-Supervised Learning With Deep Embedded Clustering for Image Classification and Segmentation", IEEE ACCESS, 9 January 2019 (2019-01-09)*
贾颖霞;郎丛妍;冯松鹤;: "基于类别相关的领域自适应交通图像语义分割方法", 计算机研究与发展, no. 04, 14 April 2020 (2020-04-14)*

Also Published As

Publication numberPublication date
CN113781383B (en)2024-06-21

Similar Documents

PublicationPublication DateTitle
CN110377740B (en)Emotion polarity analysis method and device, electronic equipment and storage medium
CN108416310B (en)Method and apparatus for generating information
CN114428677B (en) Task processing method, processing device, electronic equipment and storage medium
CN113436100B (en) Methods, apparatus, equipment, media and products for repairing video
CN109583389B (en)Drawing recognition method and device
CN113450172B (en)Commodity recommendation method and device
CN110400029A (en) Method and system for label management
CN113742564B (en) Method and device for pushing target resources
CN111062374A (en)Identification method, device, system, equipment and readable medium of identity card information
CN111160410A (en) Object detection method and device
CN109413056B (en)Method and apparatus for processing information
CN111782850A (en)Object searching method and device based on hand drawing
CN115311469A (en) Image labeling method, training method, image processing method and electronic device
CN111292333A (en)Method and apparatus for segmenting an image
CN113760279B (en) A method and device for generating a page
CN109241344A (en)Method and apparatus for handling information
CN111178353A (en)Image character positioning method and device
CN119065669A (en) Front-end code template generation method, device and medium based on image detection
CN112884538A (en)Item recommendation method and device
CN117951359A (en)Target retrieval method, target retrieval device, electronic equipment and storage medium
CN113781383B (en)Method, apparatus, device and computer readable medium for processing image
CN110796137A (en)Method and device for identifying image
CN111428536A (en)Training method and device for detection network for detecting article category and position
CN116866669A (en)Video recommendation method, apparatus and computer program product
CN113610856B (en)Method and device for training image segmentation model and image segmentation

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp