Skip to content

Commit

Permalink
fix datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
Noietch committed Oct 22, 2024
1 parent 5e2d9ea commit 94cd475
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions oadp/dp/datasets/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,8 @@ def filter_data(self) -> list[dict[str, Any]]:
key: str = datum['img_path']
patch: str = osp.split(osp.split(datum['img_path'])[0])[1]
image_name = osp.basename(key)
version = image_name.split('_')[1]
key = image_name.removesuffix('.jpg')
key = f'{version}_{patch}_{key}'
key = f'{patch}_{key}'
keys[key] = i

invalid_indices = {keys[key] for key in keys.keys() - valid_keys}
Expand Down

0 comments on commit 94cd475

Please sign in to comment.