TensorFlow-ENet icon indicating copy to clipboard operation
TensorFlow-ENet copied to clipboard

Wrong implementation of median frequency re-weighting.

Open nnop opened this issue 7 years ago • 2 comments

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) :

image

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.

nnop avatar Jul 22 '18 09:07 nnop

Do you specifically refer to line 91 where the median is divided by sum(j)?

kwotsin avatar Jul 23 '18 15:07 kwotsin

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.

nnop avatar Jul 24 '18 09:07 nnop