The purpose of this work is to present a deep learning method to determine the volume of red wine in different types of glass liquid containers from a single-view image, with potential real life applications in diet monitoring and wine consumption studies.
Diet assessment is mainly based on Food Frequency Questionnaires (FFQs) that inquire individuals about the frequency at which they consume different food items from a predefined list. In the case of wine, estimation of its consumption through FFQs is particularly imprecise as a portion (glass of wine) consumed is standardized to 100 cc, which is not always real.
This work uses convolutional neural networks in a regression model, which efficiently estimates wine volume in almost any kind of wine glass container. This study aims to provide an automated tool for red wine volume estimation based on the proposed model, in a simple and efficient way that only requires the subject to take a photograph of the glass of wine with a mobile phone, instead of having to carry a beaker or any other instrument to perform the measurement.
To train and evaluate our system, we introduced the WineGut_BrainUp dataset , a new publicly available dataset of glasses of wine that contains 24305 laboratory images, including a wide range of containers, volumes of wine, backgrounds, object distances, angles and lightning, with or without calibration object. Laboratory photographs were taken indoors and outdoors at the Institute of Food Science Research (CIAL-CSIC), the Institute of Grapevine and Wine Sciences (ICVV-CSIC) and the Center for Biomedical Research of La Rioja (CIBIR).
The model was trained with a GPU Tesla V100-PCIE-32GB for 20 hrs. The model was coded using Python, Keras and TensorFlow in Ubuntu 18.04.2 LTS.
The algorithm does not require any reference object in the image, showing that in order to solve the liquid volume estimation challenge it is not needed to include a calibration object in the photograph. In contrast, this presumed deficiency can be overcome with a larger training dataset including enough photographs of all representative situations that could occur, so that the model is able to recognize the shape and size of the glass recipient containing the liquid. Our algorithm performs this task efficiently, as can be observed in the saliency maps evaluation.
Experimental results demonstrated satisfactory performance of our image-based wine measurement system, with a Mean Absolute Error of 8 mL, and a Root Mean Square Error of 11 mL, both in the test set. Our method outperforms similar systems that were developed in the literature for related tasks. Overall, this modeling will facilitate accurate measurement of liquid volume in diet and consumption studies.
 Bartolomé, B., Moreno-Arribas, M.V., Lloret, L., Aguilar, F., Cobo, M., García, D., Heredia, I., Yuste, S., Pérez-Matute, P., Motilva, M.J. (2021) "BrainGut_WineUp laboratory images [Dataset]", DIGITAL.CSIC, https://doi.org/10.20350/digitalCSIC/14135