Git Product home page Git Product logo

cv's Introduction

CV (Computer Vision)

This repository contains python scripts which performs various CV operation, with and without deep learning.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Ubuntu system dependencies

To run the scripts, you'll need some extra software :

sudo apt-get install build-essential cmake git unzip pkg-config
sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt-get install libxvidcore-dev libx264-dev
sudo apt-get install libgtk-3-dev
sudo apt-get install libhdf5-serial-dev graphviz
sudo apt-get install libopenblas-dev libatlas-base-dev gfortran
sudo apt-get install python-tk python3-tk python-imaging-tk

And the python headers packages :

sudo apt-get install python2.7-dev python3-dev

Create a python virtual environment (optional)

It is strongly advised to use python virtual environment :

pip install virtualenv virtualenvwrapper

Then, we need to update the ~/.bashrc file:

echo -e "\n# virtualenv and virtualenvwrapper" >> ~/.bashrc
echo "export WORKON_HOME=$HOME/.virtualenvs" >> ~/.bashrc
echo "export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3" >> ~/.bashrc
echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc

And reload it with source ~/.bashrc (only once for this shell session, for next sessions it will be loaded automaticaly)

After the global virtualenv parameters are correctly configured, you can create the environment (here with python3 bindings) with :

mkvirtualenv cv -p python3

You can name your virtualenv (here cv) as you want. To work on it, simply do workon cv.

Install OpenCV

You will need numpy to run OpenCV : pip install numpy

To install OpenCV, simply do pip install opencv-contrib-python

OR

Follow one of this guides to install it with custom parameters : OpenCV Tutorials

Python packages

pip install scipy matplotlib pillow
pip install imutils h5py requests progressbar2
pip install scikit-learn scikit-image dlib
pip install mahotas
pip install tensorflow
pip install keras

PiCamera module

pip install picamera[array]

pyimagesearch package

The pyimagesearch package used in many examples and projects is located at the project root. To be able to use the scripts, don't forget to either :

  1. copy/paste the folder in your projects.
  2. add the path to your PYTHONPATH environment variable :
    • modify your ~/.bashrc file
    • add export PYTHONPATH="${PYTHONPATH}:path/to/package" (exemple : export PYTHONPATH="${PYTHONPATH}:${HOME}/CV
  3. sym-link your repository

Other methods are also acceptable. Remember, the package is mandatory for running scripts.

Testing the installation

To test your installation, try to do import keras, import cv2 and import pyimagesearchin a Python shell. If you don't have any error, your installation is working properly.

Note : the success of pyimagesearch import depends on the choice your made at previous step.

Authors

See the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

Thanks to pyimagesearch for the excellent tutorials and books from where a lot of exemples present in this project are inspired from.

cv's People

Contributors

sergentd avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.