Esempio n. 1
0
def entrance(save_model_path='/mnt/chjinche/test_data/detection/init_model',
             model_type='fasterrcnn_resnet50_fpn',
             pretrained=True):
    model_config = {
        'model_class': 'FasterRCNN',
        'model_type': model_type,
        'pretrained': pretrained
    }
    logger.info('Dump untrained model.')
    logger.info(f'Model config: {model_config}.')
    dumper = pickle_dumper(model_config, 'model_config.pkl')
    save_model_to_directory(save_model_path, dumper)
    logger.info('Finished.')
Esempio n. 2
0
def entrance(
        save_model_path='/mnt/chjinche/projects/saved_untrained_model_resnet',
        model_type='resnext101_32x8d',
        pretrained=True):
    model_config = {
        'model_class': 'ResNet',
        'model_type': model_type,
        'pretrained': pretrained
    }
    logger.info('Dump untrained model.')
    logger.info(f'Model config: {model_config}.')
    dumper = pickle_dumper(model_config, 'model_config.pkl')
    save_model_to_directory(save_model_path, dumper)
    logger.info('Finished.')
def entrance(save_model_path='../init_model',
             model_type='densenet201',
             pretrained=True,
             memory_efficient=False):
    model_config = {
        'model_class': 'DenseNet',
        'model_type': model_type,
        'pretrained': pretrained,
        'memory_efficient': memory_efficient
    }
    logger.info('Dump untrained model.')
    logger.info(f'Model config: {model_config}.')
    dumper = pickle_dumper(model_config, 'model_config.pkl')
    save_model_to_directory(save_model_path, dumper)
    logger.info('Finished.')