How to calculate weights for multilable dataset

I am trying to solve a multi label classification problem, but my dataset is heavily imbalanced.My labels look like this

enter image description here

I want to pass weights to my loss function,So my question is How can i calculate weights for my dataset.Any suggestions would be very helpful.Thanks in advance.

Also General advice on multilabel problems would also help.

Elaborate your doubt please