Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Implement better tile aggregation #98

Merged
merged 20 commits into from
Jul 15, 2024
Merged

Implement better tile aggregation #98

merged 20 commits into from
Jul 15, 2024

Conversation

AjeyPaiK
Copy link
Member

@AjeyPaiK AjeyPaiK commented Jul 12, 2024

This PR implements StitchingMode.AVERAGE along with StitchingMode.MAXIMUM in ahcore.readers for better tile stitching.

Functionality of the stitching modes illustrated through a test case:

  1. We make a 2x2 grid with tiles of size (200,200) with an overlap of (50,50).
  2. Each tile has a different color and at the overlaps, the colors are mixed as shown below.
  3. In the overlap regions, the portion where two tiles overlap has a value of 4, the portions where two tiles overlap has a value of 2. The black regions have a value of 1.
  4. The overlap regions array is used for the averaging operation or to calculate maximum values.
  5. The test I have implemented checks for colors in the different overlap regions and non-overlapping regions of the stitched image and asserts for correctness.
Stitched Tile Overlap Regions
stitched_tile overlap_count

What is the effect of this on the quality of segmentation outputs? Check below.

Before After Averaging After Averaging with large tile_overlap
before after_averaging after_gaussian

@AjeyPaiK AjeyPaiK changed the title ImplemntBetter tile aggregation Implement better tile aggregation Jul 12, 2024
@AjeyPaiK AjeyPaiK requested a review from jonasteuwen July 12, 2024 23:31
@jonasteuwen jonasteuwen merged commit fc84395 into main Jul 15, 2024
@jonasteuwen jonasteuwen deleted the feature/gaussian-blur branch July 15, 2024 12:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants