Method for searching for goods in shopping mall based on image, readable storage medium and computer equipment

文档序号:1937580 发布日期:2021-12-07 浏览:4次 中文

阅读说明:本技术 一种基于图像找寻商城商品的方法、可读存储介质及计算机设备 (Method for searching for goods in shopping mall based on image, readable storage medium and computer equipment ) 是由 孙勇 于 2021-09-13 设计创作,主要内容包括:本发明公开了一种基于图像找寻商城商品的方法、可存储介质及计算机设备,所述方法包括:将商品库中的商品图片生成图片向量,得到原始图片生成向量;将商品库中的所述商品图片去掉背景;再将去掉背景之后的图片生成图片向量,得到去背景图片生成向量;将所述原始图片生成向量和所述去背景图片生成向量保存到向量数据库中;将用户上传的图片生成图片向量,得到上传图片生成向量;将所述用户上传的图片去掉背景,再将去掉背景之后的上传的图片生成图片向量,得到去背景上传图片生成向量;应用所述上传图片生成向量和所述去背景上传图片生成向量到所述向量数据库中查找符合相似度阈值的最相似的图片,将满足条件的图片及其对应的商品返回业务方。(The invention discloses a method for searching for a commodity in a mall based on an image, a storage medium and computer equipment, wherein the method comprises the following steps: generating a picture vector by the commodity pictures in the commodity library to obtain an original picture generation vector; removing the background of the commodity pictures in the commodity library; generating a picture vector by the picture with the background removed to obtain a background-removed picture generation vector; storing the original picture generation vector and the background-removed picture generation vector into a vector database; generating a picture vector from a picture uploaded by a user to obtain an uploaded picture generating vector; removing the background of the picture uploaded by the user, and generating a picture vector by the picture uploaded after the background is removed to obtain a background-removed uploaded picture generation vector; and applying the uploaded picture generation vector and the background-removed uploaded picture generation vector to the vector database to search the most similar picture meeting the similarity threshold, and returning the picture meeting the conditions and the corresponding commodity to the business party.)

1. A method for searching for goods in a mall based on images is characterized by comprising the following steps,

s1: generating a picture vector by the commodity pictures in the commodity library to obtain an original picture generation vector;

s2: removing the background of the commodity pictures in the commodity library;

s3: generating a picture vector by the picture with the background removed to obtain a background-removed picture generation vector;

s4: storing the original picture generation vector and the background-removed picture generation vector into a vector database;

s5: generating a picture vector from a picture uploaded by a user to obtain an uploaded picture generating vector;

s6: removing the background of the picture uploaded by the user, and generating a picture vector by the picture uploaded after the background is removed to obtain a background-removed uploaded picture generation vector;

s7: and applying the uploaded picture generation vector and the background-removed uploaded picture generation vector to the vector database to search the most similar picture meeting the similarity threshold, and returning the picture meeting the conditions and the corresponding commodity to the business party.

2. The method for finding the products in the mall based on the image as claimed in claim 1, wherein the method for generating the picture vector comprises: vgg16 model.

3. The method for searching for the commodities in the mall based on the image as claimed in claim 1, wherein the background removing method comprises: rembg background removal tool.

4. The method for searching for mall commodities based on images as claimed in claim 1, wherein said vector database is a milvus vector database.

5. The image-based mall commodity searching method according to claim 1, wherein the similarity threshold is a decimal between 0 and 0.5.

6. The method for searching for mall commodities based on images as claimed in claim 5, wherein the picture is similar as the acquaintance value is closer to 0, and vice versa.

7. A readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to perform the method for image-based shopping mall items according to any one of claims 1 to 6.

8. A computer device comprising a processor and a memory, wherein the memory is configured to store a computer program; the processor, when executing the computer program stored on the memory, is configured to implement the steps of the method for finding mall items based on images according to any one of claims 1 to 6.

Technical Field

The invention relates to the technical field of computer networks, in particular to a method for searching for commodities in a mall based on images.

Background

The operation colleagues need to associate the commodities uploaded by the users with the commodities existing in the commodity library of the company, but the character information of the commodities uploaded by the users is not described clearly, and the commodities to which the commodities in the commodity library correspond are not determined, so that the commodity pictures uploaded by the users are expected to be compared with the commodity pictures in the commodity library, and similar commodities are found quickly.

The prior art has the following defects:

generally, a picture uses a certain model to extract features to generate a picture vector, the picture vector is stored in a certain database, and a new picture also generates a vector to be searched in the database to find out the most similar picture.

Because the different backgrounds of the pictures increase interference when the model extracts the picture features, the similarity of the two pictures is low, and the two pictures are not sure whether the two pictures are the same commodity or not.

Disclosure of Invention

The embodiment of the invention provides a method for searching for a commodity in a mall based on an image. The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview and is intended to neither identify key/critical elements nor delineate the scope of such embodiments. Its sole purpose is to present some concepts in a simplified form as a prelude to the more detailed description that is presented later.

According to a first aspect of the present invention, there is provided a method for searching for a mall commodity based on an image, including:

s1: generating a picture vector by the commodity pictures in the commodity library to obtain an original picture generation vector;

s2: removing the background of the commodity pictures in the commodity library;

s3: generating a picture vector by the picture with the background removed to obtain a background-removed picture generation vector;

s4: storing the original picture generation vector and the background-removed picture generation vector into a vector database;

s5: generating a picture vector from a picture uploaded by a user to obtain an uploaded picture generating vector;

s6: removing the background of the picture uploaded by the user, and generating a picture vector by the picture uploaded after the background is removed to obtain a background-removed uploaded picture generation vector;

s7: and applying the uploaded picture generation vector and the background-removed uploaded picture generation vector to the vector database to search the most similar picture meeting the similarity threshold, and returning the picture meeting the conditions and the corresponding commodity to the business party.

In some embodiments, the method for generating the picture vector is: vgg16 model.

In some embodiments, the background removing method is: rembg background removal tool.

In some embodiments, the vector database is a millius vector database.

In some embodiments, the similarity threshold is a fraction between 0-0.5.

In some embodiments, the closer the picture acquaintance values are to 0, the more similar, and vice versa.

According to a second aspect of the present invention there is provided a readable storage medium storing one or more programs which are executable by one or more processors to implement a method for image-based searching for mall items according to the first aspect of the present application.

According to a third aspect of the present invention there is provided a computer apparatus comprising a processor and a memory, wherein the memory is adapted to store a computer program; the processor, when executing the computer program stored in the memory, is configured to implement the steps of the method for finding mall goods based on images according to the first aspect of the present application.

The technical scheme provided by the embodiment of the invention has the following beneficial effects: the accuracy of identifying pictures of the same commodity with different backgrounds is improved.

It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.

FIG. 1 is a flow diagram illustrating a method for image-based searching for mall items in accordance with an exemplary embodiment;

FIG. 2 is a diagram illustrating items in an item store according to an exemplary embodiment;

FIG. 3 is a diagram illustrating items in a backgrouted merchandise store according to an exemplary embodiment;

FIG. 4 is a diagram illustrating a user uploading a picture, according to an example embodiment;

FIG. 5 is an illustration of an uploaded picture after background removal, in accordance with an exemplary embodiment;

FIG. 6 is a diagram illustrating query matching results FIG. 1 in accordance with an exemplary embodiment;

FIG. 7 is a diagram illustrating query match results FIG. 2 in accordance with an exemplary embodiment;

FIG. 8 is a diagram illustrating query match results FIG. 3 in accordance with an exemplary embodiment;

FIG. 9 is an illustration of a query match result FIG. 4 in accordance with an exemplary embodiment;

10a-10b are diagrams illustrating a user uploading a picture according to an embodiment shown in an exemplary embodiment;

11a-11b are diagrams illustrating uploaded pictures after background removal according to an example embodiment;

FIG. 12 is a contrast diagram illustrating the difference in physical location after background removal in accordance with an exemplary embodiment;

FIG. 13 is a diagram illustrating a process of co-locating physical objects according to an exemplary embodiment;

FIG. 14 is a diagram illustrating a process of co-locating physical objects according to an exemplary embodiment;

FIG. 15 is a diagram illustrating a process of co-locating physical objects in accordance with an exemplary embodiment;

16a-16b are diagrams illustrating a process of co-locating material objects according to an exemplary embodiment.

Detailed Description

The following description and the drawings sufficiently illustrate specific embodiments of the invention to enable those skilled in the art to practice them. The examples merely typify possible variations. Individual components and functions are optional unless explicitly required, and the sequence of operations may vary. Portions and features of some embodiments may be included in or substituted for those of others. The scope of embodiments of the invention encompasses the full ambit of the claims, as well as all available equivalents of the claims. Embodiments may be referred to herein, individually or collectively, by the term "invention" merely for convenience and without intending to voluntarily limit the scope of this application to any single invention or inventive concept if more than one is in fact disclosed. Herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed. The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the structures, products and the like disclosed by the embodiments, the description is relatively simple because the structures, the products and the like correspond to the parts disclosed by the embodiments, and the relevant parts can be just described by referring to the method part.

Example 1:

the invention is further described with reference to the following figures and examples:

a method for searching for products in a mall based on images as shown in fig. 1 comprises,

s1: applying vgg16 model to generate picture vector from commodity picture in commodity library to obtain original picture generating vector;

s2: removing the background of the commodity picture in the commodity library by applying a rembg background removing tool;

s3: generating a picture vector by using the vgg16 model to the picture with the background removed to obtain a background-removed picture generating vector;

s4: storing the original picture generation vector and the background-removed picture generation vector into a millius vector database;

s5: generating a picture vector from the picture uploaded by the user by applying vgg16 model to obtain an uploaded picture generating vector;

s6: removing the background of the picture uploaded by the user by using a rembg background removing tool, and generating a picture vector by using an vgg16 model to the picture uploaded after the background is removed to obtain a background-removed uploaded picture generating vector;

s7: and applying the uploaded picture generation vector and the background-removed uploaded picture generation vector to the vector database to search the most similar picture meeting the similarity threshold, and returning the picture meeting the conditions and the corresponding commodity to the business party.

According to the scheme, further, the similarity threshold value is a decimal between 0 and 0.5.

According to the above scheme, further, the picture is more similar as the acquaintance value is closer to 0, and vice versa.

Example 1:

s1: applying vgg16 model to generate picture vector from the commodity picture shown in fig. 2 in commodity library, to obtain original picture generating vector (it can be understood that the picture is represented by a string of numbers);

[0.10660044103860855,0.011570872738957405,0.0,0.0,0.06611234694719315,0.053439367562532425,0.0,0.02384275570511818,0.015891825780272484,0.028737736865878105,0.00018076665583066642,0.0,0.03093094751238823,0.0,0.015757272019982338,0.02330806478857994,0.0,0.021922966465353966,0.06089325621724129,0.034078601747751236,0.002110821194946766,0.0,0.0,0.08938027173280716,0.0,0.0027704027015715837,0.031603701412677765,0.02707478031516075,0.02341054007411003,0.00801286194473505,0.003175549441948533,0.0566675066947937,0.06464564055204391,0.0,0.10407082736492157,0.0,0.035556625574827194,0.0420391671359539,0.0,0.08118084073066711,0.06883202493190765,0.03125198557972908,0.023625576868653297,0.010807045735418797,0.02299412339925766,0.17206443846225739,0.009302015416324139,0.0,0.0,0.010259914211928844,0.01816776767373085,0.026693515479564667,0.0427345372736454,0.04714709520339966,0.04274678975343704,0.008113889023661613,0.11438143998384476,0.007879446260631084,0.012549896724522114,0.01663544587790966,0.04380473494529724,0.0,0.0337664857506752,0.0034124981611967087,0.08186658471822739,0.0,0.0,0.06635169684886932,0.0,0.0,0.0,0.1469927430152893,0.006802096497267485,0.04152765870094299,0.0,0.006926360074430704,0.019796600565314293,0.005489744711667299,0.0,0.0,0.0,0.0,0.07850982993841171,0.06571851670742035,0.026488792151212692,0.08096398413181305,0.012625844217836857,0.015400010161101818,0.013754907064139843,0.024423561990261078,0.0,0.0,0.021806344389915466,0.0,0.055531010031700134,0.09701550751924515,0.00839533843100071,0.022231683135032654,0.0,0.012884353287518024,0.06920027732849121,0.03967772424221039,0.009165124036371708,0.0,0.0351153202354908,0.0,0.027930734679102898,0.08796800673007965,0.014076005667448044,0.03432779759168625,0.0,0.0,0.0,0.0,0.0,0.0,0.023128554224967957,0.03576350212097168,0.07399170845746994,0.01100870966911316,0.04071199893951416,0.0,0.0,0.0,0.0,0.08397942036390305,0.0,0.004974612034857273,0.0260379109531641,0.03956220671534538,0.012762613594532013,0.0,0.041987158358097076,0.014223229140043259,0.01834884285926819,0.0,0.040834154933691025,0.04415493831038475,0.039992474019527435,0.027630658820271492,0.0,0.0,0.0012158880708739161,0.0,0.005533190444111824,0.0,0.059855811297893524,0.04583972319960594,0.011175782419741154,0.024391744285821915,0.0,0.0,0.06223970279097557,0.019909275695681572,0.008094655349850655,0.03195500001311302,0.0,0.030009044334292412,0.0,0.029328832402825356,0.036219026893377304,0.06636867672204971,0.011184651404619217,0.04369804635643959,0.0055448804050683975,0.000502882816363126,0.0,0.0,0.03928624838590622,0.02563481032848358,0.048377200961112976,0.0,0.016135457903146744,0.0,0.0205939132720232,0.05619284510612488,0.0021339855156838894,0.008474907837808132,0.04248573258519173,0.01331242173910141,0.02766570635139942,0.03351423144340515,0.011345409788191319,0.0,0.010844994336366653,0.0,0.023475786671042442,0.010026772506535053,0.11861398071050644,0.0,0.0,0.04241766408085823,0.004391415975987911,0.0,0.02197570912539959,0.047629013657569885,0.019284378737211227,0.0,0.0,0.0,0.0,0.010297607630491257,0.020002376288175583,0.0,0.0,0.03446338698267937,0.08361378312110901,0.00045530148781836033,0.07876734435558319,0.19161370396614075,0.036321207880973816,0.017031410709023476,0.0,0.03345596417784691,0.01386303547769785,0.020944885909557343,0.0,0.041523244231939316,0.0,0.06003280356526375,0.0,0.021209491416811943,0.05457201600074768,0.07678322494029999,0.0,0.02814880758523941,0.04765066131949425,0.14139683544635773,0.13262277841567993,0.03231354057788849,0.0312998965382576,0.03386746346950531,0.0,0.0,0.06667924672365189,0.014104527421295643,0.0,0.018017537891864777,0.05076327174901962,0.007434734143316746,0.06850791722536087,0.0,0.0053357919678092,0.0,0.03045300766825676,0.024152863770723343,0.013286430388689041,0.11401120573282242,0.08094645291566849,0.01132231205701828,0.004567322786897421,0.07335145771503448,0.0,0.05021174997091293,0.020161673426628113,0.06603067368268967,0.06650586426258087,0.004236564040184021,0.06184743344783783,0.03751175105571747,0.0,0.0,0.017187997698783875,0.040006089955568314,0.0,0.01980489119887352,0.026273498311638832,0.030187319964170456,0.0,0.051965322345495224,0.0,0.0,0.028620218858122826,0.01275753416121006,0.0,0.027003591880202293,0.15191367268562317,0.08833172172307968,0.0,0.024442099034786224,0.0,0.04917571321129799,0.012688807211816311,0.03534460440278053,0.0,0.0,0.0,0.07028691470623016,0.018397843465209007,0.03952964022755623,0.0,0.09575142711400986,0.014724220149219036,0.0,0.09191861748695374,0.0,0.02450628951191902,0.0,0.1312980055809021,0.04805978015065193,0.015767987817525864,0.0,0.016335174441337585,0.0,0.0,0.006516426336020231,0.008243383839726448,0.04913835600018501,0.0,0.030299276113510132,0.0,0.0,0.002772884676232934,0.0,0.0,0.015141869895160198,0.026495063677430153,0.033859096467494965,0.0,0.0351850725710392,0.07507962733507156,0.028982140123844147,0.05023618042469025,0.011486105620861053,0.01083812303841114,0.0,0.007351400796324015,0.0,0.04038742929697037,0.0,0.0,0.02895709127187729,0.0,0.0023732762783765793,0.07293233275413513,0.05235700309276581,0.0,0.0,0.0,0.0,0.05657404661178589,0.013925161212682724,0.024223465472459793,0.007884153164923191,0.07780427485704422,0.014008201658725739,0.04537733644247055,0.0072076995857059956,0.0,0.13750958442687988,0.022913236171007156,0.0,0.0016785827465355396,0.0,0.0,0.010446072556078434,0.03019353188574314,0.0,0.07377375662326813,0.1017790138721466,0.0059386189095675945,0.0,0.0,0.0385981947183609,0.0,0.014530022628605366,0.0,0.042597778141498566,0.0,0.0377989299595356,0.0,0.007654855493456125,0.03808857128024101,0.0,0.012413891032338142,0.0,0.0,0.0,0.02262442745268345,0.0067945667542517185,0.0,0.026868579909205437,0.013007278554141521,0.003251843387261033,0.16486935317516327,0.023801300674676895,0.03474604710936546,0.04698288068175316,0.222385436296463,0.02555493824183941,0.0,0.04920998588204384,0.0,0.0,0.02913868986070156,0.0,0.0,0.0,0.013216489925980568,0.0,0.0,0.0528169684112072,0.004249841906130314,0.03226202353835106,0.0,0.0,0.0,0.02938721515238285,0.0,0.0,0.007276702206581831,0.030039995908737183,0.18036440014839172,0.0,0.028039343655109406,0.0,0.03715028241276741,0.031414858996868134,0.08536501973867416,0.006481893826276064,0.0,0.0,0.0,0.021734138950705528,0.0,0.004248527344316244,0.0,0.010590179823338985,0.029206950217485428,0.014352470636367798,0.01703571528196335,0.0,0.0,0.10720452666282654,0.0213328767567873,0.0046380809508264065,0.006298047956079245,0.0,0.02862473577260971,0.03796178847551346,0.1377488225698471,0.024535920470952988,0.0,0.04820242524147034,0.0068219248205423355,0.022123491391539574,0.0,0.28396275639533997,0.020454496145248413,0.05765378102660179,0.01536070741713047,0.05479682981967926,0.023833097890019417,0.023094967007637024,0.03386042267084122,0.062981516122818,0.0009720897651277483,0.012818294577300549,0.005774923134595156,0.10242266952991486,0.0,0.018796663731336594,0.0,0.014706194400787354,0.05897080525755882,0.056779470294713974,0.013397496193647385,0.013707835227251053,0.007320788688957691,0.011330663226544857,0.020837582647800446,0.020585492253303528,0.01065487414598465,0.009652740322053432,0.16669583320617676,0.0,0.0,0.0,0.0,0.035787519067525864,0.02094193920493126,0.06183364987373352,0.0790119543671608,0.023085128515958786,0.0,0.023453745990991592,0.044912051409482956,0.11001137644052505,0.0,0.01923353411257267,0.0,0.0038492754101753235,0.04775603488087654,0.018417542800307274,0.049442511051893234,0.0007898983894847333,0.028749532997608185,0.0,0.0,0.10623755306005478,0.027657028287649155,0.0,0.059560906141996384,0.016627147793769836,0.0,0.0027516833506524563,0.0,0.052508655935525894,0.03813757002353668,0.0,0.0,0.0033986326307058334]

