facebookresearch / DetectAndTrack

The implementation of an algorithm presented in the CVPR18 paper: "Detect-and-Track: Efficient Pose Estimation in Videos"
Apache License 2.0
1k stars 186 forks source link

ImportError: No module named roi_blob_transforms #1

Closed kevinlin311tw closed 6 years ago

kevinlin311tw commented 6 years ago

Thank you for releasing the codes. After installing caffe2 and this repo, I would like to run the testing as below

export CUDA_VISIBLE_DEVICES="0,1,2,3" 
python launch.py \
    --cfg configs/video/2d_best/01_R101_best_hungarian-4GPU.yaml \
    --mode test \
    TEST.WEIGHTS /data/action/DetectAndTrack/pretrained_models/configs/video/2d_best/01_R101_best_hungarian-4GPU.yaml/model_final.pkl

However, I got the following errors.

Found Detectron ops lib: /usr/local/lib/libcaffe2_detectron_ops_gpu.so
E0507 21:06:30.171579  6159 init_intrinsics_check.cc:43] CPU feature avx is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU.
E0507 21:06:30.171617  6159 init_intrinsics_check.cc:43] CPU feature avx2 is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU.
E0507 21:06:30.171631  6159 init_intrinsics_check.cc:43] CPU feature fma is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU.
INFO test_net.py: 109: Called with args:
INFO test_net.py: 110: Namespace(cfg_file='configs/video/2d_best/01_R101_best_hungarian-4GPU.yaml', multi_gpu_testing=True, opts=['OUTPUT_DIR', 'outputs/configs/video/2d_best/01_R101_best_hungarian-4GPU.yaml', 'TEST.WEIGHTS', '/data/action/DetectAndTrack/pretrained_models/configs/video/2d_best/01_R101_best_hungarian-4GPU.yaml/model_final.pkl'], range=None, vis=False, wait=True)
INFO test_net.py: 116: Testing with config:
INFO test_net.py: 117: {'BBOX_XFORM_CLIP': 4.135166556742356,
 'CLUSTER': {'AUTO_RESUME': True, 'ON_CLUSTER': False},
 'DEBUG': {'DATA_LOADING': False, 'STOP_TRAIN_ITER': False},
 'DEDUP_BOXES': 0.0625,
 'DEVSTORAGE': {'HOSTNAME': '',
                'MOUNT_ENABLED': False,
                'MOUNT_POINT': '/tmp/devstorage',
                'REMOTE_PATH': ''},
 'EPS': 1e-14,
 'EVAL': {'EVAL_MPII_DROP_DETECTION_THRESHOLD': 0.5,
          'EVAL_MPII_KPT_THRESHOLD': 1.95,
          'EVAL_MPII_PER_VIDEO': False},
 'EXT_PATHS': {'POSEVAL_CODE_PATH': '/home/rgirdhar/local/OpenSource/bitbucket/poseval/'},
 'FAST_RCNN': {'MLP_HEAD_DIM': 1024,
               'ROI_XFORM_METHOD': 'RoIAlign',
               'ROI_XFORM_RESOLUTION': 7,
               'ROI_XFORM_SAMPLING_RATIO': 2},
 'FINAL_MSG': '',
 'FPN': {'COARSEST_STRIDE': 32,
         'DIM': 256,
         'EXTRA_CONV_LEVELS': False,
         'FPN_ON': True,
         'INPLACE_LATERAL': False,
         'MULTILEVEL_ROIS': True,
         'MULTILEVEL_RPN': True,
         'ROI_CANONICAL_LEVEL': 4,
         'ROI_CANONICAL_SCALE': 224,
         'ROI_MAX_LEVEL': 5,
         'ROI_MIN_LEVEL': 2,
         'RPN_ANCHOR_START_SIZE': 32,
         'RPN_ASPECT_RATIOS': (0.5, 1, 2),
         'RPN_MAX_LEVEL': 6,
         'RPN_MIN_LEVEL': 2,
         'ZERO_INIT_LATERAL': False},
 'KRCNN': {'CONV_HEAD_DIM': 512,
           'CONV_HEAD_KERNEL': 3,
           'CONV_INIT': 'MSRAFill',
           'DECONV_DIM': 256,
           'DECONV_KERNEL': 4,
           'DILATION': 1,
           'HEATMAP_SIZE': 56,
           'INFERENCE_MIN_SIZE': 0,
           'KEYPOINT_CONFIDENCE': 'bbox',
           'LOSS_WEIGHT': 1.0,
           'MIN_KEYPOINT_COUNT_FOR_VALID_MINIBATCH': 20,
           'NMS_OKS': False,
           'NO_3D_DECONV_TIME_TO_CH': False,
           'NUM_KEYPOINTS': 17,
           'NUM_STACKED_CONVS': 8,
           'ROI_KEYPOINTS_HEAD': 'keypoint_rcnn_heads.add_roi_pose_head_v1convX',
           'ROI_XFORM_METHOD': 'RoIAlign',
           'ROI_XFORM_RESOLUTION': 14,
           'ROI_XFORM_SAMPLING_RATIO': 2,
           'UP_SCALE': 2,
           'USE_3D_DECONV': False,
           'USE_DECONV': False,
           'USE_DECONV_OUTPUT': True},
 'MATLAB': 'matlab',
 'MEMONGER': True,
 'MEMONGER_SHARE_ACTIVATIONS': False,
 'MODEL': {'BBOX_REG_WEIGHTS': (10.0, 10.0, 5.0, 5.0),
           'BN_EPSILON': 1.0000001e-05,
           'BN_MOMENTUM': 0.9,
           'CLS_AGNOSTIC_BBOX_REG': False,
           'CONV_BODY': 'FPN3D.add_fpn_ResNet101_conv5_body',
           'DILATION': 1,
           'EXECUTION_TYPE': 'dag',
           'FASTER_RCNN': True,
           'KEYPOINTS_ON': True,
           'MASK_ON': False,
           'NUM_CLASSES': 2,
           'PS_GRID_SIZE': 3,
           'ROI_HEAD': 'head_builder.add_roi_2mlp_head',
           'RPN_ONLY': False,
           'TYPE': 'keypoint_rcnn',
           'USE_BN': False,
           'USE_BN_TESTMODE_ONLY': False,
           'VIDEO_ON': True},
 'MRCNN': {'CLS_SPECIFIC_MASK': True,
           'CONV_INIT': 'GaussianFill',
           'DILATION': 2,
           'DIM_REDUCED': 256,
           'MASK_HEAD_NAME': '',
           'RESOLUTION': 14,
           'ROI_XFORM_METHOD': 'RoIAlign',
           'ROI_XFORM_RESOLUTION': 7,
           'ROI_XFORM_SAMPLING_RATIO': 0,
           'THRESH_BINARIZE': 0.5,
           'UPSAMPLE_RATIO': 1,
           'USE_FC_OUTPUT': False,
           'WEIGHT_LOSS_MASK': 1.0},
 'NUM_GPUS': 4,
 'NUM_WORKERS': 4,
 'OUTPUT_DIR': 'outputs/configs/video/2d_best/01_R101_best_hungarian-4GPU.yaml',
 'PIXEL_MEANS': array([[[102.9801, 115.9465, 122.7717]]]),
 'RESNETS': {'NUM_GROUPS': 1,
             'STRIDE_1X1': True,
             'TRANS_FUNC': 'bottleneck_transformation',
             'WIDTH_PER_GROUP': 64},
 'RNG_SEED': 3,
 'ROIDB_SUBSET': [],
 'ROOT_DIR': '/data/action/DetectAndTrack',
 'ROOT_GPU_ID': 0,
 'RPN': {'ASPECT_RATIOS': (0.5, 1, 2),
         'ON': True,
         'SIZES': (64, 128, 256, 512),
         'STRIDE': 16},
 'SOLVER': {'BASE_LR': 0.0005,
            'GAMMA': 0.1,
            'LOG_LR_CHANGE_THRESHOLD': 1.1,
            'LRS': [],
            'LR_POLICY': 'steps_with_decay',
            'MAX_ITER': 26000,
            'MOMENTUM': 0.9,
            'SCALE_MOMENTUM': True,
            'SCALE_MOMENTUM_THRESHOLD': 1.1,
            'STEPS': [0, 20000, 24000],
            'STEP_SIZE': 30000,
            'WARM_UP_FACTOR': 0.3333333333333333,
            'WARM_UP_ITERS': 500,
            'WARM_UP_METHOD': u'linear',
            'WEIGHT_DECAY': 0.0001},
 'TEST': {'BBOX_AUG': {'AREA_TH_HI': 32400,
                       'AREA_TH_LO': 2500,
                       'ASPECT_RATIOS': (),
                       'ASPECT_RATIO_H_FLIP': False,
                       'COORD_HEUR': 'ID',
                       'H_FLIP': False,
                       'MAX_SIZE': 4000,
                       'SCALES': (),
                       'SCALE_H_FLIP': False,
                       'SCALE_SIZE_DEP': False,
                       'SCORE_HEUR': 'ID'},
          'BBOX_REG': True,
          'BBOX_VOTE': {'ENABLED': False, 'VOTE_TH': 0.8},
          'COMPETITION_MODE': False,
          'DATASET': 'posetrack_v1.0_val',
          'DATASETS': (),
          'DETECTIONS_PER_IM': 100,
          'ENSEMBLE': {'DEVSTORAGE_CACHE': False,
                       'PROPOSAL_CACHE': '/tmp',
                       'RPN_CONFIGS': ()},
          'EXT_CNN_FEATURES': False,
          'EXT_CNN_FEATURES_MODEL': 'ImNet',
          'FORCE_JSON_DATASET_EVAL': False,
          'INIT_RANDOM_VARS_BEFORE_LOADING': False,
          'KPS_AUG': {'AREA_TH': 32400,
                      'ASPECT_RATIOS': (),
                      'ASPECT_RATIO_H_FLIP': False,
                      'HEUR': 'HM_AVG',
                      'H_FLIP': False,
                      'MAX_SIZE': 4000,
                      'SCALES': (),
                      'SCALE_H_FLIP': False,
                      'SCALE_SIZE_DEP': False},
          'MASK_AUG': {'AREA_TH': 32400,
                       'ASPECT_RATIOS': (),
                       'ASPECT_RATIO_H_FLIP': False,
                       'HEUR': 'SOFT_AVG',
                       'H_FLIP': False,
                       'MAX_SIZE': 4000,
                       'SCALES': (),
                       'SCALE_H_FLIP': False,
                       'SCALE_SIZE_DEP': False},
          'MAX_SIZE': 1333,
          'NMS': 0.5,
          'PROPOSAL_FILE': '',
          'PROPOSAL_FILES': (),
          'PROPOSAL_LIMIT': 2000,
          'RPN_MIN_SIZE': 0,
          'RPN_NMS_THRESH': 0.7,
          'RPN_POST_NMS_TOP_N': 1000,
          'RPN_PRE_NMS_TOP_N': 1000,
          'SCALES': (800,),
          'SCORE_THRESH': 0.05,
          'SOFT_NMS': {'ENABLED': False, 'METHOD': 'linear', 'SIGMA': 0.5},
          'SVM': False,
          'WEIGHTS': '/data/action/DetectAndTrack/pretrained_models/configs/video/2d_best/01_R101_best_hungarian-4GPU.yaml/model_final.pkl'},
 'TRACKING': {'BIPARTITE_MATCHING_ALGO': 'hungarian',
              'CNN_MATCHING_LAYER': 'layer3',
              'CONF_FILTER_INITIAL_DETS': 0.95,
              'DEBUG': {'DUMMY_TRACKS': False,
                        'FLOW_SMOOTHING_COMBINE': False,
                        'UPPER_BOUND': False,
                        'UPPER_BOUND_2_GT_KPS': False,
                        'UPPER_BOUND_2_GT_KPS_ONLY_CONF': False,
                        'UPPER_BOUND_3_SHOTS': False,
                        'UPPER_BOUND_4_EVAL_UPPER_BOUND': False,
                        'UPPER_BOUND_5_GT_KPS_ONLY': False},
              'DETECTIONS_FILE': '',
              'DISTANCE_METRICS': ('bbox-overlap', 'cnn-cosdist'),
              'DISTANCE_METRIC_WTS': (1.0, 0.0),
              'FLOW_SMOOTHING': {'EXTEND_TRACKS': True,
                                 'FLOW_SHOT_BOUNDARY_TH': 6.0,
                                 'N_CONTEXT_FRAMES': 3},
              'FLOW_SMOOTHING_ON': False,
              'KEEP_CENTER_DETS_ONLY': True,
              'KP_CONF_TYPE': 'global',
              'LSTM': {'BATCH_SIZE': 20,
                       'CONSIDER_SHORT_TRACKS_TOO': False,
                       'DROPOUT': 0.2,
                       'EMSIZE': 200,
                       'EPOCHS': 10,
                       'FEATS_TO_CONSIDER': [u'bbox', u'kpts'],
                       'GRAD_CLIP': 0.25,
                       'LOG_INTERVAL': 200,
                       'LOSS_LAST_PRED_ONLY': False,
                       'LR': 0.1,
                       'MODEL': 'LSTM',
                       'NHID': 200,
                       'NLAYERS': 2,
                       'NUM_WORKERS': 4,
                       'TIED_WTS': False},
              'LSTM_TEST': {'LSTM_TRACKING_ON': False, 'LSTM_WEIGHTS': ''}},
 'TRAIN': {'ASPECT_GROUPING': True,
           'BATCH_SIZE_PER_IM': 512,
           'BBOX_NORMALIZE_TARGETS_PRECOMPUTED_deprecated': None,
           'BBOX_REG': True,
           'BBOX_THRESH': 0.5,
           'BG_THRESH_HI': 0.5,
           'BG_THRESH_LO': 0.0,
           'CROWD_FILTER_THRESH': 0.7,
           'DATASET': 'posetrack_v1.0_train',
           'DROPOUT': 0.0,
           'FG_FRACTION': 0.25,
           'FG_THRESH': 0.5,
           'GT_MIN_AREA': -1,
           'IMS_PER_BATCH': 1,
           'MAX_SIZE': 1333,
           'MINIBATCH_QUEUE_SIZE': 64,
           'PROPOSAL_FILE': '',
           'RPN_BATCH_SIZE_PER_IM': 256,
           'RPN_FG_FRACTION': 0.5,
           'RPN_MIN_SIZE': 0,
           'RPN_NEGATIVE_OVERLAP': 0.3,
           'RPN_NMS_THRESH': 0.7,
           'RPN_POSITIVE_OVERLAP': 0.7,
           'RPN_POST_NMS_TOP_N': 2000,
           'RPN_PRE_NMS_TOP_N': 2000,
           'RPN_STRADDLE_THRESH': 0,
           'SCALES': (640, 672, 704, 736, 768, 800),
           'SNAPSHOT_ITERS': 20000,
           'USE_FLIPPED': True,
           'WEIGHTS': 'pretrained_models/e2e_keypoint_rcnn_R-101-FPN_1x_trainedCOCO.pkl'},
 'USE_GPU_NMS_deprecated': None,
 'USE_NCCL': False,
 'VIDEO': {'BODY_HEAD_LINK': 'slice-center',
           'DEBUG_USE_RPN_GT': False,
           'DEFAULT_CLIPS_PER_VIDEO': 9999999999,
           'NUM_FRAMES': 1,
           'NUM_FRAMES_MID': 1,
           'PREDICT_RPN_BOX_VIS': False,
           'RPN_TUBE_GEN_STYLE': 'replicate',
           'TIME_INTERVAL': 0,
           'TIME_KERNEL_DIM': {'BODY': 1,
                               'HEAD_DET': 1,
                               'HEAD_KPS': 1,
                               'HEAD_RPN': 1},
           'TIME_STRIDE_ON': False,
           'WEIGHTS_INFLATE_MODE': 'center-only'},
 'VIS': False,
 'VIS_THR': 0.9,
 'VOC_DIR': '/mnt/vol/gfsai-east/ai-group/datasets'}
/usr/local/lib/python2.7/dist-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Traceback (most recent call last):
  File "tools/test_net.py", line 142, in <module>
    main(ind_range=args.range, multi_gpu_testing=args.multi_gpu_testing)
  File "tools/test_net.py", line 69, in main
    import core.test_engine as engine
  File "/data/action/DetectAndTrack/lib/core/test_engine.py", line 34, in <module>
    from modeling import model_builder
  File "/data/action/DetectAndTrack/lib/modeling/model_builder.py", line 18, in <module>
    from modeling.detector import DetectionModelHelper
  File "/data/action/DetectAndTrack/lib/modeling/detector.py", line 21, in <module>
    from ops.roi_blob_transforms import RoIToBatchFormatOp
ImportError: No module named roi_blob_transforms

It looks like there is a few missing files such as roi_blob_transforms and debug_ops in folder ops.

Could you please let me know how to solve this problem?

Thanks

rohitgirdhar commented 6 years ago

Oh my bad. Added the files now. Thanks for pointing it out!