CN113657273A - Method, device, electronic equipment and medium for determining commodity information - Google Patents

Method, device, electronic equipment and medium for determining commodity information Download PDF

Info

Publication number
CN113657273A
CN113657273A CN202110945242.8A CN202110945242A CN113657273A CN 113657273 A CN113657273 A CN 113657273A CN 202110945242 A CN202110945242 A CN 202110945242A CN 113657273 A CN113657273 A CN 113657273A
Authority
CN
China
Prior art keywords
image
commodity
searched
target
information
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.)
Pending
Application number
CN202110945242.8A
Other languages
Chinese (zh)
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.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China 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 Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202110945242.8A priority Critical patent/CN113657273A/en
Publication of CN113657273A publication Critical patent/CN113657273A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/5838Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0623Item investigation
    • G06Q30/0625Directed, with specific intent or strategy
    • G06Q30/0627Directed, with specific intent or strategy using item specifications

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Library & Information Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The application discloses a method, a device, electronic equipment and a medium for determining commodity information. According to the method and the device, a target image which is sent by a target terminal and contains a commodity image to be searched can be obtained, the commodity image to be searched contained in the target image is extracted to obtain corresponding attribute parameters, and then a Seq2Seq probability map model is used for calculating probability values of the commodity image to be searched and each commodity image in a commodity database as the same commodity image; taking the commodity image with the probability value exceeding a preset threshold value as a target commodity image; and sending the commodity information corresponding to the target commodity image to the target terminal. By applying the technical scheme, the user can be automatically retrieved and matched with the preset commodity image database according to the content characteristics and the visual characteristics of the image to be searched uploaded by the user, so that the commodity information corresponding to the uploaded image is provided. The problem that the user needs to search and quickly search related products at any time when shooting is met.

Description

