Shoe identification method and apparatus, electronic device, and computer-readable storage medium
By constructing and comparing three-dimensional point clouds of shoes, the problem of subjective factors affecting manual identification is solved, achieving accurate identification of genuine and counterfeit shoes and reducing costs.
Patent Information
- Application Number
- CN202211568425.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-07
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2042-12-07
AI Technical Summary
In existing technologies, footwear authentication methods rely on human authenticators, which are easily affected by subjective factors, leading to inaccurate authentication and high transportation costs.
By receiving multiple two-dimensional images of the shoes to be identified, a three-dimensional point cloud is constructed and compared with the three-dimensional point cloud of the genuine product. Through preprocessing and parameterization, subjective factors are eliminated and the accuracy of identification is improved.
It enables objective and accurate identification of genuine and counterfeit shoes, reduces transportation costs, and improves identification efficiency.
Smart Images

Figure CN115760838B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of image processing, in particular, to a shoe identification method and device, an electronic device and a computer readable storage medium. BACKGROUND
[0002] In recent years, with the rise of fashion brands such as shoes and clothes, more and more consumers tend to choose brand commodities with design copyrights. Among these brand commodities, some limited edition shoes have high collection value, and their prices are rising. However, since the manufacturing cost of counterfeit products is not high, the high profit margin has given rise to the counterfeit industry chain of fashion shoes.
[0003] In order to protect the rights and interests of consumers and eliminate their concerns about buying counterfeit products at the price of genuine products, it is increasingly important to identify the authenticity of fashion shoes. Currently, shoe identification is mainly based on manual identification by an identification expert. The identification expert determines whether the shoe to be identified conforms to the genuine product process by judging the differences between the appearance, shoe label, insole, midsole, shoe box, etc. of the shoe to be identified and the genuine product.
[0004] Among them, the shoe label, insole, midsole, and shoe box are identification points on a two-dimensional plane. These identification points on a two-dimensional plane are less affected by angle factors, and the same brand manufacturer is relatively stable when using these identification points. For example, multiple shoes can use the same shoe label, insole, and shoe box, so the identification expert can relatively easily distinguish the objective differences between the genuine product and the counterfeit product. However, these identification points can be obtained through illegal means, such as buying genuine leather from the market, obtaining genuine shoe labels, insoles, shoe boxes, etc. from a subcontractor illegally. Therefore, the accuracy of identification through these identification points is not high.
[0005] In related technologies, a shoe last is used in the manufacturing process of shoes. Its function is to provide a unified reference when processing raw materials (leather, plastic, textile cloth, etc.) into finished products, so that shoes produced by different subcontractors can have a unified shoe type, i.e. appearance. The shoe last is an important production tool for brand manufacturers, which can directly affect the shape characteristics of the shoe. Different brand manufacturers also have their own proprietary shoe lasts, which are not easily spread to counterfeit manufacturers. Therefore, the appearance of the shoe can provide a relatively accurate identification result. However, since the appearance is three-dimensional information, and there are countless shoe styles, the identification expert will be affected by subjective factors and cannot obtain a relatively accurate identification conclusion. SUMMARY
[0006] Embodiments of the present application aim to provide a shoe identification method, device, electronic equipment and computer readable storage medium, to objectively identify the authenticity of a shoe to be identified, and to eliminate the problem of inaccurate identification caused by subjective factors of an identifier, and to obtain a more accurate identification result.
[0007] In a first aspect, embodiments of the present application provide a shoe identification method, which comprises: receiving a plurality of two-dimensional images of a shoe to be identified; constructing a three-dimensional point cloud of the shoe to be identified based on the plurality of two-dimensional images; comparing the three-dimensional point cloud with a genuine three-dimensional point cloud, and determining that the shoe to be identified is genuine when the comparison result meets a preset requirement. In this way, the authenticity of the shoe to be identified can be objectively identified, and the problem of inaccurate identification caused by subjective factors of an identifier can be eliminated, and a more accurate identification result can be obtained.
[0008] Optionally, the shoe identification method further comprises a preprocessing step for the genuine three-dimensional point cloud: obtaining a plurality of non-parametric point clouds corresponding to a plurality of genuine shoes to obtain a plurality of basic point clouds; obtaining a residual point cloud by differencing each basic point cloud with a template point cloud; the template point cloud is the average of the plurality of basic point clouds; performing dimension reduction processing on the residual point cloud to obtain component data of a preset dimension, and determining the component data of the preset dimension as a residual base; performing parametric representation on the basic point cloud according to the template point cloud and the residual base to obtain genuine parameter values of the same dimension and the same component as the residual point cloud. In this way, the genuine three-dimensional point cloud can be preprocessed to obtain genuine parameter values, so that the comparison can be made by parameter values when identifying the shoe to be identified, and it is more intuitive and reliable.
[0009] Optionally, the constructing of the three-dimensional point cloud of the shoe to be identified based on the plurality of two-dimensional images comprises: detecting a plurality of preset feature points of the shoe to be identified for each two-dimensional image to obtain a plurality of groups of feature points; calculating the internal parameters, external parameters and distortion parameters of a camera according to the plurality of groups of feature points according to a preset algorithm; the camera is used for shooting the plurality of two-dimensional images; projecting a target point cloud on each two-dimensional image based on the internal parameters, external parameters and distortion parameters of the camera to obtain a projection result; the target point cloud is a point cloud with the same dimension as the residual point cloud and with component parameter values in an initial state; determining a shoe feature point distribution map in the projection result; performing loss calculation on the shoe feature point distribution map and a segmentation distribution map to obtain a target parameter value corresponding to a loss calculation result meeting a loss requirement; and the comparing of the three-dimensional point cloud with the genuine three-dimensional point cloud, and determining that the shoe to be identified is genuine when the comparison result meets a preset requirement, comprises: comparing the target parameter value with the genuine parameter value, and determining that the shoe to be identified is genuine when the comparison result is within a preset error range. In this way, the identification result can be more objective and accurate.
[0010] Optionally, the target point cloud is determined based on the following steps: initializing component data of the same dimension and the same component as the genuine parameter value; calculating the product of the component data and the residual base; and summing the product and the template point cloud to obtain the target point cloud. In this way, the target point cloud can be parameterized to facilitate the subsequent comparison process of the three-dimensional point cloud.
[0011] Optionally, the constructing the three-dimensional point cloud of the shoe to be identified based on the plurality of two-dimensional images further comprises: for each of the two-dimensional images, performing binaryzation processing on the two-dimensional image to obtain a segmented binaryzation distribution map corresponding to the two-dimensional image; and the determining the shoe feature point distribution map in the projection result comprises: performing binaryzation processing on the projection result to determine a binaryzation distribution map of the shoe to be identified. In this way, by performing binaryzation processing on the two-dimensional image and then comparing the binaryzation distribution map with the segmented binaryzation distribution map, the cost of labeling image data can be reduced.
[0012] Optionally, the loss calculation between the shoe feature point distribution map and the segmented distribution map to obtain a target parameter value corresponding to a loss calculation result that meets a loss requirement comprises: performing loss calculation between the binaryzation distribution map and the segmented binaryzation distribution map, and if the loss value is less than a preset loss value, determining that the loss calculation result meets the loss requirement; or performing loss calculation between the binaryzation distribution map and the segmented binaryzation distribution map, and if the loss value remains stable, determining that the loss calculation result meets the loss requirement. In this way, by judging whether the loss value is less than a preset loss value or remains unchanged, it can be determined whether the current loss value is the target parameter value.
[0013] Optionally, the two-dimensional images are obtained based on the following steps: in response to receiving an identification request, obtaining basic information of a shoe to be identified; the basic information includes style information and size information; displaying a plurality of anchor point maps corresponding to the shoe to be identified according to the basic information; and receiving a plurality of two-dimensional images captured by a user based on the anchor point maps. In this way, the accuracy of reconstructing the three-dimensional point cloud can be improved while reducing the difficulty of the user's shooting.
[0014] In a second aspect, an embodiment of the present application provides a shoe identification device, which comprises: a receiving module configured to receive a plurality of two-dimensional images of a shoe to be identified; a constructing module configured to construct a three-dimensional point cloud of the shoe to be identified based on the plurality of two-dimensional images; and an identifying module configured to compare the three-dimensional point cloud with a genuine three-dimensional point cloud, and determine that the shoe to be identified is genuine when the comparison result meets a preset requirement. In this way, the authenticity of the shoe to be identified can be objectively identified, and the problem of inaccurate identification caused by subjective factors of an identifier can be excluded, so that a more accurate identification result can be obtained.
[0015] In a third aspect, an electronic device is provided, which includes a processor and a memory. The memory stores computer readable instructions which, when executed by the processor, perform the steps of the method according to the first aspect.
[0016] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program. The computer program, when executed by a processor, performs the steps of the method according to the first aspect.
[0017] Other features and advantages of the present application will be further described in the following description with reference to the drawings. Some of the features and advantages of the present application may also become apparent to those skilled in the art from the above description, and from the description that follows. The features and advantages of the present application may be realized and obtained by means of the structures particularly pointed out in the written description and claims, and combinations thereof. BRIEF DESCRIPTION OF DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments of the present application. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be considered as limiting the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.
[0019] Figure 1 A flow chart of a shoe identification method provided by the embodiments of the present application;
[0020] Figure 2 A structural block diagram of a shoe identification device provided by the embodiments of the present application;
[0021] Figure 3 A structural schematic diagram of an electronic device for executing a shoe identification method provided by the embodiments of the present application. DETAILED DESCRIPTION
[0022] The technical solutions of the embodiments of the present application will be described in detail below with reference to the drawings of the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all of the embodiments. The components of the embodiments of the present application described and shown in the drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of the present application.
[0023] It should be noted that similar reference numerals and letters refer to like items in the accompanying drawings, and that, once an item is defined in one drawing, it should not require further defining or explaining in subsequent drawings. Also, in the description of the present application, the terms "first", "second", and so on are used only to distinguish descriptions, and cannot be understood as indicating or implying relative importance.
[0024] It should be noted that the embodiments in the present application or the technical features in the embodiments can be combined without conflict.
[0025] In the related art, there is a scheme in which an artificial discriminator discriminates the authenticity of shoes by appearance. However, in this scheme, there is a problem of inaccurate discrimination caused by human subjective factors. In order to solve this problem, the present application provides a shoe discrimination method, device, electronic equipment and computer readable storage medium. Further, by reconstructing the three-dimensional point cloud of the shoe to be discriminated, the authenticity of the shoe to be discriminated is objectively discriminated by the three-dimensional point cloud, and the problem of inaccurate discrimination caused by the subjective factors of the discriminator is excluded.
[0026] The shoe discrimination method described above can be applied to a server such as a server, a cloud platform, etc., or a user terminal such as a mobile phone, a computer, etc.
[0027] In some application scenarios, when the shoe discrimination method described above is applied to a server, the server can receive a discrimination request sent by a user through a user terminal, the discrimination request can include related information of a shoe to be discriminated, then the three-dimensional point cloud of the shoe to be discriminated can be reconstructed according to the related information, and the authenticity of the shoe to be discriminated can be objectively discriminated based on the three-dimensional point cloud. The related information described above may, for example, include two-dimensional image information, style information, size information, etc. of the shoe to be discriminated.
[0028] In other application scenarios, when the shoe discrimination method described above is applied to a user terminal, the user terminal can receive related information of a shoe to be discriminated uploaded by a user, then the three-dimensional point cloud of the shoe to be discriminated can be reconstructed according to the related information, and the authenticity of the shoe to be discriminated can be objectively discriminated based on the three-dimensional point cloud.
[0029] By way of example, the present application is written for application to a server.
[0030] The defects of the above-mentioned schemes in the related art are the results obtained by the inventors after practice and careful research, therefore, the discovery process of the above-mentioned problems and the solutions proposed by the embodiments of the present application to the above-mentioned problems in the following should be the contributions made by the inventors to the present application in the process of the present application.
[0031] Please refer to Figure 1 which shows a flowchart of a shoe discrimination method provided by an embodiment of the present application. As shown in Figure 1As shown, the shoe identification method includes steps 101 to 103.
[0032] Step 101, receiving a plurality of two-dimensional images of a shoe to be identified;
[0033] In some application scenarios, a user can send a plurality of two-dimensional images of a shoe to be identified to a server through a user terminal, and then the server can receive these two-dimensional images. In other application scenarios, the user terminal can also send an identification request to the server, and can include a plurality of two-dimensional images in the identification request. In this way, when the server receives the identification request, it can also receive the plurality of two-dimensional images of the shoe to be identified. Further, these two-dimensional images may, for example, include side images, top-down images, front images, back images, etc. of the shoe to be identified.
[0034] Step 102, constructing a three-dimensional point cloud of the shoe to be identified based on the plurality of two-dimensional images;
[0035] After the server receives the plurality of two-dimensional images, it can construct a three-dimensional point cloud of the shoe to be identified. In some application scenarios, it may, for example, be constructed through a neural network model (such as a recurrent neural network).
[0036] Step 103, comparing the three-dimensional point cloud with a genuine three-dimensional point cloud, and determining that the shoe to be identified is genuine when the comparison result meets a preset requirement.
[0037] After the server constructs a three-dimensional point cloud of the shoe to be identified, it can compare this three-dimensional point cloud with a corresponding genuine three-dimensional point cloud. In some application scenarios, it may, for example, compare the positions of various feature points on the three-dimensional point cloud with those on the genuine three-dimensional point cloud.
[0038] After the server compares the three-dimensional point cloud with the genuine three-dimensional point cloud, it can obtain a comparison result, and if the comparison result meets a preset requirement, it can determine that the shoe to be identified is genuine. For example, after comparing the position information of various feature points, it can obtain the position difference of the same feature point, which can be regarded as the comparison result. If the comparison result meets the preset position error requirement, it can be determined that the shoe to be identified is genuine.
[0039] In this embodiment, through the above steps 101 to 103, the authenticity of the shoe to be identified can be objectively identified, the problem of inaccurate identification due to subjective factors of the identifier can be excluded, and a more accurate identification result can be obtained.
[0040] In addition, when the shoes to be identified are identified by the appraiser, the user needs to transport the shoes to be identified to the appraiser, and after the identification of the appraiser is completed, the user needs to return the shoes to be identified. In this way, the transportation cost is high. The embodiment can realize identification through the two-dimensional image of the shoes to be identified, thereby saving the transportation process of the shoes to be identified and reducing the identification cost.
[0041] In some optional implementations, the two-dimensional image is obtained based on the following steps:
[0042] Step A, in response to receiving an identification request, obtaining basic information of the shoes to be identified; the basic information includes style information and size information;
[0043] In some application scenarios, the server can obtain the basic information of the shoes to be identified when receiving the identification request. In these application scenarios, the server can send an instruction to the user terminal to instruct the user to upload the basic information.
[0044] Step B, according to the basic information, displaying a plurality of anchor point graphs corresponding to the shoes to be identified;
[0045] After the server receives the basic information, the server can display a plurality of anchor point graphs of the shoes to be identified based on the basic information. For example, the server receives the basic information of the style M and the size 37, and then displays a plurality of corresponding anchor point graphs to the user. In some application scenarios, the server can pre-obtain anchor point graphs of different sizes corresponding to a plurality of shoes, so that the corresponding anchor point graph can be matched according to the basic information after receiving the basic information. In these application scenarios, the anchor point graph can include, for example, a side front anchor point graph, an upper front anchor point graph, a front front anchor point graph, and a back front anchor point graph.
[0046] Step C, receiving a plurality of two-dimensional images photographed by the user based on the anchor point graphs.
[0047] After the server displays a plurality of anchor point graphs, the server can prompt the user to photograph the two-dimensional image of the shoes to be identified according to the anchor point graph. For example, for the upper front anchor point graph, the server can prompt the user to photograph from the upper edge of the shoes to be identified. In this way, each anchor point graph can correspond to a two-dimensional image. When the user photographs based on the anchor point graph, a plurality of two-dimensional images of the shoes to be identified are obtained. It should be noted that, in order to more conveniently process the two-dimensional image, the user can be further prompted to photograph in a pure color background (a pure white desktop, a wall, etc.).
[0048] In the implementation, by the steps A to C, the two-dimensional image of the to-be-authenticated image can be captured by the anchor point image, and when the plurality of two-dimensional images respectively match the respective anchor point images, it can be considered that the shooting distance between the camera and the to-be-authenticated shoe is the same. In this way, the shooting difficulty of the user can be reduced, and the accuracy of the reconstructed three-dimensional point cloud can be improved.
[0049] In some application scenarios, after receiving a two-dimensional image, the server can check the two-dimensional image to confirm whether the two-dimensional image can be used to construct the three-dimensional point cloud of the to-be-authenticated shoe. For example, after receiving the front image of the to-be-authenticated shoe captured by the user according to the front edge front shooting anchor point image, the server can detect whether the front image has the feature points such as the front end point of the toe and the two end points of the forefoot that should exist on the front image to determine whether the front image is qualified. If it is detected that the front image is not qualified, the front edge front shooting anchor point image can be provided again, and the user is prompted to shoot again. If it is detected that the front image is qualified, the next anchor point image can be continued to be displayed to the user until a plurality of two-dimensional images corresponding to a plurality of anchor point images are obtained. In this way, when constructing the three-dimensional point cloud, the situation that the construction fails due to the fact that a two-dimensional image cannot provide the corresponding shoe features can be avoided.
[0050] In some optional implementations, the shoe authentication method further includes a preprocessing step for the genuine three-dimensional point cloud:
[0051] Step 1, obtaining a plurality of non-parametric point clouds corresponding to a plurality of genuine shoes to obtain a plurality of basic point clouds;
[0052] In related technologies, when reconstructing a three-dimensional point cloud, non-parametric reconstruction or parametric reconstruction can be adopted.
[0053] Specifically, when the server adopts non-parametric reconstruction, all point clouds of the to-be-authenticated shoe need to be directly obtained by a 3D perception camera in the reconstruction process. The 3D perception camera may, for example, include a camera integrated with a TOF sensor (a sensor using the time of flight principle), a structured light, a binocular camera, etc. The TOF sensor and the structured light have high cost and limited detection depth, and have large noise. The binocular camera also has high cost because two almost identical cameras need to be configured on the mobile terminal of the user. Therefore, mobile terminals integrated with 3D perception cameras are less.
[0054] When the server adopts parametric reconstruction, a large number of non-parametric point clouds of target objects can be pre-collected for the current use scenario, and the point clouds of the to-be-authenticated shoe do not need to be obtained by the 3D perception camera in the reconstruction process. Therefore, the parametric reconstruction has low cost and low environmental requirements, and is more suitable for mobile terminals.
[0055] Therefore, the server can first obtain the non-parametric point cloud corresponding to the plurality of genuine shoes, and then perform parametric reconstruction. Here, in order to make the shoe style more abundant, the server can obtain a large number of genuine shoes, and for the same style of shoes, the non-parametric point cloud of shoes of different sizes can be obtained to obtain a plurality of basic point clouds.
[0056] In some application scenarios, the basic point cloud can be stored in a basic database. For example, if the matrix represents the non-parametric point cloud of each shoe, then the matrix of all N point clouds (i.e. ) can be stored as a basic database, and the greater the value of N corresponds to, the more abundant the shoe style stored in the basic database.
[0057] Step 2, difference between each of the basic point clouds and the template point cloud to obtain a residual point cloud; the template point cloud is the average of the plurality of basic point clouds;
[0058] In some application scenarios, the server can first sum the plurality of basic point clouds, and then take the average, which is the template point cloud. That is, if the basic point cloud in the above basic database is taken as the calculation object, the template point cloud obtained based thereon can be a matrix.
[0059] After the server obtains the template point cloud, it can difference each basic point cloud from the template point cloud to obtain a residual point cloud, so as to normalize the point cloud data. In some application scenarios, the server can also store the residual point cloud in the database to obtain a residual database. For example, a residual database corresponding to the above basic database can be obtained.
[0060] Step 3, dimension reduction processing is performed on the residual point cloud to obtain component data of a preset dimension, and the component data of the preset dimension is determined as a residual base;
[0061] After the server obtains the residual point cloud, it can perform dimension reduction processing on the residual point cloud to obtain component data of a preset dimension. Here, the preset dimension may, for example, include 10 dimensions, 15 dimensions, and other dimensions that can substantially represent the comprehensive index of the residual point cloud. In some application scenarios, dimension reduction processing may, for example, be performed by principal component analysis (PCA), independent component analysis (ICA), factor analysis (FA), etc.
[0062] After the server obtains the component data of the preset dimension, it can determine these component data as a residual base for subsequent calculation. For example, for the residual database of , the server can perform dimension reduction processing on the residual point cloud using PCA to obtain component data of a preset dimension of 10 dimensions, that is, a matrix of the template point cloud.
[0063] Step 4, parameterizing the base point cloud according to the template point cloud and the residual base to obtain a positive product parameter value of the same dimension and same component as the residual point cloud.
[0064] After the server obtains the template point cloud and the residual base, the server can parameterize the non-parameterized base point cloud to obtain a positive product parameter value of the same dimension and same component as the residual point cloud. For example, the server can parameterize the non-parameterized point cloud in the above-mentioned base database, i.e., a matrix of the template point cloud, to obtain a matrix, i.e., the above-mentioned positive product parameter value. a matrix of the template point cloud.
[0065] In the present implementation, through the above-mentioned steps 1 to 4, the positive product three-dimensional point cloud can be preprocessed to obtain a positive product parameter value, so that the parameter value can be compared when identifying the to-be-identified shoes, which is more intuitive and reliable.
[0066] In some optional implementations, the constructing, in step 102, of the three-dimensional point cloud of the to-be-identified shoes based on the plurality of two-dimensional images comprises the following sub-steps:
[0067] Sub-step 1021, detecting, for each of the two-dimensional images, a plurality of preset feature points of the to-be-identified shoes to obtain a plurality of groups of feature points.
[0068] The above-mentioned preset feature points may, for example, include a most front end point of a toe, two end points of a forefoot, a top point of a tongue, two top points of a collar, a rear top point of the collar, a last end point of a heel, etc.
[0069] In some application scenarios, the server can detect the above-mentioned preset feature points on each two-dimensional image. In this way, for a plurality of two-dimensional images, the same number of groups of feature points can be obtained. It should be noted that each two-dimensional image can show the appearance of the to-be-identified shoes at a certain angle, and therefore, the preset feature points that can be detected on each two-dimensional image may be the same or different when the angles are different. For example, for a front edge front image of the to-be-identified shoes, the detected preset feature points can include a most front end point A of a toe, which can also be detected in an upper edge downward image, but the most front end point A of the toe may not be detected in a side edge front image.
[0070] Sub-step 1022, calculating, according to the plurality of groups of feature points, an internal parameter, an external parameter and a distortion parameter of a camera according to a preset algorithm; the camera is used to capture the plurality of two-dimensional images.
[0071] After the server obtains the plurality of sets of feature points, the server can calculate the intrinsic parameters and the distortion parameters of the camera according to a preset algorithm. In some application scenarios, the intrinsic parameters and the distortion parameters can be obtained, for example, by using Zhang Zhengyou camera calibration method. Further, the intrinsic parameters and the distortion parameters can be brought into a calculation formula of a three-dimensional pose estimation algorithm (solvePNP algorithm) to obtain the extrinsic parameters of the camera. Here, the process of calculating the intrinsic parameters, the extrinsic parameters and the distortion parameters of the camera by using Zhang Zhengyou camera calibration method and solvePNP algorithm is known to those skilled in the art, and will not be described here. It should be noted that, in the present implementation, when the extrinsic parameters are calculated by using solvePNP algorithm, the point on the bottom center of the template point cloud projected onto the two-dimensional image should be taken as the origin of the world coordinate system, and the extrinsic parameters of the camera calculated based on each set of feature points should be converted with the origin of the world coordinate system.
[0072] In sub-step 1023, for each two-dimensional image, the target point cloud is projected on the two-dimensional image based on the intrinsic parameters, the extrinsic parameters and the distortion parameters of the camera to obtain a projection result; the target point cloud is a point cloud with the same dimension as the residual point cloud and with initial state of component parameter values.
[0073] In some application scenarios, the server can project the target point cloud onto each two-dimensional image based on the intrinsic parameters, the extrinsic parameters and the distortion parameters of the camera to obtain a corresponding projection result. In these application scenarios, the projection result can be obtained, for example, by using perspective projection.
[0074] In some optional implementation, the target point cloud is determined based on the following steps:
[0075] In step a, component data with the same dimension and the same components as the genuine parameter values are initialized.
[0076] In some application scenarios, the server can first initialize component data with the same dimension and the same components as the genuine parameter values. In these application scenarios, the server can initialize all the component data to 0, for example.
[0077] In step b, the product of the component data and the residual base is calculated.
[0078] After the server initializes the component data, the server can calculate the product of the component data and the residual base. For example, if the component data is represented by θ value and the residual base is represented by B, the expression of the corresponding product can be .
[0079] In step c, the product and the template point cloud are summed to obtain the target point cloud.
[0080] After the server obtains the product of the component data and the residual basis, the server can sum the product with the template point cloud to obtain the corresponding target point cloud. For example, if the product of the above-mentioned is represented as , the expression of the corresponding target point cloud can be, for example, .
[0081] In the implementation, the target point cloud can be represented parametrically through the above-mentioned steps a to c, so as to facilitate the subsequent comparison of the three-dimensional point cloud.
[0082] Sub-step 1024, determining a shoe feature point distribution map in the projection result;
[0083] After the server obtains the projection result, the server can determine a shoe feature point distribution map in the projection result. In some application scenarios, the server can determine the shoe feature point distribution map through a matting algorithm (a fine-grained object segmentation algorithm), for example.
[0084] Sub-step 1025, performing loss calculation on the shoe feature point distribution map and the segmentation distribution map to obtain a target parameter value corresponding to a loss calculation result satisfying a loss requirement;
[0085] After the server determines the shoe feature point distribution map, the server can perform loss calculation on the shoe feature point distribution map and the segmentation distribution map corresponding to the genuine shoes. In some application scenarios, loss calculation can be performed through an average absolute error function (an L1 loss function) or an average square error function (an L2 loss function), for example.
[0086] After the server performs loss calculation, the server can obtain a corresponding loss calculation result. At this time, the server can further determine whether the loss calculation result satisfies a loss requirement. The loss requirement can include, for example, that the loss calculation result is within an error range.
[0087] If the loss calculation result satisfies the loss requirement, a target parameter value can be obtained. In some application scenarios, the initialized component data can be iteratively optimized and solved through the gradient backpropagation function of the Python machine learning library pytorch to obtain the target parameter value.
[0088] In this way, the comparison of the three-dimensional point cloud and the genuine three-dimensional point cloud in step 103, which determines that the shoe to be identified is genuine when the comparison result satisfies a preset requirement, includes: comparing the target parameter value with the genuine parameter value, and determining that the shoe to be identified is genuine when the comparison result is within a preset error range.
[0089] After the server obtains the target parameter value, the server can compare the target parameter value with the genuine parameter value, and can determine that the to-be-authenticated shoe is a genuine product when the comparison result is within a preset error range. In some application scenarios, the server can compare the corresponding target parameter value with the genuine parameter value in each dimension. In these application scenarios, the server can also take the style and size of the genuine shoe as an index, and save the genuine parameter value in the genuine database. In this way, when the target parameter value is compared with the genuine parameter value, the corresponding genuine parameter value of the to-be-authenticated shoe can be quickly found from the numerous genuine parameter values.
[0090] In the implementation, the target parameter value representing the three-dimensional point cloud of the to-be-authenticated shoe can be obtained through the feature points in the plurality of two-dimensional images, and then the target parameter value can be compared with the genuine parameter value to obtain the difference between the three-dimensional point cloud of the to-be-authenticated shoe and the genuine three-dimensional point cloud, so that the authentication result is more objective and accurate.
[0091] In some optional implementation, the step 102 of constructing the three-dimensional point cloud of the to-be-authenticated shoe based on the plurality of two-dimensional images further includes: for each two-dimensional image, performing binaryzation processing on the two-dimensional image to obtain a segmentation binaryzation distribution corresponding to the two-dimensional image.
[0092] In some application scenarios, the server can obtain the segmentation distribution of the to-be-authenticated shoe in advance. In these application scenarios, the server can perform binaryzation processing on each two-dimensional image to obtain the segmentation binaryzation distribution corresponding to the to-be-authenticated shoe. In these application scenarios, the two-dimensional image can be binaryzation processed, for example, by a shoe segmentation network. The shoe segmentation network can include, for example, a target segmentation algorithm (Maskrcnn), a semantic segmentation algorithm (deeplab), and the like.
[0093] In this way, the step of determining the shoe feature point distribution in the projection result includes: performing binaryzation processing on the projection result to determine the binaryzation distribution of the to-be-authenticated shoe.
[0094] After the server obtains the segmentation binaryzation distribution, the server can further obtain the binaryzation distribution of the to-be-authenticated shoe. Specifically, the server can perform binaryzation processing on the projection result to obtain the binaryzation distribution of the to-be-authenticated shoe.
[0095] After obtaining the binaryzation distribution of the to-be-authenticated shoe, the binaryzation distribution can be loss calculated with the segmentation binaryzation distribution to obtain a target parameter value corresponding to a loss calculation result satisfying a loss requirement.
[0096] In the implementation, the cost of marking image data can be reduced by binarizing the two-dimensional image and then comparing the binarized distribution map with the segmented binarized distribution map.
[0097] In some optional implementations, the loss calculation between the shoe feature point distribution map and the segmented distribution map in the sub-step 1025 to obtain the target parameter value corresponding to the loss calculation result satisfying the loss requirement includes: loss calculation between the binarized distribution map and the segmented binarized distribution map, and if the loss value is less than a preset loss value, it is determined that the loss calculation result satisfies the loss requirement; or loss calculation between the binarized distribution map and the segmented binarized distribution map, and if the loss value remains stable, it is determined that the loss calculation result satisfies the loss requirement.
[0098] In some application scenarios, when the loss calculation is performed by using the binarized distribution map, if the calculated loss value is less than a preset loss value, it can be determined that the loss calculation result satisfies the loss requirement. In these application scenarios, the preset loss value may, for example, include 0.01 millimeter, 0.015 millimeter, and other error values that can substantially regard the binarized distribution map as the segmented binarized distribution map.
[0099] In other application scenarios, when the loss calculation is performed by using the binarized distribution map, if the calculated loss value no longer changes, it can be determined that the loss calculation result satisfies the loss requirement.
[0100] In the implementation, whether the current obtained loss value is the target parameter value can be determined by judging whether the loss value is less than a preset loss value or no longer changes.
[0101] Please refer to Figure 2 which shows a structural block diagram of a shoe identification device provided by an embodiment of the present application. The shoe identification device can be a module, a program segment or code on an electronic device. It should be understood that the device corresponds to the above Figure 1 method embodiments, and can perform Figure 1 the steps involved in the method embodiments. The specific functions of the device can be referred to the description in the above, and the detailed description is appropriately omitted here to avoid repetition.
[0102] Optionally, the shoe identification device includes a receiving module 201, a constructing module 202 and an identification module 203. The receiving module 201 is configured to receive a plurality of two-dimensional images of a shoe to be identified. The constructing module 202 is configured to construct a three-dimensional point cloud of the shoe to be identified based on the plurality of two-dimensional images. The identification module 203 is configured to compare the three-dimensional point cloud with a genuine three-dimensional point cloud, and determine that the shoe to be identified is genuine when a comparison result meets a preset requirement.
[0103] Optionally, the shoe identification device further comprises a preprocessing module, and the preprocessing module is configured to perform a preprocessing step on the genuine three-dimensional point cloud: obtaining a plurality of non-parametric point clouds corresponding to a plurality of genuine shoes to obtain a plurality of basic point clouds; performing a difference operation between each of the basic point clouds and a template point cloud to obtain a residual point cloud; the template point cloud is an average value of the plurality of basic point clouds; performing dimension reduction processing on the residual point cloud to obtain component data of a preset dimension, and determining the component data of the preset dimension as a residual basis; and performing a parametric representation on the basic point cloud according to the template point cloud and the residual basis to obtain a genuine parameter value of the same dimension and the same component as the residual point cloud.
[0104] Optionally, the construction module 202 is further configured to: for each of the two-dimensional images, detect a plurality of preset feature points of the shoe to be identified to obtain a plurality of groups of feature points; calculate, according to the plurality of groups of feature points, an internal parameter, an external parameter, and a distortion parameter of a camera according to a preset algorithm; the camera is used for shooting the plurality of two-dimensional images; for each of the two-dimensional images, project a target point cloud on the two-dimensional image based on the internal parameter, the external parameter, and the distortion parameter of the camera to obtain a projection result; the target point cloud is a point cloud of the same dimension as the residual point cloud and has an initialization state of component parameter value; determine a shoe feature point distribution map in the projection result; perform loss calculation on the shoe feature point distribution map and a segmentation distribution map to obtain a target parameter value corresponding to a loss calculation result that meets a loss requirement; and the identification module 203 is configured to: compare the target parameter value with the genuine parameter value, and determine that the shoe to be identified is genuine when a comparison result is within a preset error range.
[0105] Optionally, the target point cloud is determined based on the following steps: initializing component data of the same dimension and the same component as the genuine parameter value; calculating a product of the component data and the residual basis; and summing the product and the template point cloud to obtain the target point cloud.
[0106] Optionally, the construction module 202 is further configured to: for each of the two-dimensional images, perform a binaryzation processing on the two-dimensional image to obtain a segmentation binaryzation distribution map corresponding to the two-dimensional image; and perform a binaryzation processing on the projection result to determine a binaryzation distribution map of the shoe to be identified.
[0107] Optionally, the construction module 202 is further configured to: perform loss calculation on the binaryzation distribution map and the segmentation binaryzation distribution map, and determine that a loss calculation result meets a loss requirement if a loss value is less than a preset loss value; or perform loss calculation on the binaryzation distribution map and the segmentation binaryzation distribution map, and determine that the loss calculation result meets the loss requirement if the loss value remains stable.
[0108] Optionally, the two-dimensional image is acquired based on the following steps: in response to receiving the identification request, acquiring basic information of the shoes to be identified; the basic information includes style information and size information; according to the basic information, displaying a plurality of anchor point images corresponding to the shoes to be identified; and receiving a plurality of two-dimensional images captured by the user based on the anchor point images.
[0109] It should be noted that, for the convenience and brevity of description, the specific working process of the apparatus described above can refer to the corresponding process in the foregoing method embodiments, which will not be described herein.
[0110] Please refer to Figure 3 , Figure 3 A structural schematic diagram of an electronic device for performing a shoe identification method is provided in the embodiments of the present application. The electronic device can include at least one processor 301, such as a CPU, at least one communication interface 302, at least one memory 303, and at least one communication bus 304. The communication bus 304 is used to realize the direct connection communication of these components. The communication interface 302 of the device in the embodiments of the present application is used to communicate signaling or data with other node devices. The memory 303 can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The memory 303 can also be at least one storage device located away from the aforementioned processor. The memory 303 stores computer readable instructions. When the computer readable instructions are executed by the processor 301, the electronic device can perform the method process described above. Figure 1
[0111] It can be understood that, Figure 3 The structure shown is only schematic. The electronic device can include more or fewer components than those shown in the figure, or have a different configuration from that shown in the figure. Figure 3 The components shown in the figure can be realized in hardware, software, or a combination thereof. Figure 3 Figure 3 The components shown in the figure can be realized in hardware, software, or a combination thereof.
[0112] The embodiments of the present application provide a computer readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method process performed by the electronic device in the method embodiment shown in the foregoing Figure 1
[0113] The embodiment of the present application provides a computer program product, the computer program product comprises a computer program stored on a non-transitory computer readable storage medium, the computer program comprises program instructions, when the program instructions are executed by a computer, the computer can execute the method provided by the above-mentioned method embodiments, for example, the method can comprise the following steps: receiving a plurality of two-dimensional images of a to-be-authenticated shoe; constructing a three-dimensional point cloud of the to-be-authenticated shoe based on the plurality of two-dimensional images; comparing the three-dimensional point cloud with a genuine three-dimensional point cloud, and determining that the to-be-authenticated shoe is a genuine product when a comparison result meets a preset requirement.
[0114] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other manners. The above-described device embodiments are merely illustrative, for example, the division of the units is only a logical function division, and there can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different parts can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0115] In addition, the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments.
[0116] In addition, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0117] In this paper, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations.
[0118] The above only describes the embodiments of the present application and is not used to limit the protection scope of the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A shoe authentication method characterized by comprising: The method comprises: receiving a plurality of two-dimensional images of a shoe to be identified; constructing a three-dimensional point cloud of the shoe to be identified based on the plurality of two-dimensional images; comparing the three-dimensional point cloud with a genuine three-dimensional point cloud, and determining that the shoe to be identified is genuine when the comparison result meets a preset requirement; the method further comprises a preprocessing step for the genuine three-dimensional point cloud: obtaining a plurality of non-parametric point clouds corresponding to a plurality of genuine shoes, to obtain a plurality of basic point clouds; differencing each of the basic point clouds from a template point cloud to obtain a residual point cloud; the template point cloud is the average of the plurality of basic point clouds; performing dimension reduction processing on the residual point cloud to obtain component data of a preset dimension, and determining the component data of the preset dimension as a residual basis; performing parametric representation on the basic point cloud according to the template point cloud and the residual basis to obtain genuine parameter values of the same dimension and the same component as the residual point cloud; the method of constructing a three-dimensional point cloud of the shoe to be identified based on the plurality of two-dimensional images comprises: for each of the two-dimensional images, detecting a plurality of preset feature points of the shoe to be identified to obtain a plurality of groups of feature points; calculating the internal parameters, external parameters and distortion parameters of a camera according to the plurality of groups of feature points according to a preset algorithm; the camera is used to capture the plurality of two-dimensional images; for each of the two-dimensional images, projecting a target point cloud on the two-dimensional image based on the internal parameters, external parameters and distortion parameters of the camera to obtain a projection result; the target point cloud is a point cloud of the same dimension as the residual point cloud and with component parameter values in an initial state; determining a shoe feature point distribution map in the projection result; performing loss calculation on the shoe feature point distribution map and a genuine distribution map corresponding to a genuine shoe to obtain target parameter values corresponding to a loss calculation result that meets a loss requirement; and the method of comparing the three-dimensional point cloud with a genuine three-dimensional point cloud, and determining that the shoe to be identified is genuine when the comparison result meets a preset requirement, comprises: comparing the target parameter values with the genuine parameter values, and determining that the shoe to be identified is genuine when the comparison result is within a preset error range.
2. The method of claim 1, wherein, The target point cloud is determined based on the following steps: initializing component data of the same dimension and the same component as the genuine parameter values; calculating the product of the component data and the residual basis; summing the product and the template point cloud to obtain the target point cloud.
3. The method of claim 1, wherein, performing binaryzation processing on a two-dimensional image of a genuine shoe corresponding to the shoe to be identified through a shoe segmentation network to obtain the genuine distribution map; and the method of determining a shoe feature point distribution map in the projection result comprises: performing binaryzation processing on the projection result to determine a binaryzation distribution map of the shoe to be identified. the method of performing loss calculation on the shoe feature point distribution map and a genuine distribution map corresponding to a genuine shoe to obtain target parameter values corresponding to a loss calculation result that meets a loss requirement comprises:
4. The method of claim 3, wherein, performing loss calculation on the binaryzation distribution map and the genuine distribution map, and determining that the loss calculation result meets the loss requirement if the loss value is less than a preset loss value; or The loss calculation result is determined to meet the loss requirement if the loss value remains stable.
5. The method of claim 1, wherein, The two-dimensional image is obtained based on the following steps: In response to receiving the identification request, obtaining the basic information of the shoes to be identified; the basic information includes style information and size information; According to the basic information, displaying a plurality of anchor point maps corresponding to the shoes to be identified; Receiving a plurality of two-dimensional images captured by a user based on the anchor point maps.
6. A shoe authentication device, comprising: Comprise: A receiving module for receiving a plurality of two-dimensional images of shoes to be identified; A construction module for constructing a three-dimensional point cloud of the shoes to be identified based on the plurality of two-dimensional images; An identification module for comparing the three-dimensional point cloud with a genuine three-dimensional point cloud, and determining that the shoes to be identified are genuine when the comparison result meets a preset requirement; The shoe identification device further comprises a preprocessing module, which is used to perform a preprocessing step on the genuine three-dimensional point cloud: obtaining a plurality of non-parametric point clouds corresponding to a plurality of genuine shoes to obtain a plurality of basic point clouds; subtracting each basic point cloud from a template point cloud to obtain a residual point cloud; the template point cloud is the average of the plurality of basic point clouds; performing dimension reduction processing on the residual point cloud to obtain component data of a preset dimension, and determining the component data of the preset dimension as a residual basis; According to the template point cloud and the residual basis, the basic point cloud is parameterized to obtain a genuine parameter value with the same dimension and the same component as the residual point cloud; The construction module is further used to: for each two-dimensional image, detect a plurality of preset feature points of the shoes to be identified to obtain a plurality of feature point groups; according to the plurality of feature point groups, calculate the internal parameters, external parameters and distortion parameters of a camera according to a preset algorithm; the camera is used to capture the plurality of two-dimensional images; for each two-dimensional image, project a target point cloud on the two-dimensional image based on the internal parameters, external parameters and distortion parameters of the camera to obtain a projection result; the target point cloud is a point cloud with the same dimension as the residual point cloud and the component parameter value in an initialization state; Determine a shoe feature point distribution map in the projection result; Perform loss calculation on the shoe feature point distribution map and a genuine distribution map corresponding to a genuine shoe to obtain a target parameter value corresponding to a loss calculation result that meets the loss requirement; And the identification module is used to: compare the target parameter value with the genuine parameter value, and determine that the shoes to be identified are genuine when the comparison result is within a preset error range.
7. An electronic device, comprising: The computer program is executed by the processor to run the method of any one of claims 1-5.
8. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to run the method of any one of claims 1-5.
Citation Information
Patent Citations
An article authentication method and device
CN109919635A