Skip to content

Inverse class probability weights #85

Description

** also:
if class# range from 0 to 19 (20 classes), it would be hist = np.histogram(label_img, range=[0,self.classes-1],self.classes)[0]
**

I think there are issues with the calculation of the class weights?

In train/loadData.py, I don't think "hist = np.histogram(label_img, self.classes)" has the desired result.
In the absence of range, np.histogram will use the min and max value of the array...

Should it not be "hist = np.delete(np.histogram(label_img, range=[0,self.classes],self.classes+1)[0],[0])" ?
(i.e. for 20 classes, range is [0,20] with 21 bins, and bin "0" gets discarded)

I'd be glad to understand why I'm wrong otherwise :)

Nicolas.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions