1. A method comprising: receiving an image including a portion of a shelving unit; identifying a plurality of items in the image; grouping the plurality of items based on position and identification; and determining a list of linear groups in the image.