基于paddleSeg的自定义遥感数据语义分割——以DLRSD为例

article/2025/8/18 4:04:17

转自AI Studio,原文链接:基于paddleSeg的自定义遥感数据语义分割——以DLRSD为例 - 飞桨AI Studio

  • 基于paddleseg 2.1
  • 使用自定义数据集DLRSD,其他遥感数据集
  • 实现训练、测试、推理
  • 脚本版任务

数据格式准备

DLRSD数据集

  • 基于UCMerced_LandUse数据集进行标注
  • 标注了17种类型的遥感地物类型
  • 图像尺寸256 * 256 * 3
  • 图像数21* 100 = 2100
  • gt格式,单通道8bit彩图,推荐使用PIL读取
  • DLRSD详细数据信息

数据展示: 

 

PaddleSeg数据格式

paddleSeg支持CityScapes、ADE20K、Pascal VOC、自定义等数据集格式,paddleseg数据集配置链接
 

本文使用的是自定义数据格式:

  • 数据存放在PaddleSeg/dataset/dlrsd文件夹下,
  • 影像、标注分别存储到image、gt下,
  • train、val、test等部分按txt分别存储
     

文件结构:

    custom_dataset||--images|  |--image1.jpg|  |--image2.jpg|  |--...||--labels|  |--label1.jpg|  |--label2.png|  |--...||--train.txt||--val.txt||--test.txt

txt内容格式

images/image1.jpg labels/label1.png
images/image2.jpg labels/label2.png
...

数据集配置文件可以参考设置如下:

train_dataset:type: Datasetdataset_root: custom_datasettrain_path: custom_dataset/train.txtnum_classes: 2transforms:- type: ResizeStepScalingmin_scale_factor: 0.5max_scale_factor: 2.0scale_step_size: 0.25- type: RandomPaddingCropcrop_size: [512, 512]- type: RandomHorizontalFlip- type: Normalizemode: train

项目准备

In [ ]

# paddleseg下载解压# 从gitee下载PaddleSeg
!git clone https://gitee.com/paddlepaddle/PaddleSeg.git# 进入PaddleSeg目录
%cd PaddleSeg
# 切换到release/2.1分支
!git checkout -b release/2.1 origin/release/2.1# 安装依赖
!pip install -r requirements.txt
fatal: destination path 'PaddleSeg' already exists and is not an empty directory.
/home/aistudio/PaddleSeg
fatal: Not a git repository (or any parent up to mount point /home/aistudio)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: pre-commit in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r requirements.txt (line 1)) (1.21.0)
Requirement already satisfied: yapf==0.26.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r requirements.txt (line 2)) (0.26.0)
Requirement already satisfied: flake8 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r requirements.txt (line 3)) (4.0.1)
Requirement already satisfied: pyyaml>=5.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r requirements.txt (line 4)) (5.1.2)
Requirement already satisfied: visualdl>=2.0.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r requirements.txt (line 5)) (2.2.0)
Requirement already satisfied: opencv-python in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r requirements.txt (line 6)) (4.1.1.26)
Requirement already satisfied: tqdm in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r requirements.txt (line 7)) (4.36.1)
Requirement already satisfied: filelock in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r requirements.txt (line 8)) (3.0.12)
Requirement already satisfied: scipy in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r requirements.txt (line 9)) (1.6.3)
Requirement already satisfied: prettytable in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from -r requirements.txt (line 10)) (0.7.2)
Requirement already satisfied: six in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pre-commit->-r requirements.txt (line 1)) (1.16.0)
Requirement already satisfied: toml in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pre-commit->-r requirements.txt (line 1)) (0.10.0)
Requirement already satisfied: nodeenv>=0.11.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pre-commit->-r requirements.txt (line 1)) (1.3.4)
Requirement already satisfied: virtualenv>=15.2 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pre-commit->-r requirements.txt (line 1)) (16.7.9)
Requirement already satisfied: identify>=1.0.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pre-commit->-r requirements.txt (line 1)) (1.4.10)
Requirement already satisfied: importlib-metadata in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pre-commit->-r requirements.txt (line 1)) (4.2.0)
Requirement already satisfied: cfgv>=2.0.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pre-commit->-r requirements.txt (line 1)) (2.0.1)
Requirement already satisfied: aspy.yaml in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pre-commit->-r requirements.txt (line 1)) (1.3.0)
Requirement already satisfied: pycodestyle<2.9.0,>=2.8.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flake8->-r requirements.txt (line 3)) (2.8.0)
Requirement already satisfied: mccabe<0.7.0,>=0.6.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flake8->-r requirements.txt (line 3)) (0.6.1)
Requirement already satisfied: pyflakes<2.5.0,>=2.4.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flake8->-r requirements.txt (line 3)) (2.4.0)
Requirement already satisfied: flask>=1.1.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.0.0->-r requirements.txt (line 5)) (1.1.1)
Requirement already satisfied: requests in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.0.0->-r requirements.txt (line 5)) (2.27.1)
Requirement already satisfied: shellcheck-py in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.0.0->-r requirements.txt (line 5)) (0.7.1.1)
Requirement already satisfied: bce-python-sdk in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.0.0->-r requirements.txt (line 5)) (0.8.53)
Requirement already satisfied: protobuf>=3.11.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.0.0->-r requirements.txt (line 5)) (3.14.0)
Requirement already satisfied: Flask-Babel>=1.0.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.0.0->-r requirements.txt (line 5)) (1.0.0)
Requirement already satisfied: numpy in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.0.0->-r requirements.txt (line 5)) (1.20.3)
Requirement already satisfied: matplotlib in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.0.0->-r requirements.txt (line 5)) (2.2.3)
Requirement already satisfied: Pillow>=7.0.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.0.0->-r requirements.txt (line 5)) (7.1.2)
Requirement already satisfied: pandas in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl>=2.0.0->-r requirements.txt (line 5)) (1.1.5)
Requirement already satisfied: Werkzeug>=0.15 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flask>=1.1.1->visualdl>=2.0.0->-r requirements.txt (line 5)) (0.16.0)
Requirement already satisfied: itsdangerous>=0.24 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flask>=1.1.1->visualdl>=2.0.0->-r requirements.txt (line 5)) (1.1.0)
Requirement already satisfied: Jinja2>=2.10.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flask>=1.1.1->visualdl>=2.0.0->-r requirements.txt (line 5)) (3.0.0)
Requirement already satisfied: click>=5.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flask>=1.1.1->visualdl>=2.0.0->-r requirements.txt (line 5)) (7.0)
Requirement already satisfied: pytz in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from Flask-Babel>=1.0.0->visualdl>=2.0.0->-r requirements.txt (line 5)) (2022.1)
Requirement already satisfied: Babel>=2.3 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from Flask-Babel>=1.0.0->visualdl>=2.0.0->-r requirements.txt (line 5)) (2.9.1)
Requirement already satisfied: typing-extensions>=3.6.4 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from importlib-metadata->pre-commit->-r requirements.txt (line 1)) (4.1.1)
Requirement already satisfied: zipp>=0.5 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from importlib-metadata->pre-commit->-r requirements.txt (line 1)) (3.7.0)
Requirement already satisfied: pycryptodome>=3.8.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from bce-python-sdk->visualdl>=2.0.0->-r requirements.txt (line 5)) (3.9.9)
Requirement already satisfied: future>=0.6.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from bce-python-sdk->visualdl>=2.0.0->-r requirements.txt (line 5)) (0.18.0)
Requirement already satisfied: python-dateutil>=2.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from matplotlib->visualdl>=2.0.0->-r requirements.txt (line 5)) (2.8.2)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from matplotlib->visualdl>=2.0.0->-r requirements.txt (line 5)) (3.0.7)
Requirement already satisfied: cycler>=0.10 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from matplotlib->visualdl>=2.0.0->-r requirements.txt (line 5)) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from matplotlib->visualdl>=2.0.0->-r requirements.txt (line 5)) (1.1.0)
Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from requests->visualdl>=2.0.0->-r requirements.txt (line 5)) (2021.10.8)
Requirement already satisfied: idna<4,>=2.5 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from requests->visualdl>=2.0.0->-r requirements.txt (line 5)) (3.3)
Requirement already satisfied: charset-normalizer~=2.0.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from requests->visualdl>=2.0.0->-r requirements.txt (line 5)) (2.0.12)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from requests->visualdl>=2.0.0->-r requirements.txt (line 5)) (1.26.9)
Requirement already satisfied: MarkupSafe>=2.0.0rc2 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from Jinja2>=2.10.1->flask>=1.1.1->visualdl>=2.0.0->-r requirements.txt (line 5)) (2.0.1)
Requirement already satisfied: setuptools in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from kiwisolver>=1.0.1->matplotlib->visualdl>=2.0.0->-r requirements.txt (line 5)) (56.2.0)

