Skip to content

Commit

Permalink
follow the format
Browse files Browse the repository at this point in the history
  • Loading branch information
ccomkhj authored Aug 2, 2024
1 parent 3440e41 commit 3a1e953
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sahi/models/mmdet.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,10 @@ def has_mask(self):
"""
# has_mask = self.model.model.with_mask
train_pipeline = self.model.cfg["train_dataloader"]["dataset"]["pipeline"]
has_mask = any(isinstance(item, dict) and any('mask' in key and value is True for key, value in item.items()) for item in train_pipeline)
has_mask = any(
isinstance(item, dict) and any("mask" in key and value is True for key, value in item.items())
for item in train_pipeline
)
return has_mask

@property
Expand Down

0 comments on commit 3a1e953

Please sign in to comment.