This is the Jupyter notebook version of the following book:
Michael Beyeler
Machine Learning for OpenCV: A practical introduction to the world of machine learning using OpenCV
expected August 2017
Packt Publishing Ltd., London, England
Paperback: ~380 pages
ISBN 978-178398028-4
The content is available on GitHub. The code is released under the MIT license.
There are at least two ways you can run the code:
- Using Binder (no installation required).
- Using Jupyter Notebook on your local machine.
The code in this book was tested with Python 3.5, although older versions of Python should work as well (such as Python 2.7).
Binder allows you to run Jupyter notebooks in an interactive Docker container. No installation required!
-
Make sure the service is up and running: Check status. "Deploy" should have a green button.
-
Launch the project: mbeyeler/opencv-machine-learning
You basically want to follow the installation instructions in Chapter 1 of the book.
In short:
-
Download and install Python Anaconda.
-
Add Conda-Forge to your trusted channels (to simplify installation of OpenCV on Windows platforms):
$ conda config --add channels conda-forge
-
Create a conda environment for Python 3 with all required packages:
$ conda create -n Python3 python=3.5 --file requirements.txt
-
Activate the conda environment. On Linux / Mac OS X:
$ source activate Python3
On Windows:
$ activate Python3
You can learn more about conda environments in the Managing Environments section of the conda documentation.
-
Fork and clone the GitHub repo:
-
Click the
Fork
button in the top-right corner of this page. -
Clone the repo, where
YourUsername
is your actual GitHub user name:$ git clone https://github.com/YourUsername/opencv-machine-learning
-
-
Launch Jupyter notebook:
$ jupyter notebook
This will open up a browser window in your current directory. Navigate to the folder
opencv-machine-learning
. The README file has a table of contents. Else navigate to thenotebooks
folder, click on the notebook of your choice, and selectKernel > Restart & Run All
from the top menu.