naver-ai / vidt

Apache License 2.0
307 stars 41 forks source link

#BUG #14

Open ross-Hr opened 2 years ago

ross-Hr commented 2 years ago

when i run the main.py, the error comes

ViDT training and evaluation script: error: unrecognized arguments: true

in main.py, my code is

args = parser.parse_args(['--method', 'vidt', '--backbone_name', 'swin_nano', '--epochs', '50', '--lr', '1e-4', '--min-lr', '1e-7', '--batch_size', '2', '--num_workers', '2', '--aux_loss', 'true', '--with_box_refine', 'true', '--det_token_num', '100', '--epff', ' true', '--token_label', 'true', '--iou_aware', 'true', '--with_vector', 'true', '--masks', 'true', '--coco_path', '/r/code/coco', '--output_dir', './output',])

ross-Hr commented 2 years ago

i change the code in arguments.py like this

## token label

parser.add_argument('--token_label', default=False, action='store_true', help='use of token label loss')

and when use it , just write '--token_label' in parse_args as parameter, and no 'true' item.

Then it works