Class weighting #65
ebgoldstein
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Some classes are more or less abundant than others for many segmentation tasks. It is possible that the class one cares about most is rare.. One way to potential get better predictions for this rare class is to implement a weighting in the loss function. However, passing in a class weight parameter to
model.fit()
will not work (see github.com/ keras-team/ keras/issues/3653 if you want more detail.. note that spaces are intentionally inserted into that link to avoid this discussion being linked to the issue)...To do any sort of weighting, we would need to make and pass a weight for each pixel, so essentially developing a second label that records weights... here is the TF tutorial on the topic: https://www.tensorflow.org/tutorials/images/segmentation#optional_imbalanced_classes_and_class_weights
this would be done in
make_dataset
and be activated based on a new parameter in the config..I am mentioning it here for posterity.
Beta Was this translation helpful? Give feedback.
All reactions