diff --git a/README.md b/README.md
index 93452b43e75fe20182b6d81e47829f1be3ed18ec..dcf69d92352704ecf4728e1154e90386b9465ee8 100644
--- a/README.md
+++ b/README.md
@@ -60,6 +60,7 @@ PaddleSeg支持多进程IO、多卡并行、跨卡Batch Norm同步等训练加
### 高级功能
* [PaddleSeg的数据增强](./docs/data_aug.md)
+* [PaddleSeg的loss选择](./docs/loss_select.md)
* [特色垂类模型使用](./contrib)
* [多进程训练和混合精度训练](./docs/multiple_gpus_train_and_mixed_precision_train.md)
diff --git a/configs/deepglobe_road_extraction.yaml b/configs/deepglobe_road_extraction.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..b0446fc56ea1e56115618281a3c82a837cccfe73
--- /dev/null
+++ b/configs/deepglobe_road_extraction.yaml
@@ -0,0 +1,44 @@
+EVAL_CROP_SIZE: (1025, 1025) # (width, height), for unpadding rangescaling and stepscaling
+TRAIN_CROP_SIZE: (769, 769) # (width, height), for unpadding rangescaling and stepscaling
+AUG:
+ AUG_METHOD: u"stepscaling" # choice unpadding rangescaling and stepscaling
+ FIX_RESIZE_SIZE: (640, 640) # (width, height), for unpadding
+ INF_RESIZE_VALUE: 500 # for rangescaling
+ MAX_RESIZE_VALUE: 600 # for rangescaling
+ MIN_RESIZE_VALUE: 400 # for rangescaling
+ MAX_SCALE_FACTOR: 2.0 # for stepscaling
+ MIN_SCALE_FACTOR: 0.5 # for stepscaling
+ SCALE_STEP_SIZE: 0.25 # for stepscaling
+BATCH_SIZE: 8
+DATASET:
+ DATA_DIR: "./dataset/MiniDeepGlobeRoadExtraction/"
+ IMAGE_TYPE: "rgb" # choice rgb or rgba
+ NUM_CLASSES: 2
+ TEST_FILE_LIST: "dataset/MiniDeepGlobeRoadExtraction/val.txt"
+ TRAIN_FILE_LIST: "dataset/MiniDeepGlobeRoadExtraction/train.txt"
+ VAL_FILE_LIST: "dataset/MiniDeepGlobeRoadExtraction/val.txt"
+ IGNORE_INDEX: 255
+ SEPARATOR: '|'
+FREEZE:
+ MODEL_FILENAME: "model"
+ PARAMS_FILENAME: "params"
+ SAVE_DIR: "freeze_model"
+MODEL:
+ DEFAULT_NORM_TYPE: "bn"
+ MODEL_NAME: "deeplabv3p"
+ DEEPLAB:
+ BACKBONE: "mobilenet"
+ DEPTH_MULTIPLIER: 1.0
+ ENCODER_WITH_ASPP: False
+ ENABLE_DECODER: False
+TEST:
+ TEST_MODEL: "./saved_model/deeplabv3p_mobilenetv2-1-0_bn_deepglobe_road_extraction/"
+TRAIN:
+ MODEL_SAVE_DIR: "./saved_model/deeplabv3p_mobilenetv2-1-0_bn_deepglobe_road_extraction/"
+ PRETRAINED_MODEL_DIR: "./pretrained_model/deeplabv3p_mobilenetv2-1-0_bn_coco/"
+ SNAPSHOT_EPOCH: 10
+SOLVER:
+ LR: 0.001
+ LR_POLICY: "poly"
+ OPTIMIZER: "adam"
+ NUM_EPOCHS: 300
diff --git a/dataset/download_mini_deepglobe_road_extraction.py b/dataset/download_mini_deepglobe_road_extraction.py
new file mode 100644
index 0000000000000000000000000000000000000000..13312407434b7186a782a99d38c9281c5c006c32
--- /dev/null
+++ b/dataset/download_mini_deepglobe_road_extraction.py
@@ -0,0 +1,33 @@
+# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import sys
+import os
+
+LOCAL_PATH = os.path.dirname(os.path.abspath(__file__))
+TEST_PATH = os.path.join(LOCAL_PATH, "..", "test")
+sys.path.append(TEST_PATH)
+
+from test_utils import download_file_and_uncompress
+
+
+def download_deepglobe_road_dataset(savepath, extrapath):
+ url = "https://paddleseg.bj.bcebos.com/dataset/MiniDeepGlobeRoadExtraction.zip"
+ download_file_and_uncompress(
+ url=url, savepath=savepath, extrapath=extrapath)
+
+
+if __name__ == "__main__":
+ download_deepglobe_road_dataset(LOCAL_PATH, LOCAL_PATH)
+ print("Dataset download finish!")
diff --git a/docs/configs/solver_group.md b/docs/configs/solver_group.md
index f38d9574d92404aa809d7eb51a9e6f18ff81ed7f..e068b9d36eedf2cb74e912f1705b66eac421cfdc 100644
--- a/docs/configs/solver_group.md
+++ b/docs/configs/solver_group.md
@@ -132,27 +132,6 @@ L2正则化系数
`['softmax_loss']`或`['dice_loss','bce_loss']`
-* softmax_loss
-
-![equation](http://latex.codecogs.com/gif.latex?softmax\\_loss=\sum_{i=1}^Ny_i{log(p_i)})
-
-
-
-* dice_loss
-
-![equation](http://latex.codecogs.com/gif.latex?dice\\_loss=1-\frac{2|Y\bigcap{P}|}{|Y|\bigcup|P|})
-
-[dice系数](https://zh.wikipedia.org/wiki/Dice%E7%B3%BB%E6%95%B0)
-
-
-
-* bce_loss
-
-![equation](http://latex.codecogs.com/gif.latex?bce\\_loss=y_i{log(p_i)}+(1-y_i)log(1-p_i))
-
-其中![equation](http://latex.codecogs.com/gif.latex?y_i)和*Y*为标签,
- ![equation](http://latex.codecogs.com/gif.latex?p_i)和*P*为预测结果
-
### 默认值
['softmax_loss']
diff --git a/docs/imgs/deepglobe.png b/docs/imgs/deepglobe.png
new file mode 100644
index 0000000000000000000000000000000000000000..cfd77f6b654dc16ad9687d16f8e836b278d26594
Binary files /dev/null and b/docs/imgs/deepglobe.png differ
diff --git a/docs/imgs/dice1.png b/docs/imgs/dice1.png
new file mode 100644
index 0000000000000000000000000000000000000000..f8520802296cc264849fae4a8442792cf56cb20a
Binary files /dev/null and b/docs/imgs/dice1.png differ
diff --git a/docs/imgs/loss_comparison.png b/docs/imgs/loss_comparison.png
new file mode 100644
index 0000000000000000000000000000000000000000..9a475570930f9c97e433ae9eb1f34ccae1b2444c
Binary files /dev/null and b/docs/imgs/loss_comparison.png differ
diff --git a/docs/loss_select.md b/docs/loss_select.md
new file mode 100644
index 0000000000000000000000000000000000000000..d90525f4d3ebfec2cc4a336dba39386b97b6fd89
--- /dev/null
+++ b/docs/loss_select.md
@@ -0,0 +1,77 @@
+# dice loss解决二分类中样本不均衡问题
+
+对于二类图像分割任务中,往往存在类别分布不均的情况,如:瑕疵检测,道路提取及病变区域提取等等。
+在DeepGlobe比赛的Road Extraction中,训练数据道路占比为:%4.5。如下为其图片样例:
+
+
+
+
+
+
+