コード例 #1
0
ファイル: test_frustum.py プロジェクト: typhoonlee/PointRCNN
    parser.add_argument(
        '--idx_path',
        default=None,
        help=
        'filename of txt where each line is a data idx, used for rgb detection -- write <id>.txt for all frames. [default: None]'
    )
    parser.add_argument('--dump_result',
                        action='store_true',
                        help='If true, also dump results to .pickle file')
    FLAGS = parser.parse_args()

    # Set training configurations
    BATCH_SIZE = FLAGS.batch_size
    MODEL_PATH = FLAGS.model_path
    GPU_INDEX = FLAGS.gpu
    NUM_POINT = FLAGS.num_point

    TEST_DATASET = FrustumDataset(NUM_POINT,
                                  FLAGS.kitti_path,
                                  BATCH_SIZE,
                                  FLAGS.split,
                                  data_dir='./rcnn_data_' + FLAGS.split,
                                  is_training=False,
                                  augmentX=1,
                                  random_shift=False,
                                  rotate_to_center=True,
                                  random_flip=False,
                                  use_gt_prop=False)

    test(TEST_DATASET, FLAGS.output + '.pickle', FLAGS.output)
コード例 #2
0
ファイル: test_frustum.py プロジェクト: overfitover/PointRCNN
FLAGS = parser.parse_args()

# Set training configurations
BATCH_SIZE = FLAGS.batch_size
MODEL_PATH = FLAGS.model_path
GPU_INDEX = FLAGS.gpu
NUM_POINT = FLAGS.num_point
MODEL = importlib.import_module(FLAGS.model)
# NUM_CLASSES = 2

TEST_DATASET = FrustumDataset(
    NUM_POINT,
    '/data/ssd/public/jlliu/Kitti/object',
    BATCH_SIZE,
    'val',
    save_dir=
    '/data/ssd/public/jlliu/frustum-pointnets/train/rpn_dataset_car_people/val',
    augmentX=1,
    random_shift=False,
    rotate_to_center=True,
    random_flip=False,
    fill_with_label=False)

kitti_dataset = kitti_object('/data/ssd/public/jlliu/Kitti/object')


def get_session_and_ops(batch_size, num_point):
    ''' Define model graph, load model parameters,
    create session and return session handle and tensors
    '''
    with tf.Graph().as_default():
        with tf.device('/gpu:' + str(GPU_INDEX)):
コード例 #3
0
ファイル: train_frustum.py プロジェクト: jtpils/PointRCNN-1
LOG_DIR = FLAGS.log_dir
if not os.path.exists(LOG_DIR): os.mkdir(LOG_DIR)
LOG_FOUT = open(os.path.join(LOG_DIR, 'log_train.txt'), 'w')
LOG_FOUT.write(str(FLAGS) + '\n')

BN_INIT_DECAY = 0.5
BN_DECAY_DECAY_RATE = 0.5
BN_DECAY_DECAY_STEP = float(DECAY_STEP)
BN_DECAY_CLIP = 0.99

# load data set in background thread, remember to join data_loading_thread somewhere
TRAIN_DATASET = FrustumDataset(NUM_POINT,
                               '/data/ssd/public/jlliu/Kitti/object',
                               BATCH_SIZE,
                               'train',
                               data_dir='./rcnn_data_train',
                               augmentX=5,
                               random_shift=True,
                               rotate_to_center=True,
                               random_flip=True,
                               use_gt_prop=FLAGS.use_gt_prop)
TEST_DATASET = FrustumDataset(NUM_POINT,
                              '/data/ssd/public/jlliu/Kitti/object',
                              BATCH_SIZE,
                              'val',
                              data_dir='./rcnn_data_val',
                              augmentX=1,
                              random_shift=False,
                              rotate_to_center=True,
                              random_flip=False,
                              use_gt_prop=FLAGS.use_gt_prop)
train_loading_thread = Thread(target=TRAIN_DATASET.load_buffer_repeatedly,