diff --git a/PyTorch/contrib/cv/semantic_segmentation/FCN8s/README.md b/PyTorch/contrib/cv/semantic_segmentation/FCN8s/README.md index 4b51fbc96758eaafc12317af51585737da03b621..6b68516debb2b577e2ddd314d798ac859815ab8e 100644 --- a/PyTorch/contrib/cv/semantic_segmentation/FCN8s/README.md +++ b/PyTorch/contrib/cv/semantic_segmentation/FCN8s/README.md @@ -104,7 +104,17 @@ FCN8s是一个经典的语义分割网络,FCN8s使用全卷积结构,可以 ```none ├── VOCdevkit │ │ ├── VOC2012 + | | │ │ ├── Annotations + | | │ │ ├── ImageSets + | | │ │ ├── JPEGImages + | | │ │ ├── SegmentationClass + | | │ │ ├── SegmentationObject │ │ ├── VOC2010 + | | │ │ ├── Annotations + | | │ │ ├── ImageSets + | | │ │ ├── JPEGImages + | | │ │ ├── SegmentationClass + | | │ │ ├── SegmentationObject ``` @@ -116,7 +126,17 @@ FCN8s是一个经典的语义分割网络,FCN8s使用全卷积结构,可以 ```none ├── VOCdevkit │ │ ├── VOC2012 + | | │ │ ├── Annotations + | | │ │ ├── ImageSets + | | │ │ ├── JPEGImages + | | │ │ ├── SegmentationClass + | | │ │ ├── SegmentationObject │ │ ├── VOC2010 + | | │ │ ├── Annotations + | | │ │ ├── ImageSets + | | │ │ ├── JPEGImages + | | │ │ ├── SegmentationClass + | | │ │ ├── SegmentationObject │ │ ├── VOCaug ``` 2. 数据预处理。 diff --git a/PyTorch/contrib/cv/semantic_segmentation/FCN8s/tools/train.py b/PyTorch/contrib/cv/semantic_segmentation/FCN8s/tools/train.py index 1f425457d23f99a82c7d71f7d3383792baa18596..6396d7434ed6971e06bcf1f5e13600002acbaca1 100644 --- a/PyTorch/contrib/cv/semantic_segmentation/FCN8s/tools/train.py +++ b/PyTorch/contrib/cv/semantic_segmentation/FCN8s/tools/train.py @@ -117,10 +117,11 @@ def parse_args(): def main(): + args = parse_args() os.environ['MASTER_ADDR'] = '127.0.0.1' # 可以使用当前真实ip或者'127.0.0.1' - os.environ['MASTER_PORT'] = '29688' # 随意一个可使用的port即可 + os.environ['MASTER_PORT'] = '29338' # 随意一个可使用的port即可 cfg = Config.fromfile(args.config) if args.options is not None: @@ -184,6 +185,8 @@ def main(): cfg.warm_up_epochs = args.warm_up_epochs # weik add end + + # create work_dir mmcv.mkdir_or_exist(osp.abspath(cfg.work_dir)) # dump config @@ -220,6 +223,7 @@ def main(): model = build_segmentor( cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg) + logger.info(model) datasets = [build_dataset(cfg.data.train)] @@ -237,6 +241,8 @@ def main(): PALETTE=datasets[0].PALETTE) # add an attribute for visualization convenience model.CLASSES = datasets[0].CLASSES + + train_segmentor( model, datasets,