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]
Metadata
Release files for yolov5-inference 0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| yolov5_inference-0.8.tar.gz | 63.1 kB | Details |
Release files / yolov5_inference-0.8.tar.gz
| Download URL | yolov5_inference-0.8.tar.gz |
|---|---|
| Size | 63.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6edb75a25ec2cb0f14f72082326a7f34a7faefe0832d196cdd0cbb5a2eba6f6a
|
|
BLAKE2b-256 checksum How to use checksums |
0eb10760a9d5dcf46000826886b1cbabc345213d9d6cc289206124551b5ed158
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|