Enabling smart vision with metasurfaces