googleimagesdownload -k ‘Киркоров' -l 1000 -t photo -s '>400*300' -o 'Kirkorov'
googleimagesdownload -k ‘репер Face' -l 1000 -t photo -s '>400*300' -o 'Face'
from PIL import Image
import multiprocessing, time, os
def resize_img(img_path):
img = Image. open (os.path.join ('Kirkorov', img_path))
img = img. resize ((299,299), Image. ANTIALIAS)
img. save (os.path.join ('Kirkorov_resize', img_path))
num_processes = multiprocessing. cpu_count ()
pool = multiprocessing. Pool (processes=num_processes)
st = time. time ()
pool.map (resize_img, os. listdir ('Kirkorov'))
print («Execution time: «, time. time ()-st)
INPUT:image
http://kucev.ru/Kirkorov/Kirkorov-pink17_ 21 787_l_jpg.jpg
http://kucev.ru/Kirkorov/Kirkorov-green82_ hqdefault_jpg.jpg
http://kucev.ru/Kirkorov/Kirkorov-pink25_ hqdefault_jpg.jpg
import pandas as pd
data = pd. read_csv ('assignments_v0(14.05.18).tsv', sep = '\t')
data['OUTPUT:output'] = data['OUTPUT:output'].map ({'NO':0,'YES':1})
data_groupby = data. groupby ('INPUT:image').sum ()
data_groupby['OUTPUT:output'].value_counts ()
3.0 634
0.0 445
2.0 57
1.0 23