未验证 提交 a10dd0ac 编写于 作者: W Walter 提交者: GitHub

Merge pull request #862 from littletomatodonkey/cp2.2/fix_rec_yaml

fix vehicle config
...@@ -73,9 +73,6 @@ DataLoader: ...@@ -73,9 +73,6 @@ DataLoader:
bbox_crop: True bbox_crop: True
cls_label_path: "./dataset/CompCars/train_test_split/classification/train_label.txt" cls_label_path: "./dataset/CompCars/train_test_split/classification/train_label.txt"
transform_ops: transform_ops:
- DecodeImage:
to_rgb: True
channel_first: False
- ResizeImage: - ResizeImage:
size: 224 size: 224
- RandFlipImage: - RandFlipImage:
...@@ -113,9 +110,6 @@ DataLoader: ...@@ -113,9 +110,6 @@ DataLoader:
cls_label_path: "./dataset/CompCars/train_test_split/classification/test_label.txt" cls_label_path: "./dataset/CompCars/train_test_split/classification/test_label.txt"
bbox_crop: True bbox_crop: True
transform_ops: transform_ops:
- DecodeImage:
to_rgb: True
channel_first: False
- ResizeImage: - ResizeImage:
size: 224 size: 224
- NormalizeImage: - NormalizeImage:
......
...@@ -117,8 +117,8 @@ class VeriWild(Dataset): ...@@ -117,8 +117,8 @@ class VeriWild(Dataset):
def __getitem__(self, idx): def __getitem__(self, idx):
try: try:
img = cv2.imread(self.images[idx]) with open(self.images[idx], 'rb') as f:
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) img = f.read()
if self._transform_ops: if self._transform_ops:
img = transform(img, self._transform_ops) img = transform(img, self._transform_ops)
img = img.transpose((2, 0, 1)) img = img.transpose((2, 0, 1))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册