Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

deprecated-work/Object-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repo Revision

This repo was previously in use for real-time drowsiness detection for truck drivers. The current purpose of this repo has been shifted to object detection using a webcam using OpenCV.

This project deals with object detection using OpenCV and MobileNetSSD. The logic of the code is to loop over each frame on the webcam and detect common objects such as chair, person, etc.

Cloning the repo

$ git clone https://github.com/akshathmangudi/Object-Detection.git
$ cd Object-Detection/ 

Table of Contents

Creating a venv

For Python 3.6+ users:

python -m venv /path/to/virtualenv

For activation of virtualenv: bash/zsh:

$ source <venv>/bin/activate

fish:

$ source <venv/bin/activate.fish

cmd.exe:

C:\> <venv>\Scripts\activate.bat
PowerShell: 
PS C:\> <venv>\Scripts\activate.ps1

For conda users, the following commands are to be sequentially passed into your terminal:

conda -V
conda update conda
conda create -n <envname> python=x.x anaconda
conda activate <envname>

For deactivation:

conda deactivate

Installing dependencies

$ pip install -r requirements.txt

Check condition of video devices

$ system_profiler SPCameraDataType
$ system_profiler SPCameraDataType | grep "^    [^ ]" | sed "s/    //" | sed "s/://"

Face detection

$ python face_detect.py

Object detection

$ python object_detection.py --prototxt deploy.prototxt.txt --model caffedep.caffemodel

"--prototxt" is the prototxt file that has information related to the machine learning model trained "--model" has the necessary information needed for detection. These two work hand in hand.

For termination of the program, press W.

Help

$ python object_detection.py --help 

For taking a picture, press SPACE. For terminating the program, press ESC.

Project by Akshath Mangudi (2023)

About

Details in README.md

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages