Skip to content

Commit e0faec6

Browse files
author
Eduardo Mendes
authored
Merge pull request #8 from auyer/master
Installation Guide (EN & BR) and .gitignore
2 parents d4658bd + 34d3377 commit e0faec6

File tree

5 files changed

+380
-0
lines changed

5 files changed

+380
-0
lines changed

.gitignore

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# PyInstaller
28+
# Usually these files are written by a python script from a template
29+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.coverage
41+
.coverage.*
42+
.cache
43+
nosetests.xml
44+
coverage.xml
45+
*,cover
46+
.hypothesis/
47+
48+
# Translations
49+
*.mo
50+
*.pot
51+
52+
# Django stuff:
53+
*.log
54+
local_settings.py
55+
56+
# Flask stuff:
57+
instance/
58+
.webassets-cache
59+
60+
# Scrapy stuff:
61+
.scrapy
62+
63+
# Sphinx documentation
64+
docs/_build/
65+
66+
# PyBuilder
67+
target/
68+
69+
# IPython Notebook
70+
.ipynb_checkpoints
71+
72+
# pyenv
73+
.python-version
74+
75+
# celery beat schedule file
76+
celerybeat-schedule
77+
78+
# dotenv
79+
.env
80+
81+
# virtualenv
82+
venv/
83+
ENV/
84+
85+
# Spyder project settings
86+
.spyderproject
87+
88+
# Rope project settings
89+
.ropeproject
90+
91+
#macOS stuff
92+
.DS_Store

