def train_P_net(image_set, root_path, dataset_path, prefix, end_epoch,
                frequent, lr):
    imdb = IMDB(data_name, image_set, root_path, dataset_path)
    gt_imdb = imdb.gt_imdb()
    gt_imdb = imdb.append_flipped_images(gt_imdb)
    sym = P_Net

    train_net(sym, prefix, end_epoch, gt_imdb, 12, frequent, lr)
Exemplo n.º 2
0
def train_O_net(image_set, root_path, dataset_path, prefix, ctx, pretrained,
                epoch, begin_epoch, end_epoch, frequent, lr, resume):
    imdb = IMDB("mtcnn", image_set, root_path, dataset_path)
    gt_imdb = imdb.gt_imdb()
    gt_imdb = imdb.append_flipped_images(gt_imdb)
    sym = O_Net()

    train_net(sym, prefix, ctx, pretrained, epoch, begin_epoch, end_epoch,
              gt_imdb, 48, frequent, not resume, lr)
Exemplo n.º 3
0
def train_O_net(image_set, root_path, dataset_path, prefix, ctx,
                pretrained, epoch, begin_epoch,
                end_epoch, frequent, lr, resume):
    imdb = IMDB("mtcnn", image_set, root_path, dataset_path)
    gt_imdb = imdb.gt_imdb()
    gt_imdb = imdb.append_flipped_images(gt_imdb)
    sym = O_Net()

    train_net(sym, prefix, ctx, pretrained, epoch, begin_epoch, end_epoch, gt_imdb,
              48, frequent, not resume, lr)
Exemplo n.º 4
0
def train_R_net(image_set, root_path, dataset_path, prefix, ctx,
                pretrained, epoch, begin_epoch, end_epoch, batch_size, thread_num,
                frequent, lr, lr_epoch, resume):
    imdb = IMDB("mtcnn", image_set, root_path, dataset_path)
    gt_imdb = imdb.gt_imdb()
    gt_imdb = imdb.append_flipped_images(gt_imdb)
    sym = R_Net()

    train_net(sym, prefix, ctx, pretrained, epoch, begin_epoch, end_epoch, gt_imdb, batch_size, thread_num,
              24, frequent, not resume, lr, lr_epoch)
Exemplo n.º 5
0
def train_GA_net(mode, image_set, root_path, dataset_path, prefix, ctx,
                 pretrained, epoch, begin_epoch, end_epoch, batch_size,
                 thread_num, frequent, lr, lr_epoch, resume):
    imdb = IMDB("GA", 112, image_set, root_path, dataset_path)
    gt_imdb = imdb.gt_imdb()
    gt_imdb = imdb.append_flipped_images(gt_imdb)
    sym = GA_Net112(mode, batch_size)

    train_net(mode, sym, prefix, ctx, pretrained, epoch, begin_epoch,
              end_epoch, gt_imdb, batch_size, thread_num, 112, 112, frequent,
              not resume, lr, lr_epoch)