Skip to content

tek5030/lab-dnn

Repository files navigation

Deep learning applications

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 using uv.

First, install uv:

curl -LsSf https://astral.sh/uv/install.sh | sh

Then set up the project:

# Clone the lab
git clone https://github.com/tek5030/lab-dnn.git

cd lab-dnn

# Install dependencies
uv sync

# Activate the environment
source .venv/bin/activate

Alternatively, using pip:

# 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://huggingface.co/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.

Practical Neural Network examples

We added some fun examples that use techniques that are relevant for the course. They should be able to run with the environment set up in the previous step. It's anything to complete, but you can run the main.py files, and potentially play around with the code.

OpenCV model zoo

The lab is carried out by following these steps:

  1. Get an overview
  2. Play around with examples from the OpenCV model zoo
  3. Play around with examples from the OpenCV dnn tutorials
  4. Further work

Please start the lab by going to the first step.


Prerequisites

If you are on Ubuntu and haven't completed the intro lab, the following should be sufficient for this lab.

Install required Python packages

sudo apt update
sudo apt install python3 python3-dev python3-distutils python3-venv python-is-python3

Install git lfs

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors