Skip to content
Snippets Groups Projects
Commit e25f1464 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[data.csvdataset] Fixes

parent 20364461
No related branches found
No related tags found
1 merge request!12Streamlining
...@@ -12,6 +12,9 @@ import torchvision.transforms.functional as VF ...@@ -12,6 +12,9 @@ import torchvision.transforms.functional as VF
import bob.io.base import bob.io.base
import logging
logger = logging.getLogger(__name__)
class CSVDataset(Dataset): class CSVDataset(Dataset):
""" """
...@@ -154,4 +157,9 @@ class CSVDataset(Dataset): ...@@ -154,4 +157,9 @@ class CSVDataset(Dataset):
if self.transform: if self.transform:
sample = self.transform(*sample) sample = self.transform(*sample)
return [img_path] + sample stem = img_path
if stem.startswith(self.root_path):
stem = os.path.relpath(stem, self.root_path)
elif stem.startswith(os.pathsep):
stem = stem[len(os.pathsep):]
return [stem] + sample
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment