EFS-OpenSource / calibration-framework

The net:cal calibration framework is a Python 3 library for measuring and mitigating miscalibration of uncertainty estimates, e.g., by a neural network.
https://efs-opensource.github.io/calibration-framework/
Apache License 2.0
335 stars 42 forks source link

RuntimeError: On detection mode, it is mandatory to provide binary labels y in [0,1]. #49

Closed rishabh706 closed 1 month ago

rishabh706 commented 10 months ago

Hi, I am passing the below input to the LogisticCalibration, but it is giving the runtime error.

`confidence_scores = np.array([0.70745564, 0.71694] matched = np.array([1, 1] # as both are boxes are matched with the ground truth's relative_x_position = np.array([0.7543349742889405, 0.24766819924116135]) input = np.stack((confidences_scores, relative_x_position), axis=1)

lr = LogisticCalibration(detection=True, use_cuda=False) # flag 'detection=True' is mandatory for this method lr.fit(input, matched) calibrated = lr.transform(input) `

Screenshot 2023-11-02 at 4 24 55 PM

Thanks

fabiankueppers commented 9 months ago

Thanks for pointing out, I will fix this asap.