Deci-AI / super-gradients

Easily train or fine-tune SOTA computer vision models with one open source training library. The home of Yolo-NAS.
https://www.supergradients.com
Apache License 2.0
4.59k stars 509 forks source link

using custom dataset #1825

Open skpawar1305 opened 9 months ago

skpawar1305 commented 9 months ago

📚 Documentation Improvement


import torch

class MyCustomDataset(torch.utils.data.Dataset):
    def __init__(self, train: bool, image_size: int):
        ...

    def __getitem__(self, item):
        ...
        return inputs, targets # Or inputs, targets, additional_batch_items

Hello, the above class is from the documentation to create a Custom Dataset without recipe. Without any example, it is very hard to understand what should I write, for a custom pose dataset. Anyway, I converted yolonas_pose_n recipe to code with the given script, which is a big help to be honest, and then simply modified data_loaders. Can you please write the above example class with a better example?

Thank you

I'll attach the modified recipe to code just in case train_coco2017_yolo_nas_n.zip

BloodAxe commented 9 months ago

Thanks for reporting!

For pose estimation you can refer to this Notebook on how to make a new dataset: https://github.com/Deci-AI/super-gradients/pull/1831