From 088b1e2a31c73c1b39c3bbbbc578076245cca0c1 Mon Sep 17 00:00:00 2001 From: nemonameless Date: Tue, 20 Jul 2021 13:56:14 +0000 Subject: [PATCH 1/2] fix operators typo --- ppdet/data/transform/operators.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ppdet/data/transform/operators.py b/ppdet/data/transform/operators.py index f59adbd1d11..65ec316f45d 100644 --- a/ppdet/data/transform/operators.py +++ b/ppdet/data/transform/operators.py @@ -33,7 +33,7 @@ import numpy as np import os import copy - +import logging import cv2 from PIL import Image, ImageDraw @@ -194,7 +194,7 @@ def __init__(self, prob=0.5, lower=0.02, higher=0.4, aspect_ratio=0.3): Args: prob (float): probability to carry out random erasing lower (float): lower limit of the erasing area ratio - heigher (float): upper limit of the erasing area ratio + higher (float): upper limit of the erasing area ratio aspect_ratio (float): aspect ratio of the erasing region """ super(RandomErasingImage, self).__init__() @@ -646,7 +646,7 @@ def _resize_rle(rle, im_h, im_w, im_scale_x, im_scale_y): mask = mask_util.decode(rle) mask = cv2.resize( - image, + mask, None, None, fx=im_scale_x, From 61ec5a654b9009b6b0d6990c8dda18495ded554d Mon Sep 17 00:00:00 2001 From: nemonameless Date: Sat, 18 Sep 2021 12:08:39 +0000 Subject: [PATCH 2/2] fix centernet_head bias init --- ppdet/modeling/heads/centernet_head.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ppdet/modeling/heads/centernet_head.py b/ppdet/modeling/heads/centernet_head.py index aa3fbe2c318..49c7b0df10e 100755 --- a/ppdet/modeling/heads/centernet_head.py +++ b/ppdet/modeling/heads/centernet_head.py @@ -98,7 +98,8 @@ def __init__(self, stride=1, padding=0, bias=True)) - self.heatmap[2].conv.bias[:] = -2.19 + with paddle.no_grad(): + self.heatmap[2].conv.bias[:] = -2.19 self.size = nn.Sequential( ConvLayer( in_channels, head_planes, kernel_size=3, padding=1, bias=True),