https://github.com/turiphro/cvlab
Personal scripts for quick computer vision prototypes
https://github.com/turiphro/cvlab
computer-vision deep-learning mxnet opencv stereo-vision webcams
Last synced: about 2 months ago
JSON representation
Personal scripts for quick computer vision prototypes
- Host: GitHub
- URL: https://github.com/turiphro/cvlab
- Owner: turiphro
- Created: 2019-08-17T21:05:56.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-10-23T16:24:35.000Z (over 2 years ago)
- Last Synced: 2025-02-12T10:53:58.721Z (4 months ago)
- Topics: computer-vision, deep-learning, mxnet, opencv, stereo-vision, webcams
- Language: Python
- Homepage: https://turiphro.nl/projects/cvlab
- Size: 45.9 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This repository contains code and resources for
my personal computer vision lab. It will be a
playground for new ideas using a diversity of
(Python and C++) libraries, 2D and 3D input
devices (such as webcams, Kinect, Leap Motion
and Wiimotes), prototypes, and documentation.As this repo is meant for experimentation and
prototyping, please do not judge code quality ;)Installation (Ubuntu)
=====================Last tested on Ubuntu 20.04.
```
sudo apt-get install python3-pip python3-numpy python3-dev potrace libgtk2.0-dev libeigen3-dev libavcodec-dev libdc1394-22-dev libjpeg-dev libpng-dev libtiff-dev libopenni-dev imagemagick libffi-dev libhdf5-dev libhdf5-serial-dev libatlas-base-devpython3 -m venv venv
source venv/bin/activate
pip install -r requirements/desktop.txt # or requirements/pi.txt on raspberry pi
```### Raspberry Pi
Additionally, on raspberry pis do:- `sudo raspi-config` and enable the camera module (and ssh if desired)
- install the LCD screen; depending on your screen, use:
- RPi Display (aliexpress; here 3.5 inch MPI3501):
`git clone https://github.com/goodtft/LCD-show.git && cd LCD-show && chmod +x LCD* && sudo ./LCD35-show 180`;
change rotation (180) later with `sudo ./rotate.sh [rotation]`### Manual compilation OpenCV
Alternatively, you may manually compile OpenCV.Compile OpenCV 4.0+, including Python (3) bindings (6min on my core i7)
https://www.pyimagesearch.com/2018/08/15/how-to-install-opencv-4-on-ubuntu/export OPENCV=4.1.2 # 2019-10-10
wget -O opencv.zip https://github.com/opencv/opencv/archive/$OPENCV.zip
wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/$OPENCV.zip
unzip opencv.zip && unzip opencv_contrib.zip
mv opencv-$OPENCV opencv && mv opencv_contrib-$OPENCV opencv_contribmkdir -p opencv/build/ && cd opencv/build
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D INSTALL_C_EXAMPLES=OFF \
-D OPENCV_ENABLE_NONFREE=ON \
-D OPENCV_EXTRA_MODULES_PATH=$PWD/../../opencv_contrib/modules \
-D PYTHON_EXECUTABLE=$(which python3) \
-D PYTHON2_EXECUTABLE=$(which python2) \
-D BUILD_EXAMPLES=ON ..
make -j5
sudo make installTools
=====## Inference on webcams
We can run various inference algorithms on streams of images (e.g., webcams or folders with images).Example:
```
export PYTHONPATH="$PWD:$PYTHONPATH"
python3 apps/viewer.py -i 0 1 2 -f classic.OpticalFlow
```You can find all available algorithms with:
``` grep "(\w+)\(Inference\)" -Eo inference -r ```
For more notes, see the doc/ directory.