{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "#Tous les codes sont basés sur l'environnement suivant\n", "#python 3.7\n", "#opencv 3.1.0\n", "#pytorch 1.4.0\n", "\n", "import torch\n", "from torch.autograd import Variable\n", "import torch.nn as nn\n", "import torch.nn.functional as F\n", "import cv2\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "import random\n", "import math\n", "import pickle\n", "import random\n", "from PIL import Image\n", "import sys" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "# Les fonctions dans ce bloc ne sont pas utilisées par le réseau, mais certaines fonctions d'outils\n", "\n", "# Les fonctions de ce bloc se trouvent dans le programme d'apprentissage \n", "# “Apprentissage_MSELoss_avec_GPU“\n", "# et les commentaires détaillés se trouvent dans le programme d'apprentissage\n", "\n", "def tensor_imshow(im_tensor,cannel):\n", " b,c,h,w=im_tensor.shape\n", " if c==1:\n", " plt.imshow(im_tensor.squeeze().detach().numpy())\n", " else:\n", " plt.imshow(im_tensor.squeeze().detach().numpy()[cannel,:])\n", " \n", "def get_training_fragment(frag_size,im):\n", " h,w,c=im.shape\n", " n=random.randint(0,int(h/frag_size)-1)\n", " m=random.randint(0,int(w/frag_size)-1)\n", " \n", " shape=frag_size/4\n", " vt_h=math.ceil((h+1)/shape)\n", " vt_w=math.ceil((w+1)/shape)\n", " vt=np.zeros([vt_h,vt_w])\n", " vt_h_po=round((vt_h-1)*(n*frag_size/(h-1)+(n+1)*frag_size/(h-1))/2)\n", " vt_w_po=round((vt_w-1)*(m*frag_size/(w-1)+(m+1)*frag_size/(w-1))/2)\n", " vt[vt_h_po,vt_w_po]=1\n", " vt = np.float32(vt)\n", " vt=torch.from_numpy(vt.reshape(1,1,vt_h,vt_w))\n", " \n", " return im[n*frag_size:(n+1)*frag_size,m*frag_size:(m+1)*frag_size,:],vt\n", "\n", "def write_result_in_file(result,file_name):\n", " n=0\n", " with open(file_name,'w') as file:\n", " for i in range(len(result)):\n", " while n=2 and m>=2:\n", " self.shift2=nn.Conv2d(n*m,n*m,kernel_size=3,stride=1,padding=1)\n", " self.shift2.weight=kernel_shift_ini(n,m)\n", " self.add2 = nn.Conv2d(n*m,int(n/2)*int(m/2),kernel_size=1,stride=1,padding=0)\n", " self.add2.weight=kernel_add_ini(n,m)\n", " \n", " n=int(n/2)\n", " m=int(m/2)\n", " if n>=2 and m>=2:\n", " self.shift3=nn.Conv2d(n*m,n*m,kernel_size=3,stride=1,padding=1)\n", " self.shift3.weight=kernel_shift_ini(n,m)\n", " self.add3 = nn.Conv2d(n*m,int(n/2)*int(m/2),kernel_size=1,stride=1,padding=0)\n", " self.add3.weight=kernel_add_ini(n,m)\n", " \n", " \n", " def get_descripteur(self,img,using_cuda):\n", " descripteur_img=self.Relu(self.conv1(img))\n", " b,c,h,w=descripteur_img.shape\n", " couche_constante=0.5*torch.ones([1,1,h,w])\n", " if using_cuda:\n", " couche_constante=couche_constante.cuda()\n", " descripteur_img=torch.cat((descripteur_img,couche_constante),1)\n", " descripteur_img_norm=descripteur_img/torch.norm(descripteur_img,dim=1)\n", " return descripteur_img_norm\n", " \n", " def forward(self,img,frag,using_cuda):\n", " psize=4\n", " \n", " descripteur_input1=self.get_descripteur(img,using_cuda)\n", " descripteur_input2=self.get_descripteur(frag,using_cuda)\n", " \n", " b,c,h,w=frag.shape\n", " n=int(h/psize)\n", " m=int(w/psize)\n", " \n", " for i in range(n):\n", " for j in range(m):\n", " if i==0 and j==0:\n", " map_corre=F.conv2d(descripteur_input1,get_patch(descripteur_input2,psize,i,j),padding=2)\n", " else:\n", " a=F.conv2d(descripteur_input1,get_patch(descripteur_input2,psize,i,j),padding=2)\n", " map_corre=torch.cat((map_corre,a),1)\n", " #shift\n", " map_corre=self.maxpooling(map_corre)\n", " map_corre=self.shift1(map_corre)\n", " map_corre=self.add1(map_corre)\n", " \n", " \n", " n=int(n/2)\n", " m=int(m/2)\n", " if n>=2 and m>=2:\n", " map_corre=self.maxpooling(map_corre)\n", " map_corre=self.shift2(map_corre)\n", " map_corre=self.add2(map_corre)\n", " \n", " \n", " n=int(n/2)\n", " m=int(m/2)\n", " if n>=2 and m>=2:\n", " map_corre=self.maxpooling(map_corre)\n", " map_corre=self.shift3(map_corre)\n", " map_corre=self.add3(map_corre)\n", " \n", " \n", " b,c,h,w=map_corre.shape\n", " map_corre=map_corre/(map_corre.max())\n", " #map_corre=(F.softmax(map_corre.reshape(1,1,h*w,1),dim=2)).reshape(b,c,h,w)\n", " return map_corre" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "# Les fonctions de ce bloc sont utilisées pour appliquer le réseau à des fragments (pas à des patchs carrés)\n", "\n", "\n", "# Cette fonction permet de sélectionner un ensemble de patchs carrés à partir d'un fragment\n", "# Le paramètre “frag_size” fait ici référence à la taille du patch d'entrée carré (16 * 16)\n", "# Le paramètre “seuillage” limite la proportion de pixels non noirs dans chaque patch\n", "# Le paramètre “limite” peut limiter le nombre de correctifs trouvés dans chaque fragment\n", "def get_patch_list(frag,frag_size,limite,seuillage):\n", " n=0\n", " m=0\n", " h,w,c=frag.shape\n", " patch_list=[]\n", " position_list=[]\n", " for i in range(4):\n", " if len(patch_list)>limite and limite!=0:\n", " break\n", " for j in range(4):\n", " if len(patch_list)>limite and limite!=0:\n", " break\n", " n_offset=i*4 # n offset\n", " m_offset=j*4 # m offset\n", " n=0\n", " while n+frag_size+n_offset0:\n", " rot_frag=math.atan(tan_rot)*(180/pi)\n", " else:\n", " rot_frag=math.atan(tan_rot)*(180/pi)+180\n", " rot_frag=-rot_frag\n", " if rot_frag>0:\n", " rot_frag-=360\n", " return centre[0][0],centre[1][0],rot_frag\n", "\n", "# Vérifiez les résultats de Ransac en avec des changements de distance euclidienne\n", "def test_frag(inline,frag,fres):\n", " itera=10\n", " frag_inline=[]\n", " fres_inline=[]\n", " # Metter les coordonnées du point inline dans \"frag_inline[]\",et \"fres_inline[]\"\n", " for i in range(np.size(inline,0)):\n", " if inline[i]==1:\n", " frag_inline.append([frag[i][0],frag[i][1]])\n", " fres_inline.append([fres[i][0],fres[i][1]])\n", " p=[]\n", " \n", " # Faites une boucle dix fois, \n", " # sélectionnez à chaque fois deux paires correspondantes inline \n", " # calculer le changement de leur distance euclidienne\n", " for i in range(itera):\n", " point_test=selectionner_points(2,np.size(frag_inline,0))\n", " diff_x_frag=frag_inline[point_test[1]][0]-frag_inline[point_test[0]][0]\n", " diff_y_frag=frag_inline[point_test[1]][1]-frag_inline[point_test[0]][1]\n", " diff_frag=sqrt(pow(diff_x_frag,2)+pow(diff_y_frag,2))\n", " \n", " diff_x_fres=fres_inline[point_test[1]][0]-fres_inline[point_test[0]][0]\n", " diff_y_fres=fres_inline[point_test[1]][1]-fres_inline[point_test[0]][1]\n", " diff_fres=sqrt(pow(diff_x_fres,2)+pow(diff_y_fres,2))\n", " if diff_frag !=0:\n", " fsf=diff_fres/diff_frag\n", " p.append([fsf])\n", " result=np.mean(p)\n", " return result\n", "\n", "def frag_match(frag,img,position):\n", " \n", " frag_size=frag.shape\n", " centre_frag=creer_point(frag_size[0]/2,frag_size[1]/2)\n", " \n", " retained_matches = []\n", " frag=[]\n", " fres=[]\n", " \n", " for i in range(len(position)):\n", " frag.append([float(position[i][0]),float(position[i][1])])\n", " fres.append([float(position[i][2]),float(position[i][3])])\n", " \n", " if np.size(frag)>0:\n", " # Calculer la matrice de transformation affine à l'aide de la méthode Ransac\n", " h,inline=cv2.estimateAffinePartial2D(np.array(frag),np.array(fres))\n", " # Si “h” n'est pas sous la forme de matrice 2 * 3, la matrice de transformation affine n'est pas trouvée\n", " if np.size(h)!=6:\n", " return ([-1])\n", " else:\n", " x,y,rot=position_rotation(h,centre_frag)\n", " pourcenttage=sum(inline)/np.size(frag,0)\n", " # Le nombre de points inline doit être supérieur à un certain nombre\n", " if sum(inline)>3:\n", " p=test_frag(inline,frag,fres)\n", " # La distance euclidienne entre les points correspondants ne doit pas trop changer, \n", " # sinon cela prouve que le résultat de Ransac est incorrect\n", " # ici,le changement de la distance euclidienne sont entre 0.7 et 1.3\n", " if abs(p-1)<0.3:\n", " # Ce n'est qu'alors que Ransac renvoie le résultat correct\n", " return([round(y),round(x),round(rot,3)])\n", " else:\n", " return ([-2])\n", " else:\n", " return ([-3])\n", " else:\n", " return ([-4]) " ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [], "source": [ "if __name__==\"__main__\":\n", " \n", " frag_size=16\n", " using_cuda=True\n", " net=load_net(\"./net_trainned6000\")\n", " img_test=cv2.imread(\"./fresque0.ppm\")\n", " \n", " result=[]\n", " for n in range(315):\n", " if n<10:\n", " frag_test=cv2.imread(\"./frag_eroded0/frag_eroded_000\"+str(n)+\".ppm\")\n", " elif n<100:\n", " frag_test=cv2.imread(\"./frag_eroded0/frag_eroded_00\"+str(n)+\".ppm\")\n", " else:\n", " frag_test=cv2.imread(\"./frag_eroded0/frag_eroded_0\"+str(n)+\".ppm\")\n", " \n", " # Faites pivoter les pièces de 20 degrés à chaque fois pour correspondre, répétez 18 fois\n", " for i in range(18):\n", " rotation=20*i\n", " score_list,position=run_net_v3(net,img_test,frag_test,frag_size,60,0.7,using_cuda,rotation)\n", " frag_position=frag_match(frag_test,img_test,position)\n", " # Lorsque Ransac obtient le bon résultat, sortez de la boucle\n", " if len(frag_position)==3:\n", " rotation_base=i*20\n", " break\n", " # Enregistrez les fragments correctement localisés dans \"result[]\"\n", " if len(frag_position)==3:\n", " frag_position[2]=rotation_base-360-frag_position[2]\n", " if frag_position[2]>0:\n", " frag_position[2]=frag_position[2]-360\n", " result.append([n,frag_position[0],frag_position[1],round(frag_position[2],3)])\n" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[[0, 520.0, 575.0, -356.388],\n", " [1, 535.0, 460.0, -113.454],\n", " [2, 971.0, 270.0, -40.966],\n", " [3, 1641.0, 650.0, -119.543],\n", " [4, 1349.0, 68.0, -336.356],\n", " [5, 1509.0, 192.0, -298.759],\n", " [6, 107.0, 521.0, -74.179],\n", " [7, 420.0, 440.0, -174.266],\n", " [8, 287.0, 533.0, -299.677],\n", " [9, 1518.0, 167.0, -290.164],\n", " [10, 231.0, 429.0, -180.983],\n", " [11, 666.0, 483.0, -230.948],\n", " [12, 855.0, 104.0, -346.884],\n", " [13, 1267.0, 87.0, -305.562],\n", " [14, 16.0, 705.0, -30.087],\n", " [15, 924.0, 120.0, -146.41],\n", " [16, 657.0, 372.0, -175.323],\n", " [17, 1409.0, 528.0, -329.829],\n", " [18, 618.0, 427.0, -350.062],\n", " [19, 631.0, 269.0, -87.332],\n", " [20, 1345.0, 579.0, -320.597],\n", " [21, 1670.0, 139.0, -282.108],\n", " [22, 1310.0, 4.0, -180.0],\n", " [23, 1418.0, 29.0, -112.925],\n", " [24, 874.0, 496.0, -312.046],\n", " [25, 812.0, 537.0, -4.393],\n", " [26, 47.0, 728.0, -82.997],\n", " [27, 1411.0, 200.0, -324.46],\n", " [28, 767.0, 595.0, -339.734],\n", " [29, 361.0, 434.0, -349.088],\n", " [30, 1264.0, 732.0, -211.149],\n", " [31, 958.0, 738.0, -356.008],\n", " [32, 1307.0, 679.0, -145.032],\n", " [33, 704.0, 553.0, -197.736],\n", " [34, 867.0, 344.0, -355.599],\n", " [35, 1702.0, 164.0, -315.301],\n", " [36, 1483.0, 307.0, -330.954],\n", " [37, 1365.0, 661.0, -158.589],\n", " [38, 35.0, 623.0, -301.166],\n", " [39, 968.0, 40.0, -355.307],\n", " [40, 137.0, 650.0, -127.38],\n", " [41, 1527.0, 239.0, -113.919],\n", " [42, 1176.0, 736.0, -218.247],\n", " [43, 466.0, 676.0, -139.007],\n", " [44, 297.0, 659.0, -22.509],\n", " [45, 1075.0, 363.0, -1.866],\n", " [46, 973.0, 658.0, -118.442],\n", " [47, 658.0, 589.0, -134.967],\n", " [48, 1438.0, 245.0, -63.213],\n", " [49, 1019.0, 381.0, -4.052],\n", " [50, 898.0, 586.0, -320.709],\n", " [51, 738.0, 258.0, -298.33],\n", " [52, 1668.0, 167.0, -257.834],\n", " [53, 306.0, 201.0, -304.816],\n", " [54, 129.0, 353.0, -123.722],\n", " [55, 1612.0, 527.0, -201.46],\n", " [56, 1406.0, 400.0, -132.928],\n", " [57, 1223.0, 629.0, -243.388],\n", " [58, 1603.0, 770.0, -223.688],\n", " [59, 1451.0, 323.0, -4.008],\n", " [60, 1262.0, -8.0, -143.496],\n", " [61, 1409.0, 358.0, -244.745],\n", " [62, 426.0, 567.0, -107.651],\n", " [63, 1093.0, 536.0, -11.543],\n", " [64, 1570.0, 763.0, -340.0],\n", " [65, 599.0, 29.0, -352.066],\n", " [66, 38.0, 522.0, -237.017],\n", " [67, 1076.0, 29.0, -152.794],\n", " [68, 1629.0, 79.0, -70.396],\n", " [69, 1464.0, 311.0, -306.565],\n", " [70, 1595.0, 260.0, -53.364],\n", " [71, 1343.0, 273.0, -256.237],\n", " [72, 1074.0, 236.0, -1.801],\n", " [73, 132.0, 35.0, -160.03],\n", " [74, 1627.0, 762.0, -235.274],\n", " [75, 713.0, 361.0, -136.338],\n", " [76, 1485.0, 85.0, -90.974],\n", " [77, 1243.0, 153.0, -268.034],\n", " [78, 1026.0, 511.0, -118.767],\n", " [79, 240.0, 181.0, -51.205],\n", " [80, 1085.0, 680.0, -53.483],\n", " [81, 73.0, 212.0, -299.054],\n", " [82, 1237.0, 389.0, -306.557],\n", " [83, 1269.0, 87.0, -330.538],\n", " [84, 29.0, 175.0, -298.41],\n", " [85, 982.0, 97.0, -80.0],\n", " [86, 1487.0, 276.0, -211.009],\n", " [87, 1226.0, 114.0, -321.565],\n", " [88, 60.0, 317.0, -127.895],\n", " [89, 1351.0, 285.0, -322.595],\n", " [90, 233.0, 33.0, -144.993],\n", " [91, 807.0, 211.0, -1.747],\n", " [92, 997.0, 558.0, -326.669],\n", " [93, 1682.0, 283.0, -312.023],\n", " [94, 1178.0, 691.0, -242.927],\n", " [95, 1116.0, 487.0, -288.69],\n", " [96, 952.0, 14.0, -275.225],\n", " [97, 140.0, 765.0, -206.9],\n", " [98, 772.0, 81.0, -112.039],\n", " [99, 640.0, 682.0, -57.917],\n", " [100, 121.0, 757.0, -231.821],\n", " [101, 1484.0, 218.0, -15.255],\n", " [102, 1304.0, 164.0, -273.435],\n", " [103, 862.0, 192.0, -303.177],\n", " [104, 258.0, 766.0, -257.769],\n", " [105, 540.0, 714.0, -183.176],\n", " [106, 1283.0, 264.0, -330.905],\n", " [107, 507.0, 196.0, -333.629],\n", " [108, 1428.0, 438.0, -209.806],\n", " [109, 391.0, 739.0, -243.391],\n", " [110, 250.0, 640.0, -287.596],\n", " [111, 704.0, 102.0, -78.376],\n", " [112, 1060.0, 227.0, -300.726],\n", " [113, 1509.0, 302.0, -318.749],\n", " [114, 895.0, 662.0, -199.664],\n", " [115, 1453.0, 254.0, -260.0],\n", " [116, 1058.0, 199.0, -218.275],\n", " [117, 1416.0, 779.0, 0.0],\n", " [118, 1054.0, 740.0, -197.173],\n", " [119, 1352.0, 393.0, -309.992],\n", " [120, 1273.0, 585.0, -334.957],\n", " [121, 952.0, 566.0, -193.436],\n", " [122, 1132.0, 456.0, -25.393],\n", " [123, 598.0, 179.0, -308.525],\n", " [124, 1270.0, 15.0, -260.0],\n", " [125, 763.0, 462.0, -241.979],\n", " [126, 1515.0, 307.0, -284.007],\n", " [127, 1582.0, 608.0, -175.422],\n", " [128, 388.0, 536.0, -166.952],\n", " [129, 426.0, 667.0, -84.451],\n", " [130, 1505.0, 18.0, -192.572],\n", " [131, 976.0, 440.0, -260.194],\n", " [132, 1467.0, 655.0, -345.072],\n", " [133, 1085.0, 388.0, -323.091],\n", " [134, 1189.0, 514.0, -99.219],\n", " [135, 232.0, 751.0, -360.0],\n", " [136, 1336.0, 91.0, -132.694],\n", " [137, 765.0, 173.0, -54.653],\n", " [138, 1451.0, 421.0, -291.464],\n", " [139, 920.0, 370.0, -271.035],\n", " [140, 314.0, 739.0, -302.917],\n", " [141, 1225.0, 213.0, -281.565],\n", " [143, 160.0, 716.0, -238.299],\n", " [144, 503.0, 31.0, -348.257],\n", " [145, 1159.0, 423.0, -94.766],\n", " [146, 131.0, 716.0, -27.957],\n", " [147, 20.0, 683.0, -230.611],\n", " [148, 237.0, 756.0, -164.897],\n", " [149, 1596.0, 19.0, -285.437],\n", " [150, 238.0, 737.0, -17.033],\n", " [151, 354.0, 151.0, -100.638],\n", " [152, 887.0, 257.0, -318.435],\n", " [153, 541.0, 142.0, -151.453],\n", " [154, 1177.0, 82.0, -275.589],\n", " [155, 1526.0, 594.0, -340.0],\n", " [156, 1454.0, 307.0, -305.964],\n", " [157, 327.0, 150.0, -161.526],\n", " [158, 1288.0, 199.0, -314.289],\n", " [159, 649.0, 179.0, -333.417],\n", " [160, 1413.0, 255.0, -283.537],\n", " [161, 1543.0, 61.0, -307.416],\n", " [162, 1190.0, 144.0, -226.857],\n", " [163, 587.0, 104.0, -151.213],\n", " [164, 1320.0, 602.0, -315.852],\n", " [165, 627.0, 104.0, -320.252],\n", " [166, 1474.0, 413.0, -233.361],\n", " [167, 699.0, 176.0, -178.052],\n", " [168, 1024.0, 341.0, -259.2],\n", " [169, 1701.0, 755.0, -304.039],\n", " [170, 1684.0, 210.0, -244.828],\n", " [171, 1330.0, 290.0, -21.864],\n", " [172, 1053.0, 139.0, -324.51],\n", " [173, 1643.0, 428.0, -331.469],\n", " [174, 319.0, 542.0, -205.964],\n", " [175, 1045.0, 91.0, -3.533],\n", " [176, 828.0, 695.0, -295.602],\n", " [177, 1631.0, 287.0, -132.225],\n", " [178, 361.0, 677.0, -142.992],\n", " [179, 1674.0, 350.0, -227.628],\n", " [180, 1412.0, 764.0, -350.194],\n", " [181, 845.0, 19.0, -27.206],\n", " [183, 1239.0, 192.0, -317.673],\n", " [184, 320.0, 39.0, -157.845],\n", " [185, 1387.0, 749.0, -46.487],\n", " [186, 166.0, 589.0, -211.473],\n", " [187, 1339.0, 122.0, -258.435],\n", " [188, 1216.0, 235.0, -163.194],\n", " [189, 1677.0, 696.0, -275.899],\n", " [190, 158.0, 762.0, -327.275],\n", " [191, 1078.0, 254.0, -226.278],\n", " [192, 468.0, 761.0, -280.0],\n", " [193, 439.0, 44.0, -182.45],\n", " [194, 161.0, 541.0, -354.612],\n", " [195, 972.0, 502.0, -335.421],\n", " [196, 427.0, 192.0, -300.872],\n", " [197, 17.0, 358.0, -137.835],\n", " [198, 210.0, 580.0, -7.095],\n", " [199, 259.0, 601.0, -228.13],\n", " [200, 583.0, 736.0, -154.988],\n", " [201, 216.0, 751.0, -302.426],\n", " [202, 826.0, 46.0, -162.036],\n", " [203, 1592.0, 382.0, -344.745],\n", " [204, 1533.0, 110.0, -332.592],\n", " [205, 159.0, 761.0, -21.87],\n", " [206, 1219.0, 473.0, -297.199],\n", " [207, 1697.0, 711.0, -103.887],\n", " [208, 1449.0, 289.0, -247.773],\n", " [209, 1694.0, 749.0, -48.106],\n", " [210, 842.0, 613.0, -235.221],\n", " [211, 1046.0, 294.0, -134.05],\n", " [212, 1696.0, 763.0, -258.435],\n", " [213, 350.0, 83.0, -189.227],\n", " [214, 1262.0, 482.0, -347.386],\n", " [215, 310.0, 321.0, -211.399],\n", " [216, 744.0, 22.0, -268.647],\n", " [218, 1353.0, 732.0, -72.057],\n", " [219, 1418.0, 770.0, -340.0],\n", " [220, 496.0, 718.0, -20.0],\n", " [221, 477.0, 149.0, -277.479],\n", " [222, 1547.0, 87.0, -325.069],\n", " [223, 1087.0, 345.0, -3.805],\n", " [224, 259.0, 78.0, -19.36],\n", " [225, 1530.0, 512.0, -276.062],\n", " [226, 132.0, 730.0, -360.0],\n", " [227, 944.0, 471.0, -170.0],\n", " [228, 1245.0, 256.0, -155.672],\n", " [229, 1615.0, 354.0, -81.565],\n", " [230, 177.0, 72.0, -198.674],\n", " [231, 1637.0, 470.0, -350.62],\n", " [232, 540.0, 644.0, -4.911],\n", " [233, 624.0, 625.0, -127.127],\n", " [234, 420.0, 15.0, -187.058],\n", " [235, 884.0, 751.0, -288.649],\n", " [236, 267.0, 776.0, -339.146],\n", " [237, 1129.0, 87.0, -10.008],\n", " [238, 1700.0, 713.0, -240.764],\n", " [239, 286.0, 283.0, -148.653],\n", " [240, 679.0, 730.0, -336.762],\n", " [241, 1129.0, 106.0, -326.244],\n", " [242, 1292.0, 200.0, -203.69],\n", " [243, 1693.0, 570.0, -140.0],\n", " [244, 1529.0, 114.0, -341.565],\n", " [245, 158.0, 759.0, -356.87],\n", " [246, 1116.0, 563.0, -242.203],\n", " [247, 283.0, 129.0, -309.725],\n", " [248, 1597.0, 294.0, -312.875],\n", " [249, 1709.0, 762.0, -273.435],\n", " [250, 1377.0, 302.0, -314.179],\n", " [251, 323.0, 364.0, -6.183],\n", " [252, 1316.0, 485.0, -280.0],\n", " [253, 962.0, 16.0, -280.0],\n", " [254, 1198.0, 573.0, -11.792],\n", " [255, 276.0, 384.0, -279.393],\n", " [256, 1684.0, 734.0, -104.219],\n", " [257, 1447.0, 333.0, -280.5],\n", " [258, 999.0, 256.0, -227.883],\n", " [259, 1014.0, 413.0, -325.59],\n", " [260, 141.0, 724.0, -216.565],\n", " [261, 1552.0, 545.0, -255.848],\n", " [262, 292.0, 13.0, -191.87],\n", " [263, 573.0, 681.0, -79.779],\n", " [264, 1433.0, 740.0, -149.733],\n", " [265, 138.0, 726.0, -311.027],\n", " [266, 1617.0, 762.0, -327.995],\n", " [267, 170.0, 141.0, -335.639],\n", " [268, 1282.0, 441.0, -324.876],\n", " [269, 322.0, 255.0, -143.393],\n", " [270, 100.0, 762.0, -56.809],\n", " [271, 1249.0, 533.0, -349.403],\n", " [272, 1097.0, 584.0, -213.29],\n", " [274, 1697.0, 712.0, -360.0],\n", " [275, 399.0, 148.0, -176.849],\n", " [276, 56.0, 452.0, -155.208],\n", " [277, 166.0, 16.0, -336.461],\n", " [278, 58.0, 406.0, -233.24],\n", " [279, 1552.0, 79.0, -69.146],\n", " [280, 746.0, 134.0, -259.441],\n", " [281, 123.0, 106.0, -103.672],\n", " [282, 160.0, 758.0, -64.289],\n", " [283, 1454.0, 323.0, -100.71],\n", " [284, 220.0, 98.0, -135.362],\n", " [285, 1173.0, 234.0, -105.515],\n", " [286, 1238.0, 576.0, -360.0],\n", " [287, 383.0, 194.0, -259.057],\n", " [288, 1693.0, 147.0, -322.49],\n", " [289, 286.0, 351.0, -360.0],\n", " [290, 648.0, 734.0, -27.933],\n", " [292, 160.0, 492.0, -111.87],\n", " [293, 1105.0, 621.0, -115.047],\n", " [294, 1108.0, 241.0, -227.684],\n", " [295, 1212.0, 278.0, -340.0],\n", " [296, 844.0, 756.0, -338.456],\n", " [298, 1693.0, 111.0, -278.435],\n", " [299, 1530.0, 563.0, -335.376],\n", " [301, 364.0, 316.0, -360.0],\n", " [303, 1690.0, 15.0, -3.881],\n", " [304, 1170.0, 179.0, -151.87],\n", " [305, 1408.0, 331.0, -11.189],\n", " [307, 1654.0, 12.0, -280.0],\n", " [308, 1180.0, 207.0, -80.017],\n", " [309, 86.0, 403.0, -185.0],\n", " [313, 281.0, 317.0, -120.0]]" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "result" ] } ], "metadata": { "kernelspec": { "display_name": "py37", "language": "python", "name": "py37" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.7" } }, "nbformat": 4, "nbformat_minor": 4 }