Skip to content

Commit

Permalink
Set --Args_show type to str in coco tools
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobholamovic committed Nov 8, 2022
1 parent ce7863b commit aaee546
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 24 deletions.
7 changes: 3 additions & 4 deletions tools/coco_tools/json_AnnoSta.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,14 @@ def get_args():
default='annotations',
help='annotation key name in json, default annotations')
parser.add_argument(
'-Args_show',
'--Args_show',
type=bool,
default=True,
type=str,
default='True',
help='Args_show(default: True), if True, show args info')

args = parser.parse_args()

if args.Args_show:
if args.Args_show.lower() == 'true':
print('Args'.center(100, '-'))
for k, v in vars(args).items():
print('%s = %s' % (k, v))
Expand Down
7 changes: 3 additions & 4 deletions tools/coco_tools/json_Img2Json.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,14 @@ def get_args():
default='categories',
help='categories key name in json, default categories')
parser.add_argument(
'-Args_show',
'--Args_show',
type=bool,
default=True,
type=str,
default='True',
help='Args_show(default: True), if True, show args info')

args = parser.parse_args()

if args.Args_show:
if args.Args_show.lower() == 'true':
print('Args'.center(100, '-'))
for k, v in vars(args).items():
print('%s = %s' % (k, v))
Expand Down
7 changes: 3 additions & 4 deletions tools/coco_tools/json_ImgSta.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,14 @@ def get_args():
default='images',
help='image key name in json, default images')
parser.add_argument(
'-Args_show',
'--Args_show',
type=bool,
default=True,
type=str,
default='True',
help='Args_show(default: True), if True, show args info')

args = parser.parse_args()

if args.Args_show:
if args.Args_show.lower() == 'true':
print('Args'.center(100, '-'))
for k, v in vars(args).items():
print('%s = %s' % (k, v))
Expand Down
7 changes: 3 additions & 4 deletions tools/coco_tools/json_InfoShow.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,14 @@ def get_args():
default=5,
help='show number of each sub record')
parser.add_argument(
'-Args_show',
'--Args_show',
type=bool,
default=True,
type=str,
default='True',
help='Args_show(default: True), if True, show args info')

args = parser.parse_args()

if args.Args_show:
if args.Args_show.lower() == 'true':
print('Args'.center(100, '-'))
for k, v in vars(args).items():
print('%s = %s' % (k, v))
Expand Down
7 changes: 3 additions & 4 deletions tools/coco_tools/json_Merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,14 @@ def get_args():
default=['images', 'annotations'],
help='json keys that need to merge')
parser.add_argument(
'-Args_show',
'--Args_show',
type=bool,
default=True,
type=str,
default='True',
help='Args_show(default: True), if True, show args info')

args = parser.parse_args()

if args.Args_show:
if args.Args_show.lower() == 'true':
print('Args'.center(100, '-'))
for k, v in vars(args).items():
print('%s = %s' % (k, v))
Expand Down
7 changes: 3 additions & 4 deletions tools/coco_tools/json_Split.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,14 @@ def get_args():
default='annotations',
help='annotation key name in json, default annotations')
parser.add_argument(
'-Args_show',
'--Args_show',
type=bool,
default=True,
type=str,
default='True',
help='Args_show(default: True), if True, show args info')

args = parser.parse_args()

if args.Args_show:
if args.Args_show.lower() == 'true':
print('Args'.center(100, '-'))
for k, v in vars(args).items():
print('%s = %s' % (k, v))
Expand Down

0 comments on commit aaee546

Please sign in to comment.