预修改的文件:

为正常运行网络模型,本项目已对以下文件进行修改,详情查看代码

  • PaddleSeg/configs/base/dlrsd.yml——(数据集配置文件)
  • PaddleSeg/configs/unet/unet_dlrds.yml——(模型配置文件)
  • PaddleSeg/ocrnet_dlrsd.yml——(ocrnet模型配置文件)
  • work/img_copy.py——(文件拷贝代码)
  • work/data_split.py——(数据划分代码)
  • PaddleSeg/predict.py——(增加tif读取)

数据准备

In [ ]

# 文件解压
!unzip -oq /home/aistudio/data/data55005/UCMerced_LandUse.zip -d /home/aistudio/data/image
!unzip -oq /home/aistudio/data/data55005/DLRSD.zip  -d /home/aistudio/data/gt_color

In [ ]

# 数据预处理,将文件组织自定义数据集格式
# image copy
!python /home/aistudio/work/img_copy.py /home/aistudio/data/image/UCMerced_LandUse/Images /home/aistudio/PaddleSeg/dataset/dlrsd/image
# gt copy
!python /home/aistudio/work/img_copy.py /home/aistudio/data/gt_color/DLRSD/Images /home/aistudio/PaddleSeg/dataset/dlrsd/gt
# dataset split
!python /home/aistudio/work/data_split.py 0.8 0.2 0 /home/aistudio/PaddleSeg/dataset/dlrsd/image /home/aistudio/PaddleSeg/dataset/dlrsd/gt
copy from /home/aistudio/data/image/UCMerced_LandUse/Images to /home/aistudio/PaddleSeg/dataset/dlrsd/image:
agricultural finish
airplane finish
tenniscourt finish
chaparral finish
freeway finish
parkinglot finish
mobilehomepark finish
buildings finish
sparseresidential finish
baseballdiamond finish
runway finish
denseresidential finish
beach finish
storagetanks finish
river finish
forest finish
overpass finish
golfcourse finish
harbor finish
intersection finish
mediumresidential finish
copy from /home/aistudio/data/gt_color/DLRSD/Images to /home/aistudio/PaddleSeg/dataset/dlrsd/gt:
agricultural finish
airplane finish
tenniscourt finish
chaparral finish
freeway finish
parkinglot finish
mobilehomepark finish
buildings finish
sparseresidential finish
baseballdiamond finish
runway finish
denseresidential finish
beach finish
storagetanks finish
river finish
forest finish
overpass finish
golfcourse finish
harbor finish
intersection finish
mediumresidential finish
total 2100, split: train 1680 - 0.80 rate, val 420 - 0.20 rate, test 0 - 0.00 rate

模型训练

参考paddleSeg

In [8]

