youtubevos / MaskTrackRCNN

MaskTrackRCNN for video instance segmentation based on mmdetection
Apache License 2.0
432 stars 75 forks source link

SyncBatchNorm #32

Closed taeyeopl closed 4 years ago

taeyeopl commented 4 years ago

I used the mmdetection from f3a939f It seems like torch 0.4.1 don't support the SynBatchNorm Libraray which is in the mmdetection part.

Can I ask the how to handle SyncBatchNorm.

AttributeError: module 'torch.nn' has no attribute 'SyncBatchNorm'

https://github.com/open-mmlab/mmdetection/blob/8732ed96a85163fc4fb6d36b52ff3c3d25172611/tools/fuse_conv_bn.py#L32

https://github.com/open-mmlab/mmdetection/issues/684

python3 tools/test_video.py configs/masktrack_rcnn_r50_fpn_1x_youtubevos.py models/epoch_12.pth --out output --eval segm

Traceback (most recent call last): File "tools/test_video.py", line 4, in import mmcv File "/home/user/anaconda3/envs/MaskTrackRCNN/lib/python3.6/site-packages/mmcv/init.py", line 4, in from .fileio import * File "/home/user/anaconda3/envs/MaskTrackRCNN/lib/python3.6/site-packages/mmcv/fileio/init.py", line 4, in from .io import dump, load, register_handler File "/home/user/anaconda3/envs/MaskTrackRCNN/lib/python3.6/site-packages/mmcv/fileio/io.py", line 4, in from ..utils import is_list_of, is_str File "/home/user/anaconda3/envs/MaskTrackRCNN/lib/python3.6/site-packages/mmcv/utils/init.py", line 8, in from .parrots_wrapper import (CUDA_HOME, BuildExtension, CppExtension, File "/home/user/anaconda3/envs/MaskTrackRCNN/lib/python3.6/site-packages/mmcv/utils/parrots_wrapper.py", line 67, in _BatchNorm, InstanceNorm, SyncBatchNorm = _get_norm() File "/home/user/anaconda3/envs/MaskTrackRCNN/lib/python3.6/site-packages/mmcv/utils/parrots_wrapper.py", line 60, in _getnorm SyncBatchNorm = torch.nn.SyncBatchNorm AttributeError: module 'torch.nn' has no attribute 'SyncBatchNorm'

taeyeopl commented 4 years ago

The problem was solved by changing mmcv version 0.2.0