February 2020
Intermediate to advanced
328 pages
8h 19m
English
Our dataset contains images of varying sizes. Now, we will preprocess our data and build a facial recognition model:
width_resized = 500height_resized = 500test_img = image_read("data/face_recognition/brad_pitt/brad_pitt_21.jpg")test_img <- image_scale(test_img,paste0(width_resized,"x",height_resized,sep =""))
faces <- image_detect_faces(test_img)
Let's print and save the attributes of the face's locale:
faces$detections[,1:4]face_width = faces$detections$widthface_height = faces$detections$height face_x = faces$detections$xface_y = faces$detections$y
Read now
Unlock full access