# 模型训练, 其他超参数可参考paddleSeg,对unet_dlrds.yml进行修改
# unet_dlrds.yml中的参数会覆盖dlrsd.yml中的参数,修改参数时,可以直接在unet_dlrds.yml中添加参数
# !python train.py \
#        --config configs/unet/unet_dlrsd.yml \
#        --do_eval \
#        --use_vdl \
#        --save_interval 100 \
#        --save_dir output# 使用精度更高的ocrnet进行训练, 可以尝试10000以上iter进行训练,得到更高精度
!python train.py \--batch_size 32 \--iters 1000 \--config ocrnet_dlrsd.yml \--do_eval \--use_vdl \--save_interval 100 \--save_dir output
2022-04-14 12:18:35 [INFO]	
------------Environment Information-------------
platform: Linux-4.13.0-36-generic-x86_64-with-debian-stretch-sid
Python: 3.7.4 (default, Aug 13 2019, 20:35:49) [GCC 7.3.0]
Paddle compiled with cuda: True
NVCC: Cuda compilation tools, release 10.1, V10.1.243
cudnn: 7.6
GPUs used: 1
CUDA_VISIBLE_DEVICES: None
GPU: ['GPU 0: Tesla V100-SXM2-16GB']
GCC: gcc (Ubuntu 7.5.0-3ubuntu1~16.04) 7.5.0
PaddlePaddle: 2.1.2
OpenCV: 4.1.1
------------------------------------------------
2022-04-14 12:18:35 [INFO]	
---------------Config Information---------------
batch_size: 32
iters: 1000
loss:coef:- 1- 0.4types:- ignore_index: 255type: CrossEntropyLoss- ignore_index: 255type: CrossEntropyLoss
lr_scheduler:end_lr: 0learning_rate: 0.01power: 0.9type: PolynomialDecay
model:backbone:pretrained: https://bj.bcebos.com/paddleseg/dygraph/hrnet_w18_ssld.tar.gztype: HRNet_W18backbone_indices:- 0num_classes: 18type: OCRNet
optimizer:momentum: 0.9type: sgdweight_decay: 4.0e-05
train_dataset:dataset_root: dataset/dlrsdmode: trainnum_classes: 18train_path: dataset/dlrsd/train.txttransforms:- max_scale_factor: 2.0min_scale_factor: 0.5scale_step_size: 0.25type: ResizeStepScaling- crop_size:- 256- 256type: RandomPaddingCrop- type: RandomHorizontalFlip- type: Normalizetype: Dataset
val_dataset:dataset_root: dataset/dlrsdmode: valnum_classes: 18transforms:- type: Normalize- target_size:- 256- 256type: Resizetype: Datasetval_path: dataset/dlrsd/val.txt
------------------------------------------------
W0414 12:18:35.587487   602 device_context.cc:404] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 11.0, Runtime API Version: 10.1
W0414 12:18:35.587553   602 device_context.cc:422] device: 0, cuDNN Version: 7.6.
2022-04-14 12:18:39 [INFO]	Loading pretrained model from https://bj.bcebos.com/paddleseg/dygraph/hrnet_w18_ssld.tar.gz
2022-04-14 12:18:40 [INFO]	There are 1525/1525 variables loaded into HRNet.
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/framework.py:706: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecationselif dtype == np.bool:
2022-04-14 12:18:47 [INFO]	[TRAIN] epoch: 1, iter: 10/1000, loss: 3.4345, lr: 0.009919, batch_cost: 0.6647, reader_cost: 0.03684, ips: 48.1407 samples/sec | ETA 00:10:58
2022-04-14 12:18:53 [INFO]	[TRAIN] epoch: 1, iter: 20/1000, loss: 2.7537, lr: 0.009829, batch_cost: 0.6197, reader_cost: 0.00049, ips: 51.6372 samples/sec | ETA 00:10:07
2022-04-14 12:18:59 [INFO]	[TRAIN] epoch: 1, iter: 30/1000, loss: 2.4857, lr: 0.009739, batch_cost: 0.5961, reader_cost: 0.00085, ips: 53.6849 samples/sec | ETA 00:09:38
2022-04-14 12:19:05 [INFO]	[TRAIN] epoch: 1, iter: 40/1000, loss: 2.2253, lr: 0.009648, batch_cost: 0.6049, reader_cost: 0.00106, ips: 52.8983 samples/sec | ETA 00:09:40
2022-04-14 12:19:11 [INFO]	[TRAIN] epoch: 1, iter: 50/1000, loss: 1.9626, lr: 0.009558, batch_cost: 0.5984, reader_cost: 0.00085, ips: 53.4791 samples/sec | ETA 00:09:28
2022-04-14 12:19:17 [INFO]	[TRAIN] epoch: 2, iter: 60/1000, loss: 1.8616, lr: 0.009467, batch_cost: 0.6030, reader_cost: 0.01686, ips: 53.0698 samples/sec | ETA 00:09:26
2022-04-14 12:19:23 [INFO]	[TRAIN] epoch: 2, iter: 70/1000, loss: 1.7680, lr: 0.009377, batch_cost: 0.5849, reader_cost: 0.00077, ips: 54.7057 samples/sec | ETA 00:09:04
2022-04-14 12:19:28 [INFO]	[TRAIN] epoch: 2, iter: 80/1000, loss: 1.6116, lr: 0.009286, batch_cost: 0.5890, reader_cost: 0.00095, ips: 54.3256 samples/sec | ETA 00:09:01
2022-04-14 12:19:35 [INFO]	[TRAIN] epoch: 2, iter: 90/1000, loss: 1.5829, lr: 0.009195, batch_cost: 0.6182, reader_cost: 0.00047, ips: 51.7606 samples/sec | ETA 00:09:22
2022-04-14 12:19:41 [INFO]	[TRAIN] epoch: 2, iter: 100/1000, loss: 1.5083, lr: 0.009104, batch_cost: 0.5941, reader_cost: 0.00166, ips: 53.8610 samples/sec | ETA 00:08:54
2022-04-14 12:19:41 [INFO]	Start evaluating (total_samples: 420, total_iters: 420)...
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dygraph/math_op_patch.py:239: UserWarning: The dtype of left and right variables are not the same, left dtype is paddle.int32, but right dtype is paddle.bool, the right dtype will convert to paddle.int32format(lhs_dtype, rhs_dtype, lhs_dtype))
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dygraph/math_op_patch.py:239: UserWarning: The dtype of left and right variables are not the same, left dtype is paddle.int64, but right dtype is paddle.bool, the right dtype will convert to paddle.int64format(lhs_dtype, rhs_dtype, lhs_dtype))
420/420 [==============================] - 60s 142ms/step - batch_cost: 0.1419 - reader cost: 3.9444e-
2022-04-14 12:20:40 [INFO]	[EVAL] #Images: 420 mIoU: 0.3062 Acc: 0.6152 Kappa: 0.5491 
2022-04-14 12:20:40 [INFO]	[EVAL] Class IoU: 
[0.     0.     0.2566 0.1382 0.4141 0.4006 0.3423 0.     0.9608 0.42010.0166 0.6178 0.2826 0.5871 0.15   0.     0.6299 0.294 ]
2022-04-14 12:20:40 [INFO]	[EVAL] Class Acc: 
[0.     0.     0.4912 0.9435 0.4735 0.4704 0.3853 0.     1.     0.88080.086  0.6741 0.5215 0.85   0.1504 0.     0.6799 0.3236]
2022-04-14 12:20:41 [INFO]	[EVAL] The model with the best validation mIoU (0.3062) was saved at iter 100.
2022-04-14 12:20:47 [INFO]	[TRAIN] epoch: 3, iter: 110/1000, loss: 1.3279, lr: 0.009013, batch_cost: 0.5924, reader_cost: 0.01635, ips: 54.0138 samples/sec | ETA 00:08:47
2022-04-14 12:20:53 [INFO]	[TRAIN] epoch: 3, iter: 120/1000, loss: 1.2831, lr: 0.008922, batch_cost: 0.5966, reader_cost: 0.00139, ips: 53.6371 samples/sec | ETA 00:08:45
2022-04-14 12:20:59 [INFO]	[TRAIN] epoch: 3, iter: 130/1000, loss: 1.1546, lr: 0.008831, batch_cost: 0.6096, reader_cost: 0.00082, ips: 52.4938 samples/sec | ETA 00:08:50
2022-04-14 12:21:05 [INFO]	[TRAIN] epoch: 3, iter: 140/1000, loss: 1.2061, lr: 0.008740, batch_cost: 0.5993, reader_cost: 0.00117, ips: 53.3943 samples/sec | ETA 00:08:35
2022-04-14 12:21:11 [INFO]	[TRAIN] epoch: 3, iter: 150/1000, loss: 1.0794, lr: 0.008648, batch_cost: 0.5980, reader_cost: 0.00177, ips: 53.5158 samples/sec | ETA 00:08:28
2022-04-14 12:21:17 [INFO]	[TRAIN] epoch: 4, iter: 160/1000, loss: 1.0784, lr: 0.008557, batch_cost: 0.5858, reader_cost: 0.01779, ips: 54.6240 samples/sec | ETA 00:08:12
2022-04-14 12:21:23 [INFO]	[TRAIN] epoch: 4, iter: 170/1000, loss: 1.0746, lr: 0.008465, batch_cost: 0.5943, reader_cost: 0.00015, ips: 53.8473 samples/sec | ETA 00:08:13
2022-04-14 12:21:29 [INFO]	[TRAIN] epoch: 4, iter: 180/1000, loss: 1.0160, lr: 0.008374, batch_cost: 0.5921, reader_cost: 0.00016, ips: 54.0444 samples/sec | ETA 00:08:05
2022-04-14 12:21:35 [INFO]	[TRAIN] epoch: 4, iter: 190/1000, loss: 1.1226, lr: 0.008282, batch_cost: 0.5955, reader_cost: 0.00195, ips: 53.7374 samples/sec | ETA 00:08:02
2022-04-14 12:21:41 [INFO]	[TRAIN] epoch: 4, iter: 200/1000, loss: 1.1066, lr: 0.008190, batch_cost: 0.6310, reader_cost: 0.00169, ips: 50.7141 samples/sec | ETA 00:08:24
2022-04-14 12:21:41 [INFO]	Start evaluating (total_samples: 420, total_iters: 420)...
420/420 [==============================] - 61s 144ms/step - batch_cost: 0.1440 - reader cost: 4.2161e-0
2022-04-14 12:22:41 [INFO]	[EVAL] #Images: 420 mIoU: 0.5294 Acc: 0.7634 Kappa: 0.7237 
2022-04-14 12:22:41 [INFO]	[EVAL] Class IoU: 
[0.     0.4053 0.4327 0.627  0.599  0.0673 0.7334 0.     0.9533 0.53890.5181 0.7464 0.4466 0.8169 0.552  0.6634 0.69   0.7388]
2022-04-14 12:22:41 [INFO]	[EVAL] Class Acc: 
[0.     0.6584 0.5536 0.7176 0.7343 0.8204 0.7856 0.     0.9868 0.68250.7245 0.8834 0.8107 0.9022 0.5718 0.8478 0.7959 0.9131]
2022-04-14 12:22:42 [INFO]	[EVAL] The model with the best validation mIoU (0.5294) was saved at iter 200.
2022-04-14 12:22:48 [INFO]	[TRAIN] epoch: 5, iter: 210/1000, loss: 1.0923, lr: 0.008098, batch_cost: 0.5964, reader_cost: 0.01708, ips: 53.6531 samples/sec | ETA 00:07:51
2022-04-14 12:22:54 [INFO]	[TRAIN] epoch: 5, iter: 220/1000, loss: 1.0190, lr: 0.008005, batch_cost: 0.6013, reader_cost: 0.00018, ips: 53.2211 samples/sec | ETA 00:07:48
2022-04-14 12:23:00 [INFO]	[TRAIN] epoch: 5, iter: 230/1000, loss: 1.0221, lr: 0.007913, batch_cost: 0.5972, reader_cost: 0.00066, ips: 53.5837 samples/sec | ETA 00:07:39
2022-04-14 12:23:06 [INFO]	[TRAIN] epoch: 5, iter: 240/1000, loss: 0.9766, lr: 0.007821, batch_cost: 0.6007, reader_cost: 0.00062, ips: 53.2710 samples/sec | ETA 00:07:36
2022-04-14 12:23:12 [INFO]	[TRAIN] epoch: 5, iter: 250/1000, loss: 0.8989, lr: 0.007728, batch_cost: 0.6137, reader_cost: 0.00145, ips: 52.1419 samples/sec | ETA 00:07:40
2022-04-14 12:23:18 [INFO]	[TRAIN] epoch: 5, iter: 260/1000, loss: 0.9029, lr: 0.007635, batch_cost: 0.5650, reader_cost: 0.00090, ips: 56.6328 samples/sec | ETA 00:06:58
2022-04-14 12:23:24 [INFO]	[TRAIN] epoch: 6, iter: 270/1000, loss: 0.8537, lr: 0.007543, batch_cost: 0.6184, reader_cost: 0.01685, ips: 51.7439 samples/sec | ETA 00:07:31
2022-04-14 12:23:30 [INFO]	[TRAIN] epoch: 6, iter: 280/1000, loss: 0.8544, lr: 0.007450, batch_cost: 0.5992, reader_cost: 0.00116, ips: 53.4018 samples/sec | ETA 00:07:11
2022-04-14 12:23:36 [INFO]	[TRAIN] epoch: 6, iter: 290/1000, loss: 0.8475, lr: 0.007357, batch_cost: 0.5923, reader_cost: 0.00041, ips: 54.0301 samples/sec | ETA 00:07:00
2022-04-14 12:23:42 [INFO]	[TRAIN] epoch: 6, iter: 300/1000, loss: 0.7936, lr: 0.007264, batch_cost: 0.6050, reader_cost: 0.00058, ips: 52.8951 samples/sec | ETA 00:07:03
2022-04-14 12:23:42 [INFO]	Start evaluating (total_samples: 420, total_iters: 420)...
420/420 [==============================] - 60s 144ms/step - batch_cost: 0.1435 - reader cost: 4.1186e-0
2022-04-14 12:24:42 [INFO]	[EVAL] #Images: 420 mIoU: 0.5801 Acc: 0.7912 Kappa: 0.7568 
2022-04-14 12:24:42 [INFO]	[EVAL] Class IoU: 
[0.     0.5324 0.4741 0.626  0.6086 0.5252 0.7589 0.007  0.9623 0.58030.491  0.7786 0.5816 0.9076 0.5717 0.616  0.6964 0.7239]
2022-04-14 12:24:42 [INFO]	[EVAL] Class Acc: 
[0.     0.6716 0.7091 0.8305 0.8657 0.7009 0.8022 0.9908 0.9958 0.71050.5133 0.8871 0.7654 0.9173 0.6074 0.6626 0.7855 0.9062]
2022-04-14 12:24:43 [INFO]	[EVAL] The model with the best validation mIoU (0.5801) was saved at iter 300.
2022-04-14 12:24:49 [INFO]	[TRAIN] epoch: 6, iter: 310/1000, loss: 0.8334, lr: 0.007170, batch_cost: 0.6216, reader_cost: 0.00088, ips: 51.4776 samples/sec | ETA 00:07:08
2022-04-14 12:24:55 [INFO]	[TRAIN] epoch: 7, iter: 320/1000, loss: 0.8206, lr: 0.007077, batch_cost: 0.6054, reader_cost: 0.01669, ips: 52.8564 samples/sec | ETA 00:06:51
2022-04-14 12:25:02 [INFO]	[TRAIN] epoch: 7, iter: 330/1000, loss: 0.7791, lr: 0.006983, batch_cost: 0.6115, reader_cost: 0.00038, ips: 52.3275 samples/sec | ETA 00:06:49
2022-04-14 12:25:08 [INFO]	[TRAIN] epoch: 7, iter: 340/1000, loss: 0.7893, lr: 0.006889, batch_cost: 0.5994, reader_cost: 0.00075, ips: 53.3874 samples/sec | ETA 00:06:35
2022-04-14 12:25:14 [INFO]	[TRAIN] epoch: 7, iter: 350/1000, loss: 0.7701, lr: 0.006796, batch_cost: 0.5998, reader_cost: 0.00048, ips: 53.3533 samples/sec | ETA 00:06:29
2022-04-14 12:25:19 [INFO]	[TRAIN] epoch: 7, iter: 360/1000, loss: 0.7948, lr: 0.006702, batch_cost: 0.5912, reader_cost: 0.00020, ips: 54.1302 samples/sec | ETA 00:06:18
2022-04-14 12:25:25 [INFO]	[TRAIN] epoch: 8, iter: 370/1000, loss: 0.7359, lr: 0.006607, batch_cost: 0.5961, reader_cost: 0.01591, ips: 53.6839 samples/sec | ETA 00:06:15
2022-04-14 12:25:31 [INFO]	[TRAIN] epoch: 8, iter: 380/1000, loss: 0.7732, lr: 0.006513, batch_cost: 0.5958, reader_cost: 0.00133, ips: 53.7118 samples/sec | ETA 00:06:09
2022-04-14 12:25:37 [INFO]	[TRAIN] epoch: 8, iter: 390/1000, loss: 0.7243, lr: 0.006419, batch_cost: 0.6008, reader_cost: 0.00178, ips: 53.2630 samples/sec | ETA 00:06:06
2022-04-14 12:25:43 [INFO]	[TRAIN] epoch: 8, iter: 400/1000, loss: 0.7617, lr: 0.006324, batch_cost: 0.5974, reader_cost: 0.00041, ips: 53.5635 samples/sec | ETA 00:05:58
2022-04-14 12:25:43 [INFO]	Start evaluating (total_samples: 420, total_iters: 420)...
420/420 [==============================] - 60s 142ms/step - batch_cost: 0.1421 - reader cost: 3.9464e-0
2022-04-14 12:26:43 [INFO]	[EVAL] #Images: 420 mIoU: 0.6354 Acc: 0.8046 Kappa: 0.7733 
2022-04-14 12:26:43 [INFO]	[EVAL] Class IoU: 
[0.     0.5345 0.4958 0.6375 0.6488 0.5401 0.7947 0.4412 0.9566 0.60510.5929 0.7681 0.6005 0.932  0.6718 0.6875 0.7183 0.812 ]
2022-04-14 12:26:43 [INFO]	[EVAL] Class Acc: 
[0.     0.6217 0.6435 0.6767 0.799  0.7619 0.8421 0.7266 0.9952 0.77530.7934 0.917  0.7802 0.9715 0.7451 0.7686 0.8394 0.8891]
2022-04-14 12:26:44 [INFO]	[EVAL] The model with the best validation mIoU (0.6354) was saved at iter 400.
2022-04-14 12:26:50 [INFO]	[TRAIN] epoch: 8, iter: 410/1000, loss: 0.7373, lr: 0.006229, batch_cost: 0.5961, reader_cost: 0.00151, ips: 53.6830 samples/sec | ETA 00:05:51
2022-04-14 12:26:56 [INFO]	[TRAIN] epoch: 9, iter: 420/1000, loss: 0.6996, lr: 0.006134, batch_cost: 0.6003, reader_cost: 0.01966, ips: 53.3080 samples/sec | ETA 00:05:48
2022-04-14 12:27:02 [INFO]	[TRAIN] epoch: 9, iter: 430/1000, loss: 0.7439, lr: 0.006039, batch_cost: 0.6062, reader_cost: 0.00026, ips: 52.7906 samples/sec | ETA 00:05:45
2022-04-14 12:27:08 [INFO]	[TRAIN] epoch: 9, iter: 440/1000, loss: 0.8381, lr: 0.005944, batch_cost: 0.5920, reader_cost: 0.00020, ips: 54.0508 samples/sec | ETA 00:05:31
2022-04-14 12:27:14 [INFO]	[TRAIN] epoch: 9, iter: 450/1000, loss: 0.7520, lr: 0.005848, batch_cost: 0.5970, reader_cost: 0.00065, ips: 53.6005 samples/sec | ETA 00:05:28
2022-04-14 12:27:20 [INFO]	[TRAIN] epoch: 9, iter: 460/1000, loss: 0.8414, lr: 0.005753, batch_cost: 0.6021, reader_cost: 0.00129, ips: 53.1469 samples/sec | ETA 00:05:25
2022-04-14 12:27:26 [INFO]	[TRAIN] epoch: 10, iter: 470/1000, loss: 0.8407, lr: 0.005657, batch_cost: 0.5878, reader_cost: 0.01533, ips: 54.4415 samples/sec | ETA 00:05:11
2022-04-14 12:27:32 [INFO]	[TRAIN] epoch: 10, iter: 480/1000, loss: 0.7766, lr: 0.005561, batch_cost: 0.5939, reader_cost: 0.00088, ips: 53.8809 samples/sec | ETA 00:05:08
2022-04-14 12:27:38 [INFO]	[TRAIN] epoch: 10, iter: 490/1000, loss: 0.6825, lr: 0.005465, batch_cost: 0.6033, reader_cost: 0.00082, ips: 53.0438 samples/sec | ETA 00:05:07
2022-04-14 12:27:44 [INFO]	[TRAIN] epoch: 10, iter: 500/1000, loss: 0.6993, lr: 0.005369, batch_cost: 0.5977, reader_cost: 0.00220, ips: 53.5385 samples/sec | ETA 00:04:58
2022-04-14 12:27:44 [INFO]	Start evaluating (total_samples: 420, total_iters: 420)...
420/420 [==============================] - 60s 143ms/step - batch_cost: 0.1428 - reader cost: 4.3921e-
2022-04-14 12:28:44 [INFO]	[EVAL] #Images: 420 mIoU: 0.6433 Acc: 0.8158 Kappa: 0.7854 
2022-04-14 12:28:44 [INFO]	[EVAL] Class IoU: 
[0.     0.5429 0.4983 0.6943 0.6581 0.5558 0.8024 0.4723 0.9608 0.60450.5682 0.7844 0.6218 0.9213 0.6765 0.666  0.7303 0.8215]
2022-04-14 12:28:44 [INFO]	[EVAL] Class Acc: 
[0.     0.5851 0.7199 0.7802 0.8013 0.7535 0.8533 0.7028 0.9982 0.74340.768  0.898  0.7861 0.9472 0.7861 0.7684 0.8051 0.9003]
2022-04-14 12:28:45 [INFO]	[EVAL] The model with the best validation mIoU (0.6433) was saved at iter 500.
2022-04-14 12:28:51 [INFO]	[TRAIN] epoch: 10, iter: 510/1000, loss: 0.7007, lr: 0.005272, batch_cost: 0.6111, reader_cost: 0.00197, ips: 52.3652 samples/sec | ETA 00:04:59
2022-04-14 12:28:56 [INFO]	[TRAIN] epoch: 10, iter: 520/1000, loss: 0.6916, lr: 0.005175, batch_cost: 0.5682, reader_cost: 0.00144, ips: 56.3156 samples/sec | ETA 00:04:32
2022-04-14 12:29:03 [INFO]	[TRAIN] epoch: 11, iter: 530/1000, loss: 0.6765, lr: 0.005078, batch_cost: 0.6610, reader_cost: 0.01684, ips: 48.4102 samples/sec | ETA 00:05:10
2022-04-14 12:29:09 [INFO]	[TRAIN] epoch: 11, iter: 540/1000, loss: 0.7006, lr: 0.004981, batch_cost: 0.6011, reader_cost: 0.00060, ips: 53.2397 samples/sec | ETA 00:04:36
2022-04-14 12:29:15 [INFO]	[TRAIN] epoch: 11, iter: 550/1000, loss: 0.6693, lr: 0.004884, batch_cost: 0.5991, reader_cost: 0.00319, ips: 53.4166 samples/sec | ETA 00:04:29
2022-04-14 12:29:21 [INFO]	[TRAIN] epoch: 11, iter: 560/1000, loss: 0.6371, lr: 0.004786, batch_cost: 0.6081, reader_cost: 0.00075, ips: 52.6256 samples/sec | ETA 00:04:27
2022-04-14 12:29:27 [INFO]	[TRAIN] epoch: 11, iter: 570/1000, loss: 0.6714, lr: 0.004688, batch_cost: 0.5879, reader_cost: 0.00069, ips: 54.4316 samples/sec | ETA 00:04:12
2022-04-14 12:29:33 [INFO]	[TRAIN] epoch: 12, iter: 580/1000, loss: 0.6552, lr: 0.004590, batch_cost: 0.5979, reader_cost: 0.01576, ips: 53.5168 samples/sec | ETA 00:04:11
2022-04-14 12:29:39 [INFO]	[TRAIN] epoch: 12, iter: 590/1000, loss: 0.7032, lr: 0.004492, batch_cost: 0.5926, reader_cost: 0.00015, ips: 53.9954 samples/sec | ETA 00:04:02
2022-04-14 12:29:45 [INFO]	[TRAIN] epoch: 12, iter: 600/1000, loss: 0.6684, lr: 0.004394, batch_cost: 0.5981, reader_cost: 0.00088, ips: 53.5068 samples/sec | ETA 00:03:59
2022-04-14 12:29:45 [INFO]	Start evaluating (total_samples: 420, total_iters: 420)...
420/420 [==============================] - 60s 142ms/step - batch_cost: 0.1415 - reader cost: 4.0659e-0
2022-04-14 12:30:44 [INFO]	[EVAL] #Images: 420 mIoU: 0.6476 Acc: 0.8181 Kappa: 0.7884 
2022-04-14 12:30:44 [INFO]	[EVAL] Class IoU: 
[0.     0.5753 0.5149 0.6874 0.6624 0.5632 0.8085 0.4147 0.9513 0.61580.6408 0.7854 0.6181 0.9192 0.6675 0.6941 0.7279 0.8105]
2022-04-14 12:30:44 [INFO]	[EVAL] Class Acc: 
[0.     0.7804 0.685  0.7804 0.806  0.7368 0.8634 0.8568 0.989  0.74410.7843 0.9157 0.8449 0.9835 0.7029 0.7389 0.8188 0.874 ]
2022-04-14 12:30:45 [INFO]	[EVAL] The model with the best validation mIoU (0.6476) was saved at iter 600.
2022-04-14 12:30:51 [INFO]	[TRAIN] epoch: 12, iter: 610/1000, loss: 0.6927, lr: 0.004295, batch_cost: 0.6133, reader_cost: 0.00106, ips: 52.1739 samples/sec | ETA 00:03:59
2022-04-14 12:30:57 [INFO]	[TRAIN] epoch: 12, iter: 620/1000, loss: 0.6416, lr: 0.004196, batch_cost: 0.5878, reader_cost: 0.00156, ips: 54.4372 samples/sec | ETA 00:03:43
2022-04-14 12:31:03 [INFO]	[TRAIN] epoch: 13, iter: 630/1000, loss: 0.6696, lr: 0.004097, batch_cost: 0.5937, reader_cost: 0.01762, ips: 53.9003 samples/sec | ETA 00:03:39
2022-04-14 12:31:10 [INFO]	[TRAIN] epoch: 13, iter: 640/1000, loss: 0.6738, lr: 0.003997, batch_cost: 0.6349, reader_cost: 0.00130, ips: 50.4020 samples/sec | ETA 00:03:48
2022-04-14 12:31:16 [INFO]	[TRAIN] epoch: 13, iter: 650/1000, loss: 0.6204, lr: 0.003897, batch_cost: 0.5997, reader_cost: 0.00070, ips: 53.3608 samples/sec | ETA 00:03:29
2022-04-14 12:31:22 [INFO]	[TRAIN] epoch: 13, iter: 660/1000, loss: 0.5943, lr: 0.003797, batch_cost: 0.5970, reader_cost: 0.00115, ips: 53.6006 samples/sec | ETA 00:03:22
2022-04-14 12:31:28 [INFO]	[TRAIN] epoch: 13, iter: 670/1000, loss: 0.6692, lr: 0.003697, batch_cost: 0.5999, reader_cost: 0.00095, ips: 53.3394 samples/sec | ETA 00:03:17
2022-04-14 12:31:33 [INFO]	[TRAIN] epoch: 14, iter: 680/1000, loss: 0.6299, lr: 0.003596, batch_cost: 0.5912, reader_cost: 0.01579, ips: 54.1238 samples/sec | ETA 00:03:09
2022-04-14 12:31:40 [INFO]	[TRAIN] epoch: 14, iter: 690/1000, loss: 0.6693, lr: 0.003495, batch_cost: 0.6100, reader_cost: 0.00082, ips: 52.4570 samples/sec | ETA 00:03:09
2022-04-14 12:31:46 [INFO]	[TRAIN] epoch: 14, iter: 700/1000, loss: 0.6149, lr: 0.003394, batch_cost: 0.5998, reader_cost: 0.00157, ips: 53.3538 samples/sec | ETA 00:02:59
2022-04-14 12:31:46 [INFO]	Start evaluating (total_samples: 420, total_iters: 420)...
420/420 [==============================] - 60s 143ms/step - batch_cost: 0.1428 - reader cost: 4.3040e-0
2022-04-14 12:32:46 [INFO]	[EVAL] #Images: 420 mIoU: 0.6746 Acc: 0.8354 Kappa: 0.8078 
2022-04-14 12:32:46 [INFO]	[EVAL] Class IoU: 
[0.     0.5989 0.5554 0.7251 0.6605 0.575  0.8147 0.4845 0.96   0.6310.6657 0.799  0.7254 0.9374 0.6921 0.7311 0.7419 0.8457]
2022-04-14 12:32:46 [INFO]	[EVAL] Class Acc: 
[0.     0.807  0.7245 0.8534 0.7856 0.7607 0.8763 0.7907 0.9987 0.78560.7755 0.8704 0.8246 0.9818 0.7645 0.7729 0.8567 0.9267]
2022-04-14 12:32:46 [INFO]	[EVAL] The model with the best validation mIoU (0.6746) was saved at iter 700.
2022-04-14 12:32:52 [INFO]	[TRAIN] epoch: 14, iter: 710/1000, loss: 0.7421, lr: 0.003292, batch_cost: 0.5968, reader_cost: 0.00117, ips: 53.6205 samples/sec | ETA 00:02:53
2022-04-14 12:32:58 [INFO]	[TRAIN] epoch: 14, iter: 720/1000, loss: 0.6546, lr: 0.003190, batch_cost: 0.5940, reader_cost: 0.00032, ips: 53.8741 samples/sec | ETA 00:02:46
2022-04-14 12:33:04 [INFO]	[TRAIN] epoch: 15, iter: 730/1000, loss: 0.5932, lr: 0.003088, batch_cost: 0.5865, reader_cost: 0.01657, ips: 54.5621 samples/sec | ETA 00:02:38
2022-04-14 12:33:10 [INFO]	[TRAIN] epoch: 15, iter: 740/1000, loss: 0.5941, lr: 0.002985, batch_cost: 0.5966, reader_cost: 0.00024, ips: 53.6345 samples/sec | ETA 00:02:35
2022-04-14 12:33:16 [INFO]	[TRAIN] epoch: 15, iter: 750/1000, loss: 0.6004, lr: 0.002882, batch_cost: 0.6279, reader_cost: 0.00230, ips: 50.9615 samples/sec | ETA 00:02:36
2022-04-14 12:33:23 [INFO]	[TRAIN] epoch: 15, iter: 760/1000, loss: 0.6031, lr: 0.002779, batch_cost: 0.6034, reader_cost: 0.00289, ips: 53.0347 samples/sec | ETA 00:02:24
2022-04-14 12:33:28 [INFO]	[TRAIN] epoch: 15, iter: 770/1000, loss: 0.6118, lr: 0.002675, batch_cost: 0.5960, reader_cost: 0.00167, ips: 53.6929 samples/sec | ETA 00:02:17
2022-04-14 12:33:34 [INFO]	[TRAIN] epoch: 15, iter: 780/1000, loss: 0.6142, lr: 0.002570, batch_cost: 0.5754, reader_cost: 0.00081, ips: 55.6109 samples/sec | ETA 00:02:06
2022-04-14 12:33:40 [INFO]	[TRAIN] epoch: 16, iter: 790/1000, loss: 0.5906, lr: 0.002465, batch_cost: 0.6159, reader_cost: 0.01718, ips: 51.9571 samples/sec | ETA 00:02:09
2022-04-14 12:33:46 [INFO]	[TRAIN] epoch: 16, iter: 800/1000, loss: 0.5972, lr: 0.002360, batch_cost: 0.6070, reader_cost: 0.00100, ips: 52.7145 samples/sec | ETA 00:02:01
2022-04-14 12:33:46 [INFO]	Start evaluating (total_samples: 420, total_iters: 420)...
420/420 [==============================] - 60s 143ms/step - batch_cost: 0.1431 - reader cost: 4.3473e-0
2022-04-14 12:34:47 [INFO]	[EVAL] #Images: 420 mIoU: 0.6764 Acc: 0.8370 Kappa: 0.8102 
2022-04-14 12:34:47 [INFO]	[EVAL] Class IoU: 
[0.     0.6189 0.56   0.7151 0.6693 0.5738 0.7879 0.5127 0.9634 0.63780.669  0.8069 0.7086 0.9449 0.6956 0.7226 0.7423 0.8469]
2022-04-14 12:34:47 [INFO]	[EVAL] Class Acc: 
[0.     0.7452 0.7343 0.7984 0.8166 0.767  0.8257 0.7523 1.     0.79640.7517 0.8972 0.8457 0.9782 0.7789 0.7646 0.8452 0.9181]
2022-04-14 12:34:48 [INFO]	[EVAL] The model with the best validation mIoU (0.6764) was saved at iter 800.
2022-04-14 12:34:54 [INFO]	[TRAIN] epoch: 16, iter: 810/1000, loss: 0.5991, lr: 0.002254, batch_cost: 0.5941, reader_cost: 0.00210, ips: 53.8640 samples/sec | ETA 00:01:52
2022-04-14 12:34:59 [INFO]	[TRAIN] epoch: 16, iter: 820/1000, loss: 0.5848, lr: 0.002147, batch_cost: 0.5925, reader_cost: 0.00075, ips: 54.0113 samples/sec | ETA 00:01:46
2022-04-14 12:35:05 [INFO]	[TRAIN] epoch: 16, iter: 830/1000, loss: 0.5802, lr: 0.002040, batch_cost: 0.5780, reader_cost: 0.00066, ips: 55.3610 samples/sec | ETA 00:01:38
2022-04-14 12:35:11 [INFO]	[TRAIN] epoch: 17, iter: 840/1000, loss: 0.6143, lr: 0.001933, batch_cost: 0.6128, reader_cost: 0.01615, ips: 52.2204 samples/sec | ETA 00:01:38
2022-04-14 12:35:17 [INFO]	[TRAIN] epoch: 17, iter: 850/1000, loss: 0.6197, lr: 0.001824, batch_cost: 0.6147, reader_cost: 0.00096, ips: 52.0584 samples/sec | ETA 00:01:32
2022-04-14 12:35:24 [INFO]	[TRAIN] epoch: 17, iter: 860/1000, loss: 0.5561, lr: 0.001715, batch_cost: 0.6057, reader_cost: 0.00072, ips: 52.8288 samples/sec | ETA 00:01:24
2022-04-14 12:35:30 [INFO]	[TRAIN] epoch: 17, iter: 870/1000, loss: 0.5752, lr: 0.001605, batch_cost: 0.5980, reader_cost: 0.00125, ips: 53.5096 samples/sec | ETA 00:01:17
2022-04-14 12:35:35 [INFO]	[TRAIN] epoch: 17, iter: 880/1000, loss: 0.5779, lr: 0.001495, batch_cost: 0.5963, reader_cost: 0.00278, ips: 53.6679 samples/sec | ETA 00:01:11
2022-04-14 12:35:41 [INFO]	[TRAIN] epoch: 18, iter: 890/1000, loss: 0.5226, lr: 0.001383, batch_cost: 0.5988, reader_cost: 0.01577, ips: 53.4440 samples/sec | ETA 00:01:05
2022-04-14 12:35:47 [INFO]	[TRAIN] epoch: 18, iter: 900/1000, loss: 0.5943, lr: 0.001270, batch_cost: 0.5943, reader_cost: 0.00091, ips: 53.8452 samples/sec | ETA 00:00:59
2022-04-14 12:35:47 [INFO]	Start evaluating (total_samples: 420, total_iters: 420)...
420/420 [==============================] - 60s 143ms/step - batch_cost: 0.1424 - reader cost: 4.8283e-
2022-04-14 12:36:47 [INFO]	[EVAL] #Images: 420 mIoU: 0.6823 Acc: 0.8382 Kappa: 0.8114 
2022-04-14 12:36:47 [INFO]	[EVAL] Class IoU: 
[0.     0.6235 0.5526 0.7267 0.6715 0.5952 0.8155 0.516  0.964  0.63680.6684 0.8126 0.7114 0.9239 0.699  0.7702 0.7441 0.8504]
2022-04-14 12:36:47 [INFO]	[EVAL] Class Acc: 
[0.     0.7182 0.683  0.8378 0.8101 0.7393 0.8766 0.763  0.9997 0.81030.7642 0.8939 0.8346 0.9864 0.7791 0.8363 0.8568 0.9297]
2022-04-14 12:36:48 [INFO]	[EVAL] The model with the best validation mIoU (0.6823) was saved at iter 900.
2022-04-14 12:36:54 [INFO]	[TRAIN] epoch: 18, iter: 910/1000, loss: 0.5703, lr: 0.001156, batch_cost: 0.6115, reader_cost: 0.00312, ips: 52.3318 samples/sec | ETA 00:00:55
2022-04-14 12:37:00 [INFO]	[TRAIN] epoch: 18, iter: 920/1000, loss: 0.6093, lr: 0.001041, batch_cost: 0.6014, reader_cost: 0.00108, ips: 53.2099 samples/sec | ETA 00:00:48
2022-04-14 12:37:06 [INFO]	[TRAIN] epoch: 18, iter: 930/1000, loss: 0.5604, lr: 0.000925, batch_cost: 0.5959, reader_cost: 0.00160, ips: 53.7019 samples/sec | ETA 00:00:41
2022-04-14 12:37:12 [INFO]	[TRAIN] epoch: 19, iter: 940/1000, loss: 0.5809, lr: 0.000807, batch_cost: 0.5947, reader_cost: 0.01608, ips: 53.8086 samples/sec | ETA 00:00:35
2022-04-14 12:37:18 [INFO]	[TRAIN] epoch: 19, iter: 950/1000, loss: 0.5609, lr: 0.000687, batch_cost: 0.5905, reader_cost: 0.00034, ips: 54.1959 samples/sec | ETA 00:00:29
2022-04-14 12:37:24 [INFO]	[TRAIN] epoch: 19, iter: 960/1000, loss: 0.6061, lr: 0.000564, batch_cost: 0.6175, reader_cost: 0.00174, ips: 51.8181 samples/sec | ETA 00:00:24
2022-04-14 12:37:30 [INFO]	[TRAIN] epoch: 19, iter: 970/1000, loss: 0.5418, lr: 0.000439, batch_cost: 0.6037, reader_cost: 0.00178, ips: 53.0053 samples/sec | ETA 00:00:18
2022-04-14 12:37:36 [INFO]	[TRAIN] epoch: 19, iter: 980/1000, loss: 0.5613, lr: 0.000309, batch_cost: 0.5929, reader_cost: 0.00152, ips: 53.9685 samples/sec | ETA 00:00:11
2022-04-14 12:37:42 [INFO]	[TRAIN] epoch: 20, iter: 990/1000, loss: 0.5241, lr: 0.000173, batch_cost: 0.5946, reader_cost: 0.01715, ips: 53.8205 samples/sec | ETA 00:00:05
2022-04-14 12:37:48 [INFO]	[TRAIN] epoch: 20, iter: 1000/1000, loss: 0.5681, lr: 0.000020, batch_cost: 0.5928, reader_cost: 0.00015, ips: 53.9844 samples/sec | ETA 00:00:00
2022-04-14 12:37:48 [INFO]	Start evaluating (total_samples: 420, total_iters: 420)...
420/420 [==============================] - 60s 144ms/step - batch_cost: 0.1434 - reader cost: 5.1340e-
2022-04-14 12:38:48 [INFO]	[EVAL] #Images: 420 mIoU: 0.6804 Acc: 0.8398 Kappa: 0.8132 
2022-04-14 12:38:48 [INFO]	[EVAL] Class IoU: 
[0.     0.6279 0.5664 0.7303 0.6736 0.5809 0.8024 0.5217 0.963  0.64030.6745 0.8123 0.6961 0.921  0.699  0.7392 0.7469 0.8508]
2022-04-14 12:38:48 [INFO]	[EVAL] Class Acc: 
[0.     0.7598 0.7189 0.842  0.8211 0.775  0.8507 0.7527 1.     0.7820.7552 0.8984 0.8332 0.9858 0.7765 0.804  0.8528 0.936 ]
2022-04-14 12:38:49 [INFO]	[EVAL] The model with the best validation mIoU (0.6823) was saved at iter 900.
<class 'paddle.nn.layer.conv.Conv2D'>'s flops has been counted
Customize Function has been applied to <class 'paddle.nn.layer.norm.SyncBatchNorm'>
Cannot find suitable count function for <class 'paddleseg.models.ocrnet.SpatialGatherBlock'>. Treat it as zero FLOPs.
Cannot find suitable count function for <class 'paddle.nn.layer.common.Dropout2D'>. Treat it as zero FLOPs.
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/tensor/creation.py:125: DeprecationWarning: `np.object` is a deprecated alias for the builtin `object`. To silence this warning, use `object` by itself. Doing this will not modify any behavior and is safe. 
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecationsif data.dtype == np.object:
Total Flops: 1757012736     Total Params: 12122446

