From 46482488c997333259012901c9b38e63308f261d Mon Sep 17 00:00:00 2001 From: Martin <1500595+bmmtstb@users.noreply.github.com> Date: Sat, 6 Jan 2024 23:22:42 +0100 Subject: [PATCH] first draft of train_torchreid.py with PT21 dataset Signed-off-by: Martin <1500595+bmmtstb@users.noreply.github.com> --- dgs/models/dataset/posetrack.py | 10 ++++------ pyproject.toml | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dgs/models/dataset/posetrack.py b/dgs/models/dataset/posetrack.py index 1823969..48cb33d 100644 --- a/dgs/models/dataset/posetrack.py +++ b/dgs/models/dataset/posetrack.py @@ -360,9 +360,6 @@ class PoseTrack21Torchreid(ImageDataset): Args: root (str): Root directory of all the datasets. Default "./data/" - Attributes: - dataset_dir (str): Name of the directory containing the dataset within ``root``. - Notes: The bbox crops are generated using :func:`extract_all_bboxes()`. @@ -378,13 +375,14 @@ class PoseTrack21Torchreid(ImageDataset): """ - dataset_dir: str = "PoseTrack21" + dataset_dir: FilePath = "PoseTrack21" + """Name of the directory containing the dataset within ``root``.""" def __init__(self, root: str = "", **kwargs): self.root: FilePath = ( - os.path.abspath(os.path.expanduser(root)) if len(root) else os.path.join(PROJECT_ROOT, "./data/") + os.path.abspath(os.path.expanduser(root)) if root else os.path.join(PROJECT_ROOT, "./data/") ) - self.dataset_dir: FilePath = os.path.join(self.root, self.dataset_dir) + self.dataset_dir = os.path.join(self.root, self.dataset_dir) # annotation directory # self.annotation_dir: FilePath = os.path.join(self.dataset_dir, "posetrack_data") diff --git a/pyproject.toml b/pyproject.toml index 9fd9181..bbbfee9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,6 +63,7 @@ source = ["dgs"] omit = [ "*/backbone/*", # fixme either remove backbone entirely or get it fully working... "*/utils/torchtools.py", # copied from torchreid + "tracker_api.py", # will only contain default tracker which cant really be tested without data ] [tool.coverage.paths]