Coder Social home page Coder Social logo

alvarovasquezai / people_detection Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 611.69 MB

People detection with a neural network to detect people in urban environments using custom-extracted image features. The NN is trained on a dataset consisting of images categorized into scenes with people and without people but with animals. The dataset used was created by generative AI.

License: MIT License

Jupyter Notebook 95.08% Python 4.92%
artificial-intelligence artificial-vision computer-vision deep-learning machine-learning neural-network transfer-learning ai-images-dataset

people_detection's Introduction

People Detection Using Artificial Neural Networks

Project Overview

This project demonstrates the implementation of an Artificial Neural Network (ANN) to detect people in urban environments using custom-extracted image features. The ANN is trained on a dataset consisting of images categorized into scenes with people and without people but with animals.

Authors

Table of Contents

  1. Dataset
  2. Image Features
  3. Labeling Images
  4. Data Splitting and Cross-Validation
  5. Finding the Best Hyperparameters
  6. Training Methodology
  7. Training Model
  8. Using the Model (App)
  9. Results Using the App

Dataset

The dataset comprises 200 images split into two main categories:

  • V1: Images with people and animals (100 images)
  • V2: Images with animals but without people (100 images)

Each image is processed through a custom tool that divides the image into 128x128 grids and labels each grid with one of the following classifications: Absent (A), Animal (N), Noise, and People (P). The grids are stored in respective folders according to their labels.

Folder Structure

  • dataset/
    • V1/ (with people and animals)
      • output/
        • A/ (Absent)
        • N/ (Animal)
        • Noise/
        • P/ (People)
    • V2/ (without people but with animals)
      • output/
        • A/ (Absent)
        • N/ (Animal)
        • Noise/
        • P/ (People)

Image Features

The following features are extracted from each grid for training the neural network:

  • Color Channels (R, G, B): Basic color information which is crucial for identifying elements like clothing or skin tones.
  • RGB Mean: Gives a general idea of the predominant color tone, useful for differentiating background.
  • RGB Mode: Helps identify the most common colors, useful for recognizing typical clothing colors.
  • RGB Variance & Standard Deviation: Measures color variability which can highlight significant details within the grid.
  • Color Histogram: Analyzes the distribution of color intensities, essential for segmentation based on color.
  • Gray Level Co-occurrence Matrix Properties: Provides texture information from the image which is critical for pattern recognition.
  • Local Binary Patterns: Useful for texture classification and differentiating between objects and their surroundings.
  • Histogram of Oriented Gradients (HOG): Effective for detecting human forms in various poses.
  • Peak Local Max: Detects key points in the image, aiding in feature matching and scene understanding.

Labeling Images

Labeling UI

Data Splitting and Cross-Validation

We employ a standard 80-20 split for training and testing our model, ensuring the dataset is diverse and representative of real-world scenarios. Additionally, we use 5-fold cross-validation to verify the robustness of our ANN model.

Finding the Best Hyperparameters

We explore various combinations of hyperparameters to optimize our ANN's performance. This includes testing different numbers of layers, neurons, learning rates, and more.

Training Methodology

Our training approach focuses on minimizing overfitting while maximizing the predictive accuracy of our neural network by adjusting epochs, batch sizes, and regularization methods.

Training Model

We provide detailed steps on how the model is trained, including code snippets and explanations of each stage of the training process.

Model Hyperparameters Classes Report ConfusionMatrix LearningCurve

Using the Model (App)

Description of how the model has been integrated into a user-friendly application for real-time people detection.

Results Using the App

We present a comprehensive review of the application's performance, showcasing the effectiveness of our trained model in practical scenarios. Example1 Example2 Example3 Example4

Contributing

Contributions to this project are welcome! Please fork the repository and submit a pull request with your enhancements.

License

This project is licensed under the terms of the MIT license.

people_detection's People

Contributors

alvarovasquezai avatar makinadefuego avatar mexboxluis avatar

Stargazers

Chiemeziem Fortune Nwoke avatar

Watchers

Kostas Georgiou 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.