Coder Social home page Coder Social logo

pale-w / webcamera-bot-tracker Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 1.3 MB

The purpose of this project is to help with free open source software for your security camera with the possibility of upgrading and customizing it to suit your needs. This model can also be used to recognize faces in images or videos.

License: MIT License

Python 100.00%
machine-learning machinelearning python webcamera-bot-tracker

webcamera-bot-tracker's Introduction

CAMERA-BOT-TRACKER

The purpose of this project is to help with free open source software for your security camera with the possibility

Table of Contents

Description

The purpose of this project is to help with free open source software for your security camera with the possibility of upgrading and customizing it to suit your needs. This model can also be used to recognize faces in images or videos.

Features

  • Training a face recognition model.
  • Generate face encodings from a set of images.
  • Use the trained model to recognize faces.
  • Use a bot to receive notifications of unknown faces
  • Finding a familiar face in youtube videos

Getting Started

Follow the steps below to get started

Prerequisites

Ensure you have the following dependencies installed:

  • Python (3.10x recommended)
  • OpenCV
  • face_recognition library
  • numpy
  • Pillow
  • pytube #optional
  • aiogram

Dataset Preparation

Organize your dataset: Create a directory containing images of the faces you want to recognize.

Run the train.py script, providing the name as a parameter. For example: python train.py "your_name_for_pickle"

The script will process the dataset, extract faces, and create encodings for each face.

Training the Model

After running the train.py script, you'll have a {name}_encodings.pickle file that contains the face encodings for the dataset. These encodings can be used for facial recognition tasks.

Usage

You can use the trained model and face encodings for facial recognition in your applications. The face_recognition library can be utilized for real-time recognition or batch processing of images or video frames.

Example usage:


with open("your_name_for_pickle_encodings.pickle", "rb") as file:
    data = pickle.load(file)

Load an image
image = face_recognition.load_image_file("test_image.jpg")

Get the face encodings of the test image
face_encodings = face_recognition.face_encodings(image)

Compare face encodings for recognition
results = face_recognition.compare_faces(data["encodings"], face_encodings[0])

Process results for facial recognition
if any(results):
    index = results.index(True)
    recognized_name = data["name"]
    print(f"Recognized as {recognized_name}")
else:
    print("Unknown face")

File Structure

train.py: The script to train the face recognition model and generate encodings. {name}_encodings.pickle: The output file containing face encodings for the given name.

Acknowledgments:

face_recognition library

Contributing

Feel free to contribute to this project by creating issues, suggesting improvements, or submitting pull requests.

License

This project is licensed under the MIT License See the LICENSE file for details.

webcamera-bot-tracker's People

Contributors

nikomalik avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.