This commit is contained in:
Glenn Jocher 2019-04-29 17:49:09 +02:00
parent cbe01ddeb1
commit b1604be04c
3 changed files with 5 additions and 5 deletions

View File

@ -11,7 +11,7 @@ def detect(
cfg, cfg,
data_cfg, data_cfg,
weights, weights,
images, images='data/samples', # input folder
output='output', # output folder output='output', # output folder
img_size=416, img_size=416,
conf_thres=0.5, conf_thres=0.5,
@ -122,7 +122,7 @@ if __name__ == '__main__':
parser.add_argument('--data-cfg', type=str, default='data/coco.data', help='coco.data file path') parser.add_argument('--data-cfg', type=str, default='data/coco.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('--images', type=str, default='data/samples', help='path to images') parser.add_argument('--images', type=str, default='data/samples', help='path to images')
parser.add_argument('--img-size', type=int, default=416, help='size of each image dimension') parser.add_argument('--img-size', type=int, default=416, help='inference size (pixels)')
parser.add_argument('--conf-thres', type=float, default=0.5, help='object confidence threshold') parser.add_argument('--conf-thres', type=float, default=0.5, 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')
opt = parser.parse_args() opt = parser.parse_args()
@ -133,7 +133,7 @@ if __name__ == '__main__':
opt.cfg, opt.cfg,
opt.data_cfg, opt.data_cfg,
opt.weights, opt.weights,
opt.images, images=opt.images,
img_size=opt.img_size, img_size=opt.img_size,
conf_thres=opt.conf_thres, conf_thres=opt.conf_thres,
nms_thres=opt.nms_thres nms_thres=opt.nms_thres

View File

@ -189,7 +189,7 @@ if __name__ == '__main__':
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')
parser.add_argument('--save-json', action='store_true', help='save a cocoapi-compatible JSON results file') parser.add_argument('--save-json', action='store_true', help='save a cocoapi-compatible JSON results file')
parser.add_argument('--img-size', type=int, default=416, help='size of each image dimension') parser.add_argument('--img-size', type=int, default=416, help='inference size (pixels)')
opt = parser.parse_args() opt = parser.parse_args()
print(opt, end='\n\n') print(opt, end='\n\n')

View File

@ -281,7 +281,7 @@ if __name__ == '__main__':
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-cfg', type=str, default='data/coco.data', help='coco.data file path') parser.add_argument('--data-cfg', type=str, default='data/coco.data', help='coco.data file path')
parser.add_argument('--multi-scale', action='store_true', help='random image sizes per batch 320 - 608') parser.add_argument('--multi-scale', action='store_true', help='random image sizes per batch 320 - 608')
parser.add_argument('--img-size', type=int, default=416, help='pixels') parser.add_argument('--img-size', type=int, default=416, help='inference size (pixels)')
parser.add_argument('--resume', action='store_true', help='resume training flag') parser.add_argument('--resume', action='store_true', help='resume training flag')
parser.add_argument('--transfer', action='store_true', help='transfer learning flag') parser.add_argument('--transfer', action='store_true', help='transfer learning flag')
parser.add_argument('--num-workers', type=int, default=2, help='number of Pytorch DataLoader workers') parser.add_argument('--num-workers', type=int, default=2, help='number of Pytorch DataLoader workers')