We present a novel solution to automating procurement of food materials using electronic scales, which can automatically identify the food materials along weighing them. Though CNN model is regarded as one of the most effective solutions to image recognition, the traditional techniques cannot handle the mismatch problem between the lab training data and the real world data. To solve the problem, we propose to embed a partial-and-imbalanced domain adaptation technique (Tree Adaptation Network) in the deep learning model, which can borrow knowledge from sibling classes, to overcome the imbalance problem, and transfer knowledge from the source domain to the target domain, to fight the mismatch problem between the lab training data and the real world data. Experiments show that the proposed approach outperforms the state-of-the-art algorithms. Furthermore, the proposed techniques have already been used in practice.