Exemplo n.º 1
0
                        type=int,
                        default=10000,
                        help='number of evaluation')
    parser.add_argument('--vis_num',
                        type=int,
                        default=60,
                        help='number of visible evaluation')
    parser.add_argument('--multiscale',
                        type=bool,
                        default=False,
                        help='enable multiscale_search')

    args = parser.parse_args()
    Config.set_model_name(args.model_name)
    Config.set_model_type(Config.MODEL[args.model_type])
    Config.set_model_backbone(Config.BACKBONE[args.model_backbone])
    Config.set_dataset_type(Config.DATA[args.dataset_type])
    Config.set_dataset_path(args.dataset_path)
    Config.set_dataset_version(args.dataset_version)

    config = Config.get_config()
    model = Model.get_model(config)
    evaluate = Model.get_evaluate(config)
    dataset = Dataset.get_dataset(config)

    evaluate(model,
             dataset,
             vis_num=args.vis_num,
             total_eval_num=args.eval_num,
             enable_multiscale_search=args.multiscale)
Exemplo n.º 2
0
        type=str,
        default="Default",
        help=
        "model backbone, available options: Mobilenet, Vggtiny, Vgg19, Resnet18, Resnet50"
    )
    parser.add_argument(
        "--model_name",
        type=str,
        default="default_name",
        help="model name,to distinguish model and determine model dir")
    parser.add_argument(
        "--dataset_path",
        type=str,
        default="./data",
        help="dataset path,to determine the path to load the dataset")

    args = parser.parse_args()
    #config model
    Config.set_model_name(args.model_name)
    Config.set_model_type(Config.MODEL[args.model_type])
    Config.set_model_backbone(Config.BACKBONE[args.model_backbone])
    Config.set_pretrain(True)
    #config dataset
    Config.set_pretrain_dataset_path(args.dataset_path)
    config = Config.get_config()
    #train
    model = Model.get_model(config)
    pretrain = Model.get_pretrain(config)
    dataset = Dataset.get_pretrain_dataset(config)
    pretrain(model, dataset)