I think this is something we all yearn for: a sure way to detect scam ICO but as it stands now, I don't think there is that way. What we can do is to go by the already known ways; consider the team, the idea etc.
I will always say that before you invest, study the tean for quite some time. Don't just invest as soon as you are introduced to it.