Skip to content

Commit

Permalink
fix image size type is List bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mjq2020 committed Jul 10, 2023
1 parent e00ff76 commit b08a435
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/utils/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __init__(self, model: List or AnyStr or Tuple):
)
inter = tf.lite.Interpreter
net = inter(model)
self._input_shape = list(net.get_input_details()[0]['shape'][1:])
self._input_shape = tuple(net.get_input_details()[0]['shape'][1:])
net.allocate_tensors()
self.engine = 'tf'
else:
Expand Down Expand Up @@ -280,7 +280,8 @@ def __init__(

def init(self, cfg):
self.evaluator: Evaluator = self.runner.build_evaluator(self.cfg.get('val_evaluator'))
self.evaluator.dataset_meta = self.dataloader.dataset.METAINFO
if hasattr(self.dataloader, 'dataset'):
self.evaluator.dataset_meta = self.dataloader.dataset.METAINFO
if hasattr(cfg.model, 'data_preprocessor'):
self.data_preprocess = MODELS.build(cfg.model.data_preprocessor)

Expand Down

0 comments on commit b08a435

Please sign in to comment.