模型测试

参考paddleSeg

In [9]

# 模型测试, aug_eval可以开启增强测试模式
# !python val.py \
#        --config configs/unet/unet_dlrsd.yml \
#        --model_path output/best_model/model.pdparams \
#        --aug_eval \
#        --scales 0.75 1.0 1.25 \
#        --flip_horizontal# 使用ocrnet进行测试
!python val.py \--config ocrnet_dlrsd.yml \--model_path output/best_model/model.pdparams \--aug_eval \--scales 0.75 1.0 1.25 \--flip_horizontal
2022-04-14 12:38:53 [INFO]	
---------------Config Information---------------
batch_size: 2
iters: 160000
loss:coef:- 1- 0.4types:- type: CrossEntropyLoss- type: CrossEntropyLoss
lr_scheduler:end_lr: 0learning_rate: 0.01power: 0.9type: PolynomialDecay
model:backbone:pretrained: https://bj.bcebos.com/paddleseg/dygraph/hrnet_w18_ssld.tar.gztype: HRNet_W18backbone_indices:- 0num_classes: 18type: OCRNet
optimizer:momentum: 0.9type: sgdweight_decay: 4.0e-05
train_dataset:dataset_root: dataset/dlrsdmode: trainnum_classes: 18train_path: dataset/dlrsd/train.txttransforms:- max_scale_factor: 2.0min_scale_factor: 0.5scale_step_size: 0.25type: ResizeStepScaling- crop_size:- 256- 256type: RandomPaddingCrop- type: RandomHorizontalFlip- type: Normalizetype: Dataset
val_dataset:dataset_root: dataset/dlrsdmode: valnum_classes: 18transforms:- type: Normalize- target_size:- 256- 256type: Resizetype: Datasetval_path: dataset/dlrsd/val.txt
------------------------------------------------
W0414 12:38:53.728370  4958 device_context.cc:404] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 11.0, Runtime API Version: 10.1
W0414 12:38:53.728415  4958 device_context.cc:422] device: 0, cuDNN Version: 7.6.
2022-04-14 12:38:57 [INFO]	Loading pretrained model from https://bj.bcebos.com/paddleseg/dygraph/hrnet_w18_ssld.tar.gz
2022-04-14 12:38:58 [INFO]	There are 1525/1525 variables loaded into HRNet.
2022-04-14 12:38:58 [INFO]	Loading pretrained model from output/best_model/model.pdparams
2022-04-14 12:38:58 [INFO]	There are 1583/1583 variables loaded into OCRNet.
2022-04-14 12:38:58 [INFO]	Loaded trained params of model successfully
2022-04-14 12:38:58 [INFO]	Start evaluating (total_samples: 420, total_iters: 420)...
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dygraph/math_op_patch.py:239: UserWarning: The dtype of left and right variables are not the same, left dtype is paddle.int32, but right dtype is paddle.bool, the right dtype will convert to paddle.int32format(lhs_dtype, rhs_dtype, lhs_dtype))
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dygraph/math_op_patch.py:239: UserWarning: The dtype of left and right variables are not the same, left dtype is paddle.int64, but right dtype is paddle.bool, the right dtype will convert to paddle.int64format(lhs_dtype, rhs_dtype, lhs_dtype))
420/420 [==============================] - 335s 797ms/step - batch_cost: 0.7971 - reader cost: 8.0393e-
2022-04-14 12:44:33 [INFO]	[EVAL] #Images: 420 mIoU: 0.6839 Acc: 0.8405 Kappa: 0.8143 
2022-04-14 12:44:33 [INFO]	[EVAL] Class IoU: 
[0.     0.6325 0.563  0.7203 0.6722 0.6052 0.8156 0.5139 0.9655 0.64450.6614 0.814  0.7313 0.9119 0.7007 0.7548 0.7473 0.8563]
2022-04-14 12:44:33 [INFO]	[EVAL] Class Acc: 
[0.     0.7304 0.7056 0.8246 0.7997 0.7365 0.872  0.8375 1.     0.80880.7385 0.9016 0.829  0.9841 0.7464 0.8043 0.8618 0.9425]

