from detectron.core.config import cfg from detectron.core.config import merge_cfg_from_file from detectron.core.config import get_output_dir from detectron.utils.io import cache_url from detectron.utils.logging import setup_logging import detectron.core.test_engine as infer_engine import detectron.datasets.dummy_datasets as dummy_datasets from detectron.datasets.dataset_catalog import get_im_dir import detectron.utils.c2 as c2_utils import detectron.utils.vis as vis_utils from detectron.utils.tracking import Tracking, back_track, \ infer_track_sequence, get_matlab_engine, eval_detections_matlab c2_utils.import_contrib_ops() c2_utils.import_detectron_ops() c2_utils.import_custom_ops() def parse_args(): parser = argparse.ArgumentParser(description='End-to-end inference') parser.add_argument( '--cfg', dest='cfg', help='cfg model file (/path/to/model_config.yaml)', default=None, type=str ) parser.add_argument( '--wts-pre', dest='weights_pre_list', help='list of extra pre weights model files (/path/to/model_weights.pkl)',
import pprint import sys import time from caffe2.python import workspace from detectron.core.config import assert_and_infer_cfg from detectron.core.config import cfg from detectron.core.config import merge_cfg_from_file from detectron.core.config import merge_cfg_from_list from detectron.core.test_engine import run_inference from detectron.utils.logging import setup_logging import detectron.utils.c2 as c2_utils c2_utils.import_detectron_ops() c2_utils.import_custom_ops() #utils.c2.import_custom_ops() #utils.c2.import_detectron_ops() # OpenCL may be enabled by default in OpenCV3; disable it because it's not # thread safe and causes unwanted GPU memory allocations. cv2.ocl.setUseOpenCL(False) def parse_args(): parser = argparse.ArgumentParser(description='Test a Fast R-CNN network') parser.add_argument( '--cfg', dest='cfg_file',