Welcome to this lab in the computer vision course TEK5030 at the University of Oslo. In this lab we will play with pre-trained models that are available in the Model Zoo For OpenCV DNN.
Make sure to check the prerequisites before getting started.
Start by cloning this repository on your machine.
Initialize the Python environment
# Clone the lab
git clone https://github.com/tek5030/lab-dnn.git
cd lab-dnn
python3 -m venv venv
source venv/bin/activate
pip install -U pip
pip install -r requirements.txt
python -m ipykernel install --user --name=venv
Then, download the opencv_zoo
within the project directory.
# Pull the model zoo
git clone --depth 1 https://github.com/opencv/opencv_zoo && cd opencv_zoo
git lfs install
git lfs pull
Open the project in PyCharm. If you are uncertain about how this is done, please take a look at the intro lab.
The lab is carried out by following these steps:
- Get an overview
- Play around with examples from the OpenCV model zoo
- Play around with examples from the OpenCV dnn tutorials
- Further work
Please start the lab by going to the first step.
If you are on a lab computer, you are all set.
If you are on Ubuntu and haven't completed the intro lab, the following should be sufficient for this lab.
sudo apt update
sudo apt install python3 python3-dev python3-distutils python3-venv python-is-python3
The OpenCV model zoo repository requires git lfs (Git Large File System):
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt install git-lfs