logo
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Readme
Files and versions

Updated 3 years ago

object-detection

detectron2

Object Detection using Detectron2

Description

This operator uses Facebook's Detectron2 library to compute bounding boxes, class labels, and class scores for detected objects in a given image.

Code Example

import towhee

towhee.glob('./towhee.jpg') \
      .image_decode.cv2() \
      .object_detection.detectron2(model_name='retinanet_resnet50') \
      .show()

Factory Constructor

Create the operator via the following factory method

object_detection.detectron2(model_name='retinanet_resnet50', thresh=0.5, num_classes=1000, skip_preprocess=False)

Parameters:

model_name: str

A string indicating which model to use.

thresh: float

The threshold value for which an object is detected (default value: 0.5). Set this value lower to detect more objects at the expense of accuracy, or higher to reduce the total number of detections but increase the quality of detected objects.

Frank Liu 8a4816b1f1 Update files 2 Commits
file-icon .gitattributes
840 B
download-icon
Update files 3 years ago
file-icon .gitignore
3.0 KiB
download-icon
Update files 3 years ago
file-icon README.md
1004 B
download-icon
Update files 3 years ago
file-icon __init__.py
0 B
download-icon
Update files 3 years ago
file-icon detectron2.py
2.2 KiB
download-icon
Update files 3 years ago
file-icon requirements.txt
111 B
download-icon
Update files 3 years ago