update parser type

This commit is contained in:
mlxu995 2021-12-16 15:51:58 +08:00
parent 48e8270987
commit 23c868cc72

View File

@ -74,25 +74,25 @@ if __name__ == '__main__':
help='path to save det curve') help='path to save det curve')
parser.add_argument( parser.add_argument(
'--xlim', '--xlim',
default='5', type=int,
default=5,
help='xlimrange of x-axis, x is false alarm per hour') help='xlimrange of x-axis, x is false alarm per hour')
parser.add_argument('--x_step', default='1', help='step on x-axis') parser.add_argument('--x_step', type=int, default=1, help='step on x-axis')
parser.add_argument( parser.add_argument(
'--ylim', '--ylim',
default='35', type=int,
default=35,
help='ylimrange of y-axis, y is false rejection rate') help='ylimrange of y-axis, y is false rejection rate')
parser.add_argument('--y_step', default='5', help='step on y-axis') parser.add_argument('--y_step', type=int, default=5, help='step on y-axis')
args = parser.parse_args() args = parser.parse_args()
keywords = args.keywords.strip().split(', ') keywords = args.keywords.strip().split(', ')
xlim, x_step, ylim, y_step = map(
int, [args.xlim, args.x_step, args.ylim, args.y_step])
plot_det_curve( plot_det_curve(
keywords, keywords,
args.stats_dir, args.stats_dir,
args.figure_file, args.figure_file,
xlim, args.xlim,
x_step, args.x_step,
ylim, args.ylim,
y_step) args.y_step)