Skip to content

Faster RCNN Model Is Retrained Everytime Docker instance is Run #3

@aribornstein

Description

@aribornstein

Everytime the FasterRCNN server starts the whole model is being retrained, this is really inefficient CNTK's load model function should be used instead to load a pre-trained model if my model has already been trained.

Should add the following function to enable this

def load_object_detector(cfg):
    """
    Loads an object detector from cfg
    """
    detector_name = _get_detector_name(cfg)
    eval_model = None
    print("training {}".format(detector_name))
    if detector_name == 'FastRCNN':
        from FastRCNN.FastRCNN_train import prepare, train_fast_rcnn
        prepare(cfg, use_arg_parser=False)
        eval_model = load_model(cfg['MODEL_PATH'])
    elif detector_name == 'FasterRCNN':
        from FasterRCNN.FasterRCNN_train import prepare, train_faster_rcnn
        prepare(cfg, use_arg_parser=False)
        eval_model = load_model(cfg['MODEL_PATH'])
    else:
        print('Unknown detector: {}'.format(detector_name))

    return eval_model

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions