Oct 10 – 13, 2022
Universidade do Algarve
Europe/Lisbon timezone

Deep learning to estimate wine volume from one single-view image

Oct 12, 2022, 1:30 PM
Auditório 1.5 (Complexo Pedagógico)

Auditório 1.5

Complexo Pedagógico

UALG - Campus da Penha
Lightning Talk (8' + 2' for questions) Cooperation between Iberian research communities IBERGRID Contributions


Miriam Cobo Cano (Institute of Physics of Cantabria (IFCA) - Spanish National Research Council (CSIC))


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 [1], 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.


[1] 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

Primary author

Miriam Cobo Cano (Institute of Physics of Cantabria (IFCA) - Spanish National Research Council (CSIC))


Daniel Garcia Diaz (Instituto de Física de Cantabria (IFCA)) Ignacio Heredia (Institute of Physics of Cantabria (IFCA), CSIC-UC) Fernando Aguilar Gómez (IFCA) Lara Lloret Iglesias (CSIC) Begoña Bartolomé (Institute of Food Science Research (CIAL), CSIC) M. Victoria Moreno-Arribas (Institute of Food Science Research (CIAL), CSIC) Carmen Patricia Pérez-Matute (Center for Biomedical Research of La Rioja (CIBIR)) Silvia Yuste (Institute of Grapevine and Wine Sciences (ICVV), CSIC) Maria-José Motilva (Institute of Grapevine and Wine Sciences (ICVV), CSIC)

Presentation materials