Method, device, electronic equipment and medium for determining commodity information
Technical Field
The present application relates to image processing technologies, and in particular, to a method, an apparatus, an electronic device, and a medium for determining commodity information.
Background
With the rapid development of computer processing technology, various internet-based e-commerce platforms have become more and more accepted by consumers.
In the current e-commerce platform, a consumer searches for a desired product in a text input manner, for example, inputting a store name, a store link, a product name, or a product category. However, this searching method is not very autonomous for consumers, and consumers are all passive to accept, and sometimes users cannot or do not want to search for goods by text while shopping.
Therefore, how to design a method for enabling a user to quickly acquire commodity information becomes a problem to be solved.
Disclosure of Invention
The embodiment of the application provides a method, a device, electronic equipment and a medium for determining commodity information. The method and the device are used for solving the problem that in the related technology, a user can only input characters to search commodity information to cause a single acquisition mode.
According to an aspect of an embodiment of the present application, there is provided a method for determining commodity information, including:
acquiring a target image which is sent by a target terminal and contains an image of a commodity to be searched, wherein the target image is used for acquiring commodity information of the commodity to be searched;
extracting the commodity image to be searched contained in the target image, and acquiring attribute parameters corresponding to the commodity image to be searched, wherein the attribute parameters are used for representing the image size, the image color and the image outline of the commodity image to be searched;
calculating the probability value that the commodity image to be searched and each commodity image in the commodity database are the same commodity image by using a Seq2Seq probability map model and the attribute parameters;
taking the commodity image with the probability value exceeding a preset threshold value as a target commodity image successfully matched with the commodity image to be searched;
and sending the commodity information corresponding to the target commodity image recorded in the commodity database to the target terminal.
Optionally, in another embodiment based on the foregoing method of the present application, the acquiring a target image including an image of a commodity to be searched, which is sent by a target terminal, includes:
if the target image is detected to contain a plurality of commodity images, respectively determining the image proportion of each commodity image in the target image;
and taking the commodity image with the image proportion meeting the preset condition as the commodity image to be searched.
Optionally, in another embodiment based on the foregoing method of the present application, before the obtaining of the target image including the image of the product to be searched, the method further includes:
collecting a plurality of sample commodity images and commodity information corresponding to each sample commodity image;
performing preset processing operation on the plurality of sample commodity images to obtain sample processing images, wherein the preset processing operation comprises image deformation and image rendering;
extracting gray information and edge information of each sample processing image to form a gray image information set;
and associating the gray image information set with corresponding commodity information to generate the commodity database.
Optionally, in another embodiment based on the foregoing method of the present application, the performing a preset processing operation on the plurality of sample commodity images to obtain sample processed images includes:
overturning the sample commodity image at a random angle along a horizontal axis and at a random angle along a vertical axis to obtain an overturning image;
randomly translating at least one pixel of the image of the turned image along the horizontal direction and randomly translating at least one pixel of the image along the vertical direction to obtain a translated image;
and rendering the translation image in a preset rendering mode to obtain the sample processing image.
Optionally, in another embodiment based on the above method of the present application, the extracting gray scale information and edge information of each sample processing image to form a gray scale image information set includes:
sequentially dividing each sample processing image into a first color channel, a second color channel and a third color channel by utilizing a gray scale algorithm to obtain a gray scale image corresponding to the sample processing image;
removing noise data of each color channel in the sample processing image by using a DnCNN neural network model;
extracting the horizontal information and the gradient information of the gray level image after the noise is removed by using a Sobel operator to obtain a gray level image to be processed;
and extracting the edge information of the gray level image to be processed by using a Prewitt operator to form the gray level image information set.
Optionally, in another embodiment based on the foregoing method of the present application, the probability value that the to-be-searched product image and each product image in the product database are the same product image is calculated by using the following formula:
P(s,p,o)=P(s)P(o|s)P(p|s,o);
where P (s, P, o) is a probability value, s corresponds to an image size parameter, o corresponds to an image color parameter, and P corresponds to an image contour parameter.
Optionally, in another embodiment based on the foregoing method of the present application, after the obtaining of the target image including the image of the product to be searched, the method further includes:
based on an image network detection model, carrying out feature recognition on a target image to obtain a commodity feature parameter corresponding to the target image, wherein the commodity feature parameter corresponds to at least one of a size feature, a color feature and a contour feature;
and extracting the to-be-searched commodity image contained in the target image based on the commodity characteristic parameters.
According to another aspect of an embodiment of the present application, there is provided an apparatus for determining commodity information, including:
the system comprises an acquisition module, a search module and a display module, wherein the acquisition module is configured to acquire a target image which is sent by a target terminal and contains an image of a commodity to be searched, and the target image is used for acquiring commodity information of the commodity to be searched;
the extraction module is configured to extract the to-be-searched commodity image contained in the target image and acquire attribute parameters corresponding to the to-be-searched commodity image, wherein the attribute parameters are used for representing the image size, the image color and the image outline of the to-be-searched commodity image;
the calculation module is configured to calculate probability values of the to-be-searched commodity image and each commodity image in the commodity database as the same commodity image by using a Seq2Seq probability map model and the attribute parameters;
the matching module is configured to take the commodity image with the probability value exceeding a preset threshold value as a target commodity image successfully matched with the commodity image to be searched;
a sending module configured to send the commodity information corresponding to the target commodity image recorded in the commodity database to the target terminal.
According to another aspect of the embodiments of the present application, there is provided an electronic device including:
a memory for storing executable instructions; and
and the display is used for displaying with the memory to execute the executable instructions so as to complete the operation of any one of the above methods for determining the commodity information.
According to a further aspect of the embodiments of the present application, there is provided a computer-readable storage medium for storing computer-readable instructions, which when executed, perform the operations of any one of the above methods for determining information of an article.
According to the method and the device, a target image which is sent by a target terminal and contains an image of a commodity to be searched can be obtained, and the target image is used for obtaining commodity information of the commodity to be searched; extracting a commodity image to be searched contained in a target image, acquiring attribute parameters corresponding to the commodity image to be searched, and calculating probability values of the commodity image to be searched and each commodity image in a commodity database as the same commodity image by using a Seq2Seq probability map model and the attribute parameters; taking the commodity image with the probability value exceeding a preset threshold value as a target commodity image successfully matched with the commodity image to be searched; and sending the commodity information corresponding to the target commodity image to the target terminal. By applying the technical scheme, the user can be automatically retrieved and matched with the preset commodity image database according to the content characteristics and the visual characteristics of the image to be searched uploaded by the user, so that the commodity information corresponding to the uploaded image is provided. The problem that the user needs to search and quickly search related products at any time when shooting is met.
The technical solution of the present application is further described in detail by the accompanying drawings and examples.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description, serve to explain the principles of the application.
The present application may be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:
FIG. 1 is a schematic diagram of a system for determining merchandise information according to the present application;
FIG. 2 is a schematic diagram of a method for determining merchandise information according to the present application;
fig. 3 is a schematic structural diagram of an electronic device for determining merchandise information according to the present application;
fig. 4 is a schematic structural diagram of an electronic device for determining commodity information according to the present application.
Detailed Description
Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present application unless specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the application, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
In addition, technical solutions between the various embodiments of the present application may be combined with each other, but it must be based on the realization of the technical solutions by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination of technical solutions should be considered to be absent and not within the protection scope of the present application.
It should be noted that all the directional indicators (such as upper, lower, left, right, front and rear … …) in the embodiment of the present application are only used to explain the relative position relationship between the components, the motion situation, etc. in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indicator is changed accordingly.
A method for performing the determination of the commodity information according to an exemplary embodiment of the present application is described below with reference to fig. 1 to 2. It should be noted that the following application scenarios are merely illustrated for the convenience of understanding the spirit and principles of the present application, and the embodiments of the present application are not limited in this respect. Rather, embodiments of the present application may be applied to any scenario where applicable.
Fig. 1 shows a schematic diagram of an exemplary system architecture 100 to which the method of determining merchandise information or the apparatus for determining merchandise information according to the embodiments of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, server 105 may be a server cluster comprised of multiple servers, or the like.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may be various electronic devices having a display screen, including but not limited to smart phones, tablet computers, portable computers, desktop computers, and the like.
The terminal apparatuses 101, 102, 103 in the present application may be terminal apparatuses that provide various services. For example, the user via terminal 103 (which may also be terminal 101 or 102): acquiring a target image which is sent by a target terminal and contains an image of a commodity to be searched, wherein the target image is used for acquiring commodity information of the commodity to be searched; extracting the commodity image to be searched contained in the target image, and acquiring attribute parameters corresponding to the commodity image to be searched, wherein the attribute parameters are used for representing the image size, the image color and the image outline of the commodity image to be searched; calculating the probability value that the commodity image to be searched and each commodity image in the commodity database are the same commodity image by using a Seq2Seq probability map model and the attribute parameters; taking the commodity image with the probability value exceeding a preset threshold value as a target commodity image successfully matched with the commodity image to be searched; and sending the commodity information corresponding to the target commodity image recorded in the commodity database to the target terminal.
It should be noted that the method for determining commodity information provided in the embodiments of the present application may be executed by one or more of the terminal devices 101, 102, and 103, and/or the server 105, and accordingly, the apparatus for determining commodity information provided in the embodiments of the present application is generally disposed in the corresponding terminal device, and/or the server 105, but the present application is not limited thereto.
The application also provides a method, a device, a target terminal and a medium for determining commodity information.
Fig. 1 schematically shows a flowchart of a method for determining commodity information according to an embodiment of the present application. As shown in fig. 1, the method includes:
s101, acquiring a target image which is sent by a target terminal and contains an image of a commodity to be searched, wherein the target image is used for acquiring commodity information of the commodity to be searched.
First, it should be noted that the target terminal is not specifically limited in this application, and may be, for example, an intelligent device or a server. The smart device may be a PC (Personal Computer), a smart phone, a tablet PC, an e-book reader, an MP3(Moving Picture Experts Group Audio Layer III, motion Picture Experts compression standard Audio Layer 3) player, an MP4(Moving Picture Experts Group Audio Layer IV, motion Picture Experts compression standard Audio Layer 4) player, a portable Computer, or a mobile terminal device with a display function, and the like.
In order to avoid the problem that the experience is poor due to the fact that a user wants to acquire commodity information only through text input in the prior art, the application provides a method capable of using an image containing a commodity as an input path.
S102, extracting the to-be-searched commodity image contained in the target image, and obtaining attribute parameters corresponding to the to-be-searched commodity image, wherein the attribute parameters are used for representing the image size, the image color and the image outline of the to-be-searched commodity image.
First, the process of extracting the target product image may be to determine the type of the target product, for example, electronic products, books, vehicles, and the like are determined first. Further, the extraction is performed by means such as an image detection model according to the type of the product.
Further, the method and the device can also identify at least one of the size characteristic, the color characteristic and the contour characteristic of the commodity by using the image detection model, and extract the image after determining the commodity type according to the size characteristic, the color characteristic and the contour characteristic of the commodity.
The image detection model may be, for example, a Convolutional Neural Network (CNN). Convolutional Neural Networks are a class of feed-forward Neural Networks (fed-forward Neural Networks) containing convolutional calculations and having a deep structure, and are one of the representative algorithms for deep learning. The convolutional neural network has a representation learning (representation learning) capability, and can perform translation invariant classification on input information according to a hierarchical structure of the convolutional neural network. The CNN (convolutional neural network) has remarkable effects in the fields of image classification, target detection, semantic segmentation and the like due to the powerful feature characterization capability of the CNN on the image.
Further, the method and the device can detect the characteristic information of the to-be-searched commodity image in the target image by using the CNN neural network model, and further extract the to-be-searched commodity image after performing characteristic identification on the to-be-searched commodity image. The target image needs to be input into a preset convolutional neural network model, and the output of a last full connected layer (FC) of the convolutional neural network model is used as an identification result of the feature data of the commodity image to be searched corresponding to the target image. So that the commodity image to be searched is extracted subsequently according to the identification result.
Furthermore, after the to-be-searched commodity image contained in the image is extracted, the to-be-searched commodity image can be respectively subjected to relevance comparison with a plurality of commodity images existing in a commodity database, and a target commodity image successfully matched with the to-be-searched commodity image can be determined according to each comparison result.
S103, calculating the probability value that the commodity image to be searched and each commodity image in the commodity database are the same commodity image by using the Seq2Seq probability map model and the attribute parameters.
And S104, taking the commodity image with the probability value exceeding the preset threshold value as a target commodity image successfully matched with the commodity image to be searched.
For example, a feature vector of the target commodity image output may be determined first; and the characteristic vectors output by the commodity images to be compared determine the characteristic distances between the images to be compared and the target commodity image, and select the image with the minimum distance as the commodity image with the highest relevance.
Wherein the correlation comparison can be obtained according to the following formula:
Figure BDA0003216424720000091
wherein, R (x, y) represents the correlation comparison result of the image to be compared and the target commodity image.
x, x ', x ", x + x' respectively represent different horizontal vector coordinates of a plurality of commodity images and a target commodity image existing in a commodity database;
y, y ', y + y' respectively represent different vertical vector coordinates of the image to be compared and the target commodity image;
Σ x ', y' (T '(x', y ') · I' (x + x ', y + y') represents the covariance of the image to be compared and the target merchandise image;
∑x’,y’I’(x+x’,y+y’)2representing the variance of the image and the target commodity image.
Still further, after the target commodity image contained in the image is extracted, the preset commodity images to be compared can be subjected to relevance comparison with the target commodity image respectively. Wherein, the correlation comparison can be obtained by comparing the feature vectors of the two.
And S105, sending the commodity information corresponding to the target commodity image recorded in the commodity database to the target terminal.
The method for using the image containing the commodity as the input path is provided to avoid the problem that the user wants to obtain the commodity information only through the text input as the path in the prior art, so that the experience is poor. After the server receives the search image containing the commodity image, the commodity image can be automatically extracted, and after the attribute information of each commodity stored by the database is utilized, the commodity information corresponding to the commodity image is obtained from the database and returned to the user.
It can be understood that, in the present application, a result with the most similar correlation degree may be selected from the multiple correlation results, so that the product to be compared corresponding to the result is determined as the target product. And further determining commodity information corresponding to the target commodity in the database and returning the commodity information to the terminal.
For example, when it is determined that the target article image corresponds to an article of a vehicle type, which model of vehicle (i.e., article information) is used in order to more surely obtain which brand of vehicle is. According to the method and the device, characteristics of the target commodity image can be input into the vehicle commodity database according to the pre-established commodity information database of each vehicle, so that commodity information of the brand, model and price and the like, which are stored in the database and to which the target commodity belongs, is obtained. And the commodity information is returned to the target terminal to help the user to achieve the purpose of quickly acquiring the commodity information.
According to the method and the device, a target image which is sent by a target terminal and contains an image of a commodity to be searched can be obtained, and the target image is used for obtaining commodity information of the commodity to be searched; extracting a commodity image to be searched contained in a target image, acquiring attribute parameters corresponding to the commodity image to be searched, and calculating probability values of the commodity image to be searched and each commodity image in a commodity database as the same commodity image by using a Seq2Seq probability map model and the attribute parameters; taking the commodity image with the probability value exceeding a preset threshold value as a target commodity image successfully matched with the commodity image to be searched; and sending the commodity information corresponding to the target commodity image to the target terminal. By applying the technical scheme, the user can be automatically retrieved and matched with the preset commodity image database according to the content characteristics and the visual characteristics of the image to be searched uploaded by the user, so that the commodity information corresponding to the uploaded image is provided. The problem that the user needs to search and quickly search related products at any time when shooting is met.
Optionally, in another embodiment based on the foregoing method of the present application, the acquiring a target image including an image of a commodity to be searched, which is sent by a target terminal, includes:
if the target image is detected to contain a plurality of commodity images, respectively determining the image proportion of each commodity image in the target image;
and taking the commodity image with the image proportion meeting the preset condition as the commodity image to be searched.
Further, when the application detects that the target image contains a plurality of commodity images, in order to determine the image to be searched which the user wants to acquire, the commodity image with the largest image proportion occupied by the commodity image can be selected as the commodity image to be searched.
For example, when 3 commodity images are detected to be included in the target image, the image proportion of each commodity image in the target image is respectively determined and is respectively 20%, 20% and 60%, the commodity image in which the image proportion satisfies 60% may be taken as the commodity image to be searched.
Of course, the preset condition is not specifically limited in the present application, and may be, for example, the highest, the lowest, or the like.
Optionally, in another embodiment based on the foregoing method of the present application, before the obtaining of the target image including the image of the product to be searched, the method further includes:
collecting a plurality of sample commodity images and commodity information corresponding to each sample commodity image;
performing preset processing operation on the plurality of sample commodity images to obtain sample processing images, wherein the preset processing operation comprises image deformation and image rendering;
extracting gray information and edge information of each sample processing image to form a gray image information set;
and associating the gray image information set with corresponding commodity information to generate the commodity database.
Optionally, in another embodiment based on the foregoing method of the present application, the performing a preset processing operation on the plurality of sample commodity images to obtain sample processed images includes:
overturning the sample commodity image at a random angle along a horizontal axis and at a random angle along a vertical axis to obtain an overturning image;
randomly translating at least one pixel of the image of the turned image along the horizontal direction and randomly translating at least one pixel of the image along the vertical direction to obtain a translated image;
and rendering the translation image in a preset rendering mode to obtain the sample processing image.
Optionally, in another embodiment based on the above method of the present application, the extracting gray scale information and edge information of each sample processing image to form a gray scale image information set includes:
sequentially dividing each sample processing image into a first color channel, a second color channel and a third color channel by utilizing a gray scale algorithm to obtain a gray scale image corresponding to the sample processing image;
removing noise data of each color channel in the sample processing image by using a DnCNN neural network model;
extracting the horizontal information and the gradient information of the gray level image after the noise is removed by using a Sobel operator to obtain a gray level image to be processed;
and extracting the edge information of the gray level image to be processed by using a Prewitt operator to form the gray level image information set.
Further, the method and the device can firstly establish a commodity database containing each sample commodity, so that after the commodity image to be searched is obtained subsequently, the corresponding commodity information can be obtained according to the matching of the commodity image to be searched and the database.
For constructing the commodity database, the method can be specifically divided into the following steps:
s1, collecting a plurality of sample commodity images;
s2, deforming the collected sample commodity image and constructing a database:
selecting a sample commodity image at random, turning over the sample commodity image at a random angle along a horizontal axis to generate a new image, and storing the new image in an image identification information database;
randomly selecting images in the commodity database, turning the images at random angles along a vertical axis to generate turned images, and storing the turned images in an image identification information database;
randomly selecting an image in the commodity database, randomly translating a plurality of pixels of the image along the horizontal direction to generate a new image, and storing the new image in the image identification information database;
randomly selecting an image in the commodity database, randomly translating a plurality of pixels of the image along the vertical direction to generate a translation image, and storing the translation image in the image identification information database;
fifthly, performing image rendering on the translation image in a preset rendering mode to obtain the sample processing image;
s3, constructing a gray level image information set, extracting gray level information and edge information of the commodity patterns in the database, and forming a gray level image information set:
the method comprises the steps that firstly, image information in an image identification information database is divided into three channels of R (red), G (green) and B (blue) in sequence by using a gray scale algorithm, gray scale images of all images in the image identification information database are stored after conversion is completed, and the images are stored in a gray scale image database;
secondly, removing noise in each color channel in the gray level image by using a DnCNN neural network, and replacing the original gray level image in the first step;
thirdly, extracting the level and gradient information of the denoised gray level image in the second step by using a Sobel operator, and replacing the original gray level image in the second step;
fourthly, using Isotropic Sobel, Robertsl and Prewitt operators in parallel to respectively extract the edge information of the gray level image in the third step, enabling the original gray level image in the third step to respectively generate three new gray level images corresponding to different operators, and replacing the original gray level image in the third step;
fifthly, obtaining the edge information of the gray information image of the original gray image in the fourth step by using an im2bw and ycbcr2rgb reverse conversion algorithm to form a gray image information set;
and S4, associating the gray image information set with corresponding commodity information to generate the commodity database.
Optionally, in another embodiment based on the foregoing method of the present application, the probability value that the to-be-searched product image and each product image in the product database are the same product image is calculated by using the following formula:
P(s,p,o)=P(s)P(o|s)P(p|s,o);
where P (s, P, o) is a probability value, s corresponds to an image size parameter, o corresponds to an image color parameter, and P corresponds to an image contour parameter.
Optionally, in another embodiment based on the foregoing method of the present application, after the obtaining of the target image including the image of the product to be searched, the method further includes:
based on an image network detection model, carrying out feature recognition on a target image to obtain a commodity feature parameter corresponding to the target image, wherein the commodity feature parameter corresponds to at least one of a size feature, a color feature and a contour feature;
and extracting the to-be-searched commodity image contained in the target image based on the commodity characteristic parameters.
Further, the method and the device can use a CNN image network detection model to detect the characteristic information of the commodity image in the target image, and further perform characteristic identification on the commodity image to determine the commodity characteristic parameters corresponding to the commodity image. Specifically, the target image needs to be input into a preset convolutional neural network model, and the output of a last full connected layer (FC) of the convolutional neural network model is used as an identification result of the commodity characteristic parameter corresponding to the target image.
Furthermore, after determining the characteristics corresponding to the target commodity information, the method can extract the commodity information corresponding to each sample commodity image from the database, and each model outputs a probability value for indicating the possibility that the target commodity belongs to various commodities by establishing different categories of commodity information models, and selects the type represented by the highest value as the commodity information corresponding to the target commodity.
For example, when the target product is a book product, the target product is a book product for more specific acquisition. The present application may obtain the possibility that the target product belongs to each book-type product (for example, including a science and fiction-type book model, an education-type book model, a childbearing-type book model, etc.) by inputting the characteristics of the target product into the book-type product information model. Then selecting the book type with the highest possibility and determining the book type from the book type
Specifically, multiple channels will be provided to describe various characteristic information (e.g., size, color, font, thickness, etc.) of the target product. And predicting the subject/object of each characteristic information of the commodity according to a probability graph model based on the class Seq2Seq, wherein the probability graph model formula is as follows:
P(s,p,o)=P(s)P(o|s)P(p|s,o)
where P (s, P, o) is a probability value, s corresponds to an image size parameter, o corresponds to an image color parameter, and P corresponds to an image contour parameter.
Finally, after the commodity image is determined (for example, the target commodity is a car a), the commodity information corresponding to the car a can be extracted from the database and returned to the user. The method and the device can avoid the behaviors of multiple clicks, copying, inputting and the like of the user in the prior art. By utilizing the preset rules, the user side is ensured not to need manual and tedious personal operation, and the automatic process helps the user to realize all operations of rule setting.
Optionally, in another embodiment of the present application, as shown in fig. 3, the present application further provides an apparatus for determining commodity information. Which comprises the following steps:
the system comprises an acquisition module, a search module and a display module, wherein the acquisition module is configured to acquire a target image which is sent by a target terminal and contains an image of a commodity to be searched, and the target image is used for acquiring commodity information of the commodity to be searched;
the extraction module is configured to extract the to-be-searched commodity image contained in the target image and acquire attribute parameters corresponding to the to-be-searched commodity image, wherein the attribute parameters are used for representing the image size, the image color and the image outline of the to-be-searched commodity image;
the calculation module is configured to calculate probability values of the to-be-searched commodity image and each commodity image in the commodity database as the same commodity image by using a Seq2Seq probability map model and the attribute parameters;
the matching module is configured to take the commodity image with the probability value exceeding a preset threshold value as a target commodity image successfully matched with the commodity image to be searched;
a sending module configured to send the commodity information corresponding to the target commodity image recorded in the commodity database to the target terminal.
By applying the technical scheme, the user can be automatically retrieved and matched with the preset commodity image database according to the content characteristics and the visual characteristics of the image to be searched uploaded by the user, so that the commodity information corresponding to the uploaded image is provided. The problem that the user needs to search and quickly search related products at any time when shooting is met.
In another embodiment of the present application, the obtaining module 201 further includes:
the acquisition module 201 is configured to determine an image proportion of each commodity image in the target image respectively if it is detected that the target image includes a plurality of commodity images;
the acquisition module 201 is configured to take the commodity image with the image proportion meeting a preset condition as the commodity image to be searched.
In another embodiment of the present application, the obtaining module 201 further includes:
the acquisition module 201 is configured to acquire a plurality of sample commodity images and commodity information corresponding to each sample commodity image;
the acquisition module 201 is configured to perform preset processing operations on the plurality of sample commodity images to obtain sample processing images, where the preset processing operations include image deformation and image rendering;
an obtaining module 201 configured to extract gray scale information and edge information of each sample processing image to form a gray scale image information set;
the obtaining module 201 is configured to generate the commodity database after associating the grayscale image information set with corresponding commodity information.
In another embodiment of the present application, the obtaining module 201 further includes:
an obtaining module 201 configured to turn the sample commodity image at a random angle along a horizontal axis and at a random angle along a vertical axis to obtain a turned image;
an obtaining module 201 configured to randomly translate at least one pixel of the image of the flipped image along a horizontal direction and randomly translate at least one pixel of the image along a vertical direction to obtain a translated image;
the obtaining module 201 is configured to perform image rendering on the translation image in a preset rendering manner to obtain the sample processing image.
In another embodiment of the present application, the obtaining module 201 further includes:
the obtaining module 201 is configured to sequentially divide each sample processing image into a first color channel, a second color channel and a third color channel by using a gray scale algorithm, so as to obtain a gray scale image corresponding to the sample processing image;
an obtaining module 201 configured to remove noise data of each color channel in the sample processing image by using a DnCNN neural network model;
the acquisition module 201 is configured to extract the level information and the gradient information of the noise-removed gray level image by using a Sobel operator to obtain a to-be-processed gray level image;
an obtaining module 201 configured to extract edge information of the to-be-processed grayscale image by using a Prewitt operator to form the grayscale image information set.
In another embodiment of the present application, the method further includes: calculating the probability value that the to-be-searched commodity image and each commodity image in the commodity database are the same commodity image by using the following formula:
P(s,p,o)=P(s)P(o|s)P(p|s,o);
where P (s, P, o) is a probability value, s corresponds to an image size parameter, o corresponds to an image color parameter, and P corresponds to an image contour parameter.
In another embodiment of the present application, the obtaining module 201 further includes:
the acquisition module 201 is configured to perform feature recognition on a target image based on an image network detection model to obtain a commodity feature parameter corresponding to the target image, where the commodity feature parameter corresponds to at least one of a size feature, a color feature and a contour feature;
an obtaining module 201 configured to extract the to-be-searched commodity image included in the target image based on the commodity feature parameter.
Fig. 4 is a block diagram illustrating a logical structure of an electronic device in accordance with an exemplary embodiment. For example, the electronic device 300 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
In an exemplary embodiment, there is also provided a non-transitory computer readable storage medium, such as a memory, including instructions executable by a processor of an electronic device to perform the method of determining merchandise information described above, the method comprising: acquiring a target image which is sent by a target terminal and contains an image of a commodity to be searched, wherein the target image is used for acquiring commodity information of the commodity to be searched; extracting the commodity image to be searched contained in the target image, and acquiring attribute parameters corresponding to the commodity image to be searched, wherein the attribute parameters are used for representing the image size, the image color and the image outline of the commodity image to be searched; calculating the probability value of the commodity image to be searched and each commodity image in the commodity database as the same commodity image by using a Seq2Seq probability map model and the attribute parameters; taking the commodity image with the probability value exceeding a preset threshold value as a target commodity image successfully matched with the commodity image to be searched; and sending the commodity information corresponding to the target commodity image recorded in the commodity database to the target terminal.
Optionally, the instructions may also be executable by a processor of the electronic device to perform other steps involved in the exemplary embodiments described above. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, an application/computer program product is further provided, which includes one or more instructions executable by a processor of an electronic device to perform the above method for determining commodity information, where the method includes acquiring a target image including an image of a commodity to be searched, where the target image is sent by a target terminal and is used to acquire commodity information of the commodity to be searched; extracting the commodity image to be searched contained in the target image, and acquiring attribute parameters corresponding to the commodity image to be searched, wherein the attribute parameters are used for representing the image size, the image color and the image outline of the commodity image to be searched; calculating the probability value of the commodity image to be searched and each commodity image in the commodity database as the same commodity image by using a Seq2Seq probability map model and the attribute parameters; taking the commodity image with the probability value exceeding a preset threshold value as a target commodity image successfully matched with the commodity image to be searched; and sending the commodity information corresponding to the target commodity image recorded in the commodity database to the target terminal. Optionally, the instructions may also be executable by a processor of the electronic device to perform other steps involved in the exemplary embodiments described above.
Fig. 4 is an exemplary diagram of the computer device 30. Those skilled in the art will appreciate that the schematic diagram 4 is merely an example of the computer device 30 and does not constitute a limitation of the computer device 30 and may include more or less components than those shown, or combine certain components, or different components, e.g., the computer device 30 may also include input output devices, network access devices, buses, etc.
The Processor 302 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor 302 may be any conventional processor or the like, the processor 302 being the control center for the computer device 30 and connecting the various parts of the overall computer device 30 using various interfaces and lines.
Memory 301 may be used to store computer readable instructions 303 and processor 302 may implement various functions of computer device 30 by executing or executing computer readable instructions or modules stored within memory 301 and by invoking data stored within memory 301. The memory 301 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to the use of the computer device 30, and the like. In addition, the Memory 301 may include a hard disk, a Memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Memory Card (Flash Card), at least one disk storage device, a Flash Memory device, a Read-Only Memory (ROM), a Random Access Memory (RAM), or other non-volatile/volatile storage devices.
The modules integrated by the computer device 30 may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by hardware related to computer readable instructions, which may be stored in a computer readable storage medium, and when the computer readable instructions are executed by a processor, the steps of the method embodiments may be implemented.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A method of determining merchandise information, comprising:
acquiring a target image which is sent by a target terminal and contains an image of a commodity to be searched, wherein the target image is used for acquiring commodity information of the commodity to be searched;
extracting the commodity image to be searched contained in the target image, and acquiring attribute parameters corresponding to the commodity image to be searched, wherein the attribute parameters are used for representing the image size, the image color and the image outline of the commodity image to be searched;
calculating the probability value of the commodity image to be searched and each commodity image in the commodity database as the same commodity image by using a Seq2Seq probability map model and the attribute parameters;
taking the commodity image with the probability value exceeding a preset threshold value as a target commodity image successfully matched with the commodity image to be searched;
and sending the commodity information corresponding to the target commodity image recorded in the commodity database to the target terminal.
2. The method as claimed in claim 1, wherein the acquiring the target image containing the image of the product to be searched and sent by the target terminal comprises:
if the target image is detected to contain a plurality of commodity images, respectively determining the image proportion of each commodity image in the target image;
and taking the commodity image with the image proportion meeting the preset condition as the commodity image to be searched.
3. The method as claimed in claim 1, wherein before the obtaining of the target image containing the image of the product to be searched and sent by the target terminal, the method further comprises:
collecting a plurality of sample commodity images and commodity information corresponding to each sample commodity image;
performing preset processing operation on the plurality of sample commodity images to obtain sample processing images, wherein the preset processing operation comprises image deformation and image rendering;
extracting gray information and edge information of each sample processing image to form a gray image information set;
and associating the gray image information set with corresponding commodity information to generate the commodity database.
4. The method of claim 3, wherein the performing a predetermined processing operation on the plurality of sample commodity images to obtain a sample processed image comprises:
overturning the sample commodity image at a random angle along a horizontal axis and at a random angle along a vertical axis to obtain an overturning image;
randomly translating at least one pixel of the image of the turned image along the horizontal direction and randomly translating at least one pixel of the image along the vertical direction to obtain a translated image;
and rendering the translation image in a preset rendering mode to obtain the sample processing image.
5. The method of claim 3 or 4, wherein said extracting gray scale information and edge information for each of said sample processed images to form a set of gray scale image information comprises:
sequentially dividing each sample processing image into a first color channel, a second color channel and a third color channel by utilizing a gray scale algorithm to obtain a gray scale image corresponding to the sample processing image;
removing noise data of each color channel in the sample processing image by using a DnCNN neural network model;
extracting the horizontal information and the gradient information of the gray level image after the noise is removed by using a Sobel operator to obtain a gray level image to be processed;
and extracting the edge information of the gray level image to be processed by using a Prewitt operator to form the gray level image information set.
6. The method as claimed in claim 1, wherein the probability value that the image of the product to be searched and each image of the product in the product database are the same image of the product is calculated by using the following formula:
P(s,p,o)=P(s)P(o|s)P(p|s,o);
where P (s, P, o) is a probability value, s corresponds to an image size parameter, o corresponds to an image color parameter, and P corresponds to an image contour parameter.
7. The method as claimed in claim 1, wherein after the obtaining of the target image containing the image of the product to be searched and sent by the target terminal, the method further comprises:
based on an image network detection model, carrying out feature recognition on a target image to obtain a commodity feature parameter corresponding to the target image, wherein the commodity feature parameter corresponds to at least one of a size feature, a color feature and a contour feature;
and extracting the to-be-searched commodity image contained in the target image based on the commodity characteristic parameters.
8. An apparatus for determining merchandise information, comprising:
the system comprises an acquisition module, a search module and a display module, wherein the acquisition module is configured to acquire a target image which is sent by a target terminal and contains an image of a commodity to be searched, and the target image is used for acquiring commodity information of the commodity to be searched;
the extraction module is configured to extract the to-be-searched commodity image contained in the target image and acquire attribute parameters corresponding to the to-be-searched commodity image, wherein the attribute parameters are used for representing the image size, the image color and the image outline of the to-be-searched commodity image;
the calculation module is configured to calculate probability values of the to-be-searched commodity image and each commodity image in the commodity database as the same commodity image by using a Seq2Seq probability map model and the attribute parameters;
the matching module is configured to take the commodity image with the probability value exceeding a preset threshold value as a target commodity image successfully matched with the commodity image to be searched;
a sending module configured to send the commodity information corresponding to the target commodity image recorded in the commodity database to the target terminal.
9. An electronic device, comprising:
a memory for storing executable instructions; and the number of the first and second groups,
a processor which, when executed, causes the processor to perform the steps of the method of any one of claims 1 to 7.
10. A computer-readable storage medium storing computer-readable instructions that, when executed, perform the operations of the method of determining merchandise information of any one of claims 1-7.
CN202110945242.8A 2021-08-17 2021-08-17 Method, device, electronic equipment and medium for determining commodity information Pending CN113657273A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110945242.8A CN113657273A (en) 2021-08-17 2021-08-17 Method, device, electronic equipment and medium for determining commodity information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110945242.8A CN113657273A (en) 2021-08-17 2021-08-17 Method, device, electronic equipment and medium for determining commodity information

Publications (1)

Publication Number Publication Date
CN113657273A true CN113657273A (en) 2021-11-16

Family

ID=78480741

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110945242.8A Pending CN113657273A (en) 2021-08-17 2021-08-17 Method, device, electronic equipment and medium for determining commodity information

Country Status (1)

Country Link
CN (1) CN113657273A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103412938A (en) * 2013-08-22 2013-11-27 成都数之联科技有限公司 Commodity price comparing method based on picture interactive type multiple-target extraction
CN104765891A (en) * 2015-05-06 2015-07-08 苏州搜客信息技术有限公司 Searching shopping method based on pictures
CN104991954A (en) * 2015-07-20 2015-10-21 河海大学 Shopping searching system based on image search and realization method thereof
CN110942035A (en) * 2019-11-28 2020-03-31 浙江由由科技有限公司 Method, system, device and storage medium for acquiring commodity information
CN111597326A (en) * 2019-02-21 2020-08-28 北京京东尚科信息技术有限公司 Method and device for generating commodity description text
CN112597798A (en) * 2020-11-23 2021-04-02 广州创品知识产权服务有限公司 Method for identifying authenticity of commodity by using neural network
CN112925942A (en) * 2021-03-30 2021-06-08 中国建设银行股份有限公司 Data searching method, device, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103412938A (en) * 2013-08-22 2013-11-27 成都数之联科技有限公司 Commodity price comparing method based on picture interactive type multiple-target extraction
CN104765891A (en) * 2015-05-06 2015-07-08 苏州搜客信息技术有限公司 Searching shopping method based on pictures
CN104991954A (en) * 2015-07-20 2015-10-21 河海大学 Shopping searching system based on image search and realization method thereof
CN111597326A (en) * 2019-02-21 2020-08-28 北京京东尚科信息技术有限公司 Method and device for generating commodity description text
CN110942035A (en) * 2019-11-28 2020-03-31 浙江由由科技有限公司 Method, system, device and storage medium for acquiring commodity information
CN112597798A (en) * 2020-11-23 2021-04-02 广州创品知识产权服务有限公司 Method for identifying authenticity of commodity by using neural network
CN112925942A (en) * 2021-03-30 2021-06-08 中国建设银行股份有限公司 Data searching method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US10846534B1 (en) Systems and methods for augmented reality navigation
CN108229322B (en) Video-based face recognition method and device, electronic equipment and storage medium
CN109816441B (en) Policy pushing method, system and related device
CN107690657B (en) Trade company is found according to image
EP3028184B1 (en) Method and system for searching images
CN108416902B (en) Real-time object identification method and device based on difference identification
CN110321845B (en) Method and device for extracting emotion packets from video and electronic equipment
US11544510B2 (en) System and method for multi-modal image classification
US10275819B1 (en) Reducing incompatible pairings
US10134149B2 (en) Image processing
CN113762309B (en) Object matching method, device and equipment
CN113627411A (en) Super-resolution-based commodity identification and price matching method and system
CN111581423A (en) Target retrieval method and device
CN110807110A (en) Image searching method and device combining local and global features and electronic equipment
CN112200844A (en) Method, device, electronic equipment and medium for generating image
CN111695971B (en) Article recommendation method, apparatus and device, and computer storage medium
CN110674388A (en) Mapping method and device for push item, storage medium and terminal equipment
CN112104914B (en) Video recommendation method and device
KR102059017B1 (en) Control method, apparatus and system for knowledge sharing platform
CN114898192A (en) Model training method, prediction method, device, storage medium, and program product
CN113657273A (en) Method, device, electronic equipment and medium for determining commodity information
CN114742991A (en) Poster background image selection, model training, poster generation method and related device
CN114663748A (en) Method, device, electronic device and medium for identifying indoor object
CN111881338A (en) Printed matter content retrieval method based on social software light application applet
CN113111734A (en) Watermark classification model training method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination