使用深度学习时尚图像的图像相似性[暂停]

我有时尚数据集(衬衫,T恤,夹克,鞋......等)的图像,我试图从预先训练的模型(如初始v3)中使用特征向量提取找到视觉上相似的图像,然后计算其上的欧氏距离 . 类似的结果图像非常糟糕,我该如何改进呢?

  • 我读过一些人正在使用Siamese网络进行图像相似性,因此任何人都可以提供正确实现的链接或博客来引用Siamese网络 .

  • 您将遵循图像相似性的任何其他方法 .

我的图像相似度方法:

特征向量提取:

from keras.applications.inception_v3 import InceptionV3
from keras.models import model_from_json
from keras.models import Model

初始化模型:

model = InceptionV3(include_top=True,weights='imagenet',input_tensor=None,input_shape=None,pooling=None,classes=1000)
model.summary()

Model.summary()返回:

__________________________________________________________________________________________________
activation_86 (Activation)      (None, None, None, 3 0           batch_normalization_86[0][0]     
__________________________________________________________________________________________________
mixed9_1 (Concatenate)          (None, None, None, 7 0           activation_88[0][0]              
                                                                 activation_89[0][0]              
__________________________________________________________________________________________________
concatenate_2 (Concatenate)     (None, None, None, 7 0           activation_92[0][0]              
                                                                 activation_93[0][0]              
__________________________________________________________________________________________________
activation_94 (Activation)      (None, None, None, 1 0           batch_normalization_94[0][0]     
__________________________________________________________________________________________________
mixed10 (Concatenate)           (None, None, None, 2 0           activation_86[0][0]              
                                                                 mixed9_1[0][0]                   
                                                                 concatenate_2[0][0]              
                                                                 activation_94[0][0]              
__________________________________________________________________________________________________
avg_pool (GlobalAveragePooling2 (None, 2048)         0           mixed10[0][0]                    
__________________________________________________________________________________________________
predictions (Dense)             (None, 1000)         2049000     avg_pool[0][0]                   
==================================================================================================
Total params: 23,851,784
Trainable params: 23,817,352
Non-trainable params: 34,432
__________________________________________________________________________________________________

从第二个最后一层(分类图层之前)中提取要素:

feature_extractor = Model(inputs=model.input,outputs=model.get_layer("avg_pool").output) 
feature_extractor.summary()

feature_extractor.summary()返回:

__________________________________________________________________________________________________
activation_86 (Activation)      (None, None, None, 3 0           batch_normalization_86[0][0]     
__________________________________________________________________________________________________
mixed9_1 (Concatenate)          (None, None, None, 7 0           activation_88[0][0]              
                                                                 activation_89[0][0]              
__________________________________________________________________________________________________
concatenate_2 (Concatenate)     (None, None, None, 7 0           activation_92[0][0]              
                                                                 activation_93[0][0]              
__________________________________________________________________________________________________
activation_94 (Activation)      (None, None, None, 1 0           batch_normalization_94[0][0]     
__________________________________________________________________________________________________
mixed10 (Concatenate)           (None, None, None, 2 0           activation_86[0][0]              
                                                                 mixed9_1[0][0]                   
                                                                 concatenate_2[0][0]              
                                                                 activation_94[0][0]              
__________________________________________________________________________________________________
avg_pool (GlobalAveragePooling2 (None, 2048)         0           mixed10[0][0]                    
==================================================================================================
Total params: 21,802,784
Trainable params: 21,768,352
Non-trainable params: 34,432
__________________________________________________________________________________________________

然后我将图像传递给feature_extractor以生成特征向量

feature_extractor.predict("/Data/image.jpg")

返回特征向量特征向量数组的2048维数组:

[7.419160842895508, 8.623200416564941, 24.065059661865234, 33.89033126831055, 10.111995697021484, 54.383636474609375, 0.13048411905765533, 14.17300796508789, 0.21484050154685974, 111.1320571899414, 8.242669105529785, 50.098995208740234, 96.06512451171875, 52.48130798339844, 13.139274597167969, 83.28246307373047, 24.77132225036621, 0.0, 37.143497467041016, 3.920938730239868, 14.272159576416016, 51.09659194946289, 15.268967628479004, 8.792736053466797, 28.858179092407227, 74.84180450439453, 31.169937133789062, 72.40738677978516, 106.66470336914062, 12.300100326538086, 7.130587577819824, 4.586941719055176, 0.0, 11.915562629699707, 51.602142333984375, 41.02456283569336, 14.628108024597168, 14.407774925231934, 16.186546325683594, 105.25070190429688, 70.59832763671875, 24.390174865722656, 9.576026916503906, 16.037355422973633, 3.2167584896087646, 17.87139320373535, 3.9048826694488525, 130.63584899902344, 1.677222490310669, 12.692109107971191, 2.832904815673828, 25.176849365234375, 59.76185607910156, 16.548019409179688, 46.19266128540039, 4.240864276885986, 10.755373001098633, 6.786943435668945, 12.713360786437988, 72.60244750976562, 1.8564847707748413, 105.66324615478516, 1.2716662883758545, 35.4698371887207, 44.133182525634766, 71.61164093017578, 22.811721801757812, 20.949222564697266, 71.80155181884766, 88.30802917480469, 0.21282914280891418, 15.432644844055176, 51.26642990112305, 30.843408584594727, 21.703622817993164, 0.0, 67.56871795654297, 35.93377685546875, 3.1556150913238525, 13.651681900024414, 7.436631679534912, 58.33620071411133, 13.946868896484375, 46.934810638427734, 78.18228912353516, 0.0, 30.14881706237793, 0.1549142599105835, 4.213128089904785, 73.75365447998047, 7.588717937469482, 3.343059539794922, 0.7469207048416138, 40.98401641845703, 29.115781784057617, 0.1582040786743164, 19.59610939025879, 20.34789276123047, 12.490457534790039, 3.7011477947235107, 51.69283676147461, 12.30645751953125, 72.45278930664062, 85.32930755615234, 50.6312370300293, 78.09320068359375, 1.7501834630966187, 46.296112060546875, 29.00387191772461, 77.41340637207031, 31.15573501586914, 5.562755107879639, 0.0, 5.0951924324035645, 1.0076797008514404, 24.75736427307129, 97.5516586303711, 139.95887756347656, 62.085296630859375, 30.545703887939453, 1.2614691257476807, 23.848772048950195, 7.5445451736450195, 6.890486717224121, 13.527873039245605, 51.34092712402344, 0.0, 58.77238464355469, 0.008699500933289528, 106.84085083007812, 9.465051651000977, 21.290607452392578, 28.11859893798828, 10.50449275970459, 108.01073455810547, 11.317590713500977, 8.641714096069336, 35.807861328125, 4.947061538696289, 5.181309223175049, 5.179699420928955, 66.33169555664062, 94.03004455566406, 19.22562026977539, 11.055424690246582, 64.2845458984375, 12.254673957824707, 3.1823031902313232, 80.77490234375, 1.5030101537704468, 3.176321029663086, 2.5144190788269043, 55.27169418334961, 5.719231128692627, 1.0143487453460693, 75.46812438964844, 23.46000099182129, 42.02682876586914, 8.550379753112793, 19.022974014282227, 35.16703796386719, 10.638858795166016, 1.4874194860458374, 75.24284362792969, 26.435874938964844, 31.994062423706055, 13.095346450805664, 1.464053988456726, 11.275426864624023, 45.101097106933594, 5.446495532989502, 50.73252868652344, 8.792683601379395, 4.410120010375977, 0.42717111110687256, 0.664910078048706, 20.90326499938965, 10.43204402923584, 56.757266998291016, 0.684903085231781, 120.12178802490234, 28.85076904296875, 5.186663627624512, 0.3790673315525055, 6.736868858337402, 21.417415618896484, 45.8470344543457, 90.98025512695312, 12.299046516418457, 28.103404998779297, 79.88960266113281, 17.349645614624023, 32.24039840698242, 1.4266042709350586, 6.945397853851318, 18.56368637084961, 7.827826023101807, 7.836181163787842, 0.0, 55.423423767089844, 46.05062484741211, 24.328529357910156, 6.894294738769531, 1.2594281435012817, 17.052507400512695, 0.0, 19.581188201904297, 76.05712890625, 31.71302604675293, 56.44792556762695, 14.388214111328125, 10.466553688049316, 18.483108520507812, 10.77294635772705, 75.863525390625, 7.963228225708008, 4.14269495010376, 16.68117904663086, 3.1722912788391113, 79.38523864746094, 38.92118453979492, 12.957427024841309, 68.55252838134766, 35.71929168701172, 6.664746284484863, 143.734375, 111.55817413330078, 4.8858489990234375, 20.73882484436035, 10.162839889526367, 24.054534912109375, 4.667450904846191, 59.53026580810547, 13.141448020935059, 18.939786911010742, 7.02883768081665, 112.32382202148438, 5.745828628540039, 23.396987915039062, 0.9327143430709839, 49.64495849609375, 39.78536605834961, 22.570188522338867, 241.30963134765625, 17.266759872436523, 81.3651123046875, 33.700889587402344, 10.914896011352539, 56.49928283691406, 22.268482208251953, 5.034967422485352, 62.95594787597656, 0.8361147046089172, 30.079980850219727, 14.329500198364258, 105.77542114257812, 9.10531234741211, 30.050600051879883, 23.5904541015625, 59.410911560058594, 108.15399932861328, 1.20976722240448, 10.715088844299316, 14.926594734191895, 117.88621520996094, 3.833500385284424, 1.2925535440444946, 51.4284782409668, 40.581050872802734, 4.555631637573242, 21.89402198791504, 25.36479949951172, 1.0128151178359985, 7.741214752197266, 12.473889350891113, 17.99859619140625, 77.9517822265625, 37.56599426269531, 103.34252166748047, 1.0733906030654907, 22.176708221435547, 21.65045738220215, 16.858850479125977, 23.11016082763672, 7.233189105987549, 28.787433624267578, 23.668895721435547, 16.715517044067383, 85.01860809326172, 38.20671844482422, 56.045597076416016, 181.8358917236328, 76.30843353271484, 99.49220275878906, 2.371511220932007, 92.40242767333984, 3.05519437789917, 3.5983481407165527, 3.4789681434631348, 0.0, 16.38298797607422, 54.17288589477539, 12.15965747833252, 29.376813888549805, 2.5549216270446777, 35.46818923950195, 6.372951030731201, 67.93963623046875, 5.098380088806152, 31.09971809387207, 5.872959136962891, 5.433449745178223, 41.78693771362305, 4.1639556884765625, 21.558589935302734, 49.24274444580078, 2.4406986236572266, 63.541160583496094, 76.86371612548828, 0.4947751760482788, 8.041526794433594, 2.871741771697998, 5.187830924987793, 7.363678455352783, 28.20730972290039, 34.65083694458008, 2.0337514877319336, 0.5500648617744446, 6.104744911193848, 53.29713439941406, 0.25993049144744873, 1.9981791973114014, 13.017533302307129, 7.143669605255127, 1.5382205247879028, 31.397777557373047, 1.9213356971740723, 23.797691345214844, 0.1454421728849411, 0.04543348774313927, 0.0, 27.335346221923828, 4.040029048919678, 0.353441059589386, 7.862939357757568, 0.45496031641960144, 0.0, 0.7528364062309265, 6.707374572753906, 2.8647384643554688, 0.6094130873680115, 11.720376968383789, 0.1464654505252838, 4.252190589904785, 38.25260925292969, 3.2288599014282227, 1.6970208883285522, 20.867773056030273, 5.045334815979004, 0.07207386195659637, 4.446852684020996, 3.4127426147460938, 7.866805076599121, 4.090087890625, 0.37414371967315674, 1.6888550519943237, 4.029118061065674, 2.161294460296631, 2.423827886581421, 0.3545460104942322, 16.341442108154297, 5.78457498550415, 5.913646697998047, 14.779000282287598, 3.2064125537872314, 2.3784873485565186, 0.5141410231590271, 11.972989082336426, 17.804452896118164, 3.669949769973755, 1.0120991468429565, 8.806122779846191, 1.9446135759353638, 28.87332534790039, 16.75563621520996, 2.375347375869751, 4.760293006896973, 52.12990951538086, 30.478168487548828, 7.425809860229492, 1.0785387754440308, 19.8115291595459, 8.677778244018555, 4.881664752960205, 0.18329405784606934, 3.987793445587158, 0.44932910799980164, 7.0084099769592285, 15.702136039733887, 14.509209632873535, 0.0, 5.489116191864014, 9.1719970703125, 6.16997766494751, 24.097078323364258, 6.65699577331543, 12.178064346313477, 9.888891220092773, 9.674626350402832, 3.2149417400360107, 35.02132797241211, 27.136695861816406, 3.1172924041748047, 18.63030433654785, 3.4984750747680664, 2.841987133026123, 23.750822067260742, 7.233676910400391, 1.3226885795593262, 7.948265075683594, 15.668817520141602, 11.46500015258789, 7.439513206481934, 5.16952657699585, 1.070107102394104, 0.6395660638809204, 2.351363182067871, 1.7093088626861572, 2.95261812210083, 12.336292266845703, 7.515378952026367, 1.0208163261413574, 13.415802001953125, 8.179280281066895, 0.7442041039466858, 13.609195709228516, 1.0944764614105225, 5.513803958892822, 1.822812557220459, 0.11876089870929718, 0.003639484290033579, 0.2264619618654251, 19.306516647338867, 0.0, 0.8122791051864624, 11.219844818115234, 0.7174621224403381, 5.440781593322754, 6.924309730529785, 7.512838840484619, 1.054080605506897, 3.3326709270477295, 6.774548530578613, 52.66548156738281, 4.188279151916504, 10.96968936920166, 7.002529144287109, 18.56978988647461, 9.121986389160156, 2.6736466884613037, 0.18390147387981415, 5.342698574066162, 47.48337936401367, 0.9300484657287598, 1.5790634155273438, 18.18430519104004, 21.908246994018555, 25.767305374145508, 0.0, 0.23011505603790283, 15.582146644592285, 5.974945545196533, 2.3550565242767334, 7.552123546600342, 4.020209312438965, 3.414869785308838, 1.2225652933120728, 15.032990455627441, 6.377323627471924, 5.130660057067871, 2.958130359649658, 0.21975597739219666, 17.614011764526367, 4.846522808074951, 15.73286247253418, 0.3283799886703491, 3.3502371311187744, 0.26105543971061707, 1.26963210105896, 3.551265239715576, 0.03482220694422722, 12.5267915725708, 13.303572654724121, 0.7311785221099854, 0.9637091159820557, 5.305420398712158, 4.3160080909729, 0.16590075194835663, 4.56432580947876, 3.0604333877563477, 0.08879287540912628, 8.170633316040039, 3.1218152046203613, 20.48750114440918, 0.1758984625339508, 2.7965497970581055, 11.33189582824707, 9.051541328430176, 0.06681109964847565, 2.0327816009521484, 6.638280868530273, 40.25176239013672, 1.9904733896255493, 1.3956468105316162, 2.0757575035095215, 4.675225257873535, 2.4860875606536865, 13.159001350402832, 4.905486106872559, 4.624421119689941, 10.01542854309082, 1.9173609018325806, 7.075455665588379, 3.2758755683898926, 2.999741554260254, 1.4827104806900024, 35.42900085449219, 1.5138585567474365, 0.7829644680023193, 4.041186809539795, 107.01520538330078, 0.5691640377044678, 6.877431869506836, 17.991214752197266, 1.0226010084152222, 4.551053047180176, 3.429818868637085, 5.549013614654541, 20.434083938598633, 10.930233001708984, 8.62289047241211, 0.0, 4.686013698577881, 16.757680892944336, 6.138883590698242, 3.8226735591888428, 5.081935882568359, 12.612876892089844, 0.10047821700572968, 1.4935507774353027, 0.7308120727539062, 19.022796630859375, 15.33969783782959, 0.3488297164440155, 29.826818466186523, 0.6192470788955688, 0.024119120091199875, 5.19804048538208, 18.92319107055664, 0.0, 14.176295280456543, 1.068914771080017, 1.0303295850753784, 1.243738055229187, 25.245121002197266, 0.07039514183998108, 31.402555465698242, 5.472634315490723, 4.931351661682129, 20.119495391845703, 5.025755882263184, 11.753488540649414, 0.3588124215602875, 14.08265209197998, 2.0853962898254395, 0.0, 2.929774284362793, 15.226165771484375, 53.455230712890625, 6.535355091094971, 2.532522678375244, 5.117025375366211, 12.87203598022461, 5.508459568023682, 18.57247543334961, 8.643928527832031, 57.98722457885742, 3.054943323135376, 19.403244018554688, 1.3404514789581299, 3.4741733074188232, 20.62340545654297, 1.368177890777588, 116.55875396728516, 6.705841064453125, 0.536973237991333, 0.6895679831504822, 9.947880744934082, 8.592926025390625, 0.06511148065328598, 40.61166763305664, 1.1736292839050293, 5.696990966796875, 7.1441850662231445, 0.0, 1.6572195291519165, 8.200960159301758, 0.0, 3.5174782276153564, 2.34896183013916, 5.667850971221924, 1.4762438535690308, 0.050269920378923416, 23.69639778137207, 18.856210708618164, 0.45099806785583496, 9.999056816101074, 6.422543525695801, 2.8561878204345703, 5.164314270019531, 2.854896306991577, 16.74297523498535, 0.8106218576431274, 18.531848907470703, 1.0407942533493042, 4.906529426574707, 0.5310803651809692, 4.081845283508301, 0.4484965205192566, 13.673198699951172, 5.39747428894043, 11.312204360961914, 16.67293930053711, 47.06953811645508, 2.177997589111328, 9.088181495666504, 1.4314831495285034, 1.2936794757843018, 10.644730567932129, 5.266388893127441, 0.451576292514801, 8.824007034301758, 21.87322425842285, 0.26775312423706055, 5.596616744995117, 5.182149887084961, 3.615255117416382, 1.43692946434021, 16.25295639038086, 46.86508560180664, 2.622083902359009, 5.138001918792725, 49.65974044799805, 8.129448890686035, 2.4632222652435303, 12.31764030456543, 9.986449241638184, 0.20028068125247955, 1.855963110923767, 8.863971710205078, 31.614402770996094, 6.007044792175293, 13.268204689025879, 0.11531788110733032, 0.13062013685703278, 0.0, 0.9086307883262634, 0.16448286175727844, 6.814165115356445, 4.632791519165039, 9.611577033996582, 6.940618515014648, 4.186367988586426, 6.037024974822998, 1.3786543607711792, 3.3269336223602295, 0.0, 0.0, 1.3048495054244995, 7.394234657287598, 2.304245948791504, 3.794802188873291, 2.816251277923584, 0.005775373429059982, 7.011041641235352, 3.5243520736694336, 9.864545822143555, 13.374706268310547, 0.5728729963302612, 5.797256946563721, 10.683679580688477, 5.845647811889648, 19.943138122558594, 0.43434813618659973, 3.8016743659973145, 12.910009384155273, 4.512040138244629, 6.8438920974731445, 9.693440437316895, 15.186120986938477, 20.986860275268555, 1.8949437141418457, 3.353994131088257, 1.3588522672653198, 1.0895694494247437, 3.294860601425171, 62.266075134277344, 1.4530842304229736, 26.806154251098633, 27.828514099121094, 3.3024823665618896, 8.316515922546387, 0.0, 6.208588600158691, 0.6797203421592712, 0.3523513376712799, 5.948482990264893, 22.70315933227539, 17.540224075317383, 2.92362642288208, 50.98252487182617, 10.463058471679688, 11.508440971374512, 0.0, 0.1842517852783203, 4.222146034240723, 4.185004234313965, 1.4778355360031128, 2.6680350303649902, 67.3934326171875, 0.571215808391571, 18.09180450439453, 11.69790267944336, 1.1019072532653809, 1.7316207885742188, 7.434206008911133, 3.1316471099853516, 2.1406280994415283, 13.227638244628906, 7.187698841094971, 17.08979034423828, 1.063507080078125, 2.2394983768463135, 1.164263367652893, 22.23398208618164, 4.28063440322876, 1.7160305976867676, 5.7787933349609375, 6.0791916847229, 4.180172920227051, 3.7945663928985596, 7.2150468826293945, 13.334528923034668, 1.1453303098678589, 0.11783785372972488, 2.6204986572265625, 4.6466898918151855, 8.675786018371582, 34.78003692626953, 5.540207386016846, 13.372267723083496, 1.1634327173233032, 42.42079544067383, 9.161711692810059, 12.619868278503418, 5.50671911239624, 10.117006301879883, 20.040651321411133, 6.273746967315674, 8.192425727844238, 6.507718563079834, 6.136588096618652, 29.324344635009766, 0.9575154185295105, 12.754024505615234, 6.085378170013428, 6.79293966293335, 10.894765853881836, 4.342592239379883, 3.3968727588653564, 0.8912789821624756, 1.4903589487075806, 6.991884231567383, 11.58230209350586, 1.36651611328125, 5.418364524841309, 5.147785186767578, 7.03549337387085, 0.5779212713241577, 3.921940803527832, 8.852266311645508, 0.0, 2.2210307121276855, 12.6812105178833, 16.406007766723633, 2.7756543159484863, 16.604551315307617, 12.595382690429688, 0.03267153352499008, 1.575913429260254, 5.0575737953186035, 22.205350875854492, 1.518725037574768, 5.382706165313721, 35.56560134887695, 2.19743013381958, 0.5150073170661926, 6.61427116394043, 2.708772659301758, 3.5544002056121826, 23.953365325927734, 35.2757453918457, 7.515592098236084, 0.75522780418396, 45.397377014160156, 29.134628295898438, 10.014573097229004, 4.625641822814941, 6.888254642486572, 28.488357543945312, 6.5337653160095215, 17.9958553314209, 15.568618774414062, 10.958748817443848, 4.887149810791016, 10.42225170135498, 3.3239707946777344, 1.813398838043213, 5.849672317504883, 20.255096435546875, 3.187657594680786, 7.798175811767578, 6.475830078125, 16.988006591796875, 11.03145980834961, 0.39585447311401367, 27.01788330078125, 4.908291816711426, 1.850269079208374, 22.65439224243164, 0.6801972389221191, 2.0511534214019775, 2.3415536880493164, 5.796727657318115, 7.287721633911133, 5.103677749633789, 1.2242172956466675, 2.0141100883483887, 1.9710191488265991, 0.8497035503387451, 2.385183811187744, 5.76847505569458, 8.65746021270752, 14.455005645751953, 3.0221822261810303, 0.039966434240341187, 5.771625518798828, 4.358072280883789, 8.014742851257324, 14.6064453125, 5.198576927185059, 0.4259093999862671, 5.124489784240723, 11.295317649841309, 5.016160488128662, 1.9317704439163208, 2.61747407913208, 15.86410140991211, 2.2425904273986816, 4.900169849395752, 8.477692604064941, 3.3306283950805664, 9.9004545211792, 0.19090145826339722, 1.3991680145263672, 9.285393714904785, 2.8616061210632324, 21.219663619995117, 3.1787283420562744, 12.488513946533203, 27.06332778930664, 34.39862823486328, 3.740530014038086, 1.7836519479751587, 26.71168327331543, 2.892726182937622, 0.19768527150154114, 11.466840744018555, 2.3935203552246094, 2.816843271255493, 2.681276798248291, 15.672286033630371, 4.973681926727295, 6.528845310211182, 20.14687728881836, 1.0419247150421143, 0.6455062627792358, 3.9786972999572754, 0.0, 11.106728553771973, 7.622622013092041, 0.1577969193458557, 33.28050231933594, 1.998197317123413, 2.691652297973633, 6.829797744750977, 25.44583511352539, 2.6598610877990723, 12.359720230102539, 0.8283861875534058, 7.977543830871582, 18.43694496154785, 0.011907844804227352, 4.691750526428223, 7.822314262390137, 4.636333465576172, 0.21829473972320557, 12.83057689666748, 22.878110885620117, 21.009981155395508, 24.862361907958984, 3.529212474822998, 0.0, 2.6673550605773926, 1.6833078861236572, 28.148286819458008, 0.5527242422103882, 4.701816558837891, 9.942366600036621, 2.239434003829956, 0.0, 0.019456572830677032, 4.097091197967529, 0.8463788032531738, 1.1276088953018188, 15.327204704284668, 2.1769046783447266, 0.0, 4.107156276702881, 5.77813720703125, 0.0, 0.7825927734375, 2.0281057357788086, 5.986363410949707, 2.2204244136810303, 4.5751166343688965, 2.477205514907837, 25.540512084960938, 82.810302734375, 0.8091116547584534, 6.256868362426758, 12.50594711303711, 11.573144912719727, 1.5705008506774902, 5.578740119934082, 11.45565128326416, 31.774627685546875, 5.510531902313232, 1.01656973361969, 7.523709774017334, 4.562995433807373, 9.12511157989502, 0.2080678641796112, 134.4204864501953, 32.116172790527344, 4.025609016418457, 4.160796642303467, 7.476884841918945, 5.06948184967041, 14.374717712402344, 15.585643768310547, 7.292874336242676, 10.2877836227417, 15.213799476623535, 25.741043090820312, 22.128847122192383, 0.0, 7.589321613311768, 0.5195616483688354, 21.151350021362305, 33.65596389770508, 9.687292098999023, 0.44657599925994873, 7.017444610595703, 16.774614334106445, 0.9591465592384338, 0.0, 0.7737488746643066, 6.197311878204346, 6.401415824890137, 25.85735321044922, 32.388362884521484, 57.08523178100586, 2.9659066200256348, 0.30799999833106995, 0.30044761300086975, 9.585136413574219, 13.992673873901367, 22.35456085205078, 1.9181944131851196, 0.08106657862663269, 12.361776351928711, 35.29145812988281, 3.8620810508728027, 3.265735387802124, 31.51810073852539, 2.56954288482666, 21.40486717224121, 0.6496143341064453, 2.9477152824401855, 26.801210403442383, 3.3690054416656494, 2.897503614425659, 0.3099890947341919, 14.23989200592041, 5.415079116821289, 1.641578197479248, 5.7244768142700195, 18.762615203857422, 0.8714437484741211, 15.354095458984375, 16.053979873657227, 10.444900512695312, 0.949404239654541, 4.120090007781982, 1.899787187576294, 13.111212730407715, 20.738170623779297, 13.285242080688477, 0.8029466271400452, 0.44566547870635986, 7.622041702270508, 4.915953159332275, 2.0501160621643066, 12.81425666809082, 15.348104476928711, 3.256605386734009, 57.1334114074707, 18.991111755371094, 1.326252818107605, 0.026751775294542313, 0.9268482327461243, 0.5198072195053101, 27.10002899169922, 7.583792686462402, 5.77545166015625, 1.8808702230453491, 12.468960762023926, 27.44598388671875, 7.779076099395752, 1.3121778964996338, 13.486980438232422, 1.1915124654769897, 2.9925994873046875, 1.41506826877594, 1.0473986864089966, 0.42655783891677856, 20.81812286376953, 0.2856186032295227, 2.6189911365509033, 17.54158592224121, 8.545939445495605, 13.08292293548584, 0.08217054605484009, 17.857128143310547, 0.8675345778465271, 1.70241379737854, 9.34762954711914, 8.094539642333984, 3.708327293395996, 5.315796852111816, 11.267711639404297, 2.407172679901123, 13.00814151763916, 1.4364399909973145, 16.132875442504883, 3.044682025909424, 0.84748375415802, 14.996665000915527, 8.938036918640137, 15.933738708496094, 2.4965925216674805, 2.515606164932251, 0.18802839517593384, 7.140233993530273, 4.896945476531982, 7.718364238739014, 3.673597574234009, 3.1100330352783203, 0.2597547471523285, 2.187408685684204, 0.4804377555847168, 3.6866633892059326, 0.017580673098564148, 0.016061371192336082, 17.820314407348633, 5.497705936431885, 1.15803861618042, 0.8275629878044128, 1.131193995475769, 1.2456775903701782, 1.8996963500976562, 0.3764761984348297, 0.05742986500263214, 0.9602087736129761, 4.922675609588623, 4.324154376983643, 0.0005904729478061199, 1.3194429874420166, 2.931370496749878, 1.8390254974365234, 0.9210646748542786, 1.1357073783874512, 3.9478042125701904, 1.8335098028182983, 0.03350172936916351, 0.025582559406757355, 2.752189874649048, 1.6725397109985352, 4.321263313293457, 3.3664307594299316, 0.06585881114006042, 0.017375018447637558, 3.0970849990844727, 0.06656067073345184, 2.337148666381836, 0.7746750116348267, 10.064370155334473, 2.5658209323883057, 1.44347083568573, 0.48194780945777893, 4.088871479034424, 0.9955123662948608, 0.13595154881477356, 2.0341241359710693, 0.10287867486476898, 4.733814716339111, 2.3544769287109375, 3.070373773574829, 3.586549758911133, 2.5808355808258057, 0.06193127483129501, 1.110818862915039, 1.21857750415802, 1.2511378526687622, 0.019884666427969933, 2.853846788406372, 0.10188215970993042, 2.512155532836914, 0.6663708090782166, 0.5771605372428894, 2.5888519287109375, 0.6030470132827759, 0.7412119507789612, 1.2910408973693848, 1.1469171047210693, 1.4362847805023193, 1.2802187204360962, 0.09170670807361603, 1.3953561782836914, 3.5400466918945312, 0.313500314950943, 0.4853397309780121, 2.342233180999756, 1.018266201019287, 1.9889661073684692, 2.557016611099243, 6.0309553146362305, 4.049685955047607, 3.7037456035614014, 2.067932367324829, 0.6414439678192139, 4.177459716796875, 0.017923153936862946, 0.021460870280861855, 6.805071830749512, 0.9920603632926941, 0.12773020565509796, 0.7549864053726196, 0.6933461427688599, 2.4788293838500977, 3.7270731925964355, 1.3225706815719604, 0.967077910900116, 0.5559576749801636, 0.6404160857200623, 1.6919405460357666, 0.41032910346984863, 0.023314226418733597, 0.2252722680568695, 0.40234893560409546, 0.4967433512210846, 0.17297783493995667, 0.5531114339828491, 0.18501177430152893, 0.8030598163604736, 0.7605403661727905, 1.7317641973495483, 1.0846914052963257, 2.293170928955078, 0.4009022116661072, 1.9941800832748413, 0.5070436000823975, 0.02538997307419777, 1.8912959098815918, 0.20751303434371948, 0.08463169634342194, 1.9319947957992554, 2.7935054302215576, 1.2222752571105957, 0.010451164096593857, 0.07726317644119263, 0.8302397727966309, 0.6806948781013489, 1.655975103378296, 1.9028065204620361, 0.6957131028175354, 0.014203110709786415, 3.0645320415496826, 4.416065692901611,  1.2742345333099365, 0.5709096193313599, 3.225677490234375,..... ,8.262871742248535]

然后我使用特征向量上的欧几里德距离来计算相似度 . (我也尝试过余弦相似性,这也没有提供好的结果)

直到现在我只处理文本数据我没有图像数据经验所以请理解 .

回答(0)