https://github.com/abhik-chakraborty/face-detection
https://github.com/abhik-chakraborty/face-detection
object-detection opencv python3
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/abhik-chakraborty/face-detection
- Owner: Abhik-Chakraborty
- Created: 2023-03-19T20:53:30.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-30T06:10:30.000Z (almost 2 years ago)
- Last Synced: 2025-05-14T14:46:46.733Z (7 months ago)
- Topics: object-detection, opencv, python3
- Language: Python
- Homepage:
- Size: 28.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CV-object-detection
This repository includes the following scripts:
* license_plate_detection.py - Detect and read license plates in a video file
* object_detection.py - Detect objects in a video file
* face_detection.py - Recognize faces in a video file
## Read License Plates
This script reads the video file, looks for license plates and if found, write the image of the frame
with bounding boxes and also a csv with list of plates detected and their corresponding images
cmd to run
```console
python license_plate_detection.py --input-file-path --output-dir
```
Example output

## Detect Objects
This script reads the video file, looks for objects and if found, write the image of the frame
with bounding boxes
The script uses pretrained mobilenet model. The model weights and graph are in mobilenet_model folder
cmd to run
```console
python object_detection.py --input-file-path --output-dir --model-weights-path 'mobilenet_model/frozen_inference_graph.pb' --model-graph-path 'mobilenet_model/graph.pbtxt'
```
Example output

## Recognize faces
This script reads the video file, looks for faces, compares the faces with known faces and if there is a match then
writes an image with bounding boxes and the filename of the known face image
The script uses [face-recognition python library](https://pypi.org/project/face-recognition/)
Known persons directory should have images with filname in the format {person_name}.{format}
cmd to run
```console
python face_detection.py --input-file-path --known-persons-dir ' --output-dir
```
Example output
