The iteach toolkit package includes the dhyolo model, designed to detect doors and handles in images.
Project description
iTeach Toolkit Package
Overview
The iTeach_package
is a toolkit designed for running object detection using the DH-YOLO model, specifically for identifying doors and handles in images. This package provides easy-to-use command-line tools for performing inference with a pre-trained DH-YOLO model.
Model Checkpoints
Pretrained model checkpoints can be downloaded from this link.
Installation
To install the package, use pip
:
pip install iteach_toolkit
Usage
Below is an example of how to use the package for running inference on an image.
import os
from PIL import Image as PILImg
from iteach_toolkit.DHYOLO import DHYOLODetector
# Set up paths
os.system("wget https://huggingface.co/spaces/IRVLUTD/DH-YOLO/resolve/main/test_imgs/jpad-irvl-test.jpg")
image_path = "./jpad-irvl-test.jpg"
model_path = "/path/to/yolov5_model.pt"
# Initialize the DHYOLODetector class
dhyolo = DHYOLODetector(model_path)
# Perform prediction on the image
orig_image, detections = dhyolo.predict(image_path, conf_thres=0.7, iou_thres=0.7, max_det=1000)
# Plot the bounding boxes on the original image
orig_image, image_with_bboxes = dhyolo.plot_bboxes(attach_watermark=True)
# Convert the image (with bounding boxes) from a NumPy array to a PIL Image for display.
pil_img_with_bboxes = PILImg.fromarray(image_with_bboxes)
# Plot the image
pil_img_with_bboxes.show()
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file iteach_toolkit-0.0.1.tar.gz
.
File metadata
- Download URL: iteach_toolkit-0.0.1.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 596b87a009251d4a85173d3cae26571ba21d154c12ea9a12e1485fe1387834c8 |
|
MD5 | 975aeab229fbe2b40f3290c9e519c651 |
|
BLAKE2b-256 | 7012c5a099a9bdc6049f2598e8741779ee3696bc16b5e457af6036a228cd60fc |
File details
Details for the file iteach_toolkit-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: iteach_toolkit-0.0.1-py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74b2deb1f16e5d94214056cd577a9e88c8c4e07d2b1f7a6d78839ade485be17a |
|
MD5 | 1ddded50d5d6d36f368cbccf63d84da0 |
|
BLAKE2b-256 | 03936270aabed411aab74a80ada3773027636686c8aaa645d7ff3f5dc01c98dc |