diff --git a/README.md b/README.md index f184844..a450f76 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,15 @@ -# detectron2 +# Object Detection using Detectron2 +*author: [filip-halt](https://github.com/filip-halt), [fzliu](https://github.com/fzliu)* -# Object Detection using Detectron2 +
## Description This operator uses Facebook's [Detectron2](https://github.com/facebookresearch/detectron2) library to compute bounding boxes, class labels, and class scores for detected objects in a given image. +
+ ## Code Example ```python diff --git a/__init__.py b/__init__.py index e69de29..9bb167a 100644 --- a/__init__.py +++ b/__init__.py @@ -0,0 +1,3 @@ + +def detectron2(*args, **kwargs): + return Detectron2(*args, **kwargs) diff --git a/detectron2.py b/detectron2.py index adc543f..a3f64a3 100644 --- a/detectron2.py +++ b/detectron2.py @@ -7,6 +7,7 @@ import numpy as np import torch from towhee._types import Image from towhee.operator import NNOperator, OperatorFlag +from towhee import register CFG_YAMLS = { @@ -24,7 +25,7 @@ CFG_YAMLS = { @register(outputschema=['boxes', 'classes', 'scores'], flag=OperatorFlag.STATELESS | OperatorFlag.REUSABLE) -class Detectron2ObjectDetection(NNOperator): +class Detectron2(NNOperator): """ This Operator implements object detection using the Detectron2 library.