Graph-based food ingredient detection