/Simple-Object-Detection

Simple Object Detection in python

Primary LanguagePython

Simple Object Detection

A Simple Object Detection in python

USAGE

  1. download models yolo.h5 - YOLOv3

  2. Save the file in ./models

  3. Add to path

model_path = "./models/yolo.h5"
  1. Name the input/output file name
input_path = "./input/input.jpg"
output_path = "./output/output.jpg"
  1. Run

EXAMPLE

Load Model & Detection

detector.setModelTypeAsYOLOv3()
detector.setModelPath(model_path)
detector.loadModel()
detection = detector.detectObjectsFromImage(input_image=input_path, output_image_path=output_path)

Print percentage_probability & name of object

print(list(x["name"] for x in detection))
print(list(x["percentage_probability"] for x in detection))

Intput

Output