Wrong implementation of median frequency re-weighting.
nnop opened this issue · 2 comments
nnop commented
TensorFlow-ENet/get_class_weights.py
Lines 88 to 94 in 8bb8322
The implementation is not consistent with that stated in (Eigen and Fergus, 2015) :
Reference:
- D. Eigen and R. Fergus, “Predicting depth, surface normals and semantic labels with a common multi-scale convolutional architecture,” in ICCV, pp. 2650–2658, 2015.
kwotsin commented
Do you specifically refer to line 91 where the median is divided by sum(j)
?
nnop commented
You should take the median of frequencies among all classes, not the median among all images of a single class. Meanwhile, not needing sorting before use np.median
.