Changing filepaths to Path obj (#303)

changing from using strings to paths
This commit is contained in:
evonneng authored and GitHub committed 2022-08-30 14:23:04 -07:00
1 parent 2d1ba13e12
commit 8f42ce4b34
6 files changed
+70 -92

No files matched your search

+3 -2
View File
@@ -17,6 +17,7 @@ Some dataset code.
"""
from abc import abstractmethod
from pathlib import Path
from typing import Dict, List, Optional, Union
import numpy as np
@@ -35,7 +36,7 @@ class ImageDataset(Dataset):
def __init__(
self,
image_filenames: List[str],
image_filenames: List[Path],
downscale_factor: int = 1,
alpha_color: Optional[TensorType[3]] = None,
**kwargs,
@@ -134,7 +135,7 @@ class PanopticImageDataset(ImageDataset):
def __init__(
self,
semantics: Semantics,
image_filenames: List[str],
image_filenames: List[Path],
downscale_factor: int = 1,
alpha_color: Optional[TensorType[3]] = None,
**kwargs,