KFoldSplitter
- class cocohelper.splitters.kfold.KFoldSplitter[source]
Bases:
Splitter
Split a COCO dataset into n datasets.
- Parameters:
n_fold – Defines the number of folds to be used for k-fold cross-validation.
stratified – If True the dataset is stratified.
Method List
apply
(coco)Applies the splitter to the given COCOHelper.
iter
(coco)Used to iterate over the dataset splits.
Attributes List
Methods Details
- apply(coco)[source]
Applies the splitter to the given COCOHelper.
- Parameters:
coco (COCOHelper) – a COCOHelper containing the source dataset to be split.
- Returns:
A list containing the splits of the source COCO dataset.
- Return type:
List[COCOHelper]
- iter(coco)[source]
Used to iterate over the dataset splits.
- Parameters:
coco (COCOHelper) – a COCOHelper to be iterated over.
- Returns:
A COCOHelper with filtered image ids.
Attribute Details
- _abc_impl = <_abc._abc_data object>