Skip to main content

code de inference yolov5

Project description

Package dung de inference model yolov5 voi custom object

Install

pip install yolov5-inference==0.6

Use

from yolov5_inference.infer import DetectObject
class_name = {0: 'text', 1: 'title', 2: 'list', 3: 'table', 4: 'figure'}
model = DetectObject(weights='../path/of/weights', classes=class_name)
img_path = '../path/of/img'
img = cv2.imread(img_path)
rs = model.detect(img)
# [x_min, y_min, x_max, y_max, cls]

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

yolov5_inference-0.8.tar.gz (63.1 kB view details)

Uploaded Source

File details

Details for the file yolov5_inference-0.8.tar.gz.

File metadata

  • Download URL: yolov5_inference-0.8.tar.gz
  • Upload date:
  • Size: 63.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.6.13

File hashes

Hashes for yolov5_inference-0.8.tar.gz
Algorithm Hash digest
SHA256 6edb75a25ec2cb0f14f72082326a7f34a7faefe0832d196cdd0cbb5a2eba6f6a
MD5 1d4d76164a57097a864a7a1fd4c005f1
BLAKE2b-256 0eb10760a9d5dcf46000826886b1cbabc345213d9d6cc289206124551b5ed158

See more details on using hashes here.

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