s2: removing the background of the commodity picture in the commodity library by applying a rembg background removing tool, wherein as shown in fig. 3, the complex background is removed and replaced by a white background;

s3: generating a picture vector by using the vgg16 model to the picture with the background removed to obtain a background-removed picture generating vector;

[0.1349542886018753,0.0,0.0,0.03162460774183273,0.10800360888242722,0.06675443798303604,0.017024274915456772,0.016931472346186638,0.005941486451774836,0.035644762217998505,0.0,0.023718228563666344,0.03398769721388817,0.0,0.05381642282009125,0.012642262503504753,0.0,0.0,0.05881268531084061,0.0450388565659523,0.0,0.027950938791036606,0.0,0.11759238690137863,0.05099480599164963,0.008262816816568375,0.06822925060987473,0.10484322160482407,0.0098327761515975,0.03928589075803757,0.004103207029402256,0.0098862424492836,0.09509608894586563,0.0,0.020940985530614853,0.031812455505132675,0.000487556797452271,0.1455792933702469,0.0,0.10388469696044922,0.05741100758314133,0.02875172160565853,0.026291733607649803,0.0,0.04044226184487343,0.08997730910778046,0.058625344187021255,0.0,0.020409811288118362,0.007831614464521408,0.010361342690885067,0.004123901482671499,0.05197993665933609,0.054419297724962234,0.10458484292030334,0.007019672077149153,0.009222445078194141,0.0,0.0,0.06493967771530151,0.09640577435493469,0.025679901242256165,0.06367483735084534,0.03634138032793999,0.0962933599948883,0.0,0.0,0.0786374881863594,0.0,0.0,0.0404384508728981,0.07414547353982925,0.0,0.06148494780063629,0.0,0.013598091900348663,0.0,0.005716555751860142,0.0,0.0,0.0,0.0,0.1328011155128479,0.027267828583717346,0.0,0.0751451775431633,0.01793363131582737,0.012977950274944305,0.0,0.06980109959840775,0.0,0.0,0.04421387240290642,0.0,0.12937293946743011,0.11926252394914627,0.0,0.006500144023448229,0.009104828350245953,0.0249424297362566,0.01628774404525757,0.0012470001820474863,0.025348056107759476,0.0,0.007943283766508102,0.0,0.0,0.07017988711595535,0.0002631196693982929,0.05605315417051315,0.028714464977383614,0.0,0.0,0.0,0.0,0.0,0.013435798697173595,0.014190411195158958,0.0,0.021085143089294434,0.0,0.00917311105877161,0.0,0.018278611823916435,0.012684846296906471,0.06376365572214127,0.0,0.0,0.005217352416366339,0.05026313662528992,0.002195495180785656,0.0,0.019871467724442482,0.0,0.025812111794948578,0.0,0.08628736436367035,0.1102447435259819,0.02555079571902752,0.0,0.011549812741577625,0.0,0.01674969121813774,0.0,0.030121702700853348,0.0,0.04335835948586464,0.026742592453956604,0.0,0.0046135601587593555,0.016508810222148895,0.0,0.07989218086004257,0.0,0.06545627117156982,0.023241858929395676,0.0,0.03601975366473198,0.0,0.04766891151666641,0.012546547688543797,0.11451202630996704,0.0,0.059476643800735474,0.016122976318001747,0.0022967576514929533,0.0,0.0,0.020712729543447495,0.0,0.024563495069742203,0.005886836443096399,0.006639549508690834,0.0,0.05128702521324158,0.03737982362508774,0.0,0.04816943034529686,0.023838413879275322,0.03382917121052742,0.000619184342212975,0.10532693564891815,0.010576054453849792,0.0,0.0,8.564091695006937e-05,0.025573566555976868,0.020405743271112442,0.19762161374092102,0.0,0.01798156648874283,0.0,0.028954507783055305,0.0,0.06232163682579994,0.0,0.0,0.002345907036215067,0.0,0.0,0.0,0.025317512452602386,0.0,0.0,0.0,0.0,0.09592008590698242,0.0,0.014130542054772377,0.1646680384874344,0.023592844605445862,0.0,0.0,0.05449691414833069,0.0,0.04729307070374489,0.0,0.07921165972948074,0.0,0.05196519196033478,0.0,0.0132079953327775,0.027508769184350967,0.044498689472675323,0.0,7.035646558506414e-05,0.0905476063489914,0.1520729959011078,0.16385874152183533,0.058867327868938446,0.12061643600463867,0.07048418372869492,0.0,0.005753134377300739,0.0,0.005024943500757217,0.020816663280129433,0.03012518212199211,0.0,0.009170515462756157,0.09853146225214005,0.0,0.022267362102866173,0.0,0.045945629477500916,0.04833381995558739,0.0,0.0875970646739006,0.1004924327135086,0.0,0.0,0.02397914230823517,0.0016114107565954328,0.03535499423742294,0.0,0.005294774658977985,0.05578712373971939,0.0,0.08011608570814133,0.0069626253098249435,0.0,0.0,0.003177070524543524,0.03003810904920101,0.0,0.00954684428870678,0.0,0.04437072202563286,0.0,0.0,0.0,0.0,0.0,0.0048851617611944675,0.0,0.01990988664329052,0.03930942714214325,0.03820490092039108,0.0,0.0023445512633770704,0.0,0.0,0.0,0.0,0.001332485699094832,0.00018099522276315838,0.0,0.06378740072250366,0.007923584431409836,0.014337308704853058,0.03042537346482277,0.08911629766225815,0.0050973775796592236,0.025959616526961327,0.08309141546487808,0.0,0.008361293002963066,0.007431227248162031,0.06533593684434891,0.03758082538843155,0.019495300948619843,0.0,0.029267339035868645,0.0,0.044407524168491364,0.03154945373535156,0.022677697241306305,0.0,0.0,0.0,0.009385906159877777,0.03089674934744835,0.00805378146469593,0.0,0.018878154456615448,0.0,0.019337566569447517,0.0,0.0,0.059116922318935394,0.06894290447235107,0.03292885422706604,0.012658989988267422,0.017109913751482964,0.0216587632894516,0.0,0.011469876393675804,0.0,0.036583755165338516,0.0,0.015868529677391052,0.0,0.009701431728899479,0.0,0.0,0.06652054190635681,0.003430064069107175,0.0,0.005476729944348335,0.001172715681605041,0.10566465556621552,0.004486337769776583,0.0,0.04629597067832947,0.07844647020101547,0.0,0.018532440066337585,0.0,0.0,0.11748995631933212,0.0,0.0,0.01386808231472969,0.0,0.0,0.027968479320406914,0.053722064942121506,0.0,0.10118222236633301,0.05556820333003998,0.0,4.909709969069809e-05,0.0,0.033541642129421234,0.0,0.0,0.0,0.028079228475689888,0.0,0.051613207906484604,0.0,0.0,0.0,0.0,0.017947912216186523,0.006524861324578524,0.01875319331884384,0.0,0.017173610627651215,0.0,0.0,0.02456969954073429,0.015740355476737022,0.04089393839240074,0.008615111000835896,0.00962687935680151,0.008494687266647816,0.03861184045672417,0.2689133584499359,0.0,0.0,0.04949785768985748,0.0,0.0,0.07468404620885849,0.0,0.0017325700027868152,0.0,0.059120047837495804,0.01821700669825077,0.0,0.003323507960885763,0.026719145476818085,0.050239380449056625,0.0,0.0,0.0,0.042815130203962326,0.0,0.0,0.0,0.029178742319345474,0.007754191756248474,0.0,0.0,0.0,0.03682946413755417,0.0,0.09339296072721481,0.0,0.0,0.0,0.0047095706686377525,0.06355699151754379,0.0,0.011825655587017536,0.0,0.006169151980429888,0.0,0.018400216475129128,0.05545934662222862,0.0,0.0,0.11067736893892288,0.0,0.0,0.0,0.0,0.014032134786248207,0.06073131039738655,0.06084626913070679,0.03803812339901924,0.012546245008707047,0.0,0.0346071682870388,0.0,0.0,0.22086627781391144,0.010613402351737022,0.0,0.05446823686361313,0.05257873982191086,0.03285214304924011,0.0,0.00206663622520864,0.046364326030015945,0.026944899931550026,0.02548292651772499,0.0,0.1010068729519844,0.0,0.0,0.0,0.0,0.012228320352733135,0.033734165132045746,0.0514335110783577,0.02570278011262417,0.0,0.009459157474339008,0.02954394742846489,0.010261137038469315,0.0,0.07768458127975464,0.17534896731376648,0.014631933532655239,0.0,0.0,0.0,0.0,0.015598172321915627,0.05854782089591026,0.03443540632724762,0.0,0.0,0.0,0.035802293568849564,0.0829777717590332,0.016192728653550148,0.08486311137676239,0.0,0.01884964108467102,0.08674290776252747,0.0,0.0278690867125988,0.014289948157966137,0.015827329829335213,0.012254385277628899,0.04328262060880661,0.07931209355592728,0.011892634443938732,0.0,0.09170077741146088,0.01942604035139084,0.004072435200214386,0.0,0.0,0.01877903752028942,0.04602300003170967,0.0,0.0004253564402461052,0.0]

s4: storing the original picture generation vector and the background-removed picture generation vector into a millius vector database;

the millivus needs to set an id for each vector, so that which picture is can be identified by the id, the original picture vector in the first step is set with an id 10001, and the background picture vector in the third step is set with an id 10002; then storing the two vectors into millivus;

s5: the picture uploaded by the user shown in fig. 4 is used for testing to see whether 10001 or 10002 pictures can be found, and the returned similarity value is within the threshold range, and the similarity value returned by the milvus is a decimal between 0 and 2, and is more similar as the similarity value is closer to 0, otherwise, the threshold is set to be 0.3 in this example, the smaller the threshold is, the more accurate the result is, and the same product can be considered as long as the similarity value of the returned picture vector is less than 0.3.

The picture shown in fig. 6 has a similarity value of 0.45475172996520996;

the picture shown in fig. 7 has a similarity value of 0.498405784368515;

the picture shown in fig. 8 has a similarity value of 0.29607057571411133;

the picture shown in fig. 9 has a similarity value of 0.5561721920967102.

Example 2:

and (3) processing for matching similarity optimization of different object sizes:

top graph length and width 600 x 600 as shown in fig. 10a, link:

http://img.alicdn.com/imgextra/i3/2076971977/O1CN01ryFCvB1QTVj2Ct2Kn_!!0-item_pic.jpg_600x600q90.jpg

