HRNet / HRNet-Semantic-Segmentation

The OCR approach is rephrased as Segmentation Transformer: https://arxiv.org/abs/1909.11065. This is an official implementation of semantic segmentation for HRNet. https://arxiv.org/abs/1908.07919
Other
3.09k stars 682 forks source link

Problem abput inplace_abn setup #261

Open 666shaw opened 2 years ago

666shaw commented 2 years ago

when I tried to set up the inplace_abn, it warmed me up that 'your setuptools is too old (<12) ,setuptools_scm functionality is degraded'. I do not how to deal with this problem. If you have any ideas, please tell me! Thank you!!! Here are my settings: ninja =1.10.2.3 pytorch =1.7.1

666shaw commented 2 years ago

I though the author had given the answer in the .py file in models->bn_helpers.py, as follow: import torch import functools   |     | if torch.version.startswith('0'):   | from .sync_bn.inplace_abn.bn import InPlaceABNSync   | BatchNorm2d = functools.partial(InPlaceABNSync, activation='none')   | BatchNorm2d_class = InPlaceABNSync   | relu_inplace = False   | else:   | BatchNorm2d_class = BatchNorm2d = torch.nn.SyncBatchNorm   | relu_inplace = True