diff --git a/ppcls/utils/gallery2fc.py b/ppcls/utils/gallery2fc.py index ca208408210eab4f705305b87f2b66bb38b6140d..67b08529ebb37a8a147aa81f3ebb80dc13296624 100644 --- a/ppcls/utils/gallery2fc.py +++ b/ppcls/utils/gallery2fc.py @@ -73,7 +73,7 @@ class GalleryLayer(paddle.nn.Layer): input_tensor = paddle.zeros(self.image_shape) gallery_feature = paddle.zeros((len(self.gallery_images), embedding_size)) for i, image_path in enumerate(self.gallery_images): - image = cv2.imread(image_path) + image = cv2.imread(image_path)[:, :, ::-1] for op in preprocess_ops: image = op(image) input_tensor[batch_index] = image