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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem abput inplace_abn setup

666shaw opened this issue · comments

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

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