Skip to content

Commit

Permalink
Update callbacks.py
Browse files Browse the repository at this point in the history
  • Loading branch information
martvanrijthoven authored Jun 23, 2024
1 parent 6e12013 commit 826aad1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wholeslidedata/annotation/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ def __call__(self, annotations: List[Annotation]):
for x in range(x1, x2, self._tile_size-self._overlap):
for y in range(y1, y2, self._tile_size-self._overlap):
box_poly = geometry.box(x, y, x+self._tile_size, y+self._tile_size)
if not self._full_coverage or box_poly.within(annotation):
if not self._full_coverage or box_poly.within(annotation.geometry):
new_annotations.append(Annotation.create(
index=index,
coordinates=box_poly.exterior.coords,
label=annotation.label.todict(),
))
index += 1

return new_annotations
return new_annotations

0 comments on commit 826aad1

Please sign in to comment.