Thiazole derivatives of formula I are provided
as well as pharmaceutically acceptable salts and esters thereof, wherein R
1
to R
5
, a and b have the significance given in the specification. The compounds are neuropeptide Y Y5 receptor antagonists which can be used for the treatment of obesity.