updates
This commit is contained in:
parent
8638317bbb
commit
0b19d4eb3d
4
test.py
4
test.py
|
@ -184,7 +184,7 @@ def test(cfg,
|
||||||
print('WARNING: missing pycocotools package, can not compute official COCO mAP. See requirements.txt.')
|
print('WARNING: missing pycocotools package, can not compute official COCO mAP. See requirements.txt.')
|
||||||
|
|
||||||
# https://github.com/cocodataset/cocoapi/blob/master/PythonAPI/pycocoEvalDemo.ipynb
|
# https://github.com/cocodataset/cocoapi/blob/master/PythonAPI/pycocoEvalDemo.ipynb
|
||||||
cocoGt = COCO('../coco/annotations/instances_val2014.json') # initialize COCO ground truth api
|
cocoGt = COCO(glob.glob('../coco/annotations/instances_val*.json')[0]) # initialize COCO ground truth api
|
||||||
cocoDt = cocoGt.loadRes('results.json') # initialize COCO pred api
|
cocoDt = cocoGt.loadRes('results.json') # initialize COCO pred api
|
||||||
|
|
||||||
cocoEval = COCOeval(cocoGt, cocoDt, 'bbox')
|
cocoEval = COCOeval(cocoGt, cocoDt, 'bbox')
|
||||||
|
@ -204,7 +204,7 @@ def test(cfg,
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
parser = argparse.ArgumentParser(prog='test.py')
|
parser = argparse.ArgumentParser(prog='test.py')
|
||||||
parser.add_argument('--cfg', type=str, default='cfg/yolov3-spp.cfg', help='cfg file path')
|
parser.add_argument('--cfg', type=str, default='cfg/yolov3-spp.cfg', help='cfg file path')
|
||||||
parser.add_argument('--data', type=str, default='data/coco.data', help='coco.data file path')
|
parser.add_argument('--data', type=str, default='data/coco2017.data', help='coco.data file path')
|
||||||
parser.add_argument('--weights', type=str, default='weights/yolov3-spp.weights', help='path to weights file')
|
parser.add_argument('--weights', type=str, default='weights/yolov3-spp.weights', help='path to weights file')
|
||||||
parser.add_argument('--batch-size', type=int, default=16, help='size of each image batch')
|
parser.add_argument('--batch-size', type=int, default=16, help='size of each image batch')
|
||||||
parser.add_argument('--img-size', type=int, default=416, help='inference size (pixels)')
|
parser.add_argument('--img-size', type=int, default=416, help='inference size (pixels)')
|
||||||
|
|
Loading…
Reference in New Issue