Skip to content

Commit

Permalink
Merge branch 'main' into MMdet-Language-Vision-models-support
Browse files Browse the repository at this point in the history
  • Loading branch information
fcakyon authored Aug 27, 2024
2 parents c2311b4 + 19a4334 commit d8b8e2f
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 @@ -220,7 +220,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 for key in item.keys()) 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 d8b8e2f

Please sign in to comment.