repo
stringlengths
7
54
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
sequencelengths
20
28.4k
docstring
stringlengths
1
46.3k
docstring_tokens
sequencelengths
1
1.66k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
1 value
summary
stringlengths
4
350
obf_code
stringlengths
7.85k
764k
ageitgey/face_recognition
examples/face_recognition_knn.py
train
def train(train_dir, model_save_path=None, n_neighbors=None, knn_algo='ball_tree', verbose=False): """ Trains a k-nearest neighbors classifier for face recognition. :param train_dir: directory that contains a sub-directory for each known person, with its name. (View in source code to see train_dir example tree structure) Structure: <train_dir>/ ├── <person1>/ │ ├── <somename1>.jpeg │ ├── <somename2>.jpeg │ ├── ... ├── <person2>/ │ ├── <somename1>.jpeg │ └── <somename2>.jpeg └── ... :param model_save_path: (optional) path to save model on disk :param n_neighbors: (optional) number of neighbors to weigh in classification. Chosen automatically if not specified :param knn_algo: (optional) underlying data structure to support knn.default is ball_tree :param verbose: verbosity of training :return: returns knn classifier that was trained on the given data. """ X = [] y = [] # Loop through each person in the training set for class_dir in os.listdir(train_dir): if not os.path.isdir(os.path.join(train_dir, class_dir)): continue # Loop through each training image for the current person for img_path in image_files_in_folder(os.path.join(train_dir, class_dir)): image = face_recognition.load_image_file(img_path) face_bounding_boxes = face_recognition.face_locations(image) if len(face_bounding_boxes) != 1: # If there are no people (or too many people) in a training image, skip the image. if verbose: print("Image {} not suitable for training: {}".format(img_path, "Didn't find a face" if len(face_bounding_boxes) < 1 else "Found more than one face")) else: # Add face encoding for current image to the training set X.append(face_recognition.face_encodings(image, known_face_locations=face_bounding_boxes)[0]) y.append(class_dir) # Determine how many neighbors to use for weighting in the KNN classifier if n_neighbors is None: n_neighbors = int(round(math.sqrt(len(X)))) if verbose: print("Chose n_neighbors automatically:", n_neighbors) # Create and train the KNN classifier knn_clf = neighbors.KNeighborsClassifier(n_neighbors=n_neighbors, algorithm=knn_algo, weights='distance') knn_clf.fit(X, y) # Save the trained KNN classifier if model_save_path is not None: with open(model_save_path, 'wb') as f: pickle.dump(knn_clf, f) return knn_clf
python
def train(train_dir, model_save_path=None, n_neighbors=None, knn_algo='ball_tree', verbose=False): """ Trains a k-nearest neighbors classifier for face recognition. :param train_dir: directory that contains a sub-directory for each known person, with its name. (View in source code to see train_dir example tree structure) Structure: <train_dir>/ ├── <person1>/ │ ├── <somename1>.jpeg │ ├── <somename2>.jpeg │ ├── ... ├── <person2>/ │ ├── <somename1>.jpeg │ └── <somename2>.jpeg └── ... :param model_save_path: (optional) path to save model on disk :param n_neighbors: (optional) number of neighbors to weigh in classification. Chosen automatically if not specified :param knn_algo: (optional) underlying data structure to support knn.default is ball_tree :param verbose: verbosity of training :return: returns knn classifier that was trained on the given data. """ X = [] y = [] # Loop through each person in the training set for class_dir in os.listdir(train_dir): if not os.path.isdir(os.path.join(train_dir, class_dir)): continue # Loop through each training image for the current person for img_path in image_files_in_folder(os.path.join(train_dir, class_dir)): image = face_recognition.load_image_file(img_path) face_bounding_boxes = face_recognition.face_locations(image) if len(face_bounding_boxes) != 1: # If there are no people (or too many people) in a training image, skip the image. if verbose: print("Image {} not suitable for training: {}".format(img_path, "Didn't find a face" if len(face_bounding_boxes) < 1 else "Found more than one face")) else: # Add face encoding for current image to the training set X.append(face_recognition.face_encodings(image, known_face_locations=face_bounding_boxes)[0]) y.append(class_dir) # Determine how many neighbors to use for weighting in the KNN classifier if n_neighbors is None: n_neighbors = int(round(math.sqrt(len(X)))) if verbose: print("Chose n_neighbors automatically:", n_neighbors) # Create and train the KNN classifier knn_clf = neighbors.KNeighborsClassifier(n_neighbors=n_neighbors, algorithm=knn_algo, weights='distance') knn_clf.fit(X, y) # Save the trained KNN classifier if model_save_path is not None: with open(model_save_path, 'wb') as f: pickle.dump(knn_clf, f) return knn_clf
[ "def", "train", "(", "train_dir", ",", "model_save_path", "=", "None", ",", "n_neighbors", "=", "None", ",", "knn_algo", "=", "'ball_tree'", ",", "verbose", "=", "False", ")", ":", "X", "=", "[", "]", "y", "=", "[", "]", "# Loop through each person in the training set", "for", "class_dir", "in", "os", ".", "listdir", "(", "train_dir", ")", ":", "if", "not", "os", ".", "path", ".", "isdir", "(", "os", ".", "path", ".", "join", "(", "train_dir", ",", "class_dir", ")", ")", ":", "continue", "# Loop through each training image for the current person", "for", "img_path", "in", "image_files_in_folder", "(", "os", ".", "path", ".", "join", "(", "train_dir", ",", "class_dir", ")", ")", ":", "image", "=", "face_recognition", ".", "load_image_file", "(", "img_path", ")", "face_bounding_boxes", "=", "face_recognition", ".", "face_locations", "(", "image", ")", "if", "len", "(", "face_bounding_boxes", ")", "!=", "1", ":", "# If there are no people (or too many people) in a training image, skip the image.", "if", "verbose", ":", "print", "(", "\"Image {} not suitable for training: {}\"", ".", "format", "(", "img_path", ",", "\"Didn't find a face\"", "if", "len", "(", "face_bounding_boxes", ")", "<", "1", "else", "\"Found more than one face\"", ")", ")", "else", ":", "# Add face encoding for current image to the training set", "X", ".", "append", "(", "face_recognition", ".", "face_encodings", "(", "image", ",", "known_face_locations", "=", "face_bounding_boxes", ")", "[", "0", "]", ")", "y", ".", "append", "(", "class_dir", ")", "# Determine how many neighbors to use for weighting in the KNN classifier", "if", "n_neighbors", "is", "None", ":", "n_neighbors", "=", "int", "(", "round", "(", "math", ".", "sqrt", "(", "len", "(", "X", ")", ")", ")", ")", "if", "verbose", ":", "print", "(", "\"Chose n_neighbors automatically:\"", ",", "n_neighbors", ")", "# Create and train the KNN classifier", "knn_clf", "=", "neighbors", ".", "KNeighborsClassifier", "(", "n_neighbors", "=", "n_neighbors", ",", "algorithm", "=", "knn_algo", ",", "weights", "=", "'distance'", ")", "knn_clf", ".", "fit", "(", "X", ",", "y", ")", "# Save the trained KNN classifier", "if", "model_save_path", "is", "not", "None", ":", "with", "open", "(", "model_save_path", ",", "'wb'", ")", "as", "f", ":", "pickle", ".", "dump", "(", "knn_clf", ",", "f", ")", "return", "knn_clf" ]
Trains a k-nearest neighbors classifier for face recognition. :param train_dir: directory that contains a sub-directory for each known person, with its name. (View in source code to see train_dir example tree structure) Structure: <train_dir>/ ├── <person1>/ │ ├── <somename1>.jpeg │ ├── <somename2>.jpeg │ ├── ... ├── <person2>/ │ ├── <somename1>.jpeg │ └── <somename2>.jpeg └── ... :param model_save_path: (optional) path to save model on disk :param n_neighbors: (optional) number of neighbors to weigh in classification. Chosen automatically if not specified :param knn_algo: (optional) underlying data structure to support knn.default is ball_tree :param verbose: verbosity of training :return: returns knn classifier that was trained on the given data.
[ "Trains", "a", "k", "-", "nearest", "neighbors", "classifier", "for", "face", "recognition", "." ]
c96b010c02f15e8eeb0f71308c641179ac1f19bb
https://github.com/ageitgey/face_recognition/blob/c96b010c02f15e8eeb0f71308c641179ac1f19bb/examples/face_recognition_knn.py#L46-L108
train
Train a k - nearest neighbors classifier for face recognition.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTst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tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(684 - 636) + chr(2703 - 2592) + chr(1371 - 1322) + chr(0b110101) + chr(0b110010), 17277 - 17269), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + '\x33' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(111) + chr(0b110010) + chr(0b110110) + chr(478 - 429), 0b1000), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(111) + chr(0b100100 + 0o16) + '\x33' + '\067', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + '\x31' + '\067', 0b1000), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b1101111) + chr(53) + '\x35', 40528 - 40520), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\157' + chr(0b100000 + 0o22) + '\067' + chr(0b110010), 13127 - 13119), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\157' + chr(50) + '\067', 0o10), ehT0Px3KOsy9(chr(1505 - 1457) + chr(6183 - 6072) + chr(53) + chr(1979 - 1924), 43327 - 43319), ehT0Px3KOsy9(chr(1363 - 1315) + '\157' + chr(2350 - 2299) + chr(1552 - 1504) + chr(0b110011), 35498 - 35490), ehT0Px3KOsy9('\060' + chr(2308 - 2197) + '\x31' + chr(50) + chr(0b110101), 42240 - 42232), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(50) + chr(0b101011 + 0o10) + chr(0b110000 + 0o6), 0b1000), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\x6f' + chr(0b110011) + chr(55) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + chr(0b100001 + 0o23) + chr(1551 - 1497), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + chr(53) + '\062', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110010) + chr(1288 - 1234) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1101111) + '\x31' + '\065' + '\x33', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b10000 + 0o42) + chr(52) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\157' + chr(0b110001) + chr(48) + '\061', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + chr(0b110100) + '\x30', 0b1000), ehT0Px3KOsy9('\060' + chr(0b110111 + 0o70) + chr(53) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32' + chr(0b110110) + chr(0b100000 + 0o23), 0b1000), ehT0Px3KOsy9(chr(2289 - 2241) + '\x6f' + chr(0b110001) + chr(0b110010) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(425 - 377) + chr(11667 - 11556) + chr(0b110011) + chr(0b110111) + chr(60 - 12), 8), ehT0Px3KOsy9('\x30' + chr(111) + '\063' + '\x35' + chr(54), 0b1000), ehT0Px3KOsy9(chr(1905 - 1857) + '\x6f' + '\062' + chr(50) + chr(1563 - 1510), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1011101 + 0o22) + '\063' + chr(0b110100) + '\x32', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + chr(0b110001) + chr(54), 32138 - 32130), ehT0Px3KOsy9(chr(656 - 608) + chr(3981 - 3870) + chr(693 - 643) + '\060' + '\067', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(50) + '\x32' + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1595 - 1545) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110 + 0o53) + chr(1078 - 1027), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b11011 + 0o124) + chr(54), 0o10), ehT0Px3KOsy9('\x30' + chr(3949 - 3838) + chr(1410 - 1359) + chr(0b110100) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(87 - 39) + '\157' + '\x32' + '\x31' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(1816 - 1763) + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x32' + chr(53) + chr(1189 - 1139), 8), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + chr(0b1000 + 0o50) + chr(0b1001 + 0o47), 18198 - 18190), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + chr(51) + chr(0b110111), 64384 - 64376), ehT0Px3KOsy9(chr(138 - 90) + '\x6f' + chr(0b110110) + chr(0b110111), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1336 - 1288) + chr(0b1101111) + chr(0b100011 + 0o22) + chr(0b110000), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'D'), chr(0b10101 + 0o117) + chr(0b1100101) + '\143' + chr(0b1101111) + chr(5052 - 4952) + chr(7401 - 7300))(chr(8375 - 8258) + '\x74' + '\146' + '\x2d' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def e80gRioCjdat(x9cwAbV6Ol7j, bP3ZzIE7RdEb=None, Jl2QtJ45xo3e=None, OMHDOoDIL73v=xafqLlk3kkUe(SXOLrMavuUCe(b'\x08\xbc\xdd\xf3\x90Y\xc8rJ'), chr(100) + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(9890 - 9790) + chr(0b111010 + 0o53))('\x75' + '\164' + '\146' + chr(0b101100 + 0o1) + '\070'), j5jgrsOGZdZ4=ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\x6f' + chr(0b110000), 0b1000)): xEgrFJ0REugl = [] SqiSOtYOqOJH = [] for FeGOid_wrZWG in xafqLlk3kkUe(oqhJDdMJfuwx, xafqLlk3kkUe(SXOLrMavuUCe(b'\x06\xb4\xc2\xeb\xabD\xc8'), '\144' + chr(0b1100101) + '\x63' + chr(0b1001100 + 0o43) + chr(0b1100100) + '\x65')(chr(13125 - 13008) + '\x74' + '\x66' + chr(0b1000 + 0o45) + chr(0b111000 + 0o0)))(x9cwAbV6Ol7j): if not xafqLlk3kkUe(oqhJDdMJfuwx.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\x03\xae\xd5\xf6\xbd'), chr(0b1010111 + 0o15) + chr(10008 - 9907) + chr(99) + chr(0b110100 + 0o73) + '\x64' + chr(0b1100101))(chr(117) + chr(5014 - 4898) + chr(0b100000 + 0o106) + '\x2d' + chr(56)))(xafqLlk3kkUe(oqhJDdMJfuwx.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\x00\xb2\xd8\xf1'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(0b1101111) + '\144' + chr(729 - 628))(chr(7383 - 7266) + chr(0b11000 + 0o134) + chr(0b1100110) + chr(0b111 + 0o46) + chr(809 - 753)))(x9cwAbV6Ol7j, FeGOid_wrZWG)): continue for NvkLwGT0PRAi in vJG4FB_kUrGn(xafqLlk3kkUe(oqhJDdMJfuwx.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\x00\xb2\xd8\xf1'), chr(100) + '\145' + chr(99) + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(0b110101 + 0o100) + '\164' + chr(0b1000111 + 0o37) + chr(1500 - 1455) + chr(1147 - 1091)))(x9cwAbV6Ol7j, FeGOid_wrZWG)): IdmAHWfCqrnp = TNOdWz7Hk4E5.load_image_file(NvkLwGT0PRAi) Zv41ow9w5p7O = TNOdWz7Hk4E5.face_locations(IdmAHWfCqrnp) if c2A0yzQpDQB3(Zv41ow9w5p7O) != ehT0Px3KOsy9(chr(626 - 578) + '\157' + chr(2152 - 2103), 56509 - 56501): if j5jgrsOGZdZ4: zLUzGokYBM2Z(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'#\xb0\xd0\xf8\xaa\r\xc1j\x0f\xad:\xea\xd8\xd5\xdf\xdf\x1f\xc1#\x0cO\x937\x97\x9c\xb5\x96\xbc\xe6\xfa}bh\x84\xb3\x0e\xd1\xbd'), '\x64' + chr(4173 - 4072) + '\x63' + chr(6587 - 6476) + chr(0b1100100 + 0o0) + chr(101))(chr(0b1110101) + '\164' + chr(0b100101 + 0o101) + chr(0b101101) + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x0c\xb2\xc3\xf2\xaeY'), '\144' + chr(0b1100101) + chr(99) + '\x6f' + chr(0b1000100 + 0o40) + chr(0b1100101))(chr(578 - 461) + '\164' + chr(102) + '\x2d' + chr(56)))(NvkLwGT0PRAi, xafqLlk3kkUe(SXOLrMavuUCe(b'.\xb4\xd5\xf1\xe8Y\x9aqF\xad1\xbe\x99\x86\xcc\xd7\x08\xc5'), chr(1511 - 1411) + chr(0b100100 + 0o101) + chr(0b1100011) + chr(0b110011 + 0o74) + chr(100) + chr(101))(chr(0b111111 + 0o66) + chr(0b1110100) + chr(0b1001011 + 0o33) + '\055' + chr(0b111000)) if c2A0yzQpDQB3(Zv41ow9w5p7O) < ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1971 - 1922), 8) else xafqLlk3kkUe(SXOLrMavuUCe(b',\xb2\xc4\xf1\xab\r\xd7x]\xa6u\xea\x90\xc7\xc4\x96\x04\xce$@L\xd22\x9d'), '\x64' + chr(0b110101 + 0o60) + '\143' + '\157' + chr(0b101100 + 0o70) + '\x65')('\x75' + '\x74' + chr(10386 - 10284) + chr(0b100100 + 0o11) + chr(1534 - 1478)))) else: xafqLlk3kkUe(xEgrFJ0REugl, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0b\xad\xc1\xfa\xa1I'), '\x64' + '\x65' + chr(7799 - 7700) + '\157' + chr(100) + '\x65')('\165' + chr(116) + chr(0b1100110) + '\x2d' + chr(0b11101 + 0o33)))(xafqLlk3kkUe(TNOdWz7Hk4E5, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0c\xbc\xd2\xfa\x90H\xd4t@\xa7<\xf0\x9f\xd5'), chr(0b1100100) + '\145' + chr(99) + '\157' + chr(0b100010 + 0o102) + chr(101))('\165' + chr(0b1110100) + '\x66' + chr(45) + chr(0b10 + 0o66)))(IdmAHWfCqrnp, known_face_locations=Zv41ow9w5p7O)[ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b11100 + 0o123) + chr(0b110000), 8)]) xafqLlk3kkUe(SqiSOtYOqOJH, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0b\xad\xc1\xfa\xa1I'), chr(0b1000111 + 0o35) + chr(8648 - 8547) + chr(0b1100011) + chr(111) + chr(100) + '\x65')('\x75' + chr(116) + chr(0b110101 + 0o61) + '\055' + chr(2024 - 1968)))(FeGOid_wrZWG) if Jl2QtJ45xo3e is None: Jl2QtJ45xo3e = ehT0Px3KOsy9(jB_HdqgHmVpI(yhiZVkosCjBm.sqrt(c2A0yzQpDQB3(xEgrFJ0REugl)))) if j5jgrsOGZdZ4: zLUzGokYBM2Z(xafqLlk3kkUe(SXOLrMavuUCe(b')\xb5\xde\xec\xaa\r\xd4HA\xa6<\xf9\x90\xc4\xc5\xc4\x18\x80 \x15^\xdc<\x99\x9a\xfc\x81\xaf\xeb\xffj1'), '\x64' + chr(0b1100101) + '\x63' + '\157' + '\x64' + chr(0b1100101))('\165' + chr(0b1110100) + '\x66' + chr(45) + '\x38'), Jl2QtJ45xo3e) IVMKHQpZ5wMO = LyV5yyxR8Tpe.KNeighborsClassifier(n_neighbors=Jl2QtJ45xo3e, algorithm=OMHDOoDIL73v, weights=xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e\xb4\xc2\xeb\xaeC\xd9r'), chr(0b1000 + 0o134) + '\145' + chr(0b1100011) + chr(0b1101111) + '\144' + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(0b1000111 + 0o37) + chr(0b101101) + '\070')) xafqLlk3kkUe(IVMKHQpZ5wMO, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0c\xb4\xc5'), '\144' + '\x65' + '\143' + '\157' + chr(3440 - 3340) + chr(944 - 843))(chr(6336 - 6219) + chr(739 - 623) + chr(102) + chr(1957 - 1912) + chr(0b111000 + 0o0)))(xEgrFJ0REugl, SqiSOtYOqOJH) if bP3ZzIE7RdEb is not None: with _fwkIVCGgtAN(bP3ZzIE7RdEb, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1d\xbf'), chr(0b1010 + 0o132) + chr(0b1100101) + chr(0b1100011) + '\x6f' + '\144' + chr(7143 - 7042))(chr(0b1110101) + chr(0b1110100) + '\146' + chr(0b101101) + chr(0b111000))) as EGyt1xfPT1P6: xafqLlk3kkUe(b1Ng5DsPF9ZY, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e\xa8\xdc\xef'), chr(6940 - 6840) + chr(0b110101 + 0o60) + '\x63' + chr(111) + '\x64' + chr(0b1011101 + 0o10))('\x75' + chr(116) + chr(102) + '\x2d' + chr(0b100000 + 0o30)))(IVMKHQpZ5wMO, EGyt1xfPT1P6) return IVMKHQpZ5wMO
ageitgey/face_recognition
examples/face_recognition_knn.py
predict
def predict(X_img_path, knn_clf=None, model_path=None, distance_threshold=0.6): """ Recognizes faces in given image using a trained KNN classifier :param X_img_path: path to image to be recognized :param knn_clf: (optional) a knn classifier object. if not specified, model_save_path must be specified. :param model_path: (optional) path to a pickled knn classifier. if not specified, model_save_path must be knn_clf. :param distance_threshold: (optional) distance threshold for face classification. the larger it is, the more chance of mis-classifying an unknown person as a known one. :return: a list of names and face locations for the recognized faces in the image: [(name, bounding box), ...]. For faces of unrecognized persons, the name 'unknown' will be returned. """ if not os.path.isfile(X_img_path) or os.path.splitext(X_img_path)[1][1:] not in ALLOWED_EXTENSIONS: raise Exception("Invalid image path: {}".format(X_img_path)) if knn_clf is None and model_path is None: raise Exception("Must supply knn classifier either thourgh knn_clf or model_path") # Load a trained KNN model (if one was passed in) if knn_clf is None: with open(model_path, 'rb') as f: knn_clf = pickle.load(f) # Load image file and find face locations X_img = face_recognition.load_image_file(X_img_path) X_face_locations = face_recognition.face_locations(X_img) # If no faces are found in the image, return an empty result. if len(X_face_locations) == 0: return [] # Find encodings for faces in the test iamge faces_encodings = face_recognition.face_encodings(X_img, known_face_locations=X_face_locations) # Use the KNN model to find the best matches for the test face closest_distances = knn_clf.kneighbors(faces_encodings, n_neighbors=1) are_matches = [closest_distances[0][i][0] <= distance_threshold for i in range(len(X_face_locations))] # Predict classes and remove classifications that aren't within the threshold return [(pred, loc) if rec else ("unknown", loc) for pred, loc, rec in zip(knn_clf.predict(faces_encodings), X_face_locations, are_matches)]
python
def predict(X_img_path, knn_clf=None, model_path=None, distance_threshold=0.6): """ Recognizes faces in given image using a trained KNN classifier :param X_img_path: path to image to be recognized :param knn_clf: (optional) a knn classifier object. if not specified, model_save_path must be specified. :param model_path: (optional) path to a pickled knn classifier. if not specified, model_save_path must be knn_clf. :param distance_threshold: (optional) distance threshold for face classification. the larger it is, the more chance of mis-classifying an unknown person as a known one. :return: a list of names and face locations for the recognized faces in the image: [(name, bounding box), ...]. For faces of unrecognized persons, the name 'unknown' will be returned. """ if not os.path.isfile(X_img_path) or os.path.splitext(X_img_path)[1][1:] not in ALLOWED_EXTENSIONS: raise Exception("Invalid image path: {}".format(X_img_path)) if knn_clf is None and model_path is None: raise Exception("Must supply knn classifier either thourgh knn_clf or model_path") # Load a trained KNN model (if one was passed in) if knn_clf is None: with open(model_path, 'rb') as f: knn_clf = pickle.load(f) # Load image file and find face locations X_img = face_recognition.load_image_file(X_img_path) X_face_locations = face_recognition.face_locations(X_img) # If no faces are found in the image, return an empty result. if len(X_face_locations) == 0: return [] # Find encodings for faces in the test iamge faces_encodings = face_recognition.face_encodings(X_img, known_face_locations=X_face_locations) # Use the KNN model to find the best matches for the test face closest_distances = knn_clf.kneighbors(faces_encodings, n_neighbors=1) are_matches = [closest_distances[0][i][0] <= distance_threshold for i in range(len(X_face_locations))] # Predict classes and remove classifications that aren't within the threshold return [(pred, loc) if rec else ("unknown", loc) for pred, loc, rec in zip(knn_clf.predict(faces_encodings), X_face_locations, are_matches)]
[ "def", "predict", "(", "X_img_path", ",", "knn_clf", "=", "None", ",", "model_path", "=", "None", ",", "distance_threshold", "=", "0.6", ")", ":", "if", "not", "os", ".", "path", ".", "isfile", "(", "X_img_path", ")", "or", "os", ".", "path", ".", "splitext", "(", "X_img_path", ")", "[", "1", "]", "[", "1", ":", "]", "not", "in", "ALLOWED_EXTENSIONS", ":", "raise", "Exception", "(", "\"Invalid image path: {}\"", ".", "format", "(", "X_img_path", ")", ")", "if", "knn_clf", "is", "None", "and", "model_path", "is", "None", ":", "raise", "Exception", "(", "\"Must supply knn classifier either thourgh knn_clf or model_path\"", ")", "# Load a trained KNN model (if one was passed in)", "if", "knn_clf", "is", "None", ":", "with", "open", "(", "model_path", ",", "'rb'", ")", "as", "f", ":", "knn_clf", "=", "pickle", ".", "load", "(", "f", ")", "# Load image file and find face locations", "X_img", "=", "face_recognition", ".", "load_image_file", "(", "X_img_path", ")", "X_face_locations", "=", "face_recognition", ".", "face_locations", "(", "X_img", ")", "# If no faces are found in the image, return an empty result.", "if", "len", "(", "X_face_locations", ")", "==", "0", ":", "return", "[", "]", "# Find encodings for faces in the test iamge", "faces_encodings", "=", "face_recognition", ".", "face_encodings", "(", "X_img", ",", "known_face_locations", "=", "X_face_locations", ")", "# Use the KNN model to find the best matches for the test face", "closest_distances", "=", "knn_clf", ".", "kneighbors", "(", "faces_encodings", ",", "n_neighbors", "=", "1", ")", "are_matches", "=", "[", "closest_distances", "[", "0", "]", "[", "i", "]", "[", "0", "]", "<=", "distance_threshold", "for", "i", "in", "range", "(", "len", "(", "X_face_locations", ")", ")", "]", "# Predict classes and remove classifications that aren't within the threshold", "return", "[", "(", "pred", ",", "loc", ")", "if", "rec", "else", "(", "\"unknown\"", ",", "loc", ")", "for", "pred", ",", "loc", ",", "rec", "in", "zip", "(", "knn_clf", ".", "predict", "(", "faces_encodings", ")", ",", "X_face_locations", ",", "are_matches", ")", "]" ]
Recognizes faces in given image using a trained KNN classifier :param X_img_path: path to image to be recognized :param knn_clf: (optional) a knn classifier object. if not specified, model_save_path must be specified. :param model_path: (optional) path to a pickled knn classifier. if not specified, model_save_path must be knn_clf. :param distance_threshold: (optional) distance threshold for face classification. the larger it is, the more chance of mis-classifying an unknown person as a known one. :return: a list of names and face locations for the recognized faces in the image: [(name, bounding box), ...]. For faces of unrecognized persons, the name 'unknown' will be returned.
[ "Recognizes", "faces", "in", "given", "image", "using", "a", "trained", "KNN", "classifier" ]
c96b010c02f15e8eeb0f71308c641179ac1f19bb
https://github.com/ageitgey/face_recognition/blob/c96b010c02f15e8eeb0f71308c641179ac1f19bb/examples/face_recognition_knn.py#L111-L150
train
Predicts faces in a given image using a KNN classifier.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT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02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + '\x37' + '\064', 56869 - 56861), ehT0Px3KOsy9(chr(1685 - 1637) + '\x6f' + chr(1877 - 1824) + chr(0b110100), 48661 - 48653), ehT0Px3KOsy9('\060' + '\157' + '\063' + chr(2094 - 2041) + '\x37', 0b1000), ehT0Px3KOsy9('\x30' + chr(7014 - 6903) + '\x32' + chr(1772 - 1724) + '\065', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + '\064' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(429 - 381) + chr(451 - 340) + chr(50) + chr(0b101101 + 0o10) + chr(0b100101 + 0o22), 0o10), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1101111) + chr(250 - 199) + chr(0b101001 + 0o7) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(10877 - 10766) + chr(0b110011) + chr(55) + '\x32', 612 - 604), ehT0Px3KOsy9(chr(48) + chr(0b110010 + 0o75) + chr(0b110010) + chr(0b10101 + 0o40) + '\x37', 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(4749 - 4638) + '\x32' + chr(2182 - 2133) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b101000 + 0o107) + chr(866 - 815) + '\062' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(887 - 839) + chr(111) + '\x32' + chr(0b110011) + chr(0b110101), 43582 - 43574), ehT0Px3KOsy9(chr(0b0 + 0o60) + '\157' + chr(854 - 805) + chr(0b110110) + '\x34', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b110 + 0o151) + chr(49) + '\065' + chr(0b10000 + 0o42), 0b1000), ehT0Px3KOsy9('\060' + chr(2680 - 2569) + chr(50) + chr(0b110011) + '\063', 19024 - 19016), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(6615 - 6504) + chr(52) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + chr(0b10100 + 0o41) + '\064', 0o10), ehT0Px3KOsy9('\060' + chr(6128 - 6017) + chr(49) + '\061' + chr(0b10110 + 0o34), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(3925 - 3814) + chr(1655 - 1604) + chr(0b110001) + '\x35', 8627 - 8619), ehT0Px3KOsy9(chr(154 - 106) + chr(1790 - 1679) + chr(1150 - 1101) + '\061', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + chr(55) + '\066', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x37' + '\065', 10529 - 10521), ehT0Px3KOsy9(chr(684 - 636) + chr(111) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(7320 - 7209) + '\063' + '\067', 29201 - 29193), ehT0Px3KOsy9(chr(48) + chr(4992 - 4881) + chr(0b110001) + '\x32' + chr(1510 - 1462), ord("\x08")), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(1732 - 1621) + chr(0b110001) + chr(238 - 187) + chr(0b110000 + 0o3), 0b1000), ehT0Px3KOsy9('\x30' + chr(6940 - 6829) + '\x32' + chr(54) + chr(0b110101), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b110000 + 0o77) + chr(0b11001 + 0o31) + chr(342 - 289) + chr(0b1000 + 0o50), 43585 - 43577), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + chr(0b110001) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(655 - 607) + chr(0b1001110 + 0o41) + chr(1342 - 1292) + '\x30' + chr(55), 39693 - 39685), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101000 + 0o12) + '\x30' + chr(0b11100 + 0o26), 14822 - 14814), ehT0Px3KOsy9(chr(106 - 58) + chr(111) + '\061' + chr(0b110110), 0b1000), ehT0Px3KOsy9('\060' + chr(0b101101 + 0o102) + chr(344 - 293), 25630 - 25622), ehT0Px3KOsy9(chr(48) + chr(11557 - 11446) + '\x31' + '\x30' + chr(1549 - 1495), 58278 - 58270), ehT0Px3KOsy9('\x30' + chr(2711 - 2600) + chr(0b110001) + chr(0b101011 + 0o12) + chr(0b10111 + 0o33), 8), ehT0Px3KOsy9(chr(48) + chr(7866 - 7755) + chr(1717 - 1666) + chr(0b10011 + 0o37) + chr(0b101 + 0o57), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b101 + 0o152) + chr(0b110001) + chr(0b110001) + '\x30', 6600 - 6592), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + chr(50) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + chr(1338 - 1284) + '\060', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\157' + chr(0b1011 + 0o52) + chr(0b110000), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd2'), '\x64' + chr(101) + chr(3810 - 3711) + chr(111) + '\x64' + chr(101))('\165' + chr(0b1110100) + chr(0b1100110) + chr(0b10001 + 0o34) + chr(0b1110 + 0o52)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def POyImYQwg5VB(qddKEJZP3xq2, IVMKHQpZ5wMO=None, AlxtQPEw7WKZ=None, igLlAltLfSOa=0.6): if not xafqLlk3kkUe(oqhJDdMJfuwx.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\x95_\x89\xec\xce\xca'), chr(0b1100100) + chr(0b110101 + 0o60) + chr(0b1100011) + '\x6f' + chr(0b1100100) + '\145')(chr(117) + chr(0b1110100) + chr(102) + chr(0b11010 + 0o23) + chr(0b100000 + 0o30)))(qddKEJZP3xq2) or xafqLlk3kkUe(oqhJDdMJfuwx.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8f\\\x83\xec\xd6\xca\xbc\x8e'), chr(265 - 165) + '\x65' + chr(99) + '\x6f' + chr(0b1010111 + 0o15) + chr(0b1011111 + 0o6))(chr(117) + chr(116) + '\146' + chr(0b101101) + chr(0b100101 + 0o23)))(qddKEJZP3xq2)[ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\x6f' + '\x31', 0o10)][ehT0Px3KOsy9(chr(48) + chr(2118 - 2007) + '\061', 8):] not in p035X09GErGT: raise jLmadlzMdunT(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5B\x99\xe4\xce\xc6\xa0\xda\xc6t\xee\xb4\xf8T\x1a\xfaT\x04p\xedr\x03'), chr(100) + '\x65' + '\x63' + chr(111) + chr(0b1000011 + 0o41) + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(7994 - 7892) + '\055' + chr(1528 - 1472)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x9aC\x9d\xe8\xc3\xdb'), chr(0b1100100) + '\x65' + chr(0b1110 + 0o125) + chr(6951 - 6840) + '\x64' + chr(0b111101 + 0o50))('\x75' + '\x74' + '\x66' + chr(0b101101) + chr(1411 - 1355)))(qddKEJZP3xq2)) if IVMKHQpZ5wMO is None and AlxtQPEw7WKZ is None: raise jLmadlzMdunT(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb1Y\x9c\xf1\x82\xdc\xb1\x8a\xdfu\xf6\xf3\xf6\x1a\x04\xbbC\x00+\xbez\x17[iz"{\xd0\xc1=\xef\xe7|#2\x02\xbb=\xa0\x17\x94\x0c\x84\xeb\xcc\xf0\xa7\x96\xc99\xe0\xa1\xbd\x19\x05\xffE\x00\x15\xbdh\nU'), '\x64' + chr(0b0 + 0o145) + '\143' + '\157' + '\x64' + chr(101))('\x75' + '\164' + '\x66' + chr(45) + '\x38')) if IVMKHQpZ5wMO is None: with _fwkIVCGgtAN(AlxtQPEw7WKZ, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8eN'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(111) + chr(3444 - 3344) + chr(9487 - 9386))(chr(0b1000111 + 0o56) + '\164' + chr(7009 - 6907) + chr(0b101101) + '\070')) as EGyt1xfPT1P6: IVMKHQpZ5wMO = b1Ng5DsPF9ZY.load(EGyt1xfPT1P6) QCjYYADCUb2F = TNOdWz7Hk4E5.load_image_file(qddKEJZP3xq2) rnPNuO570nRI = TNOdWz7Hk4E5.face_locations(QCjYYADCUb2F) if c2A0yzQpDQB3(rnPNuO570nRI) == ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(111) + '\060', 8): return [] AlFU3WNWEHIS = TNOdWz7Hk4E5.face_encodings(QCjYYADCUb2F, known_face_locations=rnPNuO570nRI) unx9xAUpQsOP = IVMKHQpZ5wMO.kneighbors(AlFU3WNWEHIS, n_neighbors=ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31', 8)) Xp8534W3EAFg = [unx9xAUpQsOP[ehT0Px3KOsy9(chr(1190 - 1142) + chr(111) + '\060', 8)][WVxHKyX45z_L][ehT0Px3KOsy9('\060' + chr(6415 - 6304) + '\060', 8)] <= igLlAltLfSOa for WVxHKyX45z_L in vQr8gNKaIaWE(c2A0yzQpDQB3(rnPNuO570nRI))] return [(eyamnrN0elUS, MmVY7Id_ODNA) if MnMCYVsiR1pJ else (xafqLlk3kkUe(SXOLrMavuUCe(b'\x89B\x84\xeb\xcd\xd8\xaa'), '\144' + '\x65' + chr(0b110100 + 0o57) + chr(0b111110 + 0o61) + '\x64' + '\145')('\x75' + chr(0b10111 + 0o135) + chr(0b1100110) + '\055' + '\x38'), MmVY7Id_ODNA) for (eyamnrN0elUS, MmVY7Id_ODNA, MnMCYVsiR1pJ) in pZ0NK2y6HRbn(xafqLlk3kkUe(IVMKHQpZ5wMO, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8c^\x8a\xe1\xcb\xcc\xb0'), '\144' + chr(0b1000110 + 0o37) + '\143' + '\157' + '\144' + chr(6072 - 5971))('\x75' + chr(0b1101110 + 0o6) + chr(0b1100110) + '\055' + chr(0b101011 + 0o15)))(AlFU3WNWEHIS), rnPNuO570nRI, Xp8534W3EAFg)]
ageitgey/face_recognition
examples/face_recognition_knn.py
show_prediction_labels_on_image
def show_prediction_labels_on_image(img_path, predictions): """ Shows the face recognition results visually. :param img_path: path to image to be recognized :param predictions: results of the predict function :return: """ pil_image = Image.open(img_path).convert("RGB") draw = ImageDraw.Draw(pil_image) for name, (top, right, bottom, left) in predictions: # Draw a box around the face using the Pillow module draw.rectangle(((left, top), (right, bottom)), outline=(0, 0, 255)) # There's a bug in Pillow where it blows up with non-UTF-8 text # when using the default bitmap font name = name.encode("UTF-8") # Draw a label with a name below the face text_width, text_height = draw.textsize(name) draw.rectangle(((left, bottom - text_height - 10), (right, bottom)), fill=(0, 0, 255), outline=(0, 0, 255)) draw.text((left + 6, bottom - text_height - 5), name, fill=(255, 255, 255, 255)) # Remove the drawing library from memory as per the Pillow docs del draw # Display the resulting image pil_image.show()
python
def show_prediction_labels_on_image(img_path, predictions): """ Shows the face recognition results visually. :param img_path: path to image to be recognized :param predictions: results of the predict function :return: """ pil_image = Image.open(img_path).convert("RGB") draw = ImageDraw.Draw(pil_image) for name, (top, right, bottom, left) in predictions: # Draw a box around the face using the Pillow module draw.rectangle(((left, top), (right, bottom)), outline=(0, 0, 255)) # There's a bug in Pillow where it blows up with non-UTF-8 text # when using the default bitmap font name = name.encode("UTF-8") # Draw a label with a name below the face text_width, text_height = draw.textsize(name) draw.rectangle(((left, bottom - text_height - 10), (right, bottom)), fill=(0, 0, 255), outline=(0, 0, 255)) draw.text((left + 6, bottom - text_height - 5), name, fill=(255, 255, 255, 255)) # Remove the drawing library from memory as per the Pillow docs del draw # Display the resulting image pil_image.show()
[ "def", "show_prediction_labels_on_image", "(", "img_path", ",", "predictions", ")", ":", "pil_image", "=", "Image", ".", "open", "(", "img_path", ")", ".", "convert", "(", "\"RGB\"", ")", "draw", "=", "ImageDraw", ".", "Draw", "(", "pil_image", ")", "for", "name", ",", "(", "top", ",", "right", ",", "bottom", ",", "left", ")", "in", "predictions", ":", "# Draw a box around the face using the Pillow module", "draw", ".", "rectangle", "(", "(", "(", "left", ",", "top", ")", ",", "(", "right", ",", "bottom", ")", ")", ",", "outline", "=", "(", "0", ",", "0", ",", "255", ")", ")", "# There's a bug in Pillow where it blows up with non-UTF-8 text", "# when using the default bitmap font", "name", "=", "name", ".", "encode", "(", "\"UTF-8\"", ")", "# Draw a label with a name below the face", "text_width", ",", "text_height", "=", "draw", ".", "textsize", "(", "name", ")", "draw", ".", "rectangle", "(", "(", "(", "left", ",", "bottom", "-", "text_height", "-", "10", ")", ",", "(", "right", ",", "bottom", ")", ")", ",", "fill", "=", "(", "0", ",", "0", ",", "255", ")", ",", "outline", "=", "(", "0", ",", "0", ",", "255", ")", ")", "draw", ".", "text", "(", "(", "left", "+", "6", ",", "bottom", "-", "text_height", "-", "5", ")", ",", "name", ",", "fill", "=", "(", "255", ",", "255", ",", "255", ",", "255", ")", ")", "# Remove the drawing library from memory as per the Pillow docs", "del", "draw", "# Display the resulting image", "pil_image", ".", "show", "(", ")" ]
Shows the face recognition results visually. :param img_path: path to image to be recognized :param predictions: results of the predict function :return:
[ "Shows", "the", "face", "recognition", "results", "visually", "." ]
c96b010c02f15e8eeb0f71308c641179ac1f19bb
https://github.com/ageitgey/face_recognition/blob/c96b010c02f15e8eeb0f71308c641179ac1f19bb/examples/face_recognition_knn.py#L153-L181
train
Show the face recognition results visually.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ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aZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1111 + 0o42) + chr(0b110001) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b1000101 + 0o52) + chr(919 - 867) + chr(0b110110), 51661 - 51653), ehT0Px3KOsy9(chr(48) + '\157' + chr(354 - 303) + chr(0b110000 + 0o0) + chr(0b110110), 60847 - 60839), ehT0Px3KOsy9(chr(656 - 608) + chr(0b101110 + 0o101) + chr(0b110101) + '\064', 0o10), ehT0Px3KOsy9(chr(586 - 538) + chr(0b1101111) + '\061' + '\x34' + chr(0b100101 + 0o15), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + chr(0b110001) + chr(51), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + chr(1976 - 1926), ord("\x08")), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b10100 + 0o133) + chr(49) + chr(50) + chr(0b11111 + 0o30), 0b1000), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(4475 - 4364) + chr(2506 - 2455) + '\x32', 8), ehT0Px3KOsy9('\060' + '\157' + chr(2112 - 2063) + chr(0b1000 + 0o52) + '\x31', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(2050 - 1999) + chr(0b10 + 0o61) + '\x36', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b100111 + 0o110) + chr(684 - 635) + chr(0b101 + 0o57), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110111) + chr(2221 - 2166), 23668 - 23660), ehT0Px3KOsy9('\060' + chr(7221 - 7110) + '\066' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\x31' + chr(0b11110 + 0o31) + '\064', 0b1000), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(111) + chr(738 - 687) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1010000 + 0o37) + '\x32' + '\x37' + chr(0b101010 + 0o6), ord("\x08")), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(0b1101111) + '\063' + chr(0b10010 + 0o36) + chr(2144 - 2096), 50326 - 50318), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b100 + 0o55) + '\x36', 6618 - 6610), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\x6f' + chr(923 - 874) + chr(0b110101) + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\066' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(2321 - 2210) + chr(0b101101 + 0o4) + '\065' + chr(0b10 + 0o65), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1419 - 1368) + '\063' + chr(0b101 + 0o53), ord("\x08")), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(111) + '\067' + '\065', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + '\x37' + '\x36', 33606 - 33598), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(51) + '\x30', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b110111 + 0o70) + '\063' + chr(824 - 769) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b1111 + 0o44) + chr(0b1100 + 0o53) + chr(0b11001 + 0o36), 26480 - 26472), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + chr(0b110100) + chr(605 - 557), 0b1000), ehT0Px3KOsy9(chr(1581 - 1533) + chr(0b1101111) + chr(923 - 873) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + chr(0b11110 + 0o25) + '\063', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b1000 + 0o51) + chr(54) + chr(1783 - 1734), 0o10), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\x6f' + chr(53) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(8676 - 8565) + '\062' + chr(1539 - 1490) + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(1432 - 1321) + chr(0b101 + 0o55) + chr(48) + chr(0b110110), 26648 - 26640), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b11101 + 0o30), ord("\x08")), ehT0Px3KOsy9(chr(1246 - 1198) + '\x6f' + chr(0b110011 + 0o4) + '\x31', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + chr(0b110001) + chr(685 - 632), 8), ehT0Px3KOsy9(chr(182 - 134) + chr(4615 - 4504) + '\061' + chr(72 - 24) + '\065', 12855 - 12847), ehT0Px3KOsy9(chr(1057 - 1009) + chr(0b11000 + 0o127) + chr(0b110 + 0o54) + chr(55) + '\066', 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b11011 + 0o25) + '\157' + '\065' + chr(251 - 203), 14699 - 14691)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'd'), '\x64' + chr(0b1100101) + chr(2529 - 2430) + chr(2758 - 2647) + chr(452 - 352) + chr(0b1100101))(chr(117) + '\x74' + chr(0b1010 + 0o134) + '\055' + chr(0b10111 + 0o41)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def dojQ2KT98utH(NvkLwGT0PRAi, qIQi_VFCIFZL): Lx65WhKWKCtH = Xi3KfA6brWYX.open(NvkLwGT0PRAi).convert(xafqLlk3kkUe(SXOLrMavuUCe(b'\x18a\x84'), chr(3575 - 3475) + chr(0b1100101) + '\x63' + '\x6f' + chr(0b1100100) + chr(101))(chr(3444 - 3327) + chr(116) + chr(102) + '\055' + '\x38')) B65Iv98Ts98c = wgAZnq_F1kaY.Draw(Lx65WhKWKCtH) for (AIvJRzLdDfgF, (qxrVBjeryNEZ, isOYmsUx1jxa, kXxsZxlIQUSQ, mtX6HPOlWiYu)) in qIQi_VFCIFZL: xafqLlk3kkUe(B65Iv98Ts98c, xafqLlk3kkUe(SXOLrMavuUCe(b'8C\xa5X\x03\xe5};\x7f'), chr(0b101101 + 0o67) + '\145' + chr(2631 - 2532) + chr(0b1101111) + '\x64' + chr(6119 - 6018))('\165' + chr(0b1110100) + '\146' + '\055' + chr(0b11010 + 0o36)))(((mtX6HPOlWiYu, qxrVBjeryNEZ), (isOYmsUx1jxa, kXxsZxlIQUSQ)), outline=(ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(48), 39438 - 39430), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001101 + 0o42) + chr(0b110000), 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + '\067' + chr(1366 - 1311), 8))) AIvJRzLdDfgF = AIvJRzLdDfgF.encode(xafqLlk3kkUe(SXOLrMavuUCe(b'\x1fr\x80\x01Z'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(0b1010010 + 0o35) + chr(0b1100001 + 0o3) + chr(0b1100101))('\x75' + chr(116) + chr(0b1100110) + chr(0b101101) + chr(0b11 + 0o65))) (tfNPqSlj2UD_, heCwHy8LaBe0) = B65Iv98Ts98c.textsize(AIvJRzLdDfgF) xafqLlk3kkUe(B65Iv98Ts98c, xafqLlk3kkUe(SXOLrMavuUCe(b'8C\xa5X\x03\xe5};\x7f'), chr(100) + chr(4326 - 4225) + chr(6957 - 6858) + chr(0b1011001 + 0o26) + chr(0b1100100) + '\145')(chr(0b1110101) + '\x74' + chr(102) + '\055' + '\070'))(((mtX6HPOlWiYu, kXxsZxlIQUSQ - heCwHy8LaBe0 - ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(111) + chr(0b110001) + chr(0b100011 + 0o17), 0b1000)), (isOYmsUx1jxa, kXxsZxlIQUSQ)), fill=(ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1101111) + '\060', 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(48), 8), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + chr(0b110110 + 0o1) + chr(0b110010 + 0o5), 8)), outline=(ehT0Px3KOsy9('\060' + chr(111) + chr(0b110000), 8), ehT0Px3KOsy9('\x30' + '\157' + chr(1260 - 1212), 8), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + chr(2164 - 2109) + chr(665 - 610), 8))) xafqLlk3kkUe(B65Iv98Ts98c, xafqLlk3kkUe(SXOLrMavuUCe(b'>C\xbeX'), chr(0b1100100) + chr(7485 - 7384) + chr(2209 - 2110) + chr(0b1001000 + 0o47) + chr(0b110010 + 0o62) + '\145')('\165' + chr(8619 - 8503) + '\146' + '\055' + '\070'))((mtX6HPOlWiYu + ehT0Px3KOsy9(chr(48) + chr(111) + chr(254 - 200), 0b1000), kXxsZxlIQUSQ - heCwHy8LaBe0 - ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10111 + 0o36), 8)), AIvJRzLdDfgF, fill=(ehT0Px3KOsy9('\060' + chr(3066 - 2955) + chr(2343 - 2292) + chr(55) + chr(285 - 230), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1714 - 1663) + chr(2905 - 2850) + '\x37', 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b101010 + 0o11) + chr(0b1111 + 0o50) + chr(0b110111), 8), ehT0Px3KOsy9(chr(1314 - 1266) + '\157' + '\063' + chr(55) + '\067', 8))) del B65Iv98Ts98c xafqLlk3kkUe(Lx65WhKWKCtH, xafqLlk3kkUe(SXOLrMavuUCe(b'9N\xa9['), chr(9024 - 8924) + chr(0b100100 + 0o101) + chr(6224 - 6125) + chr(111) + '\x64' + chr(0b110111 + 0o56))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(579 - 534) + chr(3012 - 2956)))()
ageitgey/face_recognition
face_recognition/api.py
_rect_to_css
def _rect_to_css(rect): """ Convert a dlib 'rect' object to a plain tuple in (top, right, bottom, left) order :param rect: a dlib 'rect' object :return: a plain tuple representation of the rect in (top, right, bottom, left) order """ return rect.top(), rect.right(), rect.bottom(), rect.left()
python
def _rect_to_css(rect): """ Convert a dlib 'rect' object to a plain tuple in (top, right, bottom, left) order :param rect: a dlib 'rect' object :return: a plain tuple representation of the rect in (top, right, bottom, left) order """ return rect.top(), rect.right(), rect.bottom(), rect.left()
[ "def", "_rect_to_css", "(", "rect", ")", ":", "return", "rect", ".", "top", "(", ")", ",", "rect", ".", "right", "(", ")", ",", "rect", ".", "bottom", "(", ")", ",", "rect", ".", "left", "(", ")" ]
Convert a dlib 'rect' object to a plain tuple in (top, right, bottom, left) order :param rect: a dlib 'rect' object :return: a plain tuple representation of the rect in (top, right, bottom, left) order
[ "Convert", "a", "dlib", "rect", "object", "to", "a", "plain", "tuple", "in", "(", "top", "right", "bottom", "left", ")", "order" ]
c96b010c02f15e8eeb0f71308c641179ac1f19bb
https://github.com/ageitgey/face_recognition/blob/c96b010c02f15e8eeb0f71308c641179ac1f19bb/face_recognition/api.py#L32-L39
train
Convert a dlib rect object to a plain tuple in ( top right bottom left
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy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Error,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(4633 - 4522) + chr(0b100011 + 0o17) + '\x35', 33188 - 33180), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(0b1101111) + chr(1446 - 1397) + chr(0b11 + 0o61) + chr(49), ord("\x08")), ehT0Px3KOsy9('\060' + chr(3757 - 3646) + '\x31' + chr(50) + '\064', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1100110 + 0o11) + '\x33' + chr(0b110111) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(111) + chr(0b110011) + chr(0b11101 + 0o30) + '\x32', 47050 - 47042), ehT0Px3KOsy9(chr(0b110000) + chr(2932 - 2821) + '\x36' + '\x37', 37694 - 37686), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010010 + 0o35) + chr(0b110010) + chr(0b110101) + '\x35', 42651 - 42643), ehT0Px3KOsy9('\060' + chr(3522 - 3411) + chr(1189 - 1139) + '\x36' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b1100110 + 0o11) + '\x33' + chr(0b110010) + chr(0b110111), 27534 - 27526), ehT0Px3KOsy9(chr(2064 - 2016) + '\x6f' + chr(0b1 + 0o60) + chr(51) + chr(0b110100), 33573 - 33565), ehT0Px3KOsy9(chr(0b110000) + chr(5931 - 5820) + chr(0b0 + 0o62) + '\060' + chr(49), 16106 - 16098), ehT0Px3KOsy9('\060' + chr(0b1100101 + 0o12) + chr(0b110001) + chr(51) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + chr(2367 - 2316) + chr(707 - 656), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + chr(0b110111) + '\x31', 0b1000), ehT0Px3KOsy9(chr(117 - 69) + chr(0b1101111) + chr(0b1101 + 0o45) + chr(2426 - 2373) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\157' + chr(0b110011) + chr(53) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1111 + 0o140) + chr(0b1 + 0o60) + chr(0b110011) + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b100001 + 0o21) + '\066', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + '\x35', 11004 - 10996), ehT0Px3KOsy9(chr(960 - 912) + chr(5472 - 5361) + chr(50) + chr(0b10111 + 0o33) + chr(0b110111), 0o10), ehT0Px3KOsy9('\x30' + chr(7339 - 7228) + '\x32' + chr(52) + '\x34', 17366 - 17358), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + '\067' + chr(2021 - 1970), 21854 - 21846), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + '\x31' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(557 - 509) + '\x6f' + chr(51) + chr(0b100011 + 0o20), 41177 - 41169), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + chr(328 - 277) + chr(992 - 944), 0b1000), ehT0Px3KOsy9(chr(1864 - 1816) + chr(111) + '\x32' + chr(0b11001 + 0o36) + '\x32', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b10111 + 0o130) + chr(0b1101 + 0o44) + chr(0b100110 + 0o20) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(12127 - 12016) + chr(51) + chr(0b110011) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\157' + chr(191 - 141) + '\x35', 8), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\157' + chr(1163 - 1114) + chr(50) + chr(0b101011 + 0o13), 48201 - 48193), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(11536 - 11425) + chr(0b111 + 0o54) + '\x34' + '\x36', 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\061' + chr(0b110101) + chr(0b101011 + 0o6), 59310 - 59302), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + '\x30' + chr(1540 - 1491), 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(618 - 564) + '\064', 27253 - 27245), ehT0Px3KOsy9(chr(2109 - 2061) + '\x6f' + '\x31' + '\x31' + '\x32', 20716 - 20708), ehT0Px3KOsy9(chr(2120 - 2072) + chr(111) + chr(49), 63569 - 63561), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(0b1001001 + 0o46) + chr(2410 - 2360) + chr(0b10001 + 0o43) + '\062', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101 + 0o142) + chr(0b10110 + 0o33) + chr(50) + '\061', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(0b0 + 0o61) + chr(1490 - 1436), 62723 - 62715), ehT0Px3KOsy9(chr(48) + chr(5932 - 5821) + chr(0b101101 + 0o4) + chr(52) + chr(0b110011), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(403 - 355) + '\157' + chr(0b11110 + 0o27) + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b';'), chr(0b1100100) + chr(0b101100 + 0o71) + '\143' + '\157' + '\144' + chr(101))('\165' + chr(0b11010 + 0o132) + chr(0b1100110) + '\055' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def _FywsezxMeNJ(BnXcKx1MkWnV): return (xafqLlk3kkUe(BnXcKx1MkWnV, xafqLlk3kkUe(SXOLrMavuUCe(b'a\x0e$'), chr(0b1100100) + chr(0b1100101) + chr(0b110011 + 0o60) + chr(0b1101111) + '\x64' + '\x65')('\x75' + '\x74' + chr(102) + '\x2d' + chr(0b111000)))(), xafqLlk3kkUe(BnXcKx1MkWnV, xafqLlk3kkUe(SXOLrMavuUCe(b'g\x083\x95\x9e'), '\144' + chr(101) + chr(0b1100011) + chr(0b100001 + 0o116) + chr(100) + chr(101))(chr(4745 - 4628) + chr(0b1110100) + '\x66' + '\055' + chr(0b101000 + 0o20)))(), xafqLlk3kkUe(BnXcKx1MkWnV, xafqLlk3kkUe(SXOLrMavuUCe(b'w\x0e \x89\x85Z'), '\144' + chr(2932 - 2831) + '\143' + chr(0b1011010 + 0o25) + chr(0b1100100) + chr(3838 - 3737))(chr(0b1110101) + '\164' + chr(102) + chr(0b10011 + 0o32) + '\070'))(), xafqLlk3kkUe(BnXcKx1MkWnV, xafqLlk3kkUe(SXOLrMavuUCe(b'y\x042\x89'), chr(100) + chr(0b1100101) + '\x63' + chr(0b1101111) + '\x64' + '\x65')(chr(0b11101 + 0o130) + chr(0b1110100) + chr(102) + '\055' + chr(56)))())
ageitgey/face_recognition
face_recognition/api.py
_trim_css_to_bounds
def _trim_css_to_bounds(css, image_shape): """ Make sure a tuple in (top, right, bottom, left) order is within the bounds of the image. :param css: plain tuple representation of the rect in (top, right, bottom, left) order :param image_shape: numpy shape of the image array :return: a trimmed plain tuple representation of the rect in (top, right, bottom, left) order """ return max(css[0], 0), min(css[1], image_shape[1]), min(css[2], image_shape[0]), max(css[3], 0)
python
def _trim_css_to_bounds(css, image_shape): """ Make sure a tuple in (top, right, bottom, left) order is within the bounds of the image. :param css: plain tuple representation of the rect in (top, right, bottom, left) order :param image_shape: numpy shape of the image array :return: a trimmed plain tuple representation of the rect in (top, right, bottom, left) order """ return max(css[0], 0), min(css[1], image_shape[1]), min(css[2], image_shape[0]), max(css[3], 0)
[ "def", "_trim_css_to_bounds", "(", "css", ",", "image_shape", ")", ":", "return", "max", "(", "css", "[", "0", "]", ",", "0", ")", ",", "min", "(", "css", "[", "1", "]", ",", "image_shape", "[", "1", "]", ")", ",", "min", "(", "css", "[", "2", "]", ",", "image_shape", "[", "0", "]", ")", ",", "max", "(", "css", "[", "3", "]", ",", "0", ")" ]
Make sure a tuple in (top, right, bottom, left) order is within the bounds of the image. :param css: plain tuple representation of the rect in (top, right, bottom, left) order :param image_shape: numpy shape of the image array :return: a trimmed plain tuple representation of the rect in (top, right, bottom, left) order
[ "Make", "sure", "a", "tuple", "in", "(", "top", "right", "bottom", "left", ")", "order", "is", "within", "the", "bounds", "of", "the", "image", "." ]
c96b010c02f15e8eeb0f71308c641179ac1f19bb
https://github.com/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3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(55) + chr(55), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1001111 + 0o40) + chr(0b1101 + 0o44) + chr(1481 - 1433) + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\x6f' + chr(53) + chr(651 - 601), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + chr(1959 - 1905) + chr(2538 - 2483), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(9862 - 9751) + chr(0b10011 + 0o36) + '\061' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b10110 + 0o35) + chr(0b100010 + 0o17), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101101 + 0o5) + chr(0b110101 + 0o2) + '\x37', 0o10), ehT0Px3KOsy9(chr(220 - 172) + chr(0b1010111 + 0o30) + '\062' + chr(0b100111 + 0o11) + chr(0b110010), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110011) + chr(0b110100) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b1101111) + '\065' + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(11300 - 11189) + chr(0b11001 + 0o32) + chr(0b110111) + chr(51), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101001 + 0o6) + chr(0b110010) + '\x37' + chr(1446 - 1395), ord("\x08")), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(4570 - 4459) + chr(0b11001 + 0o31) + chr(519 - 470) + chr(622 - 570), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + chr(1467 - 1419) + '\x32', 24479 - 24471), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(52) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(111) + chr(49) + '\x37' + '\x31', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + chr(2281 - 2231), ord("\x08")), ehT0Px3KOsy9('\060' + chr(10366 - 10255) + chr(1984 - 1934) + chr(1241 - 1189) + chr(2058 - 2008), 48597 - 48589), ehT0Px3KOsy9(chr(0b110000) + chr(0b10101 + 0o132) + chr(49) + chr(0b110101) + chr(53), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1000 + 0o147) + chr(0b110001) + chr(0b110011) + chr(54), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2000 - 1951) + chr(2111 - 2056) + chr(892 - 839), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(5094 - 4983) + chr(49) + '\065' + '\063', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + chr(0b110011) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b111000 + 0o67) + chr(49) + '\062' + '\060', 64818 - 64810), ehT0Px3KOsy9(chr(48) + '\157' + chr(1347 - 1296) + chr(0b110001) + chr(1455 - 1407), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + chr(52) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(307 - 259) + '\x6f' + '\064' + chr(0b11 + 0o56), 0o10), ehT0Px3KOsy9('\060' + chr(11898 - 11787) + chr(2438 - 2383), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011 + 0o144) + '\066' + chr(54), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + '\x35' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\157' + chr(445 - 394) + chr(51) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(808 - 760) + chr(111) + '\x31' + chr(54) + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\065' + '\065', 46888 - 46880), ehT0Px3KOsy9(chr(658 - 610) + chr(0b1101111) + chr(1367 - 1318) + '\066' + '\061', 7675 - 7667), ehT0Px3KOsy9('\x30' + chr(0b1100000 + 0o17) + '\062' + chr(0b110111) + '\x35', 30929 - 30921), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\x6f' + '\x36' + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + '\x30' + '\063', 0b1000), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b1101111) + chr(54) + chr(585 - 533), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(1908 - 1797) + chr(0b110010) + chr(0b10100 + 0o40) + chr(55), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\157' + chr(2016 - 1963) + chr(48), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x11'), '\x64' + chr(0b1100101) + chr(0b110011 + 0o60) + chr(7651 - 7540) + '\144' + chr(1224 - 1123))(chr(0b1110101) + chr(0b1110100) + chr(7429 - 7327) + '\055' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def ZIUho3ueJcRu(Zwp12no5jgU1, y75rm19CmWff): return (tsdjvlgh9gDP(Zwp12no5jgU1[ehT0Px3KOsy9('\x30' + chr(111) + chr(1912 - 1864), ord("\x08"))], ehT0Px3KOsy9(chr(0b110000) + chr(8737 - 8626) + chr(48), 8)), Dx22bkKPdt5d(Zwp12no5jgU1[ehT0Px3KOsy9('\x30' + chr(6983 - 6872) + '\061', 0o10)], y75rm19CmWff[ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49), 8)]), Dx22bkKPdt5d(Zwp12no5jgU1[ehT0Px3KOsy9('\060' + '\157' + '\x32', 0b1000)], y75rm19CmWff[ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x30', 8)]), tsdjvlgh9gDP(Zwp12no5jgU1[ehT0Px3KOsy9(chr(48) + chr(5522 - 5411) + chr(0b110011), ord("\x08"))], ehT0Px3KOsy9(chr(0b110000) + chr(1321 - 1210) + chr(648 - 600), 8)))
ageitgey/face_recognition
face_recognition/api.py
face_distance
def face_distance(face_encodings, face_to_compare): """ Given a list of face encodings, compare them to a known face encoding and get a euclidean distance for each comparison face. The distance tells you how similar the faces are. :param faces: List of face encodings to compare :param face_to_compare: A face encoding to compare against :return: A numpy ndarray with the distance for each face in the same order as the 'faces' array """ if len(face_encodings) == 0: return np.empty((0)) return np.linalg.norm(face_encodings - face_to_compare, axis=1)
python
def face_distance(face_encodings, face_to_compare): """ Given a list of face encodings, compare them to a known face encoding and get a euclidean distance for each comparison face. The distance tells you how similar the faces are. :param faces: List of face encodings to compare :param face_to_compare: A face encoding to compare against :return: A numpy ndarray with the distance for each face in the same order as the 'faces' array """ if len(face_encodings) == 0: return np.empty((0)) return np.linalg.norm(face_encodings - face_to_compare, axis=1)
[ "def", "face_distance", "(", "face_encodings", ",", "face_to_compare", ")", ":", "if", "len", "(", "face_encodings", ")", "==", "0", ":", "return", "np", ".", "empty", "(", "(", "0", ")", ")", "return", "np", ".", "linalg", ".", "norm", "(", "face_encodings", "-", "face_to_compare", ",", "axis", "=", "1", ")" ]
Given a list of face encodings, compare them to a known face encoding and get a euclidean distance for each comparison face. The distance tells you how similar the faces are. :param faces: List of face encodings to compare :param face_to_compare: A face encoding to compare against :return: A numpy ndarray with the distance for each face in the same order as the 'faces' array
[ "Given", "a", "list", "of", "face", "encodings", "compare", "them", "to", "a", "known", "face", "encoding", "and", "get", "a", "euclidean", "distance", "for", "each", "comparison", "face", ".", "The", "distance", "tells", "you", "how", "similar", "the", "faces", "are", "." ]
c96b010c02f15e8eeb0f71308c641179ac1f19bb
https://github.com/ageitgey/face_recognition/blob/c96b010c02f15e8eeb0f71308c641179ac1f19bb/face_recognition/api.py#L63-L75
train
Given a list of face encodings compare them to a known face encoding and get a euclidean distance for each comparison face.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88sgk,TLbJ60djyws0,rIcPej9ZqMqV,WTxpD_zsEOh2,LgE_IO_tHXvM,Kk1hd194VKEC,OZYzwAeSQh7N,jFWsnpHpAUWz,RwRZiUMA3V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j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\x6f' + chr(0b110010) + chr(1032 - 983) + '\066', 43434 - 43426), ehT0Px3KOsy9('\060' + '\157' + chr(49) + chr(0b11001 + 0o31) + chr(0b1100 + 0o45), ord("\x08")), ehT0Px3KOsy9(chr(1587 - 1539) + chr(111) + chr(49) + chr(0b110000) + '\x34', 57734 - 57726), ehT0Px3KOsy9('\x30' + '\x6f' + chr(292 - 241) + '\x35' + chr(52), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b100000 + 0o21) + chr(0b110010) + chr(956 - 906), 0o10), ehT0Px3KOsy9(chr(1360 - 1312) + chr(0b1000100 + 0o53) + '\062' + chr(53) + chr(54), 51662 - 51654), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + chr(482 - 429), 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\062' + '\063' + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(1398 - 1287) + '\062' + '\067' + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(7143 - 7032) + chr(50) + chr(0b11111 + 0o24) + chr(0b100001 + 0o21), 3560 - 3552), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000 + 0o147) + chr(2218 - 2168) + chr(756 - 706) + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(111) + chr(0b11100 + 0o26) + '\x32' + '\063', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x31' + chr(48) + chr(52), 8), ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\157' + chr(50) + '\x33' + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1001 + 0o146) + '\x31' + '\060' + '\x33', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + chr(48) + chr(1839 - 1790), ord("\x08")), ehT0Px3KOsy9(chr(1487 - 1439) + '\x6f' + chr(51) + chr(0b110000) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10010 + 0o40) + '\x31', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x33' + chr(2174 - 2122) + '\066', 52482 - 52474), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062' + '\x33' + '\x30', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b100001 + 0o21) + '\067' + chr(0b1011 + 0o50), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + chr(0b110000) + '\061', 0b1000), ehT0Px3KOsy9(chr(1042 - 994) + chr(0b1001011 + 0o44) + '\x33' + '\062', 21554 - 21546), ehT0Px3KOsy9(chr(1271 - 1223) + chr(0b1010110 + 0o31) + '\x35' + '\x30', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + '\066' + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101001 + 0o10) + chr(53) + '\062', 0b1000), ehT0Px3KOsy9(chr(1211 - 1163) + chr(0b111111 + 0o60) + chr(0b1111 + 0o42) + chr(1830 - 1779) + chr(2270 - 2222), 28807 - 28799), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + '\062', 0b1000), ehT0Px3KOsy9(chr(48) + chr(2584 - 2473) + chr(688 - 639) + chr(55) + chr(48), 45285 - 45277), ehT0Px3KOsy9('\x30' + chr(5590 - 5479) + chr(49) + '\x31' + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b101111 + 0o100) + chr(50) + chr(49) + chr(0b11100 + 0o32), 8), ehT0Px3KOsy9('\x30' + chr(0b111110 + 0o61) + chr(0b110001) + '\x31' + chr(51), 0o10), ehT0Px3KOsy9(chr(1555 - 1507) + '\157' + chr(0b110011) + '\x32' + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b11101 + 0o24) + chr(0b101101 + 0o5) + chr(2715 - 2660), 6562 - 6554), ehT0Px3KOsy9('\060' + chr(9451 - 9340) + chr(0b110100 + 0o2) + chr(0b101101 + 0o12), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\063' + chr(2109 - 2059) + '\x35', 0b1000), ehT0Px3KOsy9(chr(1910 - 1862) + '\157' + '\x32' + chr(0b110001) + chr(49), 60685 - 60677), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b1010 + 0o50) + chr(0b10101 + 0o42) + '\067', 0b1000), ehT0Px3KOsy9(chr(630 - 582) + '\157' + chr(1192 - 1142) + chr(1356 - 1303) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(48) + chr(943 - 832) + chr(50) + chr(0b110100) + chr(49), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\x6f' + '\x35' + '\x30', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa0'), chr(0b1001011 + 0o31) + chr(101) + '\x63' + chr(0b1101111) + chr(5898 - 5798) + chr(101))('\x75' + '\x74' + chr(8846 - 8744) + chr(1780 - 1735) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def IV5g2mYfFuyH(qPkjX_Quw1uT, fhnq05vOrYef): if c2A0yzQpDQB3(qPkjX_Quw1uT) == ehT0Px3KOsy9('\x30' + chr(111) + chr(0b101101 + 0o3), ord("\x08")): return xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\xeb<4\x98+'), chr(753 - 653) + chr(8925 - 8824) + '\143' + '\157' + '\144' + chr(0b1100101))(chr(0b1110101) + chr(2072 - 1956) + chr(102) + chr(0b1011 + 0o42) + chr(56)))(ehT0Px3KOsy9(chr(0b110000) + chr(2117 - 2006) + chr(0b110000), 8)) return xafqLlk3kkUe(WqUC3KWvYVup.linalg, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe0>6\x81'), chr(0b1100100) + chr(0b1100101) + chr(0b111100 + 0o47) + chr(111) + chr(0b111111 + 0o45) + chr(3554 - 3453))(chr(9034 - 8917) + chr(0b1110100) + chr(0b1000001 + 0o45) + '\x2d' + '\070'))(qPkjX_Quw1uT - fhnq05vOrYef, axis=ehT0Px3KOsy9(chr(1096 - 1048) + chr(0b110 + 0o151) + chr(1589 - 1540), 0o10))
ageitgey/face_recognition
face_recognition/api.py
load_image_file
def load_image_file(file, mode='RGB'): """ Loads an image file (.jpg, .png, etc) into a numpy array :param file: image file name or file object to load :param mode: format to convert the image to. Only 'RGB' (8-bit RGB, 3 channels) and 'L' (black and white) are supported. :return: image contents as numpy array """ im = PIL.Image.open(file) if mode: im = im.convert(mode) return np.array(im)
python
def load_image_file(file, mode='RGB'): """ Loads an image file (.jpg, .png, etc) into a numpy array :param file: image file name or file object to load :param mode: format to convert the image to. Only 'RGB' (8-bit RGB, 3 channels) and 'L' (black and white) are supported. :return: image contents as numpy array """ im = PIL.Image.open(file) if mode: im = im.convert(mode) return np.array(im)
[ "def", "load_image_file", "(", "file", ",", "mode", "=", "'RGB'", ")", ":", "im", "=", "PIL", ".", "Image", ".", "open", "(", "file", ")", "if", "mode", ":", "im", "=", "im", ".", "convert", "(", "mode", ")", "return", "np", ".", "array", "(", "im", ")" ]
Loads an image file (.jpg, .png, etc) into a numpy array :param file: image file name or file object to load :param mode: format to convert the image to. Only 'RGB' (8-bit RGB, 3 channels) and 'L' (black and white) are supported. :return: image contents as numpy array
[ "Loads", "an", "image", "file", "(", ".", "jpg", ".", "png", "etc", ")", "into", "a", "numpy", "array" ]
c96b010c02f15e8eeb0f71308c641179ac1f19bb
https://github.com/ageitgey/face_recognition/blob/c96b010c02f15e8eeb0f71308c641179ac1f19bb/face_recognition/api.py#L78-L89
train
Loads an image file into a numpy array.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,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essError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + chr(0b100100 + 0o20) + chr(0b110101), 26765 - 26757), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1261 - 1211) + chr(0b110011), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\062' + chr(0b10101 + 0o40) + chr(53), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + '\x31' + chr(48), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(2161 - 2106) + '\060', 32930 - 32922), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + chr(0b110000) + chr(2332 - 2281), 40210 - 40202), ehT0Px3KOsy9(chr(427 - 379) + chr(0b1000110 + 0o51) + chr(1773 - 1723) + chr(0b110000 + 0o3) + chr(0b110000), 19486 - 19478), ehT0Px3KOsy9('\060' + chr(111) + chr(340 - 290) + chr(0b11 + 0o61) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\157' + chr(49) + chr(52) + chr(767 - 716), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + chr(1315 - 1266) + chr(0b1100 + 0o46), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001 + 0o1) + chr(53), 0b1000), ehT0Px3KOsy9('\x30' + chr(614 - 503) + chr(0b110001) + chr(0b10110 + 0o32) + '\066', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + chr(317 - 268) + chr(51), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + chr(0b110001) + chr(0b110001), 7939 - 7931), ehT0Px3KOsy9(chr(0b110000) + chr(472 - 361) + chr(2096 - 2047) + '\066', 44367 - 44359), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b11100 + 0o32) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(767 - 719) + '\x6f' + chr(0b11111 + 0o22) + '\x37' + '\060', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b100 + 0o55) + chr(48) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b10010 + 0o41) + '\x37' + chr(396 - 348), 0o10), ehT0Px3KOsy9(chr(1804 - 1756) + '\x6f' + chr(0b110010) + chr(51) + chr(2306 - 2254), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1515 - 1466) + '\066' + chr(2012 - 1962), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + chr(2658 - 2606), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110111) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(1435 - 1387) + chr(111) + chr(0b1101 + 0o45) + chr(0b10100 + 0o41), 8), ehT0Px3KOsy9('\060' + chr(8959 - 8848) + '\x31' + chr(1086 - 1035), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + '\x37' + '\x30', 8), ehT0Px3KOsy9(chr(1526 - 1478) + chr(0b1101111) + '\x31' + chr(510 - 457) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + '\x32' + chr(0b110110), 25649 - 25641), ehT0Px3KOsy9('\060' + chr(0b111100 + 0o63) + '\x33' + '\x30' + '\067', 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\061' + chr(0b110101) + chr(0b11 + 0o63), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1001001 + 0o46) + chr(0b101111 + 0o2) + chr(52) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1532 - 1481) + chr(968 - 920) + chr(54), 38497 - 38489), ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\x6f' + '\061' + '\x33' + chr(299 - 245), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(7224 - 7113) + chr(1754 - 1703) + '\061', 0b1000), ehT0Px3KOsy9(chr(1574 - 1526) + '\157' + '\062' + '\067', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b1000 + 0o57) + chr(0b10011 + 0o35), 8), ehT0Px3KOsy9(chr(48) + chr(0b1001110 + 0o41) + chr(49) + chr(0b100011 + 0o21) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(111) + chr(50) + '\061', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + chr(0b0 + 0o63) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(575 - 527) + chr(111) + '\061' + chr(0b110110) + chr(54), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(9195 - 9084) + '\065' + chr(1018 - 970), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xcb'), chr(0b1000001 + 0o43) + chr(101) + chr(99) + '\x6f' + '\x64' + chr(0b1100101))(chr(0b100 + 0o161) + chr(116) + chr(9265 - 9163) + chr(0b101101) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def M5AThlGBVKhJ(sHThYHEt4PLu, holLFgwB7vsP=xafqLlk3kkUe(SXOLrMavuUCe(b'\xb7T\xef'), chr(0b1100100) + '\145' + '\143' + chr(0b1000101 + 0o52) + chr(100) + '\145')('\165' + chr(116) + '\x66' + '\055' + '\070')): VgsKglavAqRV = CVPzKRMqx4kh.Image.open(sHThYHEt4PLu) if holLFgwB7vsP: VgsKglavAqRV = VgsKglavAqRV.convert(holLFgwB7vsP) return xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\x84a\xdf\xa9A'), chr(2788 - 2688) + '\x65' + chr(99) + chr(10675 - 10564) + chr(0b1100100) + '\x65')(chr(117) + chr(0b101010 + 0o112) + chr(0b111100 + 0o52) + '\055' + chr(0b10 + 0o66)))(VgsKglavAqRV)
ageitgey/face_recognition
face_recognition/api.py
_raw_face_locations
def _raw_face_locations(img, number_of_times_to_upsample=1, model="hog"): """ Returns an array of bounding boxes of human faces in a image :param img: An image (as a numpy array) :param number_of_times_to_upsample: How many times to upsample the image looking for faces. Higher numbers find smaller faces. :param model: Which face detection model to use. "hog" is less accurate but faster on CPUs. "cnn" is a more accurate deep-learning model which is GPU/CUDA accelerated (if available). The default is "hog". :return: A list of dlib 'rect' objects of found face locations """ if model == "cnn": return cnn_face_detector(img, number_of_times_to_upsample) else: return face_detector(img, number_of_times_to_upsample)
python
def _raw_face_locations(img, number_of_times_to_upsample=1, model="hog"): """ Returns an array of bounding boxes of human faces in a image :param img: An image (as a numpy array) :param number_of_times_to_upsample: How many times to upsample the image looking for faces. Higher numbers find smaller faces. :param model: Which face detection model to use. "hog" is less accurate but faster on CPUs. "cnn" is a more accurate deep-learning model which is GPU/CUDA accelerated (if available). The default is "hog". :return: A list of dlib 'rect' objects of found face locations """ if model == "cnn": return cnn_face_detector(img, number_of_times_to_upsample) else: return face_detector(img, number_of_times_to_upsample)
[ "def", "_raw_face_locations", "(", "img", ",", "number_of_times_to_upsample", "=", "1", ",", "model", "=", "\"hog\"", ")", ":", "if", "model", "==", "\"cnn\"", ":", "return", "cnn_face_detector", "(", "img", ",", "number_of_times_to_upsample", ")", "else", ":", "return", "face_detector", "(", "img", ",", "number_of_times_to_upsample", ")" ]
Returns an array of bounding boxes of human faces in a image :param img: An image (as a numpy array) :param number_of_times_to_upsample: How many times to upsample the image looking for faces. Higher numbers find smaller faces. :param model: Which face detection model to use. "hog" is less accurate but faster on CPUs. "cnn" is a more accurate deep-learning model which is GPU/CUDA accelerated (if available). The default is "hog". :return: A list of dlib 'rect' objects of found face locations
[ "Returns", "an", "array", "of", "bounding", "boxes", "of", "human", "faces", "in", "a", "image" ]
c96b010c02f15e8eeb0f71308c641179ac1f19bb
https://github.com/ageitgey/face_recognition/blob/c96b010c02f15e8eeb0f71308c641179ac1f19bb/face_recognition/api.py#L92-L105
train
Returns an array of bounding boxes of human faces in a image.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MS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s,QOfmzcVJsrp8,tzcpInYwBvYW,iDQ_gSK8V7h0,Rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(7538 - 7427) + chr(0b110001) + '\x30' + '\x31', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(483 - 428) + '\x31', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(51) + chr(424 - 372) + '\064', 0b1000), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b101011 + 0o104) + chr(0b110010) + chr(0b110001) + chr(0b110011), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(1410 - 1359) + '\x36' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(1975 - 1927) + '\157' + '\061' + chr(55) + chr(0b1 + 0o61), ord("\x08")), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1001000 + 0o47) + chr(172 - 123) + chr(0b10100 + 0o37) + chr(0b11 + 0o63), 21297 - 21289), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + chr(48), 0o10), ehT0Px3KOsy9(chr(701 - 653) + '\157' + '\x31' + chr(0b100110 + 0o14) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + chr(50) + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(1996 - 1946) + chr(0b110000) + '\065', 49105 - 49097), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1399 - 1348) + chr(0b110100) + chr(48), 64515 - 64507), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(51) + '\063' + chr(0b11110 + 0o30), 56996 - 56988), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + chr(0b110000) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b110100) + chr(52), 17382 - 17374), ehT0Px3KOsy9('\060' + chr(111) + chr(343 - 294) + '\x37' + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1689 - 1640) + chr(0b1011 + 0o46) + chr(219 - 171), 18066 - 18058), ehT0Px3KOsy9(chr(1859 - 1811) + chr(724 - 613) + chr(0b110001) + chr(1570 - 1517) + chr(0b110 + 0o61), ord("\x08")), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(6693 - 6582) + chr(744 - 690) + chr(50), 0o10), ehT0Px3KOsy9(chr(1885 - 1837) + chr(111) + chr(0b10101 + 0o35) + chr(0b110000) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101011 + 0o10) + chr(0b110101) + '\x33', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b10101 + 0o132) + chr(0b110011 + 0o0) + chr(0b110001) + '\x35', 65116 - 65108), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + chr(2392 - 2339) + chr(0b11110 + 0o22), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1010 - 961) + chr(0b10111 + 0o35) + chr(2629 - 2577), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b10011 + 0o134) + chr(0b11100 + 0o25) + '\062' + chr(2132 - 2082), 8), ehT0Px3KOsy9('\x30' + '\157' + '\x31' + chr(49) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(111) + '\x32' + '\x33', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1010 + 0o145) + chr(0b110001) + chr(50) + '\064', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b110110) + '\x31', 8), ehT0Px3KOsy9(chr(931 - 883) + '\157' + chr(880 - 829) + chr(0b110111) + chr(49), 8), ehT0Px3KOsy9(chr(2102 - 2054) + chr(111) + '\x31' + chr(0b110100) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(8321 - 8210) + chr(0b0 + 0o61) + chr(0b11100 + 0o25) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100001 + 0o16) + chr(189 - 140) + chr(0b10011 + 0o36) + chr(915 - 863), ord("\x08")), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(4787 - 4676) + chr(0b10 + 0o61) + '\061' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(358 - 310) + chr(0b111 + 0o150) + '\x31' + chr(55) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(87 - 39) + chr(0b1010000 + 0o37) + '\061' + chr(0b10101 + 0o33), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + chr(49) + '\065', 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(1835 - 1784) + chr(51) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + chr(0b110101 + 0o1) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b10 + 0o155) + chr(51) + chr(51) + '\x31', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b11110 + 0o27) + '\x30', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'o'), chr(8489 - 8389) + chr(101) + chr(99) + chr(111) + chr(0b1100100) + chr(0b1010 + 0o133))('\165' + chr(0b1110100) + '\x66' + chr(45) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def VPU3j96nD0MS(s63jeLEbd8fs, QI6ScXIM74zD=ehT0Px3KOsy9('\x30' + chr(7516 - 7405) + '\x31', ord("\x08")), FK0vqzZ5gPN6=xafqLlk3kkUe(SXOLrMavuUCe(b')\x96\x83'), chr(2128 - 2028) + chr(101) + '\x63' + chr(111) + chr(6539 - 6439) + chr(101))(chr(117) + '\x74' + chr(0b11110 + 0o110) + chr(45) + '\070')): if FK0vqzZ5gPN6 == xafqLlk3kkUe(SXOLrMavuUCe(b'"\x97\x8a'), chr(0b1100100) + chr(0b1100101) + chr(0b1000100 + 0o37) + chr(111) + chr(0b1100100) + '\x65')('\x75' + chr(0b1011111 + 0o25) + chr(102) + '\055' + '\070'): return JRb9c5ShlmG6(s63jeLEbd8fs, QI6ScXIM74zD) else: return vWs3H5F6isiI(s63jeLEbd8fs, QI6ScXIM74zD)
ageitgey/face_recognition
face_recognition/api.py
face_locations
def face_locations(img, number_of_times_to_upsample=1, model="hog"): """ Returns an array of bounding boxes of human faces in a image :param img: An image (as a numpy array) :param number_of_times_to_upsample: How many times to upsample the image looking for faces. Higher numbers find smaller faces. :param model: Which face detection model to use. "hog" is less accurate but faster on CPUs. "cnn" is a more accurate deep-learning model which is GPU/CUDA accelerated (if available). The default is "hog". :return: A list of tuples of found face locations in css (top, right, bottom, left) order """ if model == "cnn": return [_trim_css_to_bounds(_rect_to_css(face.rect), img.shape) for face in _raw_face_locations(img, number_of_times_to_upsample, "cnn")] else: return [_trim_css_to_bounds(_rect_to_css(face), img.shape) for face in _raw_face_locations(img, number_of_times_to_upsample, model)]
python
def face_locations(img, number_of_times_to_upsample=1, model="hog"): """ Returns an array of bounding boxes of human faces in a image :param img: An image (as a numpy array) :param number_of_times_to_upsample: How many times to upsample the image looking for faces. Higher numbers find smaller faces. :param model: Which face detection model to use. "hog" is less accurate but faster on CPUs. "cnn" is a more accurate deep-learning model which is GPU/CUDA accelerated (if available). The default is "hog". :return: A list of tuples of found face locations in css (top, right, bottom, left) order """ if model == "cnn": return [_trim_css_to_bounds(_rect_to_css(face.rect), img.shape) for face in _raw_face_locations(img, number_of_times_to_upsample, "cnn")] else: return [_trim_css_to_bounds(_rect_to_css(face), img.shape) for face in _raw_face_locations(img, number_of_times_to_upsample, model)]
[ "def", "face_locations", "(", "img", ",", "number_of_times_to_upsample", "=", "1", ",", "model", "=", "\"hog\"", ")", ":", "if", "model", "==", "\"cnn\"", ":", "return", "[", "_trim_css_to_bounds", "(", "_rect_to_css", "(", "face", ".", "rect", ")", ",", "img", ".", "shape", ")", "for", "face", "in", "_raw_face_locations", "(", "img", ",", "number_of_times_to_upsample", ",", "\"cnn\"", ")", "]", "else", ":", "return", "[", "_trim_css_to_bounds", "(", "_rect_to_css", "(", "face", ")", ",", "img", ".", "shape", ")", "for", "face", "in", "_raw_face_locations", "(", "img", ",", "number_of_times_to_upsample", ",", "model", ")", "]" ]
Returns an array of bounding boxes of human faces in a image :param img: An image (as a numpy array) :param number_of_times_to_upsample: How many times to upsample the image looking for faces. Higher numbers find smaller faces. :param model: Which face detection model to use. "hog" is less accurate but faster on CPUs. "cnn" is a more accurate deep-learning model which is GPU/CUDA accelerated (if available). The default is "hog". :return: A list of tuples of found face locations in css (top, right, bottom, left) order
[ "Returns", "an", "array", "of", "bounding", "boxes", "of", "human", "faces", "in", "a", "image" ]
c96b010c02f15e8eeb0f71308c641179ac1f19bb
https://github.com/ageitgey/face_recognition/blob/c96b010c02f15e8eeb0f71308c641179ac1f19bb/face_recognition/api.py#L108-L121
train
Returns an array of bounding boxes of human faces in a image.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L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tAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(686 - 638) + chr(0b11011 + 0o124) + chr(0b11 + 0o56) + '\x32' + chr(0b110011 + 0o2), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + '\067' + chr(51), 0b1000), ehT0Px3KOsy9('\x30' + chr(7627 - 7516) + '\x32' + '\060' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(4358 - 4247) + chr(0b110 + 0o53) + chr(0b100101 + 0o14) + chr(0b100010 + 0o20), 0o10), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(6785 - 6674) + chr(1729 - 1680) + '\066' + '\065', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b111000 + 0o67) + '\061' + '\x32' + '\x35', 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1514 - 1465) + '\060' + chr(48), 3291 - 3283), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + chr(1581 - 1529) + chr(1844 - 1790), 40388 - 40380), ehT0Px3KOsy9(chr(1846 - 1798) + '\x6f' + chr(0b110011) + '\x35' + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\157' + chr(51) + chr(0b10100 + 0o42), 25158 - 25150), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x33' + '\x35' + chr(0b110100), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + '\060' + chr(0b100110 + 0o12), 8), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\157' + chr(50) + chr(0b110010) + chr(871 - 816), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1000 + 0o52) + chr(0b10110 + 0o40) + chr(50), 0o10), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\157' + chr(0b110010) + '\x34' + chr(1818 - 1770), 805 - 797), ehT0Px3KOsy9(chr(1450 - 1402) + chr(0b1101111) + chr(0b110001) + '\x35' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b111001 + 0o66) + chr(0b110110) + '\x37', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(230 - 181) + '\x30' + chr(50), 0b1000), ehT0Px3KOsy9(chr(1786 - 1738) + '\157' + chr(0b1001 + 0o50) + '\063' + chr(54), ord("\x08")), ehT0Px3KOsy9('\060' + chr(1662 - 1551) + chr(0b10101 + 0o36) + chr(54) + '\060', 49811 - 49803), ehT0Px3KOsy9(chr(423 - 375) + chr(0b1101111) + chr(0b111 + 0o54) + '\x32' + chr(0b110000), 26881 - 26873), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\062' + chr(1219 - 1165) + '\x34', 42602 - 42594), ehT0Px3KOsy9('\x30' + chr(111) + chr(2560 - 2509) + chr(0b101101 + 0o10) + chr(0b110 + 0o55), 8), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1101000 + 0o7) + '\x33' + chr(2415 - 2363) + chr(932 - 883), 0b1000), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(10074 - 9963) + chr(52) + chr(55), 0o10), ehT0Px3KOsy9('\x30' + chr(0b110010 + 0o75) + '\x33' + '\x30' + chr(0b100010 + 0o24), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(0b101011 + 0o7) + chr(923 - 872), 24149 - 24141), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\157' + '\x31' + chr(0b110101) + '\060', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(5439 - 5328) + chr(1182 - 1131) + chr(0b10111 + 0o35) + chr(492 - 444), 0b1000), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1101111) + '\x35' + '\x35', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b101000 + 0o107) + chr(50) + '\x37' + '\x33', 0b1000), ehT0Px3KOsy9('\060' + chr(306 - 195) + chr(2663 - 2610) + chr(0b101 + 0o55), ord("\x08")), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\157' + chr(1256 - 1205) + chr(52) + chr(0b101001 + 0o13), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101100 + 0o3) + '\063' + '\067' + chr(0b10000 + 0o45), 10854 - 10846), ehT0Px3KOsy9(chr(1454 - 1406) + '\x6f' + chr(50) + chr(0b11000 + 0o34), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b101100 + 0o7) + chr(0b100100 + 0o16) + chr(1967 - 1917), 0b1000), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101111) + chr(49) + '\067' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(5802 - 5691) + '\x31' + '\060' + chr(0b1111 + 0o46), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + '\061' + chr(53), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(9919 - 9808) + chr(2106 - 2055) + '\064' + '\067', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(9993 - 9882) + chr(53) + '\060', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'{'), '\x64' + chr(0b1110 + 0o127) + '\x63' + chr(111) + '\144' + chr(0b111111 + 0o46))('\x75' + '\x74' + chr(6436 - 6334) + '\055' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def ltKPMmKPgMTJ(s63jeLEbd8fs, QI6ScXIM74zD=ehT0Px3KOsy9(chr(1730 - 1682) + '\157' + chr(49), 0o10), FK0vqzZ5gPN6=xafqLlk3kkUe(SXOLrMavuUCe(b'=\x94\xe6'), chr(0b1100100) + '\x65' + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(0b1010101 + 0o20))(chr(0b1110101) + chr(0b10010 + 0o142) + '\x66' + '\055' + chr(56))): if FK0vqzZ5gPN6 == xafqLlk3kkUe(SXOLrMavuUCe(b'6\x95\xef'), '\144' + '\x65' + '\x63' + chr(0b1101111) + chr(0b111000 + 0o54) + chr(0b1100101))('\x75' + chr(116) + '\146' + chr(0b111 + 0o46) + '\070'): return [ZIUho3ueJcRu(_FywsezxMeNJ(xafqLlk3kkUe(zsgLb4TmQV7r, xafqLlk3kkUe(SXOLrMavuUCe(b"'\x9e\xe2>"), '\144' + chr(101) + chr(0b1100011) + chr(0b1011111 + 0o20) + '\x64' + '\145')(chr(0b1000110 + 0o57) + '\x74' + chr(0b111000 + 0o56) + '\x2d' + chr(1859 - 1803)))), xafqLlk3kkUe(s63jeLEbd8fs, xafqLlk3kkUe(SXOLrMavuUCe(b'&\x93\xe0:\x10'), chr(0b100010 + 0o102) + chr(101) + chr(0b10 + 0o141) + '\157' + chr(0b1100100) + chr(0b1010111 + 0o16))('\x75' + chr(3659 - 3543) + '\x66' + chr(824 - 779) + chr(787 - 731)))) for zsgLb4TmQV7r in VPU3j96nD0MS(s63jeLEbd8fs, QI6ScXIM74zD, xafqLlk3kkUe(SXOLrMavuUCe(b'6\x95\xef'), chr(0b1100100) + chr(7261 - 7160) + '\x63' + chr(0b10010 + 0o135) + chr(100) + '\x65')('\165' + '\x74' + '\146' + '\055' + chr(0b101111 + 0o11)))] else: return [ZIUho3ueJcRu(_FywsezxMeNJ(zsgLb4TmQV7r), xafqLlk3kkUe(s63jeLEbd8fs, xafqLlk3kkUe(SXOLrMavuUCe(b'&\x93\xe0:\x10'), '\144' + '\x65' + '\x63' + chr(111) + chr(3385 - 3285) + '\145')(chr(4206 - 4089) + chr(4045 - 3929) + chr(2658 - 2556) + '\x2d' + chr(0b0 + 0o70)))) for zsgLb4TmQV7r in VPU3j96nD0MS(s63jeLEbd8fs, QI6ScXIM74zD, FK0vqzZ5gPN6)]
ageitgey/face_recognition
face_recognition/api.py
batch_face_locations
def batch_face_locations(images, number_of_times_to_upsample=1, batch_size=128): """ Returns an 2d array of bounding boxes of human faces in a image using the cnn face detector If you are using a GPU, this can give you much faster results since the GPU can process batches of images at once. If you aren't using a GPU, you don't need this function. :param img: A list of images (each as a numpy array) :param number_of_times_to_upsample: How many times to upsample the image looking for faces. Higher numbers find smaller faces. :param batch_size: How many images to include in each GPU processing batch. :return: A list of tuples of found face locations in css (top, right, bottom, left) order """ def convert_cnn_detections_to_css(detections): return [_trim_css_to_bounds(_rect_to_css(face.rect), images[0].shape) for face in detections] raw_detections_batched = _raw_face_locations_batched(images, number_of_times_to_upsample, batch_size) return list(map(convert_cnn_detections_to_css, raw_detections_batched))
python
def batch_face_locations(images, number_of_times_to_upsample=1, batch_size=128): """ Returns an 2d array of bounding boxes of human faces in a image using the cnn face detector If you are using a GPU, this can give you much faster results since the GPU can process batches of images at once. If you aren't using a GPU, you don't need this function. :param img: A list of images (each as a numpy array) :param number_of_times_to_upsample: How many times to upsample the image looking for faces. Higher numbers find smaller faces. :param batch_size: How many images to include in each GPU processing batch. :return: A list of tuples of found face locations in css (top, right, bottom, left) order """ def convert_cnn_detections_to_css(detections): return [_trim_css_to_bounds(_rect_to_css(face.rect), images[0].shape) for face in detections] raw_detections_batched = _raw_face_locations_batched(images, number_of_times_to_upsample, batch_size) return list(map(convert_cnn_detections_to_css, raw_detections_batched))
[ "def", "batch_face_locations", "(", "images", ",", "number_of_times_to_upsample", "=", "1", ",", "batch_size", "=", "128", ")", ":", "def", "convert_cnn_detections_to_css", "(", "detections", ")", ":", "return", "[", "_trim_css_to_bounds", "(", "_rect_to_css", "(", "face", ".", "rect", ")", ",", "images", "[", "0", "]", ".", "shape", ")", "for", "face", "in", "detections", "]", "raw_detections_batched", "=", "_raw_face_locations_batched", "(", "images", ",", "number_of_times_to_upsample", ",", "batch_size", ")", "return", "list", "(", "map", "(", "convert_cnn_detections_to_css", ",", "raw_detections_batched", ")", ")" ]
Returns an 2d array of bounding boxes of human faces in a image using the cnn face detector If you are using a GPU, this can give you much faster results since the GPU can process batches of images at once. If you aren't using a GPU, you don't need this function. :param img: A list of images (each as a numpy array) :param number_of_times_to_upsample: How many times to upsample the image looking for faces. Higher numbers find smaller faces. :param batch_size: How many images to include in each GPU processing batch. :return: A list of tuples of found face locations in css (top, right, bottom, left) order
[ "Returns", "an", "2d", "array", "of", "bounding", "boxes", "of", "human", "faces", "in", "a", "image", "using", "the", "cnn", "face", "detector", "If", "you", "are", "using", "a", "GPU", "this", "can", "give", "you", "much", "faster", "results", "since", "the", "GPU", "can", "process", "batches", "of", "images", "at", "once", ".", "If", "you", "aren", "t", "using", "a", "GPU", "you", "don", "t", "need", "this", "function", "." ]
c96b010c02f15e8eeb0f71308c641179ac1f19bb
https://github.com/ageitgey/face_recognition/blob/c96b010c02f15e8eeb0f71308c641179ac1f19bb/face_recognition/api.py#L135-L151
train
Returns a 2d array of bounding boxes of human faces in a given image using the cnn face detectors.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc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i1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(127 - 79) + '\x6f' + '\x33' + chr(808 - 755) + '\x34', 0b1000), ehT0Px3KOsy9(chr(2284 - 2236) + chr(0b100100 + 0o113) + chr(1631 - 1582) + chr(0b10101 + 0o41) + chr(0b110011), 43558 - 43550), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b100110 + 0o14) + '\x32' + '\x35', 37441 - 37433), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + '\060' + chr(0b110111), 39910 - 39902), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + chr(2259 - 2209) + '\062', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110010) + '\061' + chr(48), 47775 - 47767), ehT0Px3KOsy9('\x30' + chr(0b1001111 + 0o40) + chr(985 - 936) + chr(49) + chr(0b11001 + 0o31), 0o10), ehT0Px3KOsy9(chr(282 - 234) + '\x6f' + chr(0b110011) + chr(0b100000 + 0o21) + chr(53), 12742 - 12734), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + chr(1432 - 1377) + chr(0b110111), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(54) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + '\064' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + '\067' + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + chr(0b1000 + 0o52) + '\x33' + chr(924 - 871), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + chr(275 - 227) + '\063', 46150 - 46142), ehT0Px3KOsy9(chr(0b1010 + 0o46) + '\157' + chr(2128 - 2078) + chr(50) + chr(0b110110), 9852 - 9844), ehT0Px3KOsy9(chr(48) + chr(1779 - 1668) + chr(0b110001) + chr(1230 - 1177) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b101101 + 0o102) + '\x33' + chr(55) + chr(200 - 151), 19619 - 19611), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(50) + '\x31' + '\x34', 10496 - 10488), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110111) + '\x37', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2032 - 1982) + '\x30' + chr(0b110111), 8), ehT0Px3KOsy9(chr(1162 - 1114) + chr(111) + '\063' + '\065', 0o10), ehT0Px3KOsy9(chr(187 - 139) + chr(111) + chr(235 - 185) + chr(0b110010) + chr(0b10000 + 0o41), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32' + chr(49) + '\x36', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + '\x32' + chr(316 - 267), 62769 - 62761), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(0b10011 + 0o40) + '\061', 0b1000), ehT0Px3KOsy9(chr(48) + chr(219 - 108) + chr(0b10000 + 0o45) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(1403 - 1355) + '\x6f' + chr(51) + chr(51), 56880 - 56872), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000000 + 0o57) + chr(399 - 350) + '\066' + chr(2866 - 2812), 56337 - 56329), ehT0Px3KOsy9(chr(1955 - 1907) + chr(0b1001011 + 0o44) + '\x32' + chr(50), 38512 - 38504), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(111) + '\x31' + chr(0b11011 + 0o32) + chr(0b110011 + 0o2), 19667 - 19659), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1101111) + chr(0b110100) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(390 - 279) + '\062' + chr(0b110100) + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b10111 + 0o130) + '\061', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(5833 - 5722) + chr(54), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b101001 + 0o11) + chr(0b110111) + chr(0b1011 + 0o47), 4566 - 4558), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\063' + '\065' + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1100111 + 0o10) + chr(502 - 451) + chr(0b101100 + 0o12) + '\x37', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b1100 + 0o47) + '\063' + '\061', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + '\x31' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b1101111) + '\x32' + chr(0b101110 + 0o5) + chr(53), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1068 - 1020) + chr(1260 - 1149) + '\x35' + chr(48), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2'), '\x64' + '\145' + chr(0b11111 + 0o104) + chr(111) + chr(0b1010110 + 0o16) + chr(0b1100101))('\x75' + '\x74' + chr(0b1000100 + 0o42) + '\055' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def KME74p7EyqRF(YJOmEcibG8C0, QI6ScXIM74zD=ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001), 8), ix9dZyeAmUxY=ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(111) + chr(50) + chr(0b110000) + chr(0b110000), 0b1000)): def InJQOrTmnjGo(rH0oaknbL_Cd): return [ZIUho3ueJcRu(_FywsezxMeNJ(xafqLlk3kkUe(zsgLb4TmQV7r, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9e\x16\xf6\xf3'), chr(100) + chr(8337 - 8236) + '\x63' + chr(0b1101111) + '\x64' + '\145')(chr(0b101110 + 0o107) + chr(116) + chr(102) + chr(45) + chr(0b11010 + 0o36)))), xafqLlk3kkUe(YJOmEcibG8C0[ehT0Px3KOsy9(chr(48) + chr(3914 - 3803) + '\x30', ord("\x08"))], xafqLlk3kkUe(SXOLrMavuUCe(b'\x9f\x1b\xf4\xf7\xb7'), '\144' + '\145' + '\x63' + '\157' + chr(0b1001 + 0o133) + chr(101))('\165' + chr(0b10001 + 0o143) + chr(102) + chr(45) + chr(56)))) for zsgLb4TmQV7r in rH0oaknbL_Cd] bxRDAGbT2QQz = l8EOGCw83ZXG(YJOmEcibG8C0, QI6ScXIM74zD, ix9dZyeAmUxY) return YyaZ4tpXu4lf(abA97kOQKaLo(InJQOrTmnjGo, bxRDAGbT2QQz))
ageitgey/face_recognition
face_recognition/api.py
face_landmarks
def face_landmarks(face_image, face_locations=None, model="large"): """ Given an image, returns a dict of face feature locations (eyes, nose, etc) for each face in the image :param face_image: image to search :param face_locations: Optionally provide a list of face locations to check. :param model: Optional - which model to use. "large" (default) or "small" which only returns 5 points but is faster. :return: A list of dicts of face feature locations (eyes, nose, etc) """ landmarks = _raw_face_landmarks(face_image, face_locations, model) landmarks_as_tuples = [[(p.x, p.y) for p in landmark.parts()] for landmark in landmarks] # For a definition of each point index, see https://cdn-images-1.medium.com/max/1600/1*AbEg31EgkbXSQehuNJBlWg.png if model == 'large': return [{ "chin": points[0:17], "left_eyebrow": points[17:22], "right_eyebrow": points[22:27], "nose_bridge": points[27:31], "nose_tip": points[31:36], "left_eye": points[36:42], "right_eye": points[42:48], "top_lip": points[48:55] + [points[64]] + [points[63]] + [points[62]] + [points[61]] + [points[60]], "bottom_lip": points[54:60] + [points[48]] + [points[60]] + [points[67]] + [points[66]] + [points[65]] + [points[64]] } for points in landmarks_as_tuples] elif model == 'small': return [{ "nose_tip": [points[4]], "left_eye": points[2:4], "right_eye": points[0:2], } for points in landmarks_as_tuples] else: raise ValueError("Invalid landmarks model type. Supported models are ['small', 'large'].")
python
def face_landmarks(face_image, face_locations=None, model="large"): """ Given an image, returns a dict of face feature locations (eyes, nose, etc) for each face in the image :param face_image: image to search :param face_locations: Optionally provide a list of face locations to check. :param model: Optional - which model to use. "large" (default) or "small" which only returns 5 points but is faster. :return: A list of dicts of face feature locations (eyes, nose, etc) """ landmarks = _raw_face_landmarks(face_image, face_locations, model) landmarks_as_tuples = [[(p.x, p.y) for p in landmark.parts()] for landmark in landmarks] # For a definition of each point index, see https://cdn-images-1.medium.com/max/1600/1*AbEg31EgkbXSQehuNJBlWg.png if model == 'large': return [{ "chin": points[0:17], "left_eyebrow": points[17:22], "right_eyebrow": points[22:27], "nose_bridge": points[27:31], "nose_tip": points[31:36], "left_eye": points[36:42], "right_eye": points[42:48], "top_lip": points[48:55] + [points[64]] + [points[63]] + [points[62]] + [points[61]] + [points[60]], "bottom_lip": points[54:60] + [points[48]] + [points[60]] + [points[67]] + [points[66]] + [points[65]] + [points[64]] } for points in landmarks_as_tuples] elif model == 'small': return [{ "nose_tip": [points[4]], "left_eye": points[2:4], "right_eye": points[0:2], } for points in landmarks_as_tuples] else: raise ValueError("Invalid landmarks model type. Supported models are ['small', 'large'].")
[ "def", "face_landmarks", "(", "face_image", ",", "face_locations", "=", "None", ",", "model", "=", "\"large\"", ")", ":", "landmarks", "=", "_raw_face_landmarks", "(", "face_image", ",", "face_locations", ",", "model", ")", "landmarks_as_tuples", "=", "[", "[", "(", "p", ".", "x", ",", "p", ".", "y", ")", "for", "p", "in", "landmark", ".", "parts", "(", ")", "]", "for", "landmark", "in", "landmarks", "]", "# For a definition of each point index, see https://cdn-images-1.medium.com/max/1600/1*AbEg31EgkbXSQehuNJBlWg.png", "if", "model", "==", "'large'", ":", "return", "[", "{", "\"chin\"", ":", "points", "[", "0", ":", "17", "]", ",", "\"left_eyebrow\"", ":", "points", "[", "17", ":", "22", "]", ",", "\"right_eyebrow\"", ":", "points", "[", "22", ":", "27", "]", ",", "\"nose_bridge\"", ":", "points", "[", "27", ":", "31", "]", ",", "\"nose_tip\"", ":", "points", "[", "31", ":", "36", "]", ",", "\"left_eye\"", ":", "points", "[", "36", ":", "42", "]", ",", "\"right_eye\"", ":", "points", "[", "42", ":", "48", "]", ",", "\"top_lip\"", ":", "points", "[", "48", ":", "55", "]", "+", "[", "points", "[", "64", "]", "]", "+", "[", "points", "[", "63", "]", "]", "+", "[", "points", "[", "62", "]", "]", "+", "[", "points", "[", "61", "]", "]", "+", "[", "points", "[", "60", "]", "]", ",", "\"bottom_lip\"", ":", "points", "[", "54", ":", "60", "]", "+", "[", "points", "[", "48", "]", "]", "+", "[", "points", "[", "60", "]", "]", "+", "[", "points", "[", "67", "]", "]", "+", "[", "points", "[", "66", "]", "]", "+", "[", "points", "[", "65", "]", "]", "+", "[", "points", "[", "64", "]", "]", "}", "for", "points", "in", "landmarks_as_tuples", "]", "elif", "model", "==", "'small'", ":", "return", "[", "{", "\"nose_tip\"", ":", "[", "points", "[", "4", "]", "]", ",", "\"left_eye\"", ":", "points", "[", "2", ":", "4", "]", ",", "\"right_eye\"", ":", "points", "[", "0", ":", "2", "]", ",", "}", "for", "points", "in", "landmarks_as_tuples", "]", "else", ":", "raise", "ValueError", "(", "\"Invalid landmarks model type. Supported models are ['small', 'large'].\"", ")" ]
Given an image, returns a dict of face feature locations (eyes, nose, etc) for each face in the image :param face_image: image to search :param face_locations: Optionally provide a list of face locations to check. :param model: Optional - which model to use. "large" (default) or "small" which only returns 5 points but is faster. :return: A list of dicts of face feature locations (eyes, nose, etc)
[ "Given", "an", "image", "returns", "a", "dict", "of", "face", "feature", "locations", "(", "eyes", "nose", "etc", ")", "for", "each", "face", "in", "the", "image" ]
c96b010c02f15e8eeb0f71308c641179ac1f19bb
https://github.com/ageitgey/face_recognition/blob/c96b010c02f15e8eeb0f71308c641179ac1f19bb/face_recognition/api.py#L168-L200
train
Given an image returns a dict of face feature locations
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce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ThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + chr(0b110001) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(9926 - 9815) + '\062' + '\x31' + '\064', 0b1000), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(111) + '\061' + chr(0b1110 + 0o50) + chr(54), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x32' + '\066' + chr(770 - 721), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b11001 + 0o126) + chr(51) + chr(0b0 + 0o61) + '\062', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + chr(2163 - 2114) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(763 - 715) + '\157' + chr(316 - 266) + chr(48) + '\x30', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + chr(48) + chr(50), 8767 - 8759), ehT0Px3KOsy9('\060' + '\157' + chr(487 - 436) + chr(54) + chr(518 - 470), 0b1000), ehT0Px3KOsy9(chr(1966 - 1918) + '\157' + '\x32', 0o10), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b1101111) + chr(0b101110 + 0o4) + chr(0b1100 + 0o51) + chr(1568 - 1515), ord("\x08")), ehT0Px3KOsy9(chr(541 - 493) + '\157' + chr(0b110011) + '\x36' + '\066', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + chr(0b110001) + chr(1865 - 1813), 0o10), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(0b100000 + 0o117) + chr(1518 - 1467) + '\063' + '\066', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(1539 - 1488) + chr(55) + chr(49), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101110 + 0o1) + '\x33' + chr(0b10110 + 0o37) + chr(0b110011), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\067' + chr(2560 - 2508), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49) + chr(0b110101), 43771 - 43763), ehT0Px3KOsy9('\x30' + '\157' + chr(0b10100 + 0o36) + chr(65 - 14) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(2012 - 1964) + chr(0b111011 + 0o64) + chr(49) + chr(53) + chr(0b1110 + 0o50), ord("\x08")), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\x6f' + '\063' + chr(0b101011 + 0o7) + chr(49), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(9256 - 9145) + chr(0b110011) + '\064', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + chr(0b10011 + 0o40) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + '\067' + '\060', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b10001 + 0o136) + chr(54) + '\x37', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(1798 - 1748) + chr(1529 - 1476) + '\x36', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b111000 + 0o67) + chr(0b110011) + chr(0b110101) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(11008 - 10897) + chr(1329 - 1278) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b110011 + 0o0) + '\x33' + chr(0b1 + 0o57), 0o10), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(0b1101111) + '\062' + '\x31' + chr(126 - 77), 8), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + chr(664 - 612) + chr(981 - 933), 0b1000), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b1101111) + chr(51) + '\x34' + '\062', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b101110 + 0o101) + '\063' + chr(49) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110101) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(229 - 181) + '\x6f' + chr(0b100110 + 0o13) + '\063' + chr(0b110101), 0b1000), ehT0Px3KOsy9('\x30' + chr(12290 - 12179) + '\x35' + chr(0b10000 + 0o40), 3553 - 3545), ehT0Px3KOsy9(chr(0b100 + 0o54) + '\x6f' + chr(2229 - 2175) + '\x31', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + chr(0b110010) + '\x32', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b111000 + 0o67) + chr(0b110011) + '\x34' + chr(0b100001 + 0o17), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + '\x37' + chr(0b111 + 0o55), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x35' + chr(48), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa7'), chr(0b100100 + 0o100) + '\x65' + chr(0b1100011) + chr(5021 - 4910) + chr(0b1010111 + 0o15) + '\145')(chr(4805 - 4688) + chr(0b11100 + 0o130) + chr(102) + '\055' + chr(363 - 307)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Gl5hXwIyA0dz(uEuJuVz7kjJc, ltKPMmKPgMTJ=None, FK0vqzZ5gPN6=xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5\xed\x04\xd6\xaf'), chr(100) + '\x65' + chr(99) + chr(0b1101111) + chr(0b110110 + 0o56) + '\x65')(chr(2469 - 2352) + '\x74' + chr(0b1001001 + 0o35) + chr(1917 - 1872) + chr(0b111000))): RG3LlXDt52WI = TXVRaMSEmjkP(uEuJuVz7kjJc, ltKPMmKPgMTJ, FK0vqzZ5gPN6) YeXLVDzZ3Eh3 = [[(UyakMW2IMFEj.x, UyakMW2IMFEj.y) for UyakMW2IMFEj in CpuIgAFcAlFa.parts()] for CpuIgAFcAlFa in RG3LlXDt52WI] if FK0vqzZ5gPN6 == xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5\xed\x04\xd6\xaf'), chr(7651 - 7551) + '\x65' + chr(0b101000 + 0o73) + '\157' + '\144' + chr(0b1100101))(chr(0b1110101) + '\164' + chr(8416 - 8314) + chr(0b101101) + '\x38'): return [{xafqLlk3kkUe(SXOLrMavuUCe(b'\xea\xe4\x1f\xdf'), '\144' + '\145' + '\x63' + '\x6f' + chr(2280 - 2180) + '\145')(chr(13166 - 13049) + '\x74' + chr(0b1100110) + '\x2d' + chr(0b111000)): lE2TT5BDXiYl[ehT0Px3KOsy9(chr(0b110000) + chr(1042 - 931) + '\060', 0b1000):ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b111100 + 0o63) + '\x32' + chr(0b101001 + 0o10), 45190 - 45182)], xafqLlk3kkUe(SXOLrMavuUCe(b"\xe5\xe9\x10\xc5\x95*\xf9'\x92p\xc2\x81"), chr(100) + chr(0b1100101) + '\143' + chr(0b1101111) + chr(4030 - 3930) + chr(9087 - 8986))(chr(0b101 + 0o160) + chr(116) + chr(0b1001001 + 0o35) + chr(617 - 572) + chr(0b1110 + 0o52)): lE2TT5BDXiYl[ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + '\x31', 8):ehT0Px3KOsy9(chr(1477 - 1429) + chr(111) + '\x32' + '\x36', 20067 - 20059)], xafqLlk3kkUe(SXOLrMavuUCe(b'\xfb\xe5\x11\xd9\xbe\x10\xe5;\x95`\xdf\x99;'), chr(498 - 398) + chr(101) + chr(0b11110 + 0o105) + '\x6f' + chr(0b1100100) + '\x65')(chr(0b1100111 + 0o16) + chr(0b1110100) + chr(0b1100110) + '\055' + '\070'): lE2TT5BDXiYl[ehT0Px3KOsy9(chr(48) + chr(0b1011010 + 0o25) + chr(0b11000 + 0o32) + chr(0b110101 + 0o1), 8):ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + '\x33', 0o10)], xafqLlk3kkUe(SXOLrMavuUCe(b'\xe7\xe3\x05\xd4\x95-\xf2+\x94e\xc8'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(117) + '\x74' + '\146' + '\x2d' + chr(2967 - 2911)): lE2TT5BDXiYl[ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + '\x33', 8):ehT0Px3KOsy9(chr(2271 - 2223) + '\x6f' + chr(0b1100 + 0o47) + chr(0b11010 + 0o35), 0o10)], xafqLlk3kkUe(SXOLrMavuUCe(b'\xe7\xe3\x05\xd4\x95;\xe92'), chr(0b1100100) + chr(0b1011110 + 0o7) + chr(0b1011000 + 0o13) + '\157' + chr(100) + chr(7023 - 6922))(chr(777 - 660) + '\x74' + chr(0b1010100 + 0o22) + chr(1536 - 1491) + chr(0b111000)): lE2TT5BDXiYl[ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10010 + 0o41) + chr(0b110111), 8):ehT0Px3KOsy9('\060' + chr(0b1101111) + '\064' + chr(0b100000 + 0o24), ord("\x08"))], xafqLlk3kkUe(SXOLrMavuUCe(b"\xe5\xe9\x10\xc5\x95*\xf9'"), chr(100) + chr(0b1000011 + 0o42) + '\x63' + '\x6f' + chr(187 - 87) + '\x65')('\165' + chr(0b1110100) + '\146' + '\x2d' + chr(351 - 295)): lE2TT5BDXiYl[ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x34' + chr(275 - 223), 8):ehT0Px3KOsy9('\x30' + chr(111) + chr(53) + chr(0b1001 + 0o51), 56280 - 56272)], xafqLlk3kkUe(SXOLrMavuUCe(b'\xfb\xe5\x11\xd9\xbe\x10\xe5;\x95'), '\144' + chr(0b1011000 + 0o15) + chr(0b10 + 0o141) + '\x6f' + '\144' + chr(101))('\165' + chr(0b1 + 0o163) + '\146' + '\055' + chr(1171 - 1115)): lE2TT5BDXiYl[ehT0Px3KOsy9(chr(412 - 364) + chr(0b1011000 + 0o27) + '\065' + chr(1607 - 1557), 8):ehT0Px3KOsy9(chr(48) + chr(0b100000 + 0o117) + chr(0b110110) + chr(1190 - 1142), ord("\x08"))], xafqLlk3kkUe(SXOLrMavuUCe(b'\xfd\xe3\x06\xee\xa6&\xf0'), chr(0b111101 + 0o47) + '\x65' + chr(0b1100011) + '\157' + chr(100) + chr(0b1100101))('\x75' + '\x74' + chr(0b101101 + 0o71) + '\055' + '\070'): lE2TT5BDXiYl[ehT0Px3KOsy9(chr(1606 - 1558) + chr(111) + chr(892 - 838) + chr(0b110000), 8):ehT0Px3KOsy9('\060' + chr(111) + chr(0b110110) + '\x37', 8)] + [lE2TT5BDXiYl[ehT0Px3KOsy9(chr(120 - 72) + chr(111) + '\061' + '\060' + chr(223 - 175), 0o10)]] + [lE2TT5BDXiYl[ehT0Px3KOsy9('\060' + chr(0b11001 + 0o126) + chr(1812 - 1757) + chr(0b110001 + 0o6), 58168 - 58160)]] + [lE2TT5BDXiYl[ehT0Px3KOsy9('\x30' + '\157' + '\067' + chr(0b1000 + 0o56), 11901 - 11893)]] + [lE2TT5BDXiYl[ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10100 + 0o43) + chr(2791 - 2738), 0b1000)]] + [lE2TT5BDXiYl[ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x37' + '\064', 8)]], xafqLlk3kkUe(SXOLrMavuUCe(b'\xeb\xe3\x02\xc5\xa5"\xdf.\x99r'), chr(0b1100100) + chr(0b10111 + 0o116) + '\143' + chr(111) + chr(1185 - 1085) + '\145')(chr(0b1110101) + '\164' + chr(8679 - 8577) + chr(323 - 278) + chr(0b111000)): lE2TT5BDXiYl[ehT0Px3KOsy9('\060' + chr(0b11010 + 0o125) + chr(1189 - 1135) + '\066', 0b1000):ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110111) + chr(0b110100), 8)] + [lE2TT5BDXiYl[ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(54) + '\x30', 8)]] + [lE2TT5BDXiYl[ehT0Px3KOsy9('\060' + chr(12007 - 11896) + chr(0b110111) + chr(0b110100), 8)]] + [lE2TT5BDXiYl[ehT0Px3KOsy9(chr(313 - 265) + chr(111) + chr(49) + chr(964 - 916) + '\063', 0o10)]] + [lE2TT5BDXiYl[ehT0Px3KOsy9('\x30' + chr(0b1101011 + 0o4) + chr(49) + '\x30' + chr(50), 8)]] + [lE2TT5BDXiYl[ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b11110 + 0o23) + chr(0b110000) + '\061', 24013 - 24005)]] + [lE2TT5BDXiYl[ehT0Px3KOsy9(chr(48) + '\x6f' + chr(463 - 414) + '\x30' + '\060', 8)]]} for lE2TT5BDXiYl in YeXLVDzZ3Eh3] elif FK0vqzZ5gPN6 == xafqLlk3kkUe(SXOLrMavuUCe(b'\xfa\xe1\x17\xdd\xa6'), '\144' + chr(0b10 + 0o143) + chr(0b11011 + 0o110) + chr(6904 - 6793) + chr(8408 - 8308) + chr(0b100000 + 0o105))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(0b11100 + 0o21) + chr(56)): return [{xafqLlk3kkUe(SXOLrMavuUCe(b'\xe7\xe3\x05\xd4\x95;\xe92'), chr(0b100010 + 0o102) + chr(5909 - 5808) + chr(6714 - 6615) + '\x6f' + chr(7563 - 7463) + chr(4073 - 3972))('\x75' + '\164' + '\x66' + '\x2d' + chr(0b11101 + 0o33)): [lE2TT5BDXiYl[ehT0Px3KOsy9('\x30' + chr(0b1101110 + 0o1) + '\x34', 52715 - 52707)]], xafqLlk3kkUe(SXOLrMavuUCe(b"\xe5\xe9\x10\xc5\x95*\xf9'"), chr(100) + chr(8151 - 8050) + chr(8170 - 8071) + chr(0b1101111) + '\x64' + '\x65')(chr(0b1110001 + 0o4) + chr(116) + chr(102) + chr(0b1001 + 0o44) + chr(0b111000)): lE2TT5BDXiYl[ehT0Px3KOsy9('\060' + '\157' + chr(677 - 627), 8):ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(10037 - 9926) + chr(0b110011 + 0o1), 8)], xafqLlk3kkUe(SXOLrMavuUCe(b'\xfb\xe5\x11\xd9\xbe\x10\xe5;\x95'), '\144' + '\x65' + chr(0b100 + 0o137) + chr(0b1000011 + 0o54) + chr(100) + chr(418 - 317))(chr(0b10001 + 0o144) + chr(0b1110100) + chr(102) + chr(1787 - 1742) + chr(0b10101 + 0o43)): lE2TT5BDXiYl[ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101011 + 0o5), 8):ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + chr(0b1000 + 0o52), 8)]} for lE2TT5BDXiYl in YeXLVDzZ3Eh3] else: raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xe2\x00\xd0\xa6&\xe4b\x9cc\xc3\x92!\xbf\x8b\x80O-\xf6\x01\xb5y\xb3XC\xd7\x9ax\xf6\xa9\xf3\x97\xbd_2ZE7\x84\xdc\xe4\xe3\x12\xd4\xa6<\xa0#\x82g\x8d\xadk\xad\x94\x8aPa\xbcB\xf1;\xb3\x19E\xc9\x8f:\x85\xa7'), '\144' + '\145' + '\x63' + '\x6f' + '\x64' + chr(8518 - 8417))(chr(3692 - 3575) + '\x74' + '\146' + '\055' + chr(0b101010 + 0o16)))
ageitgey/face_recognition
face_recognition/api.py
face_encodings
def face_encodings(face_image, known_face_locations=None, num_jitters=1): """ Given an image, return the 128-dimension face encoding for each face in the image. :param face_image: The image that contains one or more faces :param known_face_locations: Optional - the bounding boxes of each face if you already know them. :param num_jitters: How many times to re-sample the face when calculating encoding. Higher is more accurate, but slower (i.e. 100 is 100x slower) :return: A list of 128-dimensional face encodings (one for each face in the image) """ raw_landmarks = _raw_face_landmarks(face_image, known_face_locations, model="small") return [np.array(face_encoder.compute_face_descriptor(face_image, raw_landmark_set, num_jitters)) for raw_landmark_set in raw_landmarks]
python
def face_encodings(face_image, known_face_locations=None, num_jitters=1): """ Given an image, return the 128-dimension face encoding for each face in the image. :param face_image: The image that contains one or more faces :param known_face_locations: Optional - the bounding boxes of each face if you already know them. :param num_jitters: How many times to re-sample the face when calculating encoding. Higher is more accurate, but slower (i.e. 100 is 100x slower) :return: A list of 128-dimensional face encodings (one for each face in the image) """ raw_landmarks = _raw_face_landmarks(face_image, known_face_locations, model="small") return [np.array(face_encoder.compute_face_descriptor(face_image, raw_landmark_set, num_jitters)) for raw_landmark_set in raw_landmarks]
[ "def", "face_encodings", "(", "face_image", ",", "known_face_locations", "=", "None", ",", "num_jitters", "=", "1", ")", ":", "raw_landmarks", "=", "_raw_face_landmarks", "(", "face_image", ",", "known_face_locations", ",", "model", "=", "\"small\"", ")", "return", "[", "np", ".", "array", "(", "face_encoder", ".", "compute_face_descriptor", "(", "face_image", ",", "raw_landmark_set", ",", "num_jitters", ")", ")", "for", "raw_landmark_set", "in", "raw_landmarks", "]" ]
Given an image, return the 128-dimension face encoding for each face in the image. :param face_image: The image that contains one or more faces :param known_face_locations: Optional - the bounding boxes of each face if you already know them. :param num_jitters: How many times to re-sample the face when calculating encoding. Higher is more accurate, but slower (i.e. 100 is 100x slower) :return: A list of 128-dimensional face encodings (one for each face in the image)
[ "Given", "an", "image", "return", "the", "128", "-", "dimension", "face", "encoding", "for", "each", "face", "in", "the", "image", "." ]
c96b010c02f15e8eeb0f71308c641179ac1f19bb
https://github.com/ageitgey/face_recognition/blob/c96b010c02f15e8eeb0f71308c641179ac1f19bb/face_recognition/api.py#L203-L213
train
Given an image returns the 128 - dimensional face encoding for each face in the image.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88sgk,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mo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(135 - 87) + chr(8901 - 8790) + chr(688 - 637) + '\x35' + chr(48), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(1762 - 1713) + chr(1370 - 1320) + chr(0b101111 + 0o10), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\064' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b1101111) + '\x32' + chr(53), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + '\x32' + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b1001010 + 0o45) + chr(51) + chr(1966 - 1918) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + '\x33', 0b1000), ehT0Px3KOsy9('\060' + chr(0b101110 + 0o101) + chr(1766 - 1715) + '\063' + chr(0b110101), 24939 - 24931), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + chr(0b110000) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(5831 - 5720) + chr(0b1000 + 0o51) + chr(93 - 38) + '\x33', 59873 - 59865), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + '\x37' + chr(52), 11604 - 11596), ehT0Px3KOsy9(chr(48) + '\157' + chr(50), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b10011 + 0o37) + '\x35' + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(111) + chr(1368 - 1313) + '\067', 32907 - 32899), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(55) + chr(1792 - 1743), 12101 - 12093), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b10100 + 0o133) + '\062' + chr(0b100010 + 0o22) + chr(2334 - 2281), 56823 - 56815), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110 + 0o53) + chr(55), 61149 - 61141), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110010) + '\060' + '\064', ord("\x08")), ehT0Px3KOsy9('\060' + chr(2447 - 2336) + chr(54), 2046 - 2038), ehT0Px3KOsy9(chr(2286 - 2238) + '\157' + chr(51) + chr(50), 42363 - 42355), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(580 - 525), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + chr(49) + '\x36', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(2333 - 2282) + chr(0b110 + 0o60) + '\067', 30379 - 30371), ehT0Px3KOsy9(chr(385 - 337) + '\x6f' + '\x31' + chr(0b110101) + chr(53), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b11111 + 0o22) + '\067' + chr(0b110001), 8), ehT0Px3KOsy9('\x30' + chr(111) + '\063' + chr(840 - 791) + '\x32', 17498 - 17490), ehT0Px3KOsy9(chr(488 - 440) + chr(111) + chr(50) + '\065', 8), ehT0Px3KOsy9(chr(1891 - 1843) + '\157' + chr(51) + chr(440 - 391) + '\x34', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110011) + '\064' + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(2579 - 2528) + chr(0b110101) + '\063', 54155 - 54147), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + chr(0b101001 + 0o7), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b100000 + 0o22) + '\x35' + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b1101111) + chr(0b110001) + chr(0b110111) + chr(0b11000 + 0o32), ord("\x08")), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(111) + '\063' + chr(1855 - 1801) + chr(0b110100), 65124 - 65116), ehT0Px3KOsy9(chr(48) + chr(5573 - 5462) + chr(0b10010 + 0o41) + chr(0b11001 + 0o33) + chr(0b101000 + 0o13), 63674 - 63666), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + '\067' + '\065', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101100 + 0o3) + '\x31' + chr(52) + '\065', 64223 - 64215), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\063' + chr(0b110101) + chr(0b110011), 8), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(0b101100 + 0o103) + chr(1604 - 1553) + chr(0b110110) + chr(0b101000 + 0o16), 8925 - 8917), ehT0Px3KOsy9(chr(1772 - 1724) + '\x6f' + chr(0b11001 + 0o34) + chr(49), 327 - 319)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110101) + '\060', 40319 - 40311)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xc6'), '\x64' + chr(0b1100101) + '\x63' + '\x6f' + '\144' + chr(101))('\165' + '\164' + '\x66' + chr(45) + chr(0b110011 + 0o5)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def qPkjX_Quw1uT(uEuJuVz7kjJc, b3HRUWzZ4118=None, Wb6YASHos8gt=ehT0Px3KOsy9(chr(1001 - 953) + '\x6f' + '\061', 0b1000)): RNf5Mkkmzvmm = TXVRaMSEmjkP(uEuJuVz7kjJc, b3HRUWzZ4118, model=xafqLlk3kkUe(SXOLrMavuUCe(b'\x9b:@y\xbe'), chr(571 - 471) + chr(2495 - 2394) + '\x63' + chr(1912 - 1801) + chr(0b1100100) + chr(3840 - 3739))(chr(117) + '\164' + chr(0b101010 + 0o74) + chr(601 - 556) + chr(0b110000 + 0o10))) return [xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\x89%St\xab'), '\x64' + '\x65' + chr(99) + chr(0b1101111) + chr(0b10110 + 0o116) + chr(8117 - 8016))('\x75' + chr(116) + chr(0b1100110) + chr(45) + chr(56)))(xafqLlk3kkUe(aKYXkK9mEJhg, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8b8Le\xa7\xb0~\x82\xa7\x1a\xdfg\xf5[\x1c\xd6l\xf6ojc!\x85'), '\x64' + chr(101) + '\143' + chr(0b1101111) + chr(0b11110 + 0o106) + chr(0b1100101))('\165' + chr(0b1101110 + 0o6) + '\x66' + '\055' + chr(56)))(uEuJuVz7kjJc, drEwHoiFRKUv, Wb6YASHos8gt)) for drEwHoiFRKUv in RNf5Mkkmzvmm]
apache/spark
python/pyspark/sql/types.py
_parse_datatype_string
def _parse_datatype_string(s): """ Parses the given data type string to a :class:`DataType`. The data type string format equals to :class:`DataType.simpleString`, except that top level struct type can omit the ``struct<>`` and atomic types use ``typeName()`` as their format, e.g. use ``byte`` instead of ``tinyint`` for :class:`ByteType`. We can also use ``int`` as a short name for :class:`IntegerType`. Since Spark 2.3, this also supports a schema in a DDL-formatted string and case-insensitive strings. >>> _parse_datatype_string("int ") IntegerType >>> _parse_datatype_string("INT ") IntegerType >>> _parse_datatype_string("a: byte, b: decimal( 16 , 8 ) ") StructType(List(StructField(a,ByteType,true),StructField(b,DecimalType(16,8),true))) >>> _parse_datatype_string("a DOUBLE, b STRING") StructType(List(StructField(a,DoubleType,true),StructField(b,StringType,true))) >>> _parse_datatype_string("a: array< short>") StructType(List(StructField(a,ArrayType(ShortType,true),true))) >>> _parse_datatype_string(" map<string , string > ") MapType(StringType,StringType,true) >>> # Error cases >>> _parse_datatype_string("blabla") # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ParseException:... >>> _parse_datatype_string("a: int,") # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ParseException:... >>> _parse_datatype_string("array<int") # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ParseException:... >>> _parse_datatype_string("map<int, boolean>>") # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ParseException:... """ sc = SparkContext._active_spark_context def from_ddl_schema(type_str): return _parse_datatype_json_string( sc._jvm.org.apache.spark.sql.types.StructType.fromDDL(type_str).json()) def from_ddl_datatype(type_str): return _parse_datatype_json_string( sc._jvm.org.apache.spark.sql.api.python.PythonSQLUtils.parseDataType(type_str).json()) try: # DDL format, "fieldname datatype, fieldname datatype". return from_ddl_schema(s) except Exception as e: try: # For backwards compatibility, "integer", "struct<fieldname: datatype>" and etc. return from_ddl_datatype(s) except: try: # For backwards compatibility, "fieldname: datatype, fieldname: datatype" case. return from_ddl_datatype("struct<%s>" % s.strip()) except: raise e
python
def _parse_datatype_string(s): """ Parses the given data type string to a :class:`DataType`. The data type string format equals to :class:`DataType.simpleString`, except that top level struct type can omit the ``struct<>`` and atomic types use ``typeName()`` as their format, e.g. use ``byte`` instead of ``tinyint`` for :class:`ByteType`. We can also use ``int`` as a short name for :class:`IntegerType`. Since Spark 2.3, this also supports a schema in a DDL-formatted string and case-insensitive strings. >>> _parse_datatype_string("int ") IntegerType >>> _parse_datatype_string("INT ") IntegerType >>> _parse_datatype_string("a: byte, b: decimal( 16 , 8 ) ") StructType(List(StructField(a,ByteType,true),StructField(b,DecimalType(16,8),true))) >>> _parse_datatype_string("a DOUBLE, b STRING") StructType(List(StructField(a,DoubleType,true),StructField(b,StringType,true))) >>> _parse_datatype_string("a: array< short>") StructType(List(StructField(a,ArrayType(ShortType,true),true))) >>> _parse_datatype_string(" map<string , string > ") MapType(StringType,StringType,true) >>> # Error cases >>> _parse_datatype_string("blabla") # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ParseException:... >>> _parse_datatype_string("a: int,") # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ParseException:... >>> _parse_datatype_string("array<int") # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ParseException:... >>> _parse_datatype_string("map<int, boolean>>") # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ParseException:... """ sc = SparkContext._active_spark_context def from_ddl_schema(type_str): return _parse_datatype_json_string( sc._jvm.org.apache.spark.sql.types.StructType.fromDDL(type_str).json()) def from_ddl_datatype(type_str): return _parse_datatype_json_string( sc._jvm.org.apache.spark.sql.api.python.PythonSQLUtils.parseDataType(type_str).json()) try: # DDL format, "fieldname datatype, fieldname datatype". return from_ddl_schema(s) except Exception as e: try: # For backwards compatibility, "integer", "struct<fieldname: datatype>" and etc. return from_ddl_datatype(s) except: try: # For backwards compatibility, "fieldname: datatype, fieldname: datatype" case. return from_ddl_datatype("struct<%s>" % s.strip()) except: raise e
[ "def", "_parse_datatype_string", "(", "s", ")", ":", "sc", "=", "SparkContext", ".", "_active_spark_context", "def", "from_ddl_schema", "(", "type_str", ")", ":", "return", "_parse_datatype_json_string", "(", "sc", ".", "_jvm", ".", "org", ".", "apache", ".", "spark", ".", "sql", ".", "types", ".", "StructType", ".", "fromDDL", "(", "type_str", ")", ".", "json", "(", ")", ")", "def", "from_ddl_datatype", "(", "type_str", ")", ":", "return", "_parse_datatype_json_string", "(", "sc", ".", "_jvm", ".", "org", ".", "apache", ".", "spark", ".", "sql", ".", "api", ".", "python", ".", "PythonSQLUtils", ".", "parseDataType", "(", "type_str", ")", ".", "json", "(", ")", ")", "try", ":", "# DDL format, \"fieldname datatype, fieldname datatype\".", "return", "from_ddl_schema", "(", "s", ")", "except", "Exception", "as", "e", ":", "try", ":", "# For backwards compatibility, \"integer\", \"struct<fieldname: datatype>\" and etc.", "return", "from_ddl_datatype", "(", "s", ")", "except", ":", "try", ":", "# For backwards compatibility, \"fieldname: datatype, fieldname: datatype\" case.", "return", "from_ddl_datatype", "(", "\"struct<%s>\"", "%", "s", ".", "strip", "(", ")", ")", "except", ":", "raise", "e" ]
Parses the given data type string to a :class:`DataType`. The data type string format equals to :class:`DataType.simpleString`, except that top level struct type can omit the ``struct<>`` and atomic types use ``typeName()`` as their format, e.g. use ``byte`` instead of ``tinyint`` for :class:`ByteType`. We can also use ``int`` as a short name for :class:`IntegerType`. Since Spark 2.3, this also supports a schema in a DDL-formatted string and case-insensitive strings. >>> _parse_datatype_string("int ") IntegerType >>> _parse_datatype_string("INT ") IntegerType >>> _parse_datatype_string("a: byte, b: decimal( 16 , 8 ) ") StructType(List(StructField(a,ByteType,true),StructField(b,DecimalType(16,8),true))) >>> _parse_datatype_string("a DOUBLE, b STRING") StructType(List(StructField(a,DoubleType,true),StructField(b,StringType,true))) >>> _parse_datatype_string("a: array< short>") StructType(List(StructField(a,ArrayType(ShortType,true),true))) >>> _parse_datatype_string(" map<string , string > ") MapType(StringType,StringType,true) >>> # Error cases >>> _parse_datatype_string("blabla") # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ParseException:... >>> _parse_datatype_string("a: int,") # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ParseException:... >>> _parse_datatype_string("array<int") # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ParseException:... >>> _parse_datatype_string("map<int, boolean>>") # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... ParseException:...
[ "Parses", "the", "given", "data", "type", "string", "to", "a", ":", "class", ":", "DataType", ".", "The", "data", "type", "string", "format", "equals", "to", ":", "class", ":", "DataType", ".", "simpleString", "except", "that", "top", "level", "struct", "type", "can", "omit", "the", "struct<", ">", "and", "atomic", "types", "use", "typeName", "()", "as", "their", "format", "e", ".", "g", ".", "use", "byte", "instead", "of", "tinyint", "for", ":", "class", ":", "ByteType", ".", "We", "can", "also", "use", "int", "as", "a", "short", "name", "for", ":", "class", ":", "IntegerType", ".", "Since", "Spark", "2", ".", "3", "this", "also", "supports", "a", "schema", "in", "a", "DDL", "-", "formatted", "string", "and", "case", "-", "insensitive", "strings", "." ]
618d6bff71073c8c93501ab7392c3cc579730f0b
https://github.com/apache/spark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y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b1010 + 0o46) + '\x6f' + '\062' + chr(0b110110) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2003 - 1953) + chr(48) + chr(54), 44759 - 44751), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(0b101111 + 0o100) + chr(50), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + chr(881 - 826) + '\x35', 36519 - 36511), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b101011 + 0o10) + '\066' + chr(0b11010 + 0o31), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + chr(1691 - 1639) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b10 + 0o57) + chr(54), 14404 - 14396), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(55) + '\x30', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(337 - 288) + chr(0b110011) + chr(50), 0o10), ehT0Px3KOsy9(chr(77 - 29) + chr(11096 - 10985) + chr(0b1 + 0o62) + chr(0b110010), 32181 - 32173), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + '\x34' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(1772 - 1661) + chr(50), 8), ehT0Px3KOsy9(chr(48) + chr(4630 - 4519) + '\063' + chr(0b110100) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(1265 - 1217) + '\157' + chr(50) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(2279 - 2231) + chr(0b1101111) + chr(294 - 241) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1101111) + '\064' + chr(0b110100 + 0o1), 0b1000), ehT0Px3KOsy9('\060' + chr(3215 - 3104) + chr(50) + '\061' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10100 + 0o37) + chr(49) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(790 - 679) + chr(0b110010) + chr(0b100000 + 0o23) + chr(738 - 688), ord("\x08")), ehT0Px3KOsy9(chr(1422 - 1374) + chr(0b1010000 + 0o37) + '\x33' + chr(0b110111) + chr(909 - 857), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b10 + 0o61) + chr(0b11100 + 0o27) + '\x34', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(1251 - 1202) + chr(0b10000 + 0o47) + chr(0b10100 + 0o40), 10476 - 10468), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + '\x37' + '\x35', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + chr(0b100011 + 0o16) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\067' + chr(514 - 463), 0b1000), ehT0Px3KOsy9(chr(1687 - 1639) + chr(111) + chr(1217 - 1168) + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + chr(0b10 + 0o155) + chr(51) + chr(2217 - 2167) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101101 + 0o4) + chr(0b110010) + chr(87 - 33), 11487 - 11479), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + '\066' + chr(0b100001 + 0o22), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(2118 - 2067) + '\x37' + chr(0b1110 + 0o42), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(2139 - 2028) + '\064' + chr(49), 0o10), ehT0Px3KOsy9('\060' + chr(0b1011011 + 0o24) + chr(0b110011) + chr(0b100010 + 0o21) + chr(0b10000 + 0o42), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100001 + 0o22) + chr(48) + '\x32', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101110 + 0o5) + '\067' + chr(1628 - 1577), 29224 - 29216), ehT0Px3KOsy9(chr(320 - 272) + chr(111) + '\x31' + chr(1389 - 1336) + chr(0b100111 + 0o17), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(791 - 740) + '\x36', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(52) + '\066', 24739 - 24731), ehT0Px3KOsy9(chr(899 - 851) + '\x6f' + '\x32' + '\x34' + chr(0b110100), 63354 - 63346), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + chr(53) + chr(0b100110 + 0o20), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + chr(1732 - 1681) + chr(791 - 742), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110101) + '\x30', 470 - 462)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x98'), chr(100) + chr(101) + '\143' + chr(111) + '\x64' + chr(0b11011 + 0o112))(chr(0b111011 + 0o72) + '\x74' + chr(0b1100001 + 0o5) + '\055' + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Y3LYO3HV3_l1(vGrByMSYMp9h): GlVzlZeuU9PW = hUOzR39eBpY6._active_spark_context def ttqidxCuj5GC(dSlAMRKOSDl0): return bNoaKyyDQk0A(xafqLlk3kkUe(GlVzlZeuU9PW._jvm.org.apache.spark.sql.types.StructType.fromDDL(dSlAMRKOSDl0), xafqLlk3kkUe(SXOLrMavuUCe(b'\xdc\xf5m\x93'), chr(0b11000 + 0o114) + chr(0b101 + 0o140) + chr(0b1100 + 0o127) + chr(111) + '\144' + '\145')(chr(11221 - 11104) + '\x74' + '\x66' + chr(617 - 572) + chr(1756 - 1700)))()) def wURRcLRRugRv(dSlAMRKOSDl0): return bNoaKyyDQk0A(xafqLlk3kkUe(GlVzlZeuU9PW._jvm.org.apache.spark.sql.api.python.PythonSQLUtils.parseDataType(dSlAMRKOSDl0), xafqLlk3kkUe(SXOLrMavuUCe(b'\xdc\xf5m\x93'), chr(4320 - 4220) + chr(101) + '\143' + '\x6f' + chr(2623 - 2523) + '\145')('\165' + '\x74' + '\x66' + '\x2d' + chr(56)))()) try: return ttqidxCuj5GC(vGrByMSYMp9h) except jLmadlzMdunT as GlnVAPeT6CUe: try: return wURRcLRRugRv(vGrByMSYMp9h) except ZVWAAMjVVHHl: try: return wURRcLRRugRv(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xf2p\x88\x90\x952\x1d)$'), chr(4909 - 4809) + chr(101) + '\x63' + '\157' + chr(100) + chr(0b100010 + 0o103))(chr(117) + chr(116) + chr(9459 - 9357) + chr(180 - 135) + chr(56)) % xafqLlk3kkUe(vGrByMSYMp9h, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xf2p\x94\x83'), chr(100) + chr(101) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(0b10111 + 0o116))('\x75' + chr(0b1110100) + '\146' + '\055' + chr(0b111000)))()) except ZVWAAMjVVHHl: raise GlnVAPeT6CUe

No dataset card yet

New: Create and edit this dataset card directly on the website!

Contribute a Dataset Card
Downloads last month
2
Add dataset card