MCPcopy Create free account
hub / github.com/PeizeSun/SparseR-CNN / get_empty_instance

Function get_empty_instance

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

Source from the content-addressed store, hash-verified

32
33
34def get_empty_instance(h, w):
35 inst = Instances((h, w))
36 inst.gt_boxes = Boxes(torch.rand(0, 4))
37 inst.gt_classes = torch.tensor([]).to(dtype=torch.int64)
38 inst.gt_masks = BitMasks(torch.rand(0, h, w))
39 return inst
40
41
42def 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