Skip to main content

Wrapper package for yolov5 inference:v3.0

Project description

Yolo v5 Inference Engine

Basically a wrapper for the detection program for ease of use.

How to install:

pip install yolov5processor

How to use:

from yolov5processor.infer import ExecuteInference 

model = ExecuteInference(weight="path-to-weight.pt", confidence=0.4, \
            img_size=640, agnostic_nms=False, gpu=False, iou=0.5)

image = cv2.imread("imagepath.jpg")
pred = model.predict(image)

Analyse the Output:

print(pred)

{
  "points": [100, 120, 400, 500],
  "conf": 0.7,
  "class": "apple"
}

points key represents the bounding box coordinates in the order x1, y1, x2, y2 respectively. conf key represents the confidence. class key represents the object class.

Update:

  • Added compatibility with torch 1.9 and torchvision 0.10

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yolov5processor-1.2.tar.gz (85.5 kB view hashes)

Uploaded Source

Built Distribution

yolov5processor-1.2-py3-none-any.whl (96.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page