模型推理

参考paddleSeg

In [10]

# 模型推理, image_path可以设置为单个文件或者文件夹
# !python predict.py \
#        --config configs/unet/unet_dlrsd.yml \
#        --model_path output/best_model/model.pdparams \
#        --image_path dataset/dlrsd/image/agricultural00.tif \
#        --save_dir output/result# 使用ocrnet模型推理
!python predict.py \--config ocrnet_dlrsd.yml \--model_path output/best_model/model.pdparams \--image_path dataset/dlrsd/image/agricultural00.tif \--save_dir output/result
2022-04-14 12:44:36 [INFO]	
---------------Config Information---------------
batch_size: 2
iters: 160000
loss:coef:- 1- 0.4types:- type: CrossEntropyLoss- type: CrossEntropyLoss
lr_scheduler:end_lr: 0learning_rate: 0.01power: 0.9type: PolynomialDecay
model:backbone:pretrained: https://bj.bcebos.com/paddleseg/dygraph/hrnet_w18_ssld.tar.gztype: HRNet_W18backbone_indices:- 0num_classes: 18type: OCRNet
optimizer:momentum: 0.9type: sgdweight_decay: 4.0e-05
train_dataset:dataset_root: dataset/dlrsdmode: trainnum_classes: 18train_path: dataset/dlrsd/train.txttransforms:- max_scale_factor: 2.0min_scale_factor: 0.5scale_step_size: 0.25type: ResizeStepScaling- crop_size:- 256- 256type: RandomPaddingCrop- type: RandomHorizontalFlip- type: Normalizetype: Dataset
val_dataset:dataset_root: dataset/dlrsdmode: valnum_classes: 18transforms:- type: Normalize- target_size:- 256- 256type: Resizetype: Datasetval_path: dataset/dlrsd/val.txt
------------------------------------------------
W0414 12:44:36.429344  6170 device_context.cc:404] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 11.0, Runtime API Version: 10.1
W0414 12:44:36.429426  6170 device_context.cc:422] device: 0, cuDNN Version: 7.6.
2022-04-14 12:44:39 [INFO]	Loading pretrained model from https://bj.bcebos.com/paddleseg/dygraph/hrnet_w18_ssld.tar.gz
2022-04-14 12:44:40 [INFO]	There are 1525/1525 variables loaded into HRNet.
2022-04-14 12:44:40 [INFO]	Number of predict images = 1
2022-04-14 12:44:40 [INFO]	Loading pretrained model from output/best_model/model.pdparams
2022-04-14 12:44:41 [INFO]	There are 1583/1583 variables loaded into OCRNet.
2022-04-14 12:44:41 [INFO]	Start to predict...
1/1 [==============================] - 0s 173ms/step

