The timing when I and Yohei Sato should have met for the first time was the 2008 Yahoo Japan Corporation new graduate training. The reason for the phrase "should be" is that the number of new graduates hired by Yahoo Japan Corporation at that time exceeded 250. It was Zara that I had no acquaintance unless I became the same team in the training or the department to which I was assigned was the same.
At the time of joining the company, I was a beginner in programming, and I was only asking "Can I eat pointers?" It is said that Sato volunteered to enter the selection class and overcame the training. And because they were assigned to different places, they passed each other.
After that, from @ doradora09 who entered the department I belonged to as a junior "Sato sponsors a study session called TokyoR, so if you'd like, why don't you join us?" Occasionally, I started to show up at Tokyo R, where I repeatedly passed each other.
In 2015, after changing jobs, I was in a neat state after restructuring. When I contacted @ doradora09 on a whim, "I joined Datum Studio, where Sato is the vice president, so why don't you come and listen to me?" I've attended Datum Studio seminars in the past and thought it was an interesting company.
It was supposed to be just a story, but it became a drinking party, and I was able to connect with the vice president, Sato. And, as an aside, he was hit by a calculator on the spot and decided to join the company until now.
Yohei Sato is one of Japan's leading data scientists, not to mention At the same time, he is the vice president of Datum Studio Co., Ltd. We should aim for Yohei Sato.
And if you are a data scientist, you need to extract and understand the features of Yohei Sato. I think we need to make an effort to get closer to that feature.
So, this time, I extracted what makes Sato Yohei from the images collected on the net and inside Datum Studio. I decided to create a Sato Yohei detector.
Use OpenCV for image processing Tensorflow, a deep learning library, is used to extract features. For the language, I chose python3, which can handle these comprehensively.
The processing flow is as follows.
I will rent a good instance on AWS and use Amazon Linux as the OS.
When developing with python3, we introduced a virtual environment using anaconda3.
conda create -n yohei python=3.5 numpy scipy pandas jupyter scikit-learn matplotlib
source activate yohei
conda install tensorflow
conda install -c menpo opencv3=3.1.0
I encountered a problem that OpenCV does not work on Amazon Linux, so I referred to the following. http://amazarashi.me/archives/855
We are looking for images of Yohei Sato from the front on the Internet and Datum Studio.
I used OpenCV for image processing. All you have to do is run the code below.
import cv2, matplotlib
import numpy as np
import matplotlib.pyplot as plt
from IPython.display import display, Image
import os
def face_detector(img_path, i):
#Image loading
img = cv2.imread(img_path)
#Grayscale
img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
#Face detection
img_face = faceCascade.detectMultiScale(img_gray, 1.1, 3)
#If face detection is possible, proceed to the following processing
if len(img_face) > 0:
for rect in img_face:
x = rect[0]
y = rect[1]
width = rect[2]
height = rect[3]
#Cutout
dst = img_gray[y:y+height, x:x+width]
# 64*Resized to 64
dst_resized = cv2.resize(dst,(64, 64))
new_image_path = 'Output directory' + str(i) + '.png'
cv2.imwrite(new_image_path, dst_resized)
i += 1
return(i)
i = 0
for img_file in file_list:
full_path_name = 'Image storage'+ img_file
i = face_detector(full_path_name, i)
In this way, you can create a face image that has been grayscaled and cut out to 64 * 64.
Images are manually classified into Yohei Sato and others. Also, prepare a csv file with the following correct / incorrect judgment label. (1 is Yohei Sato, 0 is other than that)
img_0.png 1
img_1.png 0
img_9.png 0
︙
Create a learner by referring to the following.
Identify the anime Yuruyuri production company with TensorFlow http://kivantium.hateblo.jp/entry/2015/11/18/233834
I will add it later from here. Please wait a little longer.
Recommended Posts