Description
Currently, pixel statistics are calculated for training inputs to the de-noising model and ground truth de-noised images. These statistics allow for:
- The normalization of inputs according to intensity percentiles calculated from a large sample will normalize any given input FLAME image (sample size n=1) to the pixel distribution from a large set of FLAME images.
- Similarly, outputs from the de-noising model will be initialized to a pixel range from 0-1. While CARE-denoised FLAME images will never be fully quantitative, we can approximate quantitative pixel intensities by scaling the 0-1 range to intensity percentiles calculated from a large dataset of ground truth de-noised images (i.e. more frame accumulations).
To maximize the flexibility of the codebase for model training and evaluation, the ideal behavior would be for create_care_dataset.ipynb to aggregate pixel statistics in subsets of the larger dataset grouped by number of channels.
Example 1
Inputs to dataset: (N1,Y,X,3)
Current Behavior: Fields are saved to 'FLAME_Dataset' field in the dataset json.
input_1pct, input_99pct, output_1pct, output_99pct: 1D array of size 3 (matching the number of channels in the input)
Example 2
Inputs to dataset: (N1,Y,X,3), (N2,Y,X,1), (N3,Y,X,16)
Current Behavior: Error; code crashes.
Desired Behavior: Each of the subfields saved to the 'FLAME_Dataset' field in the dataset json (input_1pct, input_99pct, output_1pct, output_99pct) should contain pixel statistics matching the number of channels in each input subgroup:
3chan: 1D array of size 3
1chan: 1D array of size 1 (or simply a float32 value)
16chan: 1D array of size 16