From 6246d4b3c6dfec25eb4f178500080d829aa2b231 Mon Sep 17 00:00:00 2001 From: youngjae-avikus Date: Tue, 10 May 2022 15:01:31 +0900 Subject: [PATCH] fix error in getting args(width,height,channel) as type str --- utils/gen_wts_yoloV5.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/gen_wts_yoloV5.py b/utils/gen_wts_yoloV5.py index 0d8d0f8..cde904a 100644 --- a/utils/gen_wts_yoloV5.py +++ b/utils/gen_wts_yoloV5.py @@ -65,9 +65,9 @@ def parse_args(): parser = argparse.ArgumentParser(description="PyTorch YOLOv5 conversion") parser.add_argument("-w", "--weights", required=True, help="Input weights (.pt) file path (required)") parser.add_argument("-c", "--yaml", help="Input cfg (.yaml) file path") - parser.add_argument("-mw", "--width", help="Model width (default = 640 / 1280 [P6])") - parser.add_argument("-mh", "--height", help="Model height (default = 640 / 1280 [P6])") - parser.add_argument("-mc", "--channels", help="Model channels (default = 3)") + parser.add_argument("-mw", "--width", type=int, help="Model width (default = 640 / 1280 [P6])") + parser.add_argument("-mh", "--height", type=int, help="Model height (default = 640 / 1280 [P6])") + parser.add_argument("-mc", "--channels", type=int, help="Model channels (default = 3)") parser.add_argument("--p6", action="store_true", help="P6 model") args = parser.parse_args() if not os.path.isfile(args.weights):