mirror of
https://github.com/open-mmlab/mmdeploy.git
synced 2025-01-14 08:09:43 +08:00
fix mmocr create input error when the arg is array (#1721)
This commit is contained in:
parent
d28020ec34
commit
bc1b6440cd
@ -29,6 +29,9 @@ def process_model_config(model_cfg: mmengine.Config,
|
|||||||
Returns:
|
Returns:
|
||||||
mmengine.Config: the model config after processing.
|
mmengine.Config: the model config after processing.
|
||||||
"""
|
"""
|
||||||
|
if isinstance(imgs[0], np.ndarray):
|
||||||
|
# set loading pipeline type
|
||||||
|
model_cfg.test_pipeline[0].type = 'LoadImageFromNDArray'
|
||||||
test_pipeline = model_cfg._cfg_dict.test_pipeline
|
test_pipeline = model_cfg._cfg_dict.test_pipeline
|
||||||
for i, transform in enumerate(test_pipeline):
|
for i, transform in enumerate(test_pipeline):
|
||||||
if transform.type == 'PackTextRecogInputs':
|
if transform.type == 'PackTextRecogInputs':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user