uber-research / UPSNet

UPSNet: A Unified Panoptic Segmentation Network
Other
649 stars 120 forks source link

ModuleNotFoundError: No module named 'upsnet.bbox.bbox' #9

Closed WenFuLee closed 5 years ago

WenFuLee commented 5 years ago

Did I miss any step to get this error?

~/UPSNet_ROOT$ python upsnet/upsnet_end2end_train.py --cfg upsnet/experiments/upsnet_resnet50_coco.yaml
upsnet/../upsnet/config/config.py:180: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  exp_config = edict(yaml.load(f))
Traceback (most recent call last):
  File "upsnet/upsnet_end2end_train.py", line 60, in <module>
    from upsnet.dataset import *
  File "upsnet/../upsnet/dataset/__init__.py", line 1, in <module>
    from .cityscapes import Cityscapes
  File "upsnet/../upsnet/dataset/cityscapes.py", line 32, in <module>
    from upsnet.dataset.json_dataset import JsonDataset, extend_with_flipped_entries, filter_for_training, add_bbox_regression_targets
  File "upsnet/../upsnet/dataset/json_dataset.py", line 53, in <module>
    import upsnet.bbox.bbox_transform as box_utils
  File "upsnet/../upsnet/bbox/bbox_transform.py", line 15, in <module>
    from .bbox import bbox_overlaps as bbox_overlaps_cython
ModuleNotFoundError: No module named 'upsnet.bbox.bbox'

This is what I got in the route: upsnet/bbox

~/UPSNet_ROOT/upsnet/bbox$ ls
bbox.c                                bbox.pyx            bbox_transform.py  __init__.py  sample_rois.py
bbox.cpython-37m-x86_64-linux-gnu.so  bbox_regression.py  build              __pycache__  setup.py

Thanks.

YuwenXiong commented 5 years ago

From your information you only compile bbox cython module with python 3.7, make sure you also use python 3.7 when you run experiments.

YuwenXiong commented 5 years ago

Also please note that config files w/o 4gpu suffix are with horovod in distributed setting

WenFuLee commented 5 years ago

We only have 1 GPU in our environment now. Is it still compatible with the distributed setting?

YuwenXiong commented 5 years ago

Then please edit the 4gpu config, reduce lr by 4x / enlarge #iter by 4x, etc. BTW I don't think you can run coco dataset w/ 1 GPU in a acceptable time, please try cityscapes instead.

WenFuLee commented 5 years ago

I am not so sure to make the setting upsnet_resnet50_cityscapes_4gpu.yaml to fit my current environment with only 1 GPU. I have done the change below.

====

train: gpus: '0,1,2,3' -> '0' lr: 0.005 -> 0.00125 max_iteration: 48000 -> 192000 decay_iteration:

====

test: test_iteration: 48000 -> 192000

====

Did I miss anything? Thanks.

YuwenXiong commented 5 years ago

looks good to me

WenFuLee commented 5 years ago

I know training takes a long time. Could you please give me a rough time how long it may take to finish training a model using only 1 GPU based on the above setting? Thank you!

YuwenXiong commented 5 years ago

It will take ~3 days to train on 1 1080Ti GPU

WenFuLee commented 5 years ago

I see. What if I don't need a model as accurate as your best one? Could I trade off performance for less training time? For example, I can decrease the iteration numbers in order to get a trained model more quickly, which may have lower accuracy. If this is acceptable, what parameters I can try first, iteration number or else? Thank you!

YuwenXiong commented 5 years ago

You can reduce #iter, e.g. 72k/96k rather than 144k/192k

wshilaji commented 3 years ago

兄弟请问怎么自定义自己的coco panoptic格式的数据集