()
| 408 | |
| 409 | |
| 410 | def 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) |
nothing calls this directly
no test coverage detected