ageitgey / ageitgey/face_recognition

Google Colab is not using GPU

Open
#700 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
56.8k
Forks
13.7k
PR merge metrics
No merged PRs in 30d

Description

  • face_recognition version:'1.2.3'
  • Python version: python3
  • Operating System:
face_recognition library not using google colab gpu

I am following this tutorial
https://www.pyimagesearch.com/2018/06/18/face-recognition-with-opencv-python-and-deep-learning/

I have installed library in google colab like this:
!apt-get install libjpeg-dev libpng-dev libtiff-dev
!apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
!apt-get install libxvidcore-dev libx264-dev
!apt-get install libgtk-3-dev
!apt-get install libatlas-base-dev
!apt-get install gfortran
!apt-get install python3-dev

!apt-get -qq install -y libsm6 libxext6 && pip install -q -U opencv-python
import cv2
print(cv2.version)

Install dlib library

!apt update
!apt install -y cmake
!pip install dlib

import dlib
import dlib.cuda as cuda
print(cuda.get_num_devices())
dlib.DLIB_USE_CUDA=1
dlib.USE_AVX_INSTRUCTIONS=1

Install face_recognition library

!pip install face_recognition
import face_recognition
face_recognition.version

!pip install imutils

# After installing all the library & importing dataset, then i run following command
!python encode_faces.py --dataset dataset --encodings encodings.pickle


Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no repository file or test; the only entry point mentioned is encode_faces.py, run after installing dlib and face_recognition in Google Colab. Start by reproducing the installation and checking dlib.cuda.get_num_devices() before running that command. Done means establishing whether the reported GPU behavior is reproducible and identifying the project-level change or documentation needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
opencv, python
Domain
computer-vision, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.