Code Monkey home page Code Monkey logo

object-detection's Introduction

Object Detection using YOLO version 3

๐Ÿš€ Welcome to the Object Detection using YOLOv3 tutorial! In this guide, we'll walk you through the process of setting up and using YOLOv3 to detect objects in images and perform real-time object detection in videos.

๐Ÿ“ฆ Import Details

Make sure you have the following dependencies installed:

  • OpenCV
  • NumPy
  • Matplotlib
  • Jupyter Lab

You can install them using the following command:

pip install opencv-python numpy matplotlib jupyterlab

๐Ÿ“š Introduction

You Only Look Once (YOLO) is a state-of-the-art, real-time object detection algorithm. YOLOv3, the latest version, will be applied to detect objects in images. A set of pre-trained weights, based on the Common Objects in Context (COCO) database, is utilized for this tutorial.

๐Ÿ–ผ๏ธ Actual Data

We encourage you to test the YOLO algorithm on your images. The provided images are:

  • cat.jpg
  • city_scene.jpg
  • dog.jpg
  • dog2.jpg
  • eagle.jpg
  • food.jpg
  • giraffe.jpg
  • horses.jpg
  • motorbike.jpg
  • person.jpg
  • surf.jpg
  • wine.jpg

These images are located in the ./images/ folder.

๐Ÿ› ๏ธ Installation

Follow these steps to set up the YOLOv3 environment:

  1. Clone the repository:

    git clone https://github.com/Harish-Srinivas-07/object-detection.git
  2. Navigate to the project directory:

    cd yolov3-object-detection
  3. Download the YOLOv3 weights, configuration, and COCO object classes file:

  4. Run the YOLOv3 object detection:

    jupyter lab detection.ipynb
  5. Important: Download "yolov3.weights" here and place it inside the weights folder.

๐Ÿค– Theory

YOLOv3 Architecture

The neural network used by YOLOv3 consists mainly of convolutional layers, with shortcut connections and upsample layers.

Non-Maximal Suppression

YOLO uses Non-Maximal Suppression (NMS) to keep the best bounding box. Set the NMS threshold to 0.6 to remove predicted boxes with low probability.

Intersection Over Union

IOU is used to select the best bounding boxes. Set the IOU threshold to 0.4 to eliminate overlapping boxes.

๐ŸŽฅ Video Analysis

To perform object detection in videos:

  1. Load the pre-trained model and classes.
  2. Initialize video capture (from camera or file).
  3. Apply YOLOv3 to each frame, filter detections, and apply NMS.
  4. Display results in the 'Tracking' window.
  5. Press 'q' to exit the program.

Adjust parameters such as weight_file, cfg_file, namesfile, iou_thresh, and nms_thresh as needed.

jupyter lab detection.ipynb -> final phase

๐Ÿ“Š Jupyter Lab Integration

To use YOLOv3 in Jupyter Lab:

  1. Launch Jupyter Lab:

    jupyter lab
  2. Open the provided detection.ipynb notebook.

  3. Run the cells in the notebook to perform object detection interactively.

Please download "yolov3.weights" file and place inside weights folder to make program run

Have fun exploring the world of YOLOv3 object detection! ๐Ÿ•ต๏ธโ€โ™‚๏ธ

object-detection's People

Contributors

harish-srinivas-07 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.