INSTALL.md

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
#Installation Tutorial
2+
3+
First, if you don't have i already you will need to install a version of Python.
4+
5+
##Python Installation:
6+
7+
###Linux
8+
9+
It is very likely that you already have Python installed out of the box. To check if you have it installed (and which version it is), open a console and type the following command:
10+
11+
command-line
12+
```$ python3 --version
13+
``` Output >> Python 3.5.1
14+
15+
If you have a different 'micro version' of Python installed, e.g. 3.5.0, then you don't have to upgrade. If you don't have Python installed, or if you want a different version, you can install it as follows:
16+
17+
####Debian or Ubuntu
18+
command-line
19+
```$ sudo apt-get install python3.5```
20+
21+
####Fedora (up to 21)
22+
command-line
23+
```$ sudo yum install python3```
24+
25+
####Fedora (22+)
26+
command-line
27+
```$ sudo dnf install python3```
28+
29+
openSUSE
30+
command-line
31+
```$ sudo zypper install python3```
32+
33+
34+
### macOS ( OS X )
35+
The macOS comes with python 2.7, but it is a good idea to install Python3.
36+
37+
Before you install Python on OS X, you should ensure your Mac settings allow installing packages that aren't from the App Store. Go to System Preferences (it's in the Applications folder), click "Security & Privacy," and then the "General" tab. If your "Allow apps downloaded from:" is set to "Mac App Store," change it to "Mac App Store and identified developers."
38+
39+
You need to go to the website https://www.python.org/downloads/release/python-351/ and download the Python installer:
40+
41+
Download the Mac OS X 64-bit/32-bit installer file,
42+
Double click python-3.5.1-macosx10.6.pkg to run the installer.
43+
Verify the installation was successful by opening the Terminal application and running the python3 command:
44+
45+
command-line
46+
```$ python3 --version```
47+
Output>> Python 3.5.1
48+
49+
###Windows
50+
51+
You can download Python for Windows from the website https://www.python.org/downloads/release/python-351/. After downloading the *.msi file, you should run it (double-click on it) and follow the instructions there. It is important to remember the path (the directory) where you installed Python. It will be needed later!
52+
53+
One thing to watch out for: on the second screen of the installation wizard, marked "Customize", make sure you scroll down to the "Add python.exe to the Path" option and select "Will be installed on local hard drive".
54+
55+
Don't forget to add Python to the Path
56+
57+
In upcoming steps, you'll be using the Windows Command Line. For now, if you need to type in some commands, go to Start menu → All Programs → Accessories → Command Prompt. (On newer versions of Windows, you might have to search for "Command Prompt" since it's sometimes hidden.)
58+
59+
60+
##Virtual environment (Optional, but recomended)
61+
62+
Before we install the necessary packages, we will get you to install an extremely useful tool to help keep your coding environment tidy on your computer. It's possible to skip this step, but it's highly recommended. Starting with the best possible setup will save you a lot of trouble in the future!
63+
64+
So, let's create a virtual environment (also called a virtualenv). Virtualenv will isolate your Python setup on a per-project basis. This means that any changes you make to one project won't affect any others you're also developing. This is similar to the Workspaces for Java developers.
65+
66+
All you need to do is find a directory in which you want to create the virtualenv; it is recomended that you create it inside your projects folder as it will be part of your project.
67+
68+
###On Unix ( Linux and macOS):
69+
70+
```
71+
pip3 install virtualenv
72+
mkdir folder_name && cd folder_name
73+
python3 -m venv virtualenv_name(of your choice)
74+
```
75+
76+
NOTE 1: if you only have one version of Python installed, you might not need to add the "3" in the command, thus you can use "pip instal.." instead.
77+
78+
NOTE 2: If you have a new installation of python, you probably already have PIP installed as well (a Python package installer)
79+
But In case PIP ins't already installed, refer to this link to install it : https://pip.pypa.io/en/latest/installing/
80+
81+
82+
Starting the Virtualenv:
83+
84+
85+
```
86+
$ source virtualenv_name/bin/activate
87+
```
88+
89+
NOTE: sometimes source might not be available. In those cases try doing this instead:
90+
91+
```
92+
$ . virtualenv_name/bin/activate
93+
```
94+
95+
96+
97+
###On Windows:
98+
First, install venv:
99+
```
100+
C:\%userprofile%\Python35-32\Scripts\pip.exe install virtualenv
101+
```
102+
103+
Now, assuming you are going to create a folder inside C:\%userprofile%\projects\VirtualEnv\recogVirtual,
104+
105+
Creating VEnv
106+
```
107+
C:\%userprofile%\Python35-32\Scripts\virtualenv.exe C:\%userprofile%\projects\VirtualEnv\recogVirtual
108+
```
109+
110+
Activation:
111+
```
112+
C:\%userprofile%\projetcs\VirtualEnv\recogVirtual\Scripts\activate
113+
```
114+
115+
116+
####This is the recomended place for cloning this repository.
117+
####```git clone https://github.com/peixebabel/simple-recognition.git```
118+
119+
## Installing Scikit-learn, the Python Machine learning Framework
120+
121+
This Library requires NumPy and SciPy. To install them, run:
122+
123+
``` pip3 install NumPy SciPy
124+
pip3 install -U scikit-learn ```
125+
126+
127+
##Caffe Framework
128+
129+
As this part is very different for each system, you can follow a step-by-step guide here (macOS check below first): [caffe.berkeleyvision.org/installation](http://caffe.berkeleyvision.org/installation.html#prerequisites)
130+
131+
### macOS -> Homebrew
132+
133+
For the installation on the macOS, you are going to need the Homebrew Package Manager, and for that you will need the Command line tools. If you already have Xcode installed, you can just run the command ```xcode-select --install```
134+
135+
Or you can download it from [developer.apple](http://developer.apple.com/)
136+
137+
138+
To install the Homebrew itself, run the following command:
139+
140+
``` ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ```
141+
142+
Now you should be able to follow Caffe's tutorial.

INSTALLBR.md

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
#Tutorial de Instalação
2+
3+
Primeiramente, caso já não tenha, irá precisar instalar uma versão da linguagem Python,
4+
5+
## Instalação do Python :
6+
7+
###Linux
8+
9+
É bem provavel que sua distribuição de Linux já tenha Python instalado. Para checar se tem (e qual a versão ele é), abra o terminal e digite o seguinte comando:
10+
11+
command-line
12+
```$ python3 --version
13+
```Resultado : Python 3.5.1
14+
15+
Se você tem uma 'micro versão' diferente instalada ex: 3.5.0 no lugar da 3.5.1, você não precisa atualizar.
16+
Mas se você não tem python ou tem uma versão diferente, como 2.7, siga os passos para seu sistema:
17+
18+
####Debian or Ubuntu
19+
command-line
20+
```$ sudo apt-get install python3.5```
21+
22+
####Fedora (até versão 21)
23+
command-line
24+
```$ sudo yum install python3```
25+
26+
####Fedora (22+)
27+
command-line
28+
```$ sudo dnf install python3```
29+
30+
openSUSE
31+
command-line
32+
```$ sudo zypper install python3```
33+
34+
35+
### macOS ( OS X )
36+
O macOS já vem com python 2.7 instalado, e para atualizar, siga os passos a seguir:
37+
38+
Antes de você instalar Python no seu macOS, você precisa hablitar a instalação de pacotes que não são da App Store. Vá para System Preferences, clique em "Security & Privacy," e na aba "General". Mude a opção "Allow apps downloaded from:" de "Mac App Store," para "Mac App Store and identified developers."
39+
40+
Baixe o instalador Python do site oficial da linguagem: https://www.python.org/downloads/release/python-351/
41+
42+
Verifique se a instalação foi bem scedida abrindo o Terminal e digitando:
43+
command-line
44+
```$ python3 --version
45+
``` Resultado: Python 3.5.1`
46+
47+
###Windows
48+
49+
Você pode baixar Python para Windoes do website oficial:
50+
https://www.python.org/downloads/release/python-351/. Durante a instalação, lembre-se do diretório onde ela está sendo feita, pois irá precisar mais tarde.
51+
52+
Preste atenção em uma coisa: Na segunda tela da instalação "Customize", role para baixo e na opção "Add python.exe to the Path" selecione "Will be installed on local hard drive".
53+
54+
Não esqueça de adicionar Python para o caminho.
55+
56+
57+
## Virtualenv - ambiente virtual (Opcional, mas recomendado)
58+
59+
Antes de instalarmos qualquer pacote, podemos usar uma ferramenta muito útil para manter seu ambiente de desenvolvimento organizado e separado de outros no seu computador, tornando as configurações independetes das do resto do computador. Isso irá prevenir problemas no fututo. Isso fucniona como as Workspaces de Java.
60+
61+
Você precisa escolher o diretório onde irá desenvolver seu projeto. É recomendável que seja dentro de sua pasta de projetos, e que seu repositório GIT esteja dentro dela (vamos chegar nisso depois).
62+
63+
###Unix :
64+
65+
```
66+
pip3 install virtualenv
67+
mkdir noma_pasta && cd nome_pasta
68+
python3 -m venv virtualenv_nome(nome de sua escolha)
69+
```
70+
71+
72+
NOTA 1: Se você tem apenas uma vesão de Python, você não percisará do "3" no comando. então pode usar "pip instal..." no lugar.
73+
74+
NOTA 2: Caso você esteja usando uma versão antiga de Python que não tenha PIP instalado, você pode baixa-lo aqui: https://pip.pypa.io/en/latest/installing/
75+
76+
Iniciando o Virtualenv:
77+
78+
79+
``` $ source virtualenv_nome/bin/activate
80+
```
81+
82+
NOTA: As vezes "source" pode não estar dispoível, nesse caso, tente o seguinte:
83+
84+
``` $ . virtualenv_nome/bin/activate
85+
```
86+
87+
88+
89+
###Windows:
90+
Primeiro, instale o virtualenv
91+
```
92+
C:\%userprofile%\Python35-32\Scripts\pip.exe install virtualenv
93+
```
94+
95+
Assumindo que você irá criar uma pasta em : C:\%userprofile%\projetos\VirtualEnv\recogVirtual,
96+
97+
Creiando o VEnv
98+
```
99+
C:\%userprofile%\Python35-32\Scripts\virtualenv.exe
100+
C:\%userprofile%\projetos\VirtualEnv\recogVirtual
101+
```
102+
103+
Ativação:
104+
```
105+
C:\%userprofile%\projetos\VirtualEnv\recogVirtual\Scripts\activate
106+
```
107+
108+
109+
####É aqui que você deve fazer a clonagem deste repositório git.
110+
####```git clone https://github.com/peixebabel/simple-recognition.git```
111+
112+
113+
## Instalando o Scikit-learn, o Framework de Python para Machine Learning
114+
115+
Esta biblioteca depende de NumPy e SciPy. para instala-las, digite:
116+
117+
``` pip3 install NumPy SciPy
118+
pip3 install -U scikit-learn ```
119+
120+
121+
##Caffe Framework
122+
123+
Esta parte é bem diferente pra cada sistema, então você pode seguir um guia passo a passo aqui (Usuario de macOS: Chequem a baixo primeiro): [caffe.berkeleyvision.org/installation](http://caffe.berkeleyvision.org/installation.html#prerequisites)
124+
125+
### macOS -> Homebrew
126+
Para a instalação no macOS, você precisará do Homebrew Package Manager.
127+
Para isso, você precisa instalar a Command line tools. Caso tenha o Xcode instalado, digite no terminal : ```xcode-select --install```
128+
129+
Ou você pode baixar de: [developer.apple](http://developer.apple.com/)
130+
131+
132+
Agora para instalar o proprio Homebrew, digite no terminal:
133+
``` ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ```
134+
135+
A partir de agora siga o passo a passo do site da Caffe Framework (acima)

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
11
# simple-recognition
2+
23
Simple Recognition using pokemon images
4+
5+
#Tutorial
6+
7+
####Installation guide on: [INSTALL.md](INSTALL.md)
8+
9+
####Guia de Instalação em Portugues em: [INSTALLBR.md](INSTALLBR.md)
10+
11+
####Usage Guide :
12+
13+
- To do

extractFeatures.pyc

-3.18 KB
Binary file not shown.

0 commit comments

Comments
 (0)