Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions yolo/tools/data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def load_data(self, dataset_path: Path, phase_name: str):
Returns:
dict: The loaded data from the cache for the specified phase.
"""
cache_path = dataset_path / f"{phase_name}.pache"
cache_path = dataset_path / f"{phase_name}.cache"

if not cache_path.exists():
logger.info(f":factory: Generating {phase_name} cache")
Expand Down Expand Up @@ -87,7 +87,7 @@ def filter_data(self, dataset_path: Path, phase_name: str, sort_image: bool = Fa
data_type, adjust_path = "txt", True
# TODO: should i sort by name?
with open(file_list, "r") as file:
images_list = [dataset_path / line.rstrip() for line in file]
images_list = [images_path / line.rstrip() for line in file]
labels_list = [
Path(str(image_path).replace("images", "labels")).with_suffix(".txt") for image_path in images_list
]
Expand Down