예제 #1
0
        plt.subplot(4, 3, 12)
        plt.imshow(target[:,:,::-1])
        plt.axis('off')
        
        fig.savefig(out_path, bbox_inches='tight')
        plt.close(fig)

        print('out_inds: ', out_inds)
        print('out_msks: ', out_msks)
        # print('cls_inds: ', entry['cls_inds'])
        # print('pos_inds: ', entry['pos_inds'])
        # print('trans_inds: ', entry['trans_inds'])
        break


if __name__ == '__main__':
    cv2.setNumThreads(0)
    config, unparsed = get_config()
    config = abstract_arguments(config)
    np.random.seed(config.seed)
    random.seed(config.seed)
    torch.manual_seed(config.seed)
    if(config.cuda):
        torch.cuda.manual_seed_all(config.seed)
    prepare_directories(config)

    # test_dataset(config)
    test_loader(config)
    # test_lang_vocab(config)
    # test_clip_and_triplet(config)
    # test_indices(config)
예제 #2
0
 def setUp(self):
     config, unparsed = get_config()
     np.random.seed(config.seed)
     random.seed(config.seed)
     self.cfg = deepcopy(config)