MCPcopy
hub / github.com/facebookresearch/detectron2 / get_empty_instance

Function get_empty_instance

tests/modeling/test_model_e2e.py:58–63  ·  view source on GitHub ↗
(h, w)

Source from the content-addressed store, hash-verified

56
57
58def get_empty_instance(h, w):
59 inst = Instances((h, w))
60 inst.gt_boxes = Boxes(torch.rand(0, 4))
61 inst.gt_classes = torch.tensor([]).to(dtype=torch.int64)
62 inst.gt_masks = BitMasks(torch.rand(0, h, w))
63 return inst
64
65
66def get_regular_bitmask_instances(h, w):

Callers 2

test_empty_dataMethod · 0.85
test_half_empty_dataMethod · 0.85

Calls 4

InstancesClass · 0.90
BoxesClass · 0.90
BitMasksClass · 0.90
toMethod · 0.45

Tested by

no test coverage detected