Coder Social home page Coder Social logo

headphones-detection-yolo's Introduction

Headphones object detection using YoloV4

Headphones Detection 1 Headphones Detection 2 Headphones Detection 3

This project aims to train a object detecion deep learning model, using a custom number of classes (Headphones)

Get started

Ensure that your python version is >= 3.9 and you have installed the opencv with CUDA

Download the data running the following command in the src directory:

   $ python data_downloader.py 

Create the train.txt and test.txt files with random split, these files must be in the same directory that the darknet.data file

   $ cd src
   $ python split_train_test.py ../data/images/ 

Install YoloV4 Darknet with CUDA:

Download the yolov4-tiny-custom

Get the yolov4-tiny-custom.cfg and change the number of classes and the filters for the [conv] layers before the [yolo] layers

   $ wget https://github.com/AlexeyAB/darknet/blob/master/cfg/yolov4-tiny-custom.cfg

Train using pre-trained weights

Download file with the first 29-convolutional layers of yolov4-tiny: https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.conv.29

   $ darknet.exe detector train darknet.data yolo-cfg/yolov4-tiny-custom.cfg yolov4-tiny.conv.29 -map

Test the results

   $ darknet.exe detector test darknet.data yolo-cfg/yolov4-tiny-custom.cfg backup/yolov4-tiny-custom_final.weights data/your-image-path.png

Run Inference in python

   $ cd src/
   $ python main.py --image your_image.png

headphones-detection-yolo's People

Contributors

pjarbas 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.