Skip to main content

code de inference yolov5

Project description

Package dung de inference model yolov5 voi custom object


pip install yolov5-inference==0.6


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 hashes)

Uploaded source

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