logo
Browse Source

Update files

main
Frank Liu 3 years ago
parent
commit
2ee452f1b7
  1. 7
      README.md
  2. 3
      __init__.py
  3. 3
      detectron2.py

7
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
<br />
## 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.
<br />
## Code Example
```python

3
__init__.py

@ -0,0 +1,3 @@
def detectron2(*args, **kwargs):
return Detectron2(*args, **kwargs)

3
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.

Loading…
Cancel
Save