Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

how to make openCV use GPU on google colab

I'm trying to make OpenCV use GPU on google Colab but I can' find any tutorial what I fond is this tutorial

but I get stuck at step3 cuz this tutorial is not for colab

how to make openCV use GPU on google colab

I'm trying to make OpenCV use GPU on google Colab but I can' find any tutorial what I fond is this tutorial

but I get stuck at step3 step4 cuz this tutorial is not for colab

how to make openCV use GPU on google colab

I'm trying to make OpenCV use GPU on google Colab but I can' find any good tutorial what I fond is a tutorial for Ubuntu I followed these steps Step 1: Install NVIDIA CUDA drivers, CUDA Toolkit, and cuDNN "collab already have the drivers"

step 2: Install OpenCV and “dnn” GPU dependencies

! sudo apt-get update
! sudo apt-get upgrade
! sudo apt-get install build-essential cmake unzip pkg-config
! sudo apt-get install libjpeg-dev libpng-dev libtiff-dev
! sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev
! sudo apt-get install libv4l-dev libxvidcore-dev libx264-dev
! sudo apt-get install libgtk-3-dev
! sudo apt-get install libatlas-base-dev gfortran
! sudo apt-get install python3-dev

step 3: Download OpenCV source code

!cd ~
! wget -O opencv.zip https://github.com/opencv/opencv/archive/4.2.0.zip
! wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.2.0.zip
! unzip opencv.zip
! unzip opencv_contrib.zip
! mv opencv-4.2.0 opencv
! mv opencv_contrib-4.2.0 opencv_contrib

step 4:

! wget https://bootstrap.pypa.io/get-pip.py
! sudo python3 get-pip.py
! sudo pip install virtualenv virtualenvwrapper
! sudo rm -rf ~/get-pip.py ~/.cache/pip
$ nano ~/.bashrc   <----- problem here I can't open this tutorial

file to edit it in colab

but I get stuck at step4 cuz this tutorial is not for colab

colab and colab give me error

/bin/bash: nano: command not found

how to make openCV use GPU on google colab

I'm trying to make OpenCV use GPU on google Colab but I can' find any good tutorial what I fond is a tutorial for Ubuntu I followed these steps

Step 1: Install NVIDIA CUDA drivers, CUDA Toolkit, and cuDNN "collab already have the drivers"

step 2: Install OpenCV and “dnn” GPU dependencies

! sudo apt-get update
! sudo apt-get upgrade
! sudo apt-get install build-essential cmake unzip pkg-config
! sudo apt-get install libjpeg-dev libpng-dev libtiff-dev
! sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev
! sudo apt-get install libv4l-dev libxvidcore-dev libx264-dev
! sudo apt-get install libgtk-3-dev
! sudo apt-get install libatlas-base-dev gfortran
! sudo apt-get install python3-dev

step 3: Download OpenCV source code

!cd ~
! wget -O opencv.zip https://github.com/opencv/opencv/archive/4.2.0.zip
! wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.2.0.zip
! unzip opencv.zip
! unzip opencv_contrib.zip
! mv opencv-4.2.0 opencv
! mv opencv_contrib-4.2.0 opencv_contrib

step 4:

! wget https://bootstrap.pypa.io/get-pip.py
! sudo python3 get-pip.py
! sudo pip install virtualenv virtualenvwrapper
! sudo rm -rf ~/get-pip.py ~/.cache/pip
$ nano ~/.bashrc   <----- problem here I can't open this file to edit it in colab

but I get stuck at step4 cuz this tutorial is not for colab and colab give me error

/bin/bash: nano: command not found