-
Notifications
You must be signed in to change notification settings - Fork 1
Implement LogImagesCallback
and TrackTileMetricsPerScanner
callback
#111
base: main
Are you sure you want to change the base?
Conversation
This reverts commit 4b812da.
LogImagesCallback
and TrackTileMetricsPerScanner
callbackLogImagesCallback
and TrackTileMetricsPerScanner
callback
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. |
@JorenB thanks for the comment. Currently, all the files inside the callbacks directory end with "callback". For example, I renamed the callback which tracks tile metrics per scanner as |
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).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.