mlexchange / mlex_dlsia_segmentation_prototype

Other
3 stars 3 forks source link

Inconsistency of normalization between training and inference #29

Open TibbersHao opened 2 months ago

TibbersHao commented 2 months ago

For the current state of normalization function in utils.py, input could either be a single frame array or stacked array if multiple masks are provided. When more than one mask is provided, normalization step in training will take the percentile based on all pixel values across frames to perform min-max normalization, while for inference step only one image is passed in each time, so the normalization base is different. This needs to be corrected either by modifying the normalization function itself, or in the training script to make it consistent.