as shown in fig. 10b, lower graph length 790 x 1088, link:

https://img.alicdn.com/imgextra/i2/2076971977/O1CN01rpBrRA1QTViyGF57E_!!2076971977.jpg

as shown in fig. 11a and 11b, the upper graph and the lower graph are respectively background-removed to obtain the following two background-removed pictures, the upper graph has a length and a width of 600 × 600, and the lower graph has an actual length and a width: 1088 x 1088, after removing the background, the graph is transformed into a square with the maximum side length, the original graph pixel is 790 x 1088, so this is transformed into a square with 1088 x 1088, and then the two graphs are compared to have the similar value: 0.12442220002412796, respectively;

as shown in fig. 12, it is found through the test case that if the two pictures are similar to each other in nature, but the white-low distance is different or the object is located in the position of the white background, the similarity between the two pictures is also affected.

An algorithm is implemented so that two real objects are at the same position and the same size in the picture, thereby improving the similarity.

As shown in fig. 13, in the first step, the picture is edge-whitened, and only the real object part is retained.

As shown in fig. 14, the second step scales the real object into an image with a maximum edge of 200 pixels.

As shown in fig. 15, the third step creates a 224 × 224 white background picture, which displays the real object in the center.

As shown in fig. 16a and 16b, the two picture sizes, position, white background distance and physical size are relatively close. The resulting similarity value was 0.037911172956228256 (more similar as closer to 0), which was more similar than before. This gives the user a more confident picture matching result.

