Skip to content

Commit

Permalink
Update formatting.py (#10743)
Browse files Browse the repository at this point in the history
  • Loading branch information
captainIT authored Aug 8, 2023
1 parent 5412e85 commit 4d2fbb0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mmdet/datasets/transforms/formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,8 @@ def transform(self, results: dict) -> dict:

img_meta = {}
for key in self.meta_keys:
assert key in results, f'`{key}` is not found in `results`, ' \
f'the valid keys are {list(results)}.'
img_meta[key] = results[key]

if key in results:
img_meta[key] = results[key]
data_sample.set_metainfo(img_meta)
packed_results['data_samples'] = data_sample

Expand Down

0 comments on commit 4d2fbb0

Please sign in to comment.