Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug #1874

Merged
merged 2 commits into from
Feb 29, 2024
Merged

fix bug #1874

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading