mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-01 05:20:32 +08:00
Changing filepaths to Path obj (#303)
changing from using strings to paths
This commit is contained in:
1 parent
2d1ba13e12
commit
8f42ce4b34
6 files changed
+70
-92
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user