提交 e6a5c897 编写于 作者: D dengkaipeng

fix doc and compatible python3.

上级 023742e3
...@@ -94,7 +94,7 @@ To train the model, [cocoapi](https://github.com/cocodataset/cocoapi) is needed. ...@@ -94,7 +94,7 @@ To train the model, [cocoapi](https://github.com/cocodataset/cocoapi) is needed.
**training strategy:** **training strategy:**
* Use momentum optimizer with momentum=0.9. * Use momentum optimizer with momentum=0.9.
* In first 4000 iteration, the learning rate increases linearly from 0.0 to 0.01. Then lr is decayed at 450000, 500000 iteration with multiplier 0.1, 0.01. The maximum iteration is 500000. * In first 4000 iteration, the learning rate increases linearly from 0.0 to 0.001. Then lr is decayed at 400000, 450000 iteration with multiplier 0.1, 0.01. The maximum iteration is 500000.
Training result is shown as below: Training result is shown as below:
<p align="center"> <p align="center">
......
...@@ -95,7 +95,7 @@ YOLOv3 的网络结构由基础特征提取网络、multi-scale特征融合层 ...@@ -95,7 +95,7 @@ YOLOv3 的网络结构由基础特征提取网络、multi-scale特征融合层
**训练策略:** **训练策略:**
* 采用momentum优化算法训练YOLOv3,momentum=0.9。 * 采用momentum优化算法训练YOLOv3,momentum=0.9。
* 学习率采用warmup算法,前4000轮学习率从0.0线性增加至0.01。在400000,450000轮时使用0.1,0.01乘子进行学习率衰减,最大训练500000轮。 * 学习率采用warmup算法,前4000轮学习率从0.0线性增加至0.001。在400000,450000轮时使用0.1,0.01乘子进行学习率衰减,最大训练500000轮。
下图为模型训练结果: 下图为模型训练结果:
<p align="center"> <p align="center">
......
...@@ -93,7 +93,7 @@ class DataSetReader(object): ...@@ -93,7 +93,7 @@ class DataSetReader(object):
for target in anno: for target in anno:
if target['area'] < cfg.gt_min_area: if target['area'] < cfg.gt_min_area:
continue continue
if target.has_key('ignore') and target['ignore']: if 'ignore' in target and target['ignore']:
continue continue
box = box_utils.coco_anno_box_to_center_relative(target['bbox'], img_height, img_width) box = box_utils.coco_anno_box_to_center_relative(target['bbox'], img_height, img_width)
...@@ -120,7 +120,7 @@ class DataSetReader(object): ...@@ -120,7 +120,7 @@ class DataSetReader(object):
img['gt_boxes'] = np.zeros((cfg.max_box_num, 4), dtype=np.float32) img['gt_boxes'] = np.zeros((cfg.max_box_num, 4), dtype=np.float32)
img['gt_labels'] = np.zeros((cfg.max_box_num), dtype=np.int32) img['gt_labels'] = np.zeros((cfg.max_box_num), dtype=np.int32)
for k in ['date_captured', 'url', 'license', 'file_name']: for k in ['date_captured', 'url', 'license', 'file_name']:
if img.has_key(k): if k in img:
del img[k] del img[k]
if is_train: if is_train:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册