Example 2:

a memory unit storing and executing instructions comprising: the readable storage medium stores one or more programs, which are executable by one or more processors, to implement the XXX image-based shopping mall goods searching method as described in embodiment 1 of the present application.

Example 3:

a computer apparatus comprising a processor and a memory, wherein the memory is for storing a computer program; the processor is configured to implement the steps of the method for searching for a mall commodity based on an image when executing the computer program stored in the memory.

Embodiments of the subject matter and the functional operations described in this specification can be implemented in: digital electronic circuitry, tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and their structural equivalents, or a combination of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions, encoded on a tangible, non-transitory program carrier for execution by, or to control the operation of, data processing apparatus. Alternatively or additionally, the program instructions may be encoded on an artificially generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode and transmit information to suitable receiver apparatus for execution by the data processing apparatus. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them.

The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform corresponding functions by operating on input data and generating output. The processes and logic flows can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit).

Computers suitable for executing computer programs include, for example, general and/or special purpose microprocessors, or any other type of central processing unit. Generally, a central processing unit will receive instructions and data from a read-only memory and/or a random access memory. The basic components of a computer include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto-optical disks, or optical disks. However, a computer does not necessarily have such a device. Moreover, a computer may be embedded in another device, e.g., a mobile telephone, a Personal Digital Assistant (PDA), a mobile audio or video player, a game console, a Global Positioning System (GPS) receiver, or a portable storage device such as a Universal Serial Bus (USB) flash drive, to name a few.

Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., an internal hard disk or a removable disk), magneto-optical disks, and CD ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.

While this specification contains many specific implementation details, these should not be construed as limitations on the scope of any invention or of what may be claimed, but rather as descriptions of features specific to particular embodiments of particular inventions. Certain features that are described in this specification in the context of separate embodiments can also be implemented in combination in a single embodiment. In other instances, features described in connection with one embodiment may be implemented as discrete components or in any suitable subcombination. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination.

Thus, particular embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve desirable results. Further, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some implementations, multitasking and parallel processing may be advantageous.

The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

It is to be understood that the present invention is not limited to the procedures and structures 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 invention is limited only by the appended claims.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:文本配图的方法、装置及电子设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!