The military fight against the Islamic State has been exceedingly difficult and costly, especially to the Iraqi and Syrian forces that have fought the group for years, but also to civilians uprooted from their homes and forced to flee in order to survive.