updates
This commit is contained in:
parent
6ae25fc597
commit
9b92794e20
7
test.py
7
test.py
|
@ -72,6 +72,9 @@ def test(
|
||||||
seen += 1
|
seen += 1
|
||||||
|
|
||||||
if pred is None:
|
if pred is None:
|
||||||
|
if len(labels):
|
||||||
|
tcls = labels[:, 0].cpu() # target classes
|
||||||
|
stats.append((correct, torch.Tensor(), torch.Tensor(), tcls))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if save_json: # add to json pred dictionary
|
if save_json: # add to json pred dictionary
|
||||||
|
@ -162,8 +165,8 @@ if __name__ == '__main__':
|
||||||
parser = argparse.ArgumentParser(prog='test.py')
|
parser = argparse.ArgumentParser(prog='test.py')
|
||||||
parser.add_argument('--batch-size', type=int, default=32, help='size of each image batch')
|
parser.add_argument('--batch-size', type=int, default=32, help='size of each image batch')
|
||||||
parser.add_argument('--cfg', type=str, default='cfg/yolov3.cfg', help='cfg file path')
|
parser.add_argument('--cfg', type=str, default='cfg/yolov3.cfg', help='cfg file path')
|
||||||
parser.add_argument('--data-cfg', type=str, default='cfg/coco.data', help='coco.data file path')
|
parser.add_argument('--data-cfg', type=str, default='cfg/example_single_class.data', help='coco.data file path')
|
||||||
parser.add_argument('--weights', type=str, default='weights/yolov3.weights', help='path to weights file')
|
parser.add_argument('--weights', type=str, default='weights/latesth.pt', help='path to weights file')
|
||||||
parser.add_argument('--iou-thres', type=float, default=0.5, help='iou threshold required to qualify as detected')
|
parser.add_argument('--iou-thres', type=float, default=0.5, help='iou threshold required to qualify as detected')
|
||||||
parser.add_argument('--conf-thres', type=float, default=0.001, help='object confidence threshold')
|
parser.add_argument('--conf-thres', type=float, default=0.001, help='object confidence threshold')
|
||||||
parser.add_argument('--nms-thres', type=float, default=0.5, help='iou threshold for non-maximum suppression')
|
parser.add_argument('--nms-thres', type=float, default=0.5, help='iou threshold for non-maximum suppression')
|
||||||
|
|
Loading…
Reference in New Issue