TensorFlow-ENet
TensorFlow-ENet copied to clipboard
Wrong implementation of median frequency re-weighting.
https://github.com/kwotsin/TensorFlow-ENet/blob/8bb8322b343f65fa8740f731d31fcb361d8546f7/get_class_weights.py#L88-L94
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.
Do you specifically refer to line 91 where the median is divided by sum(j)?
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.