# detectron2 # 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 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.