def get_minibatch_blob_names()

in lib/roi_data/minibatch_rel.py [0:0]


def get_minibatch_blob_names(split):
    """Returns blob names in the order in which they are read by the data
    loader.
    """
    # data blob: holds a batch of N images, each with 3 channels
    # Fast R-CNN like models trained on precomputed proposals
    # rois blob: holds R regions of interest, each is a 5-tuple
    # (batch_idx, x1, y1, x2, y2) specifying an image batch index and a
    # rectangle (x1, y1, x2, y2)

    if split == 'train':
        blob_names = ['data']
        blob_names += ['sbj_rois']
        blob_names += ['obj_rois']
        blob_names += ['rel_rois_sbj']
        blob_names += ['rel_rois_obj']
        blob_names += ['rel_rois_prd']
        if cfg.MODEL.LOSS_TYPE.find('TRIPLET') >= 0:
            blob_names += ['sbj_pos_vecs']
            blob_names += ['obj_pos_vecs']
            blob_names += ['rel_pos_vecs']
            if cfg.DATASET.find('visual_genome') >= 0 and \
                    cfg.MODEL.SUBTYPE.find('yall') < 0:
                blob_names += ['sbj_neg_vecs']
                blob_names += ['obj_neg_vecs']
                blob_names += ['rel_neg_vecs']
            blob_names += ['sbj_neg_affinity_mask']
            blob_names += ['obj_neg_affinity_mask']
            blob_names += ['rel_neg_affinity_mask']
            if cfg.MODEL.LOSS_TYPE.find('CLUSTER') >= 0:
                blob_names += ['sbj_pos_affinity_mask']
                blob_names += ['obj_pos_affinity_mask']
                blob_names += ['rel_pos_affinity_mask']
        blob_names += ['sbj_pos_labels_int32']
        blob_names += ['obj_pos_labels_int32']
        blob_names += ['rel_pos_labels_int32']
        blob_names += ['sbj_pos_starts']
        blob_names += ['obj_pos_starts']
        blob_names += ['rel_pos_starts']
        blob_names += ['sbj_pos_ends']
        blob_names += ['obj_pos_ends']
        blob_names += ['rel_pos_ends']
        blob_names += ['sbj_neg_starts']
        blob_names += ['obj_neg_starts']
        blob_names += ['rel_neg_starts']
        blob_names += ['sbj_neg_ends']
        blob_names += ['obj_neg_ends']
        blob_names += ['rel_neg_ends']
        if cfg.TRAIN.ADD_LOSS_WEIGHTS:
            blob_names += ['rel_pos_weights']
        if cfg.TRAIN.ADD_LOSS_WEIGHTS_SO:
            blob_names += ['sbj_pos_weights']
            blob_names += ['obj_pos_weights']
    else:  # val/test
        blob_names = ['data']
        blob_names += ['sbj_rois']
        blob_names += ['obj_rois']
        blob_names += ['rel_rois_sbj']
        blob_names += ['rel_rois_obj']
        blob_names += ['rel_rois_prd']
        blob_names += ['sbj_pos_labels_int32']
        blob_names += ['obj_pos_labels_int32']
        blob_names += ['rel_pos_labels_int32']
        blob_names += ['sbj_gt_boxes']
        blob_names += ['obj_gt_boxes']
        blob_names += ['rel_gt_boxes']
        blob_names += ['image_idx']
        blob_names += ['image_id']
        blob_names += ['image_scale']
        blob_names += ['subbatch_id']
        blob_names += ['num_proposals']

    return blob_names