roytseng-tw / Detectron.pytorch

A pytorch implementation of Detectron. Both training from scratch and inferring directly from pretrained Detectron weights are available.
MIT License
2.82k stars 567 forks source link

fix config. wrong indentation and typos #165

Open 1Konny opened 5 years ago

1Konny commented 5 years ago
  1. yaml.parser.ParserError caused by incorrect indentation in e2e_faster_rcnn_X-101-64x4d-FPN_1x.yaml

COMMAND:

python tools/test_net.py --dataset coco2017 --cfg configs/baselines/e2e_faster_rcnn_X-101-64x4d-FPN_1x.yaml --load_detectron /path/to/weights/e2e_faster_rcnn_X-101-64x4d-FPN_1x.pkl

ERROR :

"expected <block end>, but found %r" % token.id, token.start_mark)
yaml.parser.ParserError: while parsing a block mapping
  in "configs/baselines/e2e_faster_rcnn_X-101-64x4d-FPN_1x.yaml", line 1, column 1
expected <block end>, but found '<block mapping start>'
  in "configs/baselines/e2e_faster_rcnn_X-101-64x4d-FPN_1x.yaml", line 20, column 3
  1. ModuleNotFoundError: No module named 'modeling.head_builder' COMMAND :
    python tools/test_net.py --dataset keypoints_coco2017 --cfg configs/baselines/e2e_keypoint_rcnn_R-101-FPN_s1x.yaml --load_detectron weights/detectron_models_weights/e2e_keypoint_rcnn_R-10
    1-FPN_s1x.pkl

ERROR:

creating index...
index created!
ERROR model_builder.py:  42: Failed to find function: head_builder.roi_2mlp_head
Traceback (most recent call last):
  File "tools/test_net.py", line 112, in <module>
    check_expected_results=True)
  File "/hdd2/codes/Detectron.pytorch/lib/core/test_engine.py", line 128, in run_inference
    all_results = result_getter()
  File "/hdd2/codes/Detectron.pytorch/lib/core/test_engine.py", line 108, in result_getter
    multi_gpu=multi_gpu_testing
  File "/hdd2/codes/Detectron.pytorch/lib/core/test_engine.py", line 158, in test_net_on_dataset
    args, dataset_name, proposal_file, output_dir, gpu_id=gpu_id
  File "/hdd2/codes/Detectron.pytorch/lib/core/test_engine.py", line 232, in test_net
    model = initialize_model_from_cfg(args, gpu_id=gpu_id)
  File "/hdd2/codes/Detectron.pytorch/lib/core/test_engine.py", line 322, in initialize_model_from_cfg
    model = model_builder.Generalized_RCNN()
  File "/hdd2/codes/Detectron.pytorch/lib/modeling/model_builder.py", line 103, in __init__
    self.Box_Head = get_func(cfg.FAST_RCNN.ROI_BOX_HEAD)(
  File "/hdd2/codes/Detectron.pytorch/lib/modeling/model_builder.py", line 39, in get_func
    module = importlib.import_module(module_name)
  File "/home/wonkonge/anaconda3/envs/detectron/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'modeling.head_builder'