Git Product home page Git Product logo

yolo-object-detection's Introduction

YOLO-Object-Detection

YOLO is a state-of-the-art, real-time object detection algorithm. In this notebook, we will apply the YOLO algorithm to detect objects in images. darknet prints out the objects it detected, its confidence, and how long it took to find them. We didn't compile Darknet with OpenCV so it can't display the detections directly. Instead, it saves them in predictions.png. You can open it to see the detected objects. Since we are using Darknet on the CPU it takes around 6-12 seconds per image. If we use the GPU version it would be much faster.

How to run:

  1. Open Jupter Notebook in your browser
  2. Open the folder containing this folder
  3. Run YOLO.ipynb
  4. done!

For detailed explanation you can refer to my blog here: https://towardsdatascience.com/you-only-look-once-yolo-implementing-yolo-in-less-than-30-lines-of-python-code-97fb9835bfd2?source=friends_link&sk=5c7234f716e38c8a7b6625ef20fa7811

This is inspired from CVND Udacity course

LinkedIn: https://www.linkedin.com/in/garima-nishad-9b8385134/

Follow me on Twitter: https://twitter.com/garima__nishad

yolo-object-detection's People

Contributors

garima13a avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

yolo-object-detection's Issues

YOLO ON CUSTOM DATASET

How can use this repo to train custom dataset i.e YOLO Objection Detection on custom dataset but by using this repo

Add Python3 File

If it's a real time detection code, it would be better to upload a .py file along with the notebook file.

get region boxes

I want to extract the coordinates of boundary boxes. For this I use a function of YoloLayer -> forward.
When i want to use this function I have this error

TypeError Traceback (most recent call last)

in ()
----> 1 x = y.forward(resized_image, nms_thresh)

/content/darknet.py in forward(self, output, nms_thresh)
25
26 for m in self.anchor_mask:
---> 27 masked_anchors += self.anchors[m*self.anchor_step:(m+1)*self.anchor_step]
28
29 masked_anchors = [anchor/self.stride for anchor in masked_anchors]

TypeError: can't multiply sequence by non-int of type 'float'

If someone have an idea to solve this. I attached my code below. For use it you just need to download yolov3.weights on https://github.com/pjreddie/darknet.git
YOLO-Object-Detection.tar.gz

Output shape of the Darknet model

In the detect_obects function we have :

list_boxes = model(img, nms_thresh)

# Make a new list with all the bounding boxes returned by the neural network
boxes = list_boxes[0][0] + list_boxes[1][0] + list_boxes[2][0]

In the last line, why do we need to concatenate the 3 terms ? What do they represent ?

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.