Skip to content

Commit

Permalink
Quick typing fix for datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
sheridana committed Jun 30, 2023
1 parent 5f92052 commit d8a44a6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion biogtr/datasets/cell_tracking_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(
clip_length: int = 10,
mode: str = "train",
augmentations: Optional[dict] = None,
gt_list: str = None,
gt_list: Optional[str] = None,
):
"""Initialize CellTrackingDataset.
Expand Down
3 changes: 2 additions & 1 deletion biogtr/datasets/microscopy_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from biogtr.datasets.base_dataset import BaseDataset
from torch.utils.data import Dataset
from torchvision.transforms import functional as tvf
from typing import Optional
import albumentations as A
import numpy as np
import random
Expand All @@ -23,7 +24,7 @@ def __init__(
chunk: bool = False,
clip_length: int = 10,
mode: str = "Train",
augmentations: dict = None,
augmentations: Optional[dict] = None,
):
"""Initialize MicroscopyDataset.
Expand Down
15 changes: 8 additions & 7 deletions biogtr/datasets/sleap_dataset.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"""Module containing logic for loading sleap datasets."""
from biogtr.datasets import data_utils
from biogtr.datasets.base_dataset import BaseDataset
from torchvision.transforms import functional as tvf
from typing import List, Optional
import albumentations as A
import torch
import imageio
import numpy as np
import sleap_io as sio
import random
from biogtr.datasets import data_utils
from biogtr.datasets.base_dataset import BaseDataset
from torchvision.transforms import functional as tvf
from typing import List
import sleap_io as sio
import torch


class SleapDataset(BaseDataset):
Expand All @@ -23,7 +23,7 @@ def __init__(
chunk: bool = True,
clip_length: int = 500,
mode: str = "train",
augmentations: dict = None,
augmentations: Optional[dict] = None,
):
"""Initialize SleapDataset.
Expand Down Expand Up @@ -137,6 +137,7 @@ def get_instances(self, label_idx: List[int], frame_idx: List[int]) -> list[dict
gt_track_ids, bboxes, crops, poses, shown_poses = [], [], [], [], []

i = int(i)
print(i)

lf = video[i]
img = vid_reader.get_data(i)
Expand Down

0 comments on commit d8a44a6

Please sign in to comment.