Skip to content

Commit

Permalink
fix bug (#1874)
Browse files Browse the repository at this point in the history
* fix bug

* fixed according to review
  • Loading branch information
ofrimasad authored Feb 29, 2024
1 parent ac0f4b4 commit 6c8fa3a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ def __call__(self, sample: Union["DetectionSample", Dict[str, Any]]) -> Union["D
if isinstance(sample, DetectionSample):
return self.apply_to_sample(sample)
else:
has_crowd_target = "crowd_target" in sample
sample = self.convert_input_dict_to_detection_sample(sample)
sample = self.apply_to_sample(sample)
return self.convert_detection_sample_to_dict(sample, include_crowd_target="crowd_targets" in sample)
return self.convert_detection_sample_to_dict(sample, include_crowd_target=has_crowd_target)

@classmethod
def convert_input_dict_to_detection_sample(cls, sample_annotations: Dict[str, Union[np.ndarray, Any]]) -> DetectionSample:
Expand Down

0 comments on commit 6c8fa3a

Please sign in to comment.