Image-based contextual pill recognition with medical knowledge graph assistance