Open martinwholtmon opened 2 months ago
Refactor the dataset so that we have a abstract class defining the dataset, and abstract from it to create the modifications for the VideoDataset and RawFrameDataset. The abstract class could be named "ClsDataset" -> ClassificationDataset.
https://github.com/martinwholtmon/IT3920-2024-Master-MSIT/blob/dev/src/har_project/data/datasets.py
Basically, both of those two files are close to equal, the only difference is in the __getitem__, load_video and the fields:
__getitem__
load_video
self.loader = .. self.sampler = ..
Idealy, create a better logic so that only one method is overridden. It is fine for the fields to be set in the subclasses. Use ABC: https://www.geeksforgeeks.org/abstract-classes-in-python/
Refactor the dataset so that we have a abstract class defining the dataset, and abstract from it to create the modifications for the VideoDataset and RawFrameDataset. The abstract class could be named "ClsDataset" -> ClassificationDataset.
https://github.com/martinwholtmon/IT3920-2024-Master-MSIT/blob/dev/src/har_project/data/datasets.py
Basically, both of those two files are close to equal, the only difference is in the
__getitem__
,load_video
and the fields:Idealy, create a better logic so that only one method is overridden. It is fine for the fields to be set in the subclasses. Use ABC: https://www.geeksforgeeks.org/abstract-classes-in-python/