MCPcopy Create free account
hub / github.com/PaddlePaddle/Research / test

Function test

CV/astar2019/reader.py:319–335  ·  view source on GitHub ↗
(settings, file_list, batch_size)

Source from the content-addressed store, hash-verified

317
318
319def test(settings, file_list, batch_size):
320 file_list = os.path.join(settings.data_dir, file_list)
321 if 'coco' in settings.dataset:
322 from pycocotools.coco import COCO
323 coco_api = COCO(file_list)
324 image_ids = coco_api.getImgIds()
325 images = coco_api.loadImgs(image_ids)
326 if '2014' in file_list:
327 sub_dir = "val2014"
328 elif '2017' in file_list:
329 sub_dir = "val2017"
330 data_dir = os.path.join(settings.data_dir, sub_dir)
331 return coco(settings, coco_api, images, 'test', batch_size, False,
332 data_dir)
333 else:
334 image_list = [line.strip() for line in open(file_list)]
335 return pascalvoc(settings, image_list, 'test', batch_size, False)
336
337
338def infer(settings, image_path):

Callers

nothing calls this directly

Calls 2

cocoFunction · 0.85
pascalvocFunction · 0.85

Tested by

no test coverage detected