[PYTHON] I made a Dir en gray face classifier using TensorFlow --② Environment construction

Introduction

--I don't use pyenv, virtualenv or annaconda.

--Not python3. It's not opencv3 either. --No virtual environment is used. ――I use zsh, but bash is the same.

environment

# OS/software/Library version Use Remarks
1 Mac OS X EI Capitan All He is doing his best
2 Docker Latest edition All
3 Python 2.7 series Machine learning and web part I put it in Homebrew, not the existing one
4 Apache 2.4 series Web part I'm using an existing one
5 PHP 5.6 series Image collection part It can be in another language. I wrote it in Ruby at first, but I couldn't connect well due to proxy relations, so...
6 NumPy 1.12 series Matrix operation with OpenCV
7 OpenCV 2.4 series Face detection from image
8 TensorFlow 1.1 system Deep learning
9 Flask 0.12 series Web part Python web framework
10 WSGI 0.12 series Web part I put it in from pip. Compatibility with Python when homebrew is included...

Build

Advance preparation

Updated to latest

brew update

tap

brew tap homebrew/python
brew tap homebrew/science

Introduction of Python

Installation

brew install python

Check the path

which python
/usr/local/bin/python ※1

Check version

python
Python 2.7.13 (default, Apr  4 2017, 08:46:44) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

Introducing NumPy

Installation

brew install numpy

Introducing OpenCV

Installation

brew install opencv

Check version

Python 2.7.13 (default, Apr  4 2017, 08:46:44) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.__version__
'2.4.13.2'
>>>

Introduction of TensolFlow

Installation

pip install --ignore-installed --upgrade \
 https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.1.0-py2-none-any.whl

Confirmation of installation

>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> print(sess.run(hello))

Introducing Flask

Installation

pip install Flask

Introducing WSGI

Installation

pip install mod_wsgi

PATH setting

.zshrc


if [ -d $(brew --prefix)/lib/python2.7/site-packages ];then
  export PYTHONPATH=$(brew --prefix)/lib/python2.7/site-packages:$PYTHONPAT
fi

All page links

-I made a Dir en gray face classifier using TensorFlow --(1) Introduction -I made a face classifier for Dir en gray using TensorFlow-② Environment construction -I made a face classifier for Dir en gray using TensorFlow-③ Image collection -I made a face classifier for Dir en gray using TensorFlow-④ Face extraction -I made a face classifier for Dir en gray using TensorFlow-⑤ Learning data preparation -I made a Dir en gray face classifier using TensorFlow-⑥ Learning program -I made a face classifier for Dir en gray using TensorFlow-⑦ Learning model -I made a face classifier for Dir en gray using TensorFlow-⑧ Learning execution -I made a Dir en gray face classifier using TensorFlow --⑨ Data visualization -I made a Dir en gray face classifier using TensorFlow --⑩ Face classification test -I made a Dir en gray face classifier using TensorFlow-⑪ Web release preparation -I made a Dir en gray face classifier using TensorFlow --⑫ Web release -I tried to make a Dir en gray face classifier using TensorFlow --⑬ Playing (final)

Recommended Posts

I made a Dir en gray face classifier using TensorFlow --② Environment construction
I made a Dir en gray face classifier using TensorFlow-④ Face extraction
I made a Dir en gray face classifier using TensorFlow --⑩ Face classification test
I made a Dir en gray face classifier using TensorFlow --⑥ Learning program
I made a Dir en gray face classifier using TensorFlow --⑬ Playing (final)
I made a Dir en gray face classifier using TensorFlow --- ⑧ Learning execution
I made a Dir en gray face classifier using TensorFlow --⑫ Web release
I made a Dir en gray face classifier using TensorFlow --- ⑦ Learning model
I made a Dir en gray face classifier using TensorFlow --⑪ Web release preparation
I made a VGG16 model using TensorFlow (on the way)
I made a Line-bot using Python!
Make a face recognizer using TensorFlow
Face detection using a cascade classifier
Beginner: I made a launcher using dictionary
I built a TensorFlow environment on windows10
I tried to make a ○ ✕ game using TensorFlow
I made a login / logout process using Python Bottle.
[Python] I made a classifier for irises [Machine learning]
I made a school festival introduction game using Ren’py
〇✕ I made a game
I tried to automate the construction of a hands-on environment using IBM Cloud's SoftLayer API
I made a quick feed reader using feedparser in Python
I tried hosting a TensorFlow deep learning model using TensorFlow Serving
I made a face diagnosis AI for a female professional golfer ③
I made a muscle training estimation app using Qore SDK
I made a Chatbot using LINE Messaging API and Python
[Ubuntu 18.04] Tensorflow 2.0.0-GPU environment construction
Python environment construction and TensorFlow
I made a python text
Ubuntu14.04 + GPU + TensorFlow environment construction
[Tensorflow] Tensorflow environment construction on Windows 10
I tried using magenta / TensorFlow
I made a discord bot
I made a game called Battle Ship using pygame and tkinter
I tried scoring a transvestite contest using Face ++'s Detect API
Creating a Shogi Game Record Management App Using Django 1-Environment Construction-
Postgres environment construction with Docker I struggled a little, so note
I made a poker game server chat-holdem using websocket with python
I made a Chatbot using LINE Messaging API and Python (2) ~ Server ~
[Kaggle] I made a collection of questions using the Titanic tutorial