Fixed RGB subtraction

parent bf346e32
Pipeline #52287 failed with stage
in 83 minutes and 34 seconds
......@@ -135,14 +135,15 @@ class VGG16_Oxford(OpenCVTransformer):
Caffe has the shape `C x H x W` and the chanel is BGR and
"""
# To BGR
X = X[:, ::-1, :, :].astype("float32")
# Subtracting
X[:, :, :, 0] -= caffe_average_img[0]
X[:, :, :, 1] -= caffe_average_img[1]
X[:, :, :, 2] -= caffe_average_img[2]
# To BGR
X = X[:, ::-1, :, :].astype("float32")
return X
super(VGG16_Oxford, self).__init__(checkpoint_path, config, preprocessor)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment