Giter Site home page Giter Site logo

jeffw99 / hardhat-detector Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kjaisingh/hardhat-detector

0.0 1.0 0.0 373 KB

A convolutional neural network implementation of a script that detects whether an individual is wearing a hardhat or not.

Python 100.00%

hardhat-detector's Introduction

Hardhat Detector

A Convolutional Neural Network implementation of a script that detects whether an individual is wearing a hardhat or not.

The intended implementation for this system is for a construction company wishing to have a detection system that scans a construction worker walking, and checks that they are wearing the necessary safety equipment, preventing the need of an individual to manually do so and increasing work environment safety.

This repository contains numerous files that allow for the downloading of training and testing images, the sorting of these images, the construction of a model and the implementation of a model. All commands must be run in the working directory of the folder, and can be run as follows:

  1. Download negative (false) images from the ImageNet dataset and stores it in a directory locally.
python download-neg-images.py
  1. Download positive (true) images from the ImageNet dataset and stores it in a directory locally.
python download-pos-images.py
  1. Certain downloaded images may simply be empty or irrepresentative images - to improve the accuracy of the algorithm, delete these manually.

  2. Split the downloaded images into training and test set, and sorts them into directories suitable for use with Keras functions.

python sort_train_and_test.py
  1. Create and train the convolutional neural network.
python cnn.py
  1. Pass in images to be scanned for the presence of hardhats using the parser argument -i, with being a placeholder for the file name of the image. The default is 'test_pos.jpg', also part of the repository. The classification result is printed in the console.
python classify.py -i <imageFileName>

hardhat-detector's People

Contributors

kjaisingh avatar

Watchers

 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.