Police are using AI to detect ‘dangerous’ protests. Here’s how it works