Using artificial intelligence to fight food waste