[Fix] Fix TextSpottingConfigGenerator and TextSpottingDataConverter (#1604)

* [Fix] Fix TextSpottingConfigGenerator

* fix
pull/1567/head
Tong Gao 2022-12-06 16:28:37 +08:00 committed by GitHub
parent d9ea92191e
commit e095107518
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -362,6 +362,7 @@ class TextSpottingConfigGenerator(TextDetConfigGenerator):
config_path: str = 'configs/',
) -> None:
BaseDatasetConfigGenerator.__init__(
self,
data_root=data_root,
task='textspotting',
overwrite_cfg=overwrite_cfg,

View File

@ -365,7 +365,10 @@ class TextSpottingDataConverter(BaseDataConverter):
packed_instances.append(packed_sample)
packed_instances = dict(
instances=packed_instances, img_path=img_path, height=h, width=w)
instances=packed_instances,
img_path=img_path.replace(self.data_root + '/', ''),
height=h,
width=w)
return packed_instances