Well, the NSFW and SFW flags can be set by the person who upload the content or by the admin. Based on that flag Chevereto display the banner that fits that contents. I know that is not perfect but it seems that works well for most websites out there.