Closed pr4deepr closed 1 month ago
looking at the code: https://github.com/BiaPyX/BiaPy/blob/2c3d6cc6aca04ed738e9a201a14b636b5b13d836/biapy/data/generators/__init__.py#L385
should this
if calc_percentiles:
be
if not calc_percentiles:
???
Ok, I didn't realize I had to explicitly provide the lower and upper percentile file paths in the config file when running TEST.
So, now I've specified the paths under the key:
- PATHS.LWR_VAL_FILE
- PATHS.UPR_VAL_FILE
Once I do this, it works!!
I assumed they would have been automatically detected as I provided the PATHS.CHECKPOINT_FILE.
Is this worth adding in the documentation? or did I miss this part?
Cheers Pradeep
Also, to add the UPR_VAL_FILE and LWR_VAL_FILE were both in same directory as PATHS.CHECKPOINT_FILE..
Hi,
Sorry for the delay... I'm pushing new changes (60e06cc): I separated the percentile clipping for the normalization, so you can apply it using 'custom'
normalization. The idea of having these values stored is to load during test to do the same percentile clipping as the one used during train/val. This will be done when DATA.NORMALIZATION.APPLICATION_MODE == "dataset"
, otherwise a per image clipping will be made. I'm changing the documentation to reflect these changes and also information regarding the values stored under checkpoints
folder so the users can now where they are.
Thank you again!
Feel free to close the issue if you want. Tell me when you also checked that it works as you expected so we can close also #73 ;)
Hi @pr4deepr, did you have time to check this? Thanks a lot!
Hi Sorry, I haven't. Will get onto this soon. Pradeep
Hello,
Just to tell you that we make a new release of BiaPy solving minor bugs and some related to percentile clippling. Now it should be running in all the cases. It would be nice if you can try and reproduce the results you got by doing that clipping outside BiaPy. Our doc to use the clipping is also updated here.
Hi @danifranco I gave it a go and I can run it using the CLI and the percentile clipping seems to be working for both training and inference. Thanks for updating the doc. I like the option of clipping and then having different normalization options.
Cheers Pradeep
Thank you so much for trying it!! I'm closing the issue.
Hi @danifranco I've trained a model using percentile normalization with the 3D detection workflow. I'm running into errors during the "TEST" part of the workflow.
I keep getting this error:
I have the lower_bound_perc.npy and upper_bound_perc.npy.. I checked the lower and upper bound files and they are:
Looks like something to do with the logic in this code block:
https://github.com/BiaPyX/BiaPy/blob/2c3d6cc6aca04ed738e9a201a14b636b5b13d836/biapy/data/generators/__init__.py#L363
Cheers Pradeep