MCPcopy Create free account
hub / github.com/NVIDIA/DALI / test_coco_pix_mask_ratio

Function test_coco_pix_mask_ratio

dali/test/python/reader/test_coco.py:410–428  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

408
409
410def test_coco_pix_mask_ratio():
411 file_root = os.path.join(test_data_root, "db", "coco_dummy", "images")
412 train_annotations = os.path.join(test_data_root, "db", "coco_dummy", "instances.json")
413
414 batch_size = 2
415
416 @pipeline_def(batch_size=1, device_id=0, num_threads=4)
417 def coco_pipe(ratio=False):
418 _, _, _, masks = fn.readers.coco(
419 file_root=file_root,
420 annotations_file=train_annotations,
421 pixelwise_masks=True,
422 ratio=ratio,
423 )
424 return masks
425
426 pipe_ref = coco_pipe(batch_size=batch_size, ratio=False)
427 pipe_test = coco_pipe(batch_size=batch_size, ratio=True)
428 compare_pipelines(pipe_ref, pipe_test, batch_size, 5)

Callers

nothing calls this directly

Calls 2

compare_pipelinesFunction · 0.90
coco_pipeFunction · 0.85

Tested by

no test coverage detected