Skip to content

Threshold for object detection #52

@Dene33

Description

@Dene33

I used Google Colab tutorial, changed instance segmentation model to object detection like this:

cfg = get_cfg()
cfg.merge_from_file("./detectron2_repo/configs/COCO-Detection/retinanet_R_101_FPN_3x.yaml")
cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.5  # set threshold for this model
# Find a model from detectron2's model zoo. You can either use the https://dl.fbaipublicfiles.... url, or use the following shorthand
cfg.MODEL.WEIGHTS = "detectron2://COCO-Detection/retinanet_R_101_FPN_3x/138363263/model_final_59f53c.pkl"
predictor = DefaultPredictor(cfg)
outputs = predictor(im)

As you can see cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.5 but threshold doesn't work:

image

Am I doing something wrong? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions