Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YoloDataset Contains Misleading Variable Names #108

Open
jonasdieker opened this issue Oct 25, 2024 · 1 comment
Open

YoloDataset Contains Misleading Variable Names #108

jonasdieker opened this issue Oct 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jonasdieker
Copy link

Description

I am confused about the following method:

def filter_data(self, dataset_path: Path, phase_name: str) -> list:
"""
Filters and collects dataset information by pairing images with their corresponding labels.
Parameters:
images_path (Path): Path to the directory containing image files.
labels_path (str): Path to the directory containing label files.
Returns:
list: A list of tuples, each containing the path to an image file and its associated segmentation as a tensor.
"""

My impression is that this is a general dataset, yet it seems to only load segmentations and no bboxes, judging from the docstring and variable names.
However, the following method, which does the actual loading seems to talk about bboxes again, even though the argument is clearly called seg_data_one_img:

def load_valid_labels(self, label_path: str, seg_data_one_img: list) -> Union[Tensor, None]:
"""
Loads and validates bounding box data is [0, 1] from a label file.

@jonasdieker jonasdieker added the bug Something isn't working label Oct 25, 2024
@nkinnaird
Copy link

I think it's just a language/translation thing, and it does load bboxes as you say (and maybe can load segmentation masks with the right config, but I haven't tested that or looked into it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants