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

Implement LogImagesCallback and TrackTileMetricsPerScanner callback#111

Open
AjeyPaiK wants to merge 24 commits intomainfrom
feature/log_images_callback
Open

Implement LogImagesCallback and TrackTileMetricsPerScanner callback#111
AjeyPaiK wants to merge 24 commits intomainfrom
feature/log_images_callback

Conversation

@AjeyPaiK
Copy link
Member

@AjeyPaiK AjeyPaiK commented Sep 27, 2024

This PR implements two callbacks that are useful for training segmentation models.

The LogImagesCallback helps visualize validation batches along with tile-wise dice scores. Check below for an example. The logging can be done through any logger utility provided in pytorch lightning (currently supports mlflow and tensorboard).

image

The TrackTileMetricsPerScanner is useful to monitor the generalization gap which may occur while training models with datasets containing images scanned by a variety of scanners. This callback provides crucial insights into how well the model is doing on images from each of the vendors.

image

@AjeyPaiK AjeyPaiK changed the title Implment LogImagesCallback and TrackTileMetricsPerScanner callback Implement LogImagesCallback and TrackTileMetricsPerScanner callback Sep 27, 2024
@JorenB
Copy link
Contributor

JorenB commented Sep 30, 2024

Quick comment on first scan-through: file name and class name conventions are not the same between the two callbacks that are added here. My preference would be to leave out "callback" in the filename (it's clear from the parent folder), but to have the "Callback" at the end of the class name so that it's clear what we're dealing with when importing. Also, "TrackTileMetricsPerScannerCallback" is perhaps a bit convoluted, think about shortening it to something sensible.

If others have different ideas about the proposed naming conventions, feel free to comment on that. This also depends on the current conventions used in the rest of ahcore, of course.

@AjeyPaiK
Copy link
Member Author

AjeyPaiK commented Oct 2, 2024

@JorenB thanks for the comment. Currently, all the files inside the callbacks directory end with "callback". For example, abstract_file_writer_callback, file_writer_callback and so on...

I renamed the callback which tracks tile metrics per scanner as ScannerTileMetricsCallback

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