How to get binary scores?
swamiviv opened this issue · 2 comments
The process_image.py script provides scores from classifier models in the interval [0, 1]. In order to ensure a binary decision, these scores have to compared to a threshold (normally 0.5). Are these the thresholds that are made available in the models.py script? What's the exact procedure to convert the model output scores to binary 0/1 decision?
The pre-trained models are already calibrated so that 0.5 is the operating point of the AUC curve. See Section 2.5. https://arxiv.org/abs/2111.00595
So you can just take the outputs and test >0.5
For more info on how the model calibration is performed see this code: https://github.com/mlmed/torchxrayvision/blob/master/scripts/model_calibrate.py
Thanks for the quick response and the clarification.
I had to convince myself that Eqn (1) in the paper was implemented somewhere and it happened to be attached to the forward method from the op_norm routine. Thanks again :)