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

[Feature] I've added support for YoloTxt Dataset Format #3177

Open
NWalker4483 opened this issue Dec 26, 2024 · 1 comment
Open

[Feature] I've added support for YoloTxt Dataset Format #3177

NWalker4483 opened this issue Dec 26, 2024 · 1 comment

Comments

@NWalker4483
Copy link

What is the feature?

Why?

  1. I've been working with a lot of synthetic data and find the txt format makes it easier to experiment with my tools and it's straightforward
  2. A lot of people already use this format for their computer vision projects

How it works

The dataset follows this structure:

dataset_root/
├── train/
│   ├── images/
│   │   ├── image1.jpg
│   │   └── image2.jpg
│   └── labels/
│       ├── image1.txt
│       └── image2.txt
└── val/
    ├── images/
    │   ├── image3.jpg
    │   └── image4.jpg
    └── labels/
        ├── image3.txt
        └── image4.txt

Label Format

Each .txt file contains one annotation per line in the format:
{class_id} {x_center} {y_center} {width} {height} {keypoint_x1} {keypoint_y1} {visible1} {keypoint_x2} {keypoint_y2} {visible2} ...

Where:

  • All values are normalized to [0, 1]
  • visible is 0 for not labeled, 1 for labeled but not visible, 2 for labeled and visible

Usage

train_dataloader = dict(
    ...
    dataset=dict(
        type='YOLOPoseDataset',
        data_root=data_root,
        data_mode=data_mode,
        data_prefix=dict(img='train'),
        pipeline=train_pipeline,
        metainfo=dict(from_file=metainfo_file)
    ),
)

Is this considered within scope for a PR?

Any other context?

No response

@NWalker4483
Copy link
Author

To be clear, this is something I'm implemented already for my project. I'm just curious if it's within scope to be merged by the repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant