Happily got the info that my master’s supervisor’s lab, namely: The State-Level key Laboratory of Multispectral Signal Processing in Huazhong University of Science and Technology released TorchSeg just yesterday. I can’t helping testing it out.
Preparation
Python Packages
According to the README.md on TorchSeg, serveral packages need to be prepared FIRST:
1  | ➜ ~ pip show torch  | 
PyTorch Models
Download all PyTorch models provided from within all .py files from PyTorch Vision Models. Let’s briefly summarize the models as follows:
- alexnet: https://download.pytorch.org/models/alexnet-owt-4df8aa71.pth
 - densenet121: https://download.pytorch.org/models/densenet121-a639ec97.pth
 - densenet169: https://download.pytorch.org/models/densenet169-b2777c0a.pth
 - densenet201: https://download.pytorch.org/models/densenet201-c1103571.pth
 - densenet161: https://download.pytorch.org/models/densenet161-8d451a50.pth
 - inception_v3_google: https://download.pytorch.org/models/inception_v3_google-1a9a5a14.pth
 - resnet18: https://download.pytorch.org/models/resnet18-5c106cde.pth
 - resnet34: https://download.pytorch.org/models/resnet34-333f7ec4.pth
 - resnet50: https://download.pytorch.org/models/resnet50-19c8e357.pth
 - resnet101: https://download.pytorch.org/models/resnet101-5d3b4d8f.pth
 - resnet152: https://download.pytorch.org/models/resnet152-b121ed2d.pth
 - squeezenet1_0: https://download.pytorch.org/models/squeezenet1_0-a815701f.pth
 - squeezenet1_1: https://download.pytorch.org/models/squeezenet1_1-f364aa15.pth
 - vgg11: https://download.pytorch.org/models/vgg11-bbd30ac9.pth
 - vgg13: https://download.pytorch.org/models/vgg13-c768596a.pth
 - vgg16: https://download.pytorch.org/models/vgg16-397923af.pth
 - vgg19: https://download.pytorch.org/models/vgg19-dcbb9e9d.pth
 - vgg11_bn: https://download.pytorch.org/models/vgg11_bn-6002323d.pth
 - vgg13_bn: https://download.pytorch.org/models/vgg13_bn-abd245e5.pth
 - vgg16_bn: https://download.pytorch.org/models/vgg16_bn-6c64b313.pth
 - vgg19_bn: https://download.pytorch.org/models/vgg19_bn-c79401a0.pth
 
Test
TorchSeg config.py modification
After TorchSeg is checked out, we need to modify all the config.py files and ensure all variables C.pretrained_model are specified to the RIGHT location and with the RIGHT names. In my case, I just downloaded all PyTorch models under the same directory as TorchSeg, therefore, all C.pretrained_model are designated as:
1  | C.pretrained_model = "./resnet18-5c106cde.pth"  | 
etc.
We also need to modify all variables C.dataset_path and make sure we are using the RIGHT dataset. In fact, ONLY two datasets are directly adopted in the originally checked-out code of TorchSeg.
Currently, it seems there is still some tricks about how to configure these datasets, please refer to my Github issue.