mirror of https://github.com/open-mmlab/mmocr.git
[Fix] Fix TextSpottingConfigGenerator and TextSpottingDataConverter (#1604)
* [Fix] Fix TextSpottingConfigGenerator * fixpull/1567/head
parent
d9ea92191e
commit
e095107518
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue