|
import json |
|
|
|
import datasets |
|
|
|
|
|
datasets.Features( |
|
{ |
|
"img_id": datasets.Image("path"), |
|
"anno_polygons": datasets.Sequence( |
|
{ |
|
[ |
|
{'category_id': datasets.Value("int32"), |
|
'segmentation': datasets.Sequence(feature=list, ), |
|
'area': datasets.Value("int64"), |
|
'bbox': datasets.Sequence('list'), |
|
'width': datasets.Value('int32'), |
|
'height': datasets.Value('int32') |
|
}, |
|
] |
|
} |
|
), |
|
"anno_texts": datasets.Value("string"), |
|
"anno_labels": datasets.Value("string"), |
|
"anno_num": datasets.Value("int32"), |
|
"anno_image_quality": datasets.Value("float64") |
|
} |
|
) |
|
|
|
|
|
_URL = "" |
|
def _split_generators(self, dl_manager): |
|
|
|
return [ |
|
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": ".\mcocr_public_train_test_shared_data\mcocr_train_data"}), |
|
datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": ".\mcocr_public_train_test_shared_data\mcocr_val_data"}), |
|
] |
|
|
|
|