PaddleDetection
PaddleDetection copied to clipboard
ppyoloe_plus: the images are not normalized during network training ?
问题确认 Search before asking
- [X] 我已经搜索过问题,但是没有找到解答。I have searched the question and found no related answer.
请提出你的问题 Please ask your question
When inferring, I used the following code,but there is no results on the image
def preprocess(self, srcimg):
img = cv2.cvtColor(srcimg, cv2.COLOR_BGR2RGB)
img = cv2.resize(img, self.input_size, interpolation=cv2.INTER_LINEAR)
img = img.astype(np.float32)
img = img / 255.
img -= self.mean_[None, None, :]
img /= self.std_[None, None, :]
img = np.transpose(img, [2, 0, 1])
return img
However, when I remove the code below, the result is normal
img = img / 255.
img -= self.mean_[None, None, :]
img /= self.std_[None, None, :]
see https://github.com/PaddlePaddle/PaddleDetection/blob/develop/ppdet/data/transform/operators.py#L399 divide 255 is executed, but just modify the norm_type to None for fast speed.