Data gradients analysis for segmentation of dataset in yolo format
Soorajkumar3 opened this issue · 3 comments
Soorajkumar3 commented
💡 Your Question
Is this data gradient not available for segmentation analysis of dataset in yolo format?
Louis-Dupont commented
Hi @Soorajkumar3
We don't provide a built-in class to instantiate a segmentation dataset that would be in YOLO format.
But if you already have a dataset class that loads your data (YOLO format or any), then you can use it inside DataGradients.
Soorajkumar3 commented
can you share a example , examples in the documentation were not helpful
Louis-Dupont commented
Let's start with that example
from data_gradients.managers.segmentation_manager import SegmentationAnalysisManager
train_data = ...
val_data = ...
class_names = ...
analyzer = SegmentationAnalysisManager(
report_title="Testing Data-Gradients Segmentation",
train_data=train_data,
val_data=val_data,
class_names=class_names,
)
analyzer.run()
What you need to have to use this script is:
- training dataset/dataloader
train_data
- validation dataset/dataloader
val_data
- list of class names that appear in your dataset
This assumes that you already have a dataset/dataloader implementation (as explained in my previous comment).
If you don't, then you have two options;
- Either convert your data to COCO or VOC format. We provide built-in dataset formats for both types (Yolo format may come later but we don't support it currently)
- Or build your own dataset class, which should iterate over your images/masks