Skip to content

Commit

Permalink
fix(dataset): add get_image to KWCocoDataset
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulHax committed Nov 12, 2024
1 parent 2aaf3fc commit 8e625b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/nrtk_explorer/app/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
dataset_id_to_image_id,
dataset_id_to_transformed_image_id,
)
from nrtk_explorer.library.dataset import get_dataset
from nrtk_explorer.app.images.images import Images
from nrtk_explorer.app.images.stateful_annotations import (
make_stateful_annotations,
Expand Down
4 changes: 3 additions & 1 deletion src/nrtk_explorer/library/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ def make_coco_dataset(path: str):
import kwcoco

class CocoDataset(kwcoco.CocoDataset, BaseDataset):
pass
def _get_image(self, id: int):
image_fpath = self.get_image_fpath(id)
return Image.open(image_fpath)

return CocoDataset(path)
except ImportError:
Expand Down

0 comments on commit 8e625b5

Please sign in to comment.