推理结果展示


http://chatgpt.dhexx.cn/article/3PxNhWb4.shtml

相关文章

【计算机视觉】最全语义分割模型总结(从FCN到deeplabv3+)

文章目录 一、前言1.1 语义分割 二、FCN&#xff1a;CNN语义分割的开山之作2.1 结构2.2 特点 三、Deeplab_v13.1 前言3.2 特点 四、U-Net4.1 结构4.2 特点 五、Seg-Net5.1 结构5.2 特点 六、Deeplab_v26.1 结构6.2 特点6.3 Fcis6.3.1 特点 七、RefineNet7.1 结构7.2 特点 八、L…

语义分割网络系列2——Unet

目录 1 Unet网络介绍1.1 Unet论文1.2 简介1.3 6大特点 2 Unet网络3种不同的实现方式2.1 Unet网络的class实现&#xff08;mIou&#xff09;2.2 Unet网络的layer的实现&#xff08;mIou&#xff09;2.3 第3种实现方法&#xff08;存在问题&#xff0c;验证集准确率一直不变&…

毕业设计 U-Net遥感图像语义分割(源码+论文)

文章目录 0 项目说明1 研究目的2 研究方法3 研究结论4 论文目录5 项目源码6 最后 0 项目说明 **基于 U-Net 网络的遥感图像语义分割 ** 提示&#xff1a;适合用于课程设计或毕业设计&#xff0c;工作量达标&#xff0c;源码开放 实验训练使用 Anaconda 版 Python 3.7 下的 T…

基于深度学习的遥感影像语义分割数据预处理

基于深度学习的遥感影像语义分割数据预处理 第一次处理数据&#xff0c;不熟练&#xff0c;仅供参考 数据预处理工具&#xff1a;Arcgis 第一步&#xff1a;下载遥感影像tif数据 根据实际需求选择感兴趣的遥感影像区域 数据来源&#xff1a;Google卫星影像 第二步&#xff1…

语义分割—遥感影像数据标签制作(ARCGIS)

目录 制作标签 转为tif格式 制作标签 1.新建文件夹链接 2.右键新建的文件夹&#xff0c;新建一个shp文件 3.要素类型选择面要素&#xff0c;并为shp文件命名 此处可以配置与依赖图层相同的坐标系&#xff0c;也可以在转为.tif的时候修改环境里的两个选项统一坐标系 4.右键文…

语义分割:遥感影像标签制作

1、打开一张遥感影像&#xff0c;或者航片 2.新建shp&#xff1a;在对应文件夹下&#xff0c;右键新建shpfile 选择面&#xff0c;添加坐标系与影像坐标系相同 3.开始编辑新建的shp 选择面&#xff0c;沿图像四周紧贴图像画矩形 4. 保存编辑内容后停止编辑否则无法添加字段&…

LaTeX的斜体,粗体

参考 LaTeX的斜体&#xff0c;粗体 - 云社区 - 腾讯云 写文章的小伙伴应该知道&#xff0c;在文章中&#xff0c;变量是需要斜体的&#xff0c;那么怎么才是斜体呢 首先&#xff0c;在LATEX中&#xff0c;强调可以以斜体形式展现出来。那么强调命令是如何体现的呢&#xff1a…

LaTeX 加粗

本系列文章由 yhl_leo 出品&#xff0c;转载请注明出处。 文章链接&#xff1a; http://blog.csdn.net/yhl_leo/article/details/50997822 LaTeX中文本加粗的方法&#xff0c;给出代码示例&#xff0c;一看就懂&#xff1a; \documentclass{article} \usepackage{amsmath}\beg…

【LaTex 中英文样式加粗】自由选择中英文字体样式,中英文字体粗黑程度设置

&#x1f33c; 在本文中&#xff0c;选择楷体样式&#xff0c;以及加粗的楷体。 ▚ 01 设置全文字体 1.1 中文 以设置中文为楷体为例&#xff1a; 在\documentclass{article}与\begin{document}之间&#xff0c;添加语句\setCJKmainfont[AutoFakeBold2.5,ItalicFont{楷体}]{…

LaTeX表格字体加粗(解决文本变宽问题)

latex中对文本加粗常用的方法是 \textbf{*} 在表格中&#xff0c;这个命令也同样生效。但它会使文本变宽&#xff0c;如 尝试的方法 网上找了很多办法&#xff0c;想改变表格加粗的宽度&#xff0c;常见是是调整LaTeX字体&#xff0c;如下 Command Nominal Point Size …

Latex排版小技巧0001:中文字体加粗

论文排版时中文字体加粗 在设置CJK字体过程中添加[AutoFakeBold {3.17}]设置&#xff0c;参数 “3.17” 用于指定加粗程度。加粗时使用 latex 默认加粗指令 \textbf 即可。 \setallmainfonts{Times New Roman}\setCJKmainfont[AutoFakeBoldtrue]{SimSun}\newCJKfontfamily{\h…

latex中如何加粗字体?

加粗代码&#xff1a; \textbf{文字} 效果图&#xff1a;

LaTeX中\textbf无法将汉字进行加粗

场景 利用\textbf对汉字进行加粗&#xff1a; \textbf{模型复杂度}显示如下&#xff1a; 可以发现&#xff0c;确实没有被加粗。 解决 一开始设置了全局字体为宋体&#xff1a; \setCJKmainfont{SimSun}注释掉即可。

解决LaTeX英文字体加粗失效、无法加粗问题

文章目录 一、前言二、具体问题三、解决办法四、使用效果 一、前言 最近使用 LaTeX 作为模板写实验报告、论文时&#xff0c;在自己写的 cls 文件里定义好了各种字体及格式&#xff0c;但是在使用过程中却出现了部分问题。 二、具体问题 标题、摘要里的英文字体并不能像中文字…

LaTex常用技巧3:加粗字体

截图来自[1] 普通加粗 \mathbf 斜体加粗 \usepackage{bm} \bm 矩阵、向量的加粗需要使用。 相关参考 [1]latex矩阵加粗

【latex】Latex如何加粗文字;表格中如何加粗文字而不让文本变宽

问题 latex中对文本加粗常用的方法是 \textbf{*}在表格中&#xff0c;这个命令也同样生效。但它会使文本变宽&#xff0c;如 尝试 网上找了很多办法&#xff0c;想改变表格加粗的宽度&#xff0c;常见是是调整LaTeX字体&#xff0c;如下 Command Nominal Point Size …

vmware 安装报错:failed to install hcmon drivers 完美解决(含VMware15激活码)

首先绝大部分使用网上的方法&#xff0c;删除各种驱动和注册表都是结果都是失败的&#xff1a;再次安装的结果仍然是&#xff1a; 在网上搜寻几天找到一位大神博客&#xff0c;完美解决&#xff0c;试了之后的结果是完美安装&#xff0c;搬运如下&#xff1a; 解决方法&…

安装VMware WorkStation

安装VMware准备&#xff1a; 软件准备&#xff1a; VMware-workstation-full-12.1.1-3770994.exe 秘钥准备&#xff1a; 1、双击VMware-workstation-full-12.1.1-3770994.exe&#xff0c;进行安装如下图所示&#xff1a; 2、弹出的界面中选择“我接受许可协议中的条款”&…

虚拟机安装以及镜像激活码下载

虚拟机的概念和作用&#xff0c;这里不再阐述&#xff0c;不明白的可以自行百度。 需要注意的是&#xff0c;穿越火线无需虚拟机即可多开&#xff0c;安装虚拟机 后台 挂机刷经验&#xff0c;英雄联盟使用虚拟机可以后台挂机刷金币。 〓-------------------------- -------- --…

Deepin 系统下安装VMware并激活.

打开深度商店:搜索VMware,并下载安装. 打开启动器:点击VMware-install, 填写你的管理员密码.(如果当出现这个页面,同时按住ctrl alt A 键 会卡掉.按esc 退出,因该是一个bug) 然后就是下一步. 最后完成安装. 然后打开VMware Workstation.输入密钥. CG54H-D8D0H-H8DHY-C6X7X-…