diff options
author | Jordan Gong <jordan.gong@protonmail.com> | 2020-12-19 21:16:19 +0800 |
---|---|---|
committer | Jordan Gong <jordan.gong@protonmail.com> | 2020-12-19 21:16:19 +0800 |
commit | 0d4c20a8104a77f2f61f5ce0ac46c3a26d61b9c1 (patch) | |
tree | 539cc16bf561dfe9ea2b69b21b159cadbb7161b3 /utils | |
parent | d7975c6a9b3814aa09f8a9ad48647f741d097060 (diff) |
1. Delete unused transform function
2. Reorganize the initialization cache dicts
Diffstat (limited to 'utils')
-rw-r--r-- | utils/dataset.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/utils/dataset.py b/utils/dataset.py index 63cffa5..f41a9c5 100644 --- a/utils/dataset.py +++ b/utils/dataset.py @@ -14,10 +14,6 @@ ClipLabels = NewType('ClipLabels', Set[str]) ClipConditions = NewType('ClipConditions', Set[str]) ClipViews = NewType('ClipViews', Set[str]) -default_frame_transform = transforms.Compose([ - transforms.Resize(size=(64, 32)) -]) - class CASIAB(data.Dataset): """CASIA-B multi-view gait dataset""" @@ -89,6 +85,11 @@ class CASIAB(data.Dataset): # set of three attributes above self.metadata = Dict[str, Set[str]] + # Dictionaries for indexing frames and frame names by clip name + # and chip path when cache is on + self._cached_clips_frame_names: Optional[Dict[str, List[str]]] = None + self._cached_clips: Optional[Dict[str, torch.Tensor]] = None + clip_names = sorted(os.listdir(self.root_dir)) if self.is_train: @@ -166,8 +167,6 @@ class CASIAB(data.Dataset): 'views': set(self.views.tolist()) } - self._cached_clips_frame_names: Optional[Dict[str, List[str]]] = None - self._cached_clips: Optional[Dict[str, torch.Tensor]] = None if self.cache_on: self._cached_clips_frame_names = dict() self._cached_clips = dict() |