ABSTRACT
Personalized nutrition requires practical methods to convert dietary assessments into tailored food portions. Current image‐based assessment tools and 3D food printing systems are often disconnected, lacking end‐to‐end evaluation. This study presents an integrated platform that converts meal images into personalized 3D‐printed macronutrient supplements. The system combines smartphone image analysis, volume calculation, nutrient recommendation, and automated G‐code generation for a custom dual‐nozzle 3D printer. Four nutrient‐rich inks (avocado, purple sweet potato, red lentil, chicken breast) were formulated with guar gum and characterized for extrusion‐based fabrication. The AI dietary assessment module achieved a mean volume and weight estimation error of 37.25%, with macronutrient estimation errors between 31% and 38%. Ablation studies demonstrated that user‐calibrated 3D depth reconstruction reduced volume errors compared to 2D baselines and uncalibrated models. During fabrication, the optimized inks exhibited shear‐thinning behavior and elastic‐dominant responses, enabling stable extrusion. Printed shape fidelity ranged from 89.67% to 99.00%, and weight accuracy from 79.00% to 96.00%. These results demonstrate the feasibility of a closed‐loop workflow linking AI dietary assessment with automated, on‐demand food fabrication, paving the way for precision nutrition interventions.
Keywords: 3D food printing, artificial intelligence, food inks, multi‐material printing, personalized nutrition
1. Introduction
Personalized nutrition seeks to align dietary intake with individual energy requirements, activity levels, health goals, and food preferences. Because energy and macronutrient needs vary considerably among individuals, standardized dietary recommendations may not provide sufficient guidance for precise dietary management (Manore 2005; Wang et al. 2024). Estimated energy requirement and acceptable macronutrient distribution ranges provide useful references for determining daily energy and macronutrient targets, but their practical application still depends on accurate dietary assessment and the availability of suitable foods that can meet the calculated nutritional requirements. In many current systems, users receive nutritional recommendations digitally but must still select ingredients, determine portion sizes, and prepare the recommended food themselves. This separation between dietary guidance and food production limits the practical delivery of personalized meals.
Artificial intelligence, computer vision, and smartphone technologies have improved dietary assessment by enabling food recognition, portion estimation, and nutrient calculation from meal images (Li and Yang 2022; Lo et al. 2020; Joshi et al. 2024). Image‐based systems can reduce the burden of manual food recording and support regular monitoring of dietary intake. However, their performance depends on several sequential processes, including food segmentation, depth estimation, volume reconstruction, density assignment, food weight calculation, and nutrient database matching. Errors introduced at any stage can propagate through the complete calculation process and affect the final estimate of dietary intake (Lu et al. 2020; Partridge et al. 2018). For example, inaccurate food masks can alter the estimated food area, while errors in depth or density can lead to incorrect volume and weight estimates. These errors subsequently influence macronutrient calculation and the nutritional supplement recommended by the system. Quantitative evaluation should therefore include segmentation accuracy, volume estimation error, food weight estimation error, nutrient estimation error, and cumulative system accuracy rather than relying only on the reported performance of individual pretrained models.
Extrusion‐based 3D food printing provides a potential method for converting personalized dietary recommendations into physically prepared food portions. The technology allows control over ingredient composition, deposited volume, geometry, and material distribution, and has been applied to personalized nutrition, texture‐modified foods, and customized meal production (Voon et al. 2019; Kadival et al. 2023; Chen et al. 2024; Yellapantula et al. 2025). Multi‐nozzle printing systems can combine food materials with different nutritional profiles within a single printed product (Uzel et al. 2022; Fujiwara et al. 2025). However, dietary assessment and 3D food printing are commonly studied as separate processes. Dietary assessment systems generally stop at food recognition or nutritional recommendation, while 3D food printing studies mainly focus on formulation, printability, and structural properties. The direct conversion of image‐derived nutritional information into optimized food ink quantities, printable model files, and physically produced food portions remains insufficiently evaluated (Bhuiyan and Nahid 2025; Kok Wah 2025).
A complete personalized food fabrication workflow requires coordinated operation across the computational and physical stages. The dietary assessment module must estimate the amount and nutritional composition of the consumed food. The recommendation module must calculate the remaining macronutrient requirements and identify a feasible combination of available food items. The resulting food ink masses must then be converted into printable volumes and geometries using appropriate density information. Automatic model generation and slicing are required to produce machine‐readable STL and G‐code files, while printer calibration determines whether the intended food mass can be deposited accurately. The reliability of the complete workflow, therefore, depends on both computational accuracy and fabrication accuracy. Comparisons with baseline methods and ablation analyses are also important for determining the contributions of plate scale calibration, density calibration, multi‐material optimization, and extrusion calibration to the final result.
Food ink formulation is an essential component of this translation process because the available inks must provide suitable nutritional contributions while maintaining stable extrusion and deposition behavior. The selected food inks function as printable nutrient carriers within the proposed AI‐to‐print workflow. Their formulation and characterization establish whether software‐generated macronutrient targets can be converted into printable volumes, stable food structures, and measurable printed masses. Avocado, purple sweet potato, red lentil, and chicken breast were selected as model ingredients because of their contrasting fat, carbohydrate, and protein profiles (Dreher and Davenport 2013; Cai et al. 2023; Grela et al. 2017; Wilson et al. 2020). Guar gum was incorporated at formulation‐specific concentrations to improve flow consistency and structural stability, as hydrocolloids can modify viscosity, gel strength, and printing performance in food pastes and gels (Cai et al. 2023; Chancharoen et al. 2023; Zhong et al. 2024). Bulk density provides the conversion between recommended food mass and printable volume, while rheological properties affect extrusion and post‐deposition shape retention. Shape fidelity and weight accuracy further indicate whether the digital model and intended food mass can be reproduced during printing. Texture and microstructural measurements provide additional information about the stability and physical suitability of the printed food portions.
Accordingly, this study developed and evaluated an integrated platform that converts meal images and user information into personalized printed macronutrient supplements. The system combines food segmentation using SAM and FoodSAM, monocular depth estimation using Depth Pro, food volume and weight calculation, nutrient intake estimation, macronutrient gap determination, constrained food ink optimization, automatic STL and G‐code generation, and dual‐material food printing. The computational workflow was evaluated using volume estimation error, food‐weight estimation error, macronutrient estimation error, baseline comparison, and ablation analyses of plate‐scale calibration and volume‐reconstruction method. The selected food inks were assessed for their suitability as printable nutrient carriers. Four nutrient‐rich food inks were formulated and characterized. The fabrication stage was evaluated independently through shape fidelity and printed‐mass accuracy, which quantified the agreement between the software‐generated geometry and mass targets and the corresponding printed outputs. Together, these evaluations establish the feasibility and current limitations of converting image‐based dietary assessment into personalized printed food portions.
2. Experimental Section
2.1. Food Ink Materials
The food ink formulations define the material library used by the recommendation and model‐generation pipeline. Each formulation was designed to provide a distinct contribution of macronutrients while maintaining extrusion suitability. Avocado (AV), chicken breast (CH), purple sweet potato (PSP), and red lentils (RL) were used as model food materials in this study. The optimized formulation ratios of base material, guar gum, and water for each food ink are summarized in Table 1. Guar gum (GG) was used as the hydrocolloid for all printable formulations. The percentages reported below refer to the final formulation weight. For the AV/GG formulation, AV, water, and GG were used at 85%, 13%, and 2% (w/w), respectively. AV was sliced, mashed, and placed in a blender. The mixture was blended on manual setting, and the blender was stopped intermittently to scrape the material accumulated on the side walls back to the center until no visible lumps remained. Water and guar gum were then added and mixed until smooth. For the CH/GG formulation, CH, water, and GG were used at 73%, 26%, and 1% (w/w), respectively. CH was first blended with a portion of the water without heating, then heated to until cooked. The remaining water was added after cooking, with GG dispersed separately in part of it before being incorporated into the CH mixture. The mixture was further blended at until a homogeneous paste was obtained. For the PSP/GG formulation, PSP freeze‐dried powder, water, and GG were used at 20%, 79%, and 1% (w/w), respectively. The PSP powder was mixed with water, then GG was added, and the mixture was further blended until a stable texture was obtained. For the RL/GG formulation, RL puree, water, and GG were used at 94%, 5%, and 1% (w/w), respectively. Raw RL were first rinsed to remove impurities and then boiled for approximately 15 min until softened. The excess water was removed, and the cooked RL were blended into a puree and sieved to obtain a homogeneous RL puree. This prepared puree was then weighed as one component of the final formulation. GG was dispersed in water and then incorporated into the RL puree, followed by sieving again if lumps were present.
TABLE 1.
Formulation, ingredients, macronutrient composition, and bulk density of the four macronutrient‐rich food inks used in the portion recommendations.
| Formulation | Ingredients | Composition | Carbohydrates | Protein | Fat | Density |
|---|---|---|---|---|---|---|
| (%) | (g/100 g) | (g/100 g) | (g/100 g) | (g cm−3) | ||
| AV/GG | Avocado, guar gum, water | 85, 2, 13 | 1.40 | 1.38 | 12.10 | 0.63 |
| PSP/GG | Purple sweet potato, guar gum, water | 20, 1, 79 | 17.00 | 1.56 | 0.05 | 0.81 |
| RL/GG | Red lentils, guar gum, water | 94, 1, 5 | 11.20 | 6.60 | 0.61 | 1.18 |
| CH/GG | Chicken breast, guar gum, water | 73, 1, 26 | 0.06 | 19.80 | 1.15 | 0.82 |
2.2. 3D Printer Design
A customized dual nozzle food printer with a syringe‐driven extrusion system was developed to execute the digital outputs generated by the recommendation and model‐generation pipeline. Nozzle alignment, material switching, extrusion calibration, and temperature control were therefore used to improve the consistency between the calculated food‐ink quantities and the physically deposited printed masses. Customized valve and motor designs were implemented to enable material switching during printing. The V‐shaped nozzle assembly comprised a nozzle mounting block, an L‐shaped ink inlet fitting connected to the food ink feeding tube, an extrusion nozzle, and a locking screw. Constructed from food‐grade stainless steel, the assembly featured smooth internal geometries to minimize residue accumulation. A locking mechanism allowed the valve and nozzle components to be detached for cleaning, autoclaving, or replacement. The modular layout provided direct access to the food contact pathway, facilitating cleaning between food ink formulations. The system also supported a pressurized water flush cycle to facilitate cleaning of the internal food contact surfaces. Temperature control was implemented to reduce temperature‐related variations in material properties during printing. Replaceable food‐grade tubes were used to transport the food materials and reduce the risk of cross‐contamination between ingredient batches. Motors and mechanical actuators were positioned off the carriage to separate them from the food pathway.
2.3. 3D Model Generation
Model generation converts gram‐based food‐ink recommendations into printable geometry. Since the recommendation algorithm outputs the required mass of each food ink, calibrated bulk density was used to calculate the corresponding printable volume and model dimensions. The algorithm integrated data from the software program and the composition of macronutrients, combining two food ingredients into a stacked 3D model based on their respective contents as determined by the recommendation system. A cubic model with minimal base dimensions of mm () was designed as the default printing surface area dimension, with the height dynamically calculated according to the required gram weight. This calculation utilized density data derived from the actual printed weight and volume of the printed food samples. The infill structure was set to a 70% rectilinear pattern to support structural stability and material distribution within the printed model. The 3D models were then processed using PrusaSlicer to convert .stl files into G‐code format, generating XYZ printing paths configured for the 3D food printer. All models were designed to align with the printing parameters specified in subsequent sections to support compatibility with the extrusion process. The printing settings were configured with a layer thickness of 1.5 mm, a nozzle size of 2 mm, and a print speed of 50 mm/s.
2.4. Shape Fidelity and Weight Accuracy
Shape fidelity and weight accuracy were used to evaluate the physical realization of software‐generated printing targets. Shape fidelity reflects the agreement between the designed and printed geometry, while weight accuracy reflects the agreement between the intended and deposited food‐ink mass. Because macronutrient delivery is calculated from printed mass, weight accuracy directly affects final nutrient delivery accuracy. A digital caliper was used to measure the side lengths and height of each printed sample, and the measured volume was calculated from these dimensions. Shape fidelity (%) was determined by comparing the measured volume with the designed model volume. The actual weight of each printed sample was measured using an analytical balance and compared with the intended weight calculated from the designed model volume and calibrated bulk density. Weight accuracy (%) was calculated by comparing the measured weight with the intended weight. Repeated printing trials were conducted in triplicate, and the results were presented as mean standard deviation. Statistical differences among formulations were analyzed using one‐way ANOVA followed by Duncan's multiple range test, with significance defined at 0.05. The system's error margins were quantified by comparing the intended parameters of the digital model with the measured geometry and mass of the printed output. Dimensional deviation was determined from the discrepancy between the intended and measured side lengths and height of the printed structures, while mass deviation was determined from the discrepancy between the intended and measured sample weight. Shape fidelity differed significantly among formulations according to one‐way ANOVA ( = 0.037), with AV/GG showing the highest value (99 1%), CH/GG showing the lowest value (90 3%), and RL/GG and PSP/GG showing intermediate values (both 96 4%). Weight accuracy also differed significantly among formulations (p = 0.001), with CH/GG showing the lowest value (79 3%), while AV/GG, RL/GG, and PSP/GG showed higher values of 90 5%, 91 2%, and 96 2%, respectively. Duncan's multiple range test indicated that RL/GG and PSP/GG were not significantly different from either AV/GG or CH/GG in shape fidelity, whereas CH/GG was significantly lower than the other formulations in weight accuracy. Across the four formulations, dimensional error margins ranged from approximately 1% to 10%, while mass error margins ranged from approximately 4% to 21%.
2.5. Microstructural and Compositional Analysis
Fourier transform infrared spectroscopy was performed using a VERTEX 70/HYPERION 1000 FTIR system (Bruker, Germany). Each food ink sample was freeze‐dried, ground into a fine powder, and mixed with potassium bromide for spectral analysis. Spectra were collected over the wavenumber range of 400 to 4000 cm−1 using OPUS. The characteristic absorption bands were identified directly from the recorded spectra based on their observed wavenumbers. Functional group assignments were made by comparison with previously published FTIR studies of food proteins, carbohydrates, lipids, and related food matrices (Carbonaro and Nucara 2010; Ji et al. 2020). No automated spectral database was used for peak assignment. Environmental scanning electron microscopy (ESEM; Quanta 250 FEG; FEI) was used to examine the microstructure of the food ink formulations. Samples were immobilized in UV‐activated gel within a metal holder, cured for 60 s, and imaged on a Peltier stage at and 60% humidity. Images were acquired at magnifications of and using a 10 kV excitation voltage. Nutrient composition of the formulations were analyzed in a certified laboratory (Intertek Testing Services Hong Kong Ltd.), as shown in Table 1.
2.6. Textural and Rheological Analysis
Rheological and textural measurements were conducted to assess whether the selected food inks could support the printing requirements of the AI‐to‐print workflow. The inks must flow during extrusion, maintain shape after deposition, support layer formation, and produce printed portions with suitable mechanical properties for handling and consumption. Texture profile analysis was conducted using a texture analyzer (JISC TEX‐200N, Japan) equipped with a 36 mm diameter cylindrical compression probe. Measurements were performed in triplicate at . For formulations without guar gum, the food material was loaded directly into the cylindrical sample container supplied with the instrument. For formulations containing guar gum, samples were fabricated under general printing conditions and subsequently placed in the same cylindrical container. For both sample types, the test portion had a diameter of 20 mm and a height of 10 mm. Each sample was subjected to two compression cycles at a test speed of 1 mm/s and a penetration depth of 5 mm, corresponding to 50% strain. Hardness, springiness, cohesiveness, gumminess, chewiness, and adhesiveness were determined from the resulting force–time curves. The International Dysphagia Diet Standardization Initiative (IDDSI) tests were conducted to categorize the printed food inks into different IDDSI levels (Wong et al. 2023). The rheological properties of the food inks were analyzed using a rheometer (ARES G2, TA Instruments, UK) in triplicate at . A circular plate of 25 mm diameter with a 1 mm gap was used. Apparent viscosity of food inks was examined with shear rate increasing from 0.01 to 100 s−1. Oscillation amplitude tests from 0.1%–1000% strain at 10 rad/s and oscillation frequency sweep tests from 0.1–100 rad/s with a constant amplitude strain within the linear viscoelastic region (LVR) were conducted to analyze the viscoelasticity of food inks. Recovery experiments were conducted with three‐step changing shear rate tests with an initial shear rate of 1 s−1 applied for 250 s, followed by a shear rate of 80 s−1 for 100 s, and back to the initial stage at 1 s−1.
3. Results
3.1. Software System Workflow
The web‐based software system streamlined personalized nutrition by guiding users through a seamless workflow, from meal photo capture to dietary assessment and 3DFP mesh model file generation (Figure 1).
FIGURE 1.

An illustration diagram of the AI‐enabled personalized food printing based on dietary assessment.
Users initiate the process by capturing meal photos on their smartphones, which are then analyzed by the software system to generate nutritional data (Figure 2, Movie S1). The scanning process is intended for regular use throughout the day to track cumulative intake. The 3D‐printed formulation is produced as a precision supplement to bridge the remaining specific nutritional gap at the end of a tracking period. This ensures the user meets their daily estimated energy requirements (EER) and acceptable macronutrient distribution ranges (AMDR) through a targeted delivery mechanism. Precise volume estimation is critical for calculating macronutrient content, as errors could misestimate nutrient intake, skewing AI‐driven recommendations to meet AMDR compliance. The user interface (UI) then displays scanned meal data, including food composition and key factors such as the serving plate's diameter, prompting interactive feedback and reducing estimation errors through user validation. This meal scanning feature, which uses the phone's camera, leverages users' habitual food photography, enhancing engagement and data reliability.
FIGURE 2.

User Interface (UI) of the AI‐enabled personalized food printing software application.
The software system collects user data by prompting users to input their gender, height, weight, age, and activity level. It categorizes physical activity level (PAL) into four distinct segments–sedentary, low active, active, and very active, for integration with the Mifflin‐St Jeor equation (Mifflin et al. 1990). These segments, defined by PAL values, reflect varying degrees of daily physical exertion and are crucial for accurately calculating estimated energy requirements (EER). Interactive descriptive tools are used to clarify the requirements of each activity‐level category, minimizing misclassifications. This combined calculation enables accurate EER computation, facilitating tailored macronutrient recommendations that align with individual nutrition goals.
The UI then presents a dashboard summarizing macronutrients consumed from scanned meals, total energy consumed, and remaining daily needs, guiding users to select one of four meal plans with various nutrition goals: balanced, low fat, low carbohydrates, or low protein. These plans differ by their macronutrient distributions, catering to distinct goals such as weight loss, muscle gain, or energy optimization (Phillips 2021; Gardner et al. 2018). Visual breakdowns of macronutrient ratios aid effective quantitative data communication with users, while real‐time calculations ensure they understand their energy needs. Then, a specific set of 3D mesh models is generated and can be used to print the recommended nutrient compositions into the food. The workflow's integration of meal scanning and personal data input ensures a user‐centric approach, recommending recipe formulation based on precise EER calculation. The app's cross‐platform compatibility enables seamless access from mobile devices, aligning with modern user habits.
3.2. Algorithm and Architecture
The algorithmic workflow links image‐based dietary assessment with downstream food fabrication. Food segmentation, volume estimation, nutrient calculation, macronutrient‐gap optimization, and model generation were integrated to produce printable food‐ink quantities from meal‐image inputs (Figure 3).
FIGURE 3.

A detailed implementation of the AI‐enabled dietary assessment workflow to generate recommended 3D printed macronutrient food ink formulations.
3.2.1. Food Segmentation
Food segmentation provides the spatial boundary information used for subsequent volume reconstruction and nutrient estimation. Mask quality, therefore, affects estimated food area, reconstructed volume, calculated food weight, nutrient intake, and the final printed supplement recommendation. In this system, the food segmentation task is performed exclusively via semantic segmentation, which uses the segment anything model (SAM). SAM is a class‐agnostic segmentation model that generates high‐quality binary masks for various objects in an image, demonstrating remarkable zero‐shot generalization across multiple domains (Kirillov et al. 2023; Ravi et al. 2024). SAM demonstrated strong zero‐shot transfer capabilities, outperforming the strongest single‐point interactive segmenter baseline on 16 out of 23 diverse segmentation datasets (by as much as 47 mIoU) and achieving an average precision (AP) of 46.5 on the COCO dataset for instance segmentation. To address the limitation of lacking semantic class labels, we integrate a dedicated food semantic segmentation network, FoodSAM, that associates the SAM‐generated masks with food‐specific category labels (Lan et al. 2023). FoodSAM achieved state‐of‐the‐art performance in food image segmentation, reaching 46.42% mIoU, 84.10% aAcc, and 58.27% mAcc on the FoodSeg103 dataset, as well as 66.14% mIoU, 88.47% aAcc, and 78.01% mAcc on the UECFoodPix Complete dataset. Figure 4c shows the segmentation results obtained with FoodSAM in the food mask column. Each pseudo‐color region inside the resulting masks denotes a distinct food class present in the input image. The generated masks visually delineated the individual food regions, successfully isolating each food item and assigning semantically consistent labels.
FIGURE 4.

Sample results visualization. (a) Sample images taken from phone camera. (b) Plate contours are manually drawn in the web UI. (c) Food masks generated by the food segmentation model. (d) Depth maps generated by the depth pro model. (e) Detailed nutrition calculation results based on estimated volume and food nutrition database.
3.2.2. Volume Estimation
In this workflow, volume estimation connects image analysis with nutrient calculation. Estimating the volume of each segmented food item is a crucial step in transforming visual information into quantitative nutritional data. To accomplish this, we first generate a high‐resolution, metric depth map from a monocular RGB meal image using the Depth Pro model (Bochkovskii et al. 2024). The Depth Pro model achieved state‐of‐the‐art performance in zero‐shot metric monocular depth estimation and boundary tracing, reaching 89.0% accuracy and 0.113 AbsRel error on the Sun‐RGBD dataset, as well as a 0.409 boundary 1 score and 40.0% accuracy on the Sintel dataset. Figure 4d presents the depth map for sample input images, which provides pixel‐wise distance information, enabling the three‐dimensional reconstruction of food items from a single image. Figure S2 presents additional sample images of depth map visualization, along with the corresponding segmentation results. Once the depth map is acquired, the volume estimation algorithm operates on each segmented food item mask produced by the semantic segmentation module. The algorithm fits a plane to the food point cloud using principal component analysis (PCA) (Abdi and Williams 2010). The point cloud is then transformed to align this plane with the ‐axis, facilitating measurement of food volume above the plate. To calibrate the depth scale, the system provides a user interface that allows users to draw an elliptical contour corresponding to the plate in the image, as shown in Figure 4b. Next, we extract the points above the estimated support plane and compute the volume of their convex hull, which approximates the volume of the food item.
3.2.3. Macronutrient Calculation and Recommendation
Nutrient estimation was implemented as a practical computational step linking image‐estimated food quantity to personalized supplement design. Estimated food volume was converted into food weight using density information, and the corresponding macronutrient values were calculated using food composition data. For accurate nutritional analysis, we obtained comprehensive food composition data from USDA FoodData Central (U.S. Department of Agriculture, Agricultural Research Service 2019). The system first multiplies the estimated food volume by the density retrieved from the database to obtain the food's weight, which is then used to query the database again to yield the corresponding amounts of carbohydrates, fat, and protein. Figure 4e demonstrates the nutrition calculation results.
Our recommendation algorithm further personalizes daily macronutrient targets, suggesting dietary adjustments to meet individual needs and preferences. The algorithm measures the difference between target and current nutrition intake to determine supplementation needs. To optimize food choices that fill these nutritional gaps, we formulate a bounded optimization problem. Let be the nutritional content matrix of the available food inks, be the vector of ingredient quantities (in grams), and be the target macronutrient shortfall. The objective is to minimize the Euclidean distance between the printed macronutrients and the target requirements:
| (1) |
This objective is subject to physical printing volume constraints:
| (2) |
where is the maximum allowable printing volume and is the density of the th food ink. This bounded optimization is solved using the limited‐memory BFGS with bounds (L‐BFGS‐B) algorithm, which natively enforces strict box constraints.
The system generates 3D mesh models that accurately represent the physical volume of dietary supplements intended for food printing. Separate food‐item models were generated for two nutritional ingredients, as the dual‐nozzle food printer supports mixing of different nutrients. The algorithm iteratively searches for feasible base dimensions within predefined physiological limits of 50 50 to 150 130 . It then calculates the corresponding height to maintain the correct volume, which is constrained to 1.5–22 mm to ensure printing consistency and shape integrity. Table 2 presents the personalized nutrition recommendations for 12 distinct user profiles. Furthermore, sample food items were printed based on auto‐generated results, as shown in Figure 5.
TABLE 2.
Nutrition recommendations for sample user profiles. Macronutrient intakes (C, P, F; g), calculated needs, gaps , and concise 3D‐printed food fixes. C = carbohydrate; P = protein; F = fat; PSP = purple sweet potato; Lentil = red lentils; Avo = avocado; Chick = chicken breast.
| ID | Profile (age/sex, cm, kg, activity, diet preference) | Intake C/P/F (g) | Need C/P/F (g) | (g) | Sol. | Printed foods (g) (g) |
|---|---|---|---|---|---|---|
| 1 | 30 F, 163, 65, sedentary, balanced, meat‐based protein | 107.10/86.60/74.00 | 198.95/79.58/55.62 | +91.85/−7.02/−18.38 | 1 | PSP 529.61, Avo 129.88 +91.85/+10.05/+15.98 |
| 2 | PSP 540.28, Chick 5.26 +91.85/+9.47/+0.33 | |||||
| 2 | 30 F, 163, 65, very‐active, balanced, meat‐based protein | 249.00/89.00/88.50 | 285.99/114.40/79.95 | +36.99/+25.40/−8.55 | 1 | PSP 217.21, Chick 111.15 +36.99/+25.40/+1.39 |
| 3 | 30 F, 163, 65, mod‐active, balanced, plant‐based protein | 230.00/112.00/68.00 | 256.98/102.79/71.84 | +26.98/−9.21/+3.84 | 1 | PSP 156.14, Avo 31.07 +26.98/+2.86/+3.84 |
| 2 | Lentil 238.42, Avo 19.69 +26.98/−16.01/+3.84 | |||||
| 4 | 30 F, 163, 65, light‐active, balanced, plant‐based protein | 181.60/94.00/68.00 | 227.96/91.19/63.73 | +46.36/−2.81/−4.27 | 1 | Lentil 362.94, Avo 408.23 +46.36/+29.59/+51.61 |
| 2 | PSP 268.90, Avo 46.55 +46.37/+4.84/+5.77 | |||||
| 3 | PSP 190.19, Lentil 125.30 +46.37/+11.24/+0.86 | |||||
| 5 | 30 F, 163, 65, mod‐active, low‐fat, plant‐based protein | 303.10/125.40/46.80 | 308.37/102.79/47.89 | +5.27/−22.61/+1.09 | 1 | Lentil 46.26, Avo 6.69 +5.27/+3.15/+1.09 |
| 2 | PSP 30.29, Avo 8.90 +5.27/+0.60/+1.09 | |||||
| 6 | 30 F, 163, 65, mod‐active, high‐protein, meat‐based protein | 138.00/200.00/75.00 | 143.91/200.44/79.02 | +5.91/+0.44/+4.02 | 1 | PSP 31.79, Avo 32.67 +5.86/−0.95/+3.97 |
| 7 | 30 M, 175, 75, sedentary, balanced, plant‐based protein | 262.00/135.00/72.00 | 248.84/99.54/69.56 | −13.16/−35.46/−2.44 | — | |
| 8 | 30 M, 175, 75, light‐active, balanced, plant‐based protein | 248.00/143.00/88.00 | 285.13/114.05/79.71 | +37.13/−28.95/−8.29 | 1 | Lentil 324.03, Avo 59.75 +37.13/+22.21/+9.21 |
| 2 | PSP 152.30, Lentil 100.34 +37.13/+9.00/+0.69 | |||||
| 3 | PSP 216.69, Avo 20.74 +37.13/+3.67/+2.62 | |||||
| 9 | 30 M, 175, 75, mod‐active, balanced, meat‐based protein | 350.00/175.00/110.00 | 321.42/128.57/89.85 | −28.58/−46.43/−20.15 | — | |
| 10 | 30 M, 175, 75, very‐active, balanced, meat‐based protein | 540.00/223.00/81.00 | 357.71/143.08/100.00 | −182.29/−79.92/+19.00 | 1 | PSP 3.42, Avo 156.97 +2.78/+2.22/+19.00 |
| 2 | Avo 155.46, Chick 16.31 +2.19/+5.37/+18.99 | |||||
| 11 | 30 M, 175, 75, mod‐active, low‐fat, plant‐based protein | 375.00/204.00/23.00 | 385.70/128.57/59.90 | +10.70/−75.43/+36.90 | 1 | PSP 37.84, Avo 304.81 +10.70/+4.80/+36.90 |
| 2 | Lentil 57.78, Avo 302.05 +10.70/+7.98/+36.90 | |||||
| 12 | 30 M, 175, 75, mod‐active, high‐protein, meat‐based protein | 215.00/225.00/83.00 | 179.99/250.71/8.84 | −35.01/+25.71/+15.84 | 1 | Avo 119.33, Chick 121.51 −1.74/+25.71/+15.84 |
FIGURE 5.

Food printed by the generated recommendation model.
3.2.4. Quantitative Validation and Ablation Analysis of the AI Dietary Assessment
To quantitatively validate the integrated AI dietary assessment pipeline and justify the proposed architecture, an experimental dataset of distinct meals was prepared and evaluated. Prior to imaging, each food item was weighed individually on an analytical balance to establish the ground‐truth weight. Ground‐truth macronutrient values were calculated using these exact weights and the USDA FoodData Central database.
Meal images were processed through the AI pipeline to generate estimated values for volume, weight, and macronutrients. The accuracy of these estimations was quantified using the mean absolute percentage error (MAPE), defined as:
where is the ground truth value and is the system's estimated value.
As detailed in Table 3, the Depth Pro‐based volume reconstruction using the proposed 3D convex hull method achieved a mean MAPE of 37.25%. When converted to mass using the assigned density values, the food weight estimation yielded a matching mean MAPE of 37.25%. Consequently, the nutrient estimation error (MAPE) was 30.96% for carbohydrates, 37.22% for proteins, and 37.78% for fats.
TABLE 3.
Quantitative validation of the image‐based dietary assessment pipeline. C, Carbohydrates; F, Fat; P, Protein; SD, Standard deviation; , Volume; , Weight.
| Meal | Food type | Ground truth | AI predicted | Absolute percentage error (%) | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| (g) | (mL) | P (g) | C (g) | F (g) | (g) | (mL) | P (g) | C (g) | F (g) |
|
|
P | C | F | ||||||||
| #1 | Carrot | 29.70 | 49.50 | 0.30 | 2.97 | 0.06 | 10.88 | 18.13 | 0.11 | 1.09 | 0.02 | 63.37 | 63.37 | 63.33 | 63.30 | 66.67 | ||||||
| Rice | 43.00 | 50.59 | 3.01 | 33.97 | 0.43 | 56.05 | 65.94 | 3.92 | 44.28 | 0.56 | 30.35 | 30.34 | 30.23 | 30.35 | 30.23 | |||||||
| Chicken | 53.90 | 49.00 | 14.55 | 0.00 | 7.55 | 77.83 | 70.75 | 21.01 | 0.00 | 10.90 | 44.40 | 44.39 | 44.40 | N/A | 44.37 | |||||||
| #2 | Rape | 80.00 | 133.33 | 2.40 | 4.00 | 0.24 | 45.60 | 76.00 | 1.37 | 2.28 | 0.14 | 43.00 | 43.00 | 42.92 | 43.00 | 41.67 | ||||||
| Steak | 236.90 | 215.36 | 59.23 | 0.00 | 47.38 | 177.78 | 161.62 | 44.45 | 0.00 | 35.56 | 24.96 | 24.95 | 24.95 | N/A | 24.95 | |||||||
| #3 | Orange | 158.50 | 264.17 | 1.58 | 19.02 | 0.16 | 154.36 | 257.26 | 1.54 | 18.52 | 0.15 | 2.61 | 2.62 | 2.53 | 2.63 | 6.25 | ||||||
| #4 | Lettuce | 99.00 | 165.00 | 0.99 | 2.97 | 0.10 | 45.04 | 75.07 | 0.45 | 1.35 | 0.05 | 54.51 | 54.50 | 54.55 | 54.55 | 50.00 | ||||||
| #5 | Mushroom | 92.90 | 154.83 | 2.79 | 6.50 | 0.09 | 52.21 | 87.01 | 1.57 | 3.65 | 0.05 | 43.80 | 43.80 | 43.73 | 43.85 | 44.44 | ||||||
| #6 | Orange | 94.30 | 157.17 | 0.94 | 11.32 | 0.09 | 54.53 | 90.89 | 0.55 | 6.54 | 0.05 | 42.17 | 42.17 | 41.49 | 42.23 | 44.44 | ||||||
| Strawberry | 95.50 | 159.17 | 0.96 | 7.64 | 0.29 | 61.41 | 102.35 | 0.61 | 4.91 | 0.18 | 35.70 | 35.70 | 36.46 | 35.73 | 37.93 | |||||||
| #7 | Bread | 72.90 | 91.12 | 6.56 | 35.72 | 2.92 | 91.04 | 113.80 | 8.19 | 44.61 | 3.64 | 24.88 | 24.89 | 24.85 | 24.89 | 24.66 | ||||||
|
Mean MAPE
|
37.25
|
37.25
|
37.22
|
37.84
|
37.78
|
|||||||||||||||||
To establish the methodological advantage of our volume estimation approach, we compared the proposed pipeline against a standard 2D baseline and conducted ablation studies on key pipeline components (Tables 4 and 5). The proposed 3D depth‐based approach (MAPE 37.25%) outperformed the 2D geometric baseline (MAPE 215.26%). In the uncalibrated depth ablation, the pipeline was run in fully automated mode—relying solely on the raw depth map without user‐defined plate scaling—resulting in a drastic degradation in volume estimation MAPE to 267.14%. Finally, comparing the geometric reconstruction algorithms revealed that the proposed 3D Convex Hull approach vastly outperformed the 3D Voxel Grid Ablation, which yielded a MAPE of 77.80%. The quantitative results in this section evaluate the image‐based dietary assessment stage, including volume, food‐weight, and macronutrient estimation. The subsequent fabrication stage was evaluated independently through shape fidelity and printed‐mass accuracy. These printing metrics quantify the agreement between the software‐generated geometry and mass targets and their corresponding physical outputs, rather than directly measuring complete end‐to‐end macronutrient delivery.
TABLE 4.
Comparison of volume estimation methods: Proposed AI versus 2D geometric baseline.
| Sample | Ground truth | Proposed AI | 2D geometric baseline | ||||
|---|---|---|---|---|---|---|---|
| vol. (mL) | Vol. (mL) | MAPE (%) | Vol. (mL) | MAPE (%) | |||
| #1 | 49.50 | 18.13 | 63.37 | 304.07 | 514.28 | ||
| 50.59 | 65.94 | 30.34 | 161.24 | 218.72 | |||
| 49.00 | 70.75 | 44.39 | 232.42 | 374.33 | |||
| #2 | 133.33 | 76.00 | 43.00 | 555.86 | 316.91 | ||
| 215.36 | 161.62 | 24.95 | 259.13 | 20.32 | |||
| #3 | 264.17 | 257.26 | 2.62 | 118.21 | 55.25 | ||
| #4 | 165.00 | 75.07 | 54.50 | 440.95 | 167.24 | ||
| #5 | 154.83 | 87.01 | 43.80 | 440.40 | 184.44 | ||
| #6 | 157.17 | 90.89 | 42.17 | 347.66 | 121.20 | ||
| 159.17 | 102.35 | 35.70 | 169.60 | 6.55 | |||
| #7 | 91.12 | 113.80 | 24.89 | 445.23 | 388.62 | ||
| Mean | — | — |
37.25
|
— |
215.26
|
||
TABLE 5.
Ablation study: Comparison of proposed AI method versus uncalibrated depth and 3D voxel grid estimation.
| Sample | Ground truth | Proposed AI | Uncalibrated depth | 3D voxel grid | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Vol. (mL) | Vol. (mL) | MAPE (%) | Vol. (mL) | MAPE (%) | Vol. (mL) | MAPE (%) | ||||
| #1 | 49.50 | 18.13 | 63.37 | 79.51 | 60.63 | 4.88 | 90.14 | |||
| 50.59 | 65.94 | 30.34 | 289.13 | 471.52 | 24.38 | 51.81 | ||||
| 49.00 | 70.75 | 44.39 | 310.22 | 533.10 | 16.00 | 67.35 | ||||
| #2 | 133.33 | 76.00 | 43.00 | 299.44 | 124.59 | 18.88 | 85.84 | |||
| 215.36 | 161.62 | 24.95 | 1112.82 | 416.73 | 42.63 | 80.21 | ||||
| #3 | 264.17 | 257.26 | 2.62 | 919.85 | 248.20 | 54.50 | 79.37 | |||
| #4 | 165.00 | 75.07 | 54.50 | 171.81 | 4.13 | 14.13 | 91.44 | |||
| #5 | 154.83 | 87.01 | 43.80 | 155.76 | 0.60 | 19.88 | 87.16 | |||
| #6 | 157.17 | 90.89 | 42.17 | 219.39 | 39.59 | 16.00 | 89.82 | |||
| 159.17 | 102.35 | 35.70 | 247.04 | 55.21 | 26.13 | 83.58 | ||||
| #7 | 91.12 | 113.80 | 24.89 | 987.95 | 984.23 | 46.38 | 49.10 | |||
| Mean | — | — |
37.25
|
— |
267.14
|
— |
77.80
|
|||
3.3. 3D Food Dual‐Printing System
A customized dual‐nozzle food printer was developed, featuring a customized V‐shaped nozzle mechanism that allows for smooth, dual‐material food ink printing (Figure 6).
FIGURE 6.

Schematic diagram of the 3D food dual‐printing system.
The V‐shaped design incorporated two 2 mm nozzles converging at a single point of extrusion, driven by a stepper motor. With the V‐shape system, the motor lowered the selected nozzle to the printing position via G‐code commands. The food ink flow of each nozzle was governed by custom solenoid valves, which opened to permit extrusion and closed to prevent overflow. The operation of these valves was synchronized with motor actuation via a custom G‐code file that defined T0 and T1 commands for real‐time, per‐layer material selection. In this study, a mm cubic model was used for testing and calibrated to print with two different food ingredients, using G‐code to assign T0 to one food ink formula and T1 to the other. Temperature control maintained consistent ink properties, with heated syringe compartments preventing viscosity changes. Food‐grade tubing connected the external syringes to the printing heads, enabling continuous feeding without refills for up to 300 g of food ink. This design reduced the print head's moving mass to less than 0.2 kg.
3.4. Material Evaluation and Printing Performance of Food Ink Formulations
Shape fidelity and weight accuracy were measured as indicators of the printing performance of food ink formulations (Azeem et al. 2025; Castillo‐Guaca et al. 2023; Ji et al. 2020) (Figure 7).
FIGURE 7.

(a–d) 3D printed macronutrient food systems from left to right: AV/GG, CH/GG, RL/GG, PSP/GG. (e) Examples of printed samples with dual printing. (f) Computational representations of the generated food models for 3D printing. (g) Shape fidelity and weight accuracy rate of the 3D printed food ink samples. Bars with different superscript letters indicate significant differences ( 0.05, Duncan's multiple range test).
Among the four printed food inks, AV/GG achieved the highest shape fidelity at 99.00 1.00%, followed by RL/GG and PSP/GG, which both showed high shape fidelity values of 95.67% with standard deviations of 4.04% and 3.51%, respectively (Table 6). CH/GG exhibited the lowest shape fidelity at 89.67 3.06%. For weight accuracy, PSP/GG showed the highest value at 96.00 2.00%, while AV/GG and RL/GG also maintained high values of 90.33 5.13% and 91.33 1.53%, respectively. CH/GG showed the lowest weight accuracy at 79.00 2.65%.
TABLE 6.
Shape fidelity and weight accuracy of optimized GG‐containing food inks. Values are presented as mean (standard deviation) ( = 3). Different superscript letters within the same column indicate significant differences among formulations ( 0.05).
| Sample | Shape fidelity (%) | Weight accuracy (%) |
|---|---|---|
| AV/GG | 99.00a [1.00] | 90.33A [5.13] |
| CH/GG | 89.67b [3.06] | 79.00B [2.65] |
| RL/GG | 95.67ab [4.04] | 91.33A [1.53] |
| PSP/GG | 95.67ab [3.51] | 96.00A [2.00] |
Fourier‐transform infrared spectroscopy (FT‐IR) and environmental scanning electron microscopy (ESEM) were used to characterize the chemical composition and microstructural properties of the food inks (Figure 8a–h). All food ink formulations show peaks at 1650 cm−1 as an indicator of proteins, 2800–3700 cm−1 for carbohydrates, and 1722–1759 cm−1 for lipids. Both avocado inks AV and AV/GG exhibited a prominent C═O peak at around 1740 cm−1 region, and distinct peaks at 2850 and 2920 cm−1. PSP and PSP/GG displayed a strong C─O peak in the 1022 cm−1 region. RL and RL/GG exhibited strong amide I/II peaks at 1633 and 1542 cm−1. CH and CH/GG exhibited strong amide I/II peaks at 1650/1550 cm−1.
FIGURE 8.

(a,b) FT‐IR diagrams of the food ink formulations. (c–h) ESEM images (magnification 1000 and 5000) of food ink formulations.
Rheological and textural properties of the food inks were measured (Figure 9a–g). In the steady shear rate sweep tests, all food inks exhibited shear‐thinning behavior (Figure 9a). The apparent viscosity–shear rate relationship was further fitted using the empirical power‐law equation:
| (3) |
where is the apparent viscosity, is the shear rate, is the fitted consistency coefficient corresponding to the apparent viscosity at , and describes the shear‐rate dependence of viscosity. All fitted values were negative, confirming shear‐thinning behavior for every food ink formulation. GG incorporation increased the coefficient in all food systems. Oscillatory amplitude sweeps assessed viscoelasticity properties (Figure 9b). All the printed food inks started at tan value smaller than 1 and eventually reached the yield point, where tan =
/
= 1, at different strain % (Figure 9c). The frequency sweep tests demonstrated that all food inks exhibited
throughout the tested range (Figure 9d). Yield stress was determined at the crossover point of
and
(Figure 9e). Furthermore, recovery tests were conducted to study the food ink's structure recovery ability (Figure 9f). The texture profile analysis quantified the hardness, adhesiveness, cohesiveness, elasticity, chewiness, and stickiness of 3D‐printed food inks with and without GG (Figure 9g).
FIGURE 9.

Rheological and textural analysis of food inks. (a) Changes in viscosity with shear rate sweep test. (b)
and
at increasing oscillation strain %. (c) values at increasing oscillation strain %. (d)
and
versus angular frequency. (e) Yield stress value under oscillation strain from 0.1% to 1000%. (f) Viscosity of printed food inks from a recovery experiment using a three‐step steady shear rate test. (g) Normalized radar plot of texture profile analysis, including hardness, adhesiveness, cohesiveness, elasticity, chewiness, and stickiness. Error bars and shaded bands represent variation among repeated measurements.
4. Discussion
4.1. Significance of the AI Dietary Assessment Architecture
In our pipeline, the final nutrient calculation is subject to multiple sources of uncertainty, primarily originating from image segmentation, depth estimation, and assumed food densities. The estimated weight of a food item is derived from its segmented area , its estimated depth , and its assigned density , such that . Consequently, errors from these three variables accumulate multiplicatively. While isolating the exact error contribution of depth estimation is challenging without explicit depth ground truth, our system evaluates the cumulative effect of these uncertainties end‐to‐end by comparing the final estimated food weight with the ground‐truth weight. To reduce the propagation of upstream errors, the system incorporates user correction of the segmentation masks and plate contour. The known plate diameter provides a scale reference for metric volume reconstruction without requiring an additional calibration object, such as a coin or card. These correction and calibration steps are intended to reduce segmentation‐ and scale‐related errors before food‐weight and macronutrient estimation. The quantitative results reported in Table 3 show how errors in volume reconstruction propagate into downstream estimates of food weight and macronutrients under the tested conditions.
The 2D geometric baseline did not account for variations in food height or irregular surface geometry and therefore produced a higher mean volume MAPE than the proposed method. The 3D convex‐hull method approximates the physical envelope of each segmented food item and was better suited than the tested 2D baseline for representing irregular foods, such as chicken and steak. The ablation results also showed the importance of plate‐based scale calibration, as the uncalibrated monocular‐depth output produced a higher volume MAPE than the calibrated workflow. Compared with the tested voxel‐grid implementation, the convex‐hull method achieved a lower volume MAPE and generated continuous geometric boundaries for volume calculation.
These comparisons are summarized in Table S1. Unlike methods that require a separate calibration object, the proposed workflow uses the known plate diameter as the scale reference, with the plate contour manually specified via the user interface. The workflow reconstructs approximate three‐dimensional food geometry from standard RGB images using monocular depth estimation, plate‐based scale calibration, and convex‐hull volume calculation. It subsequently links the estimated dietary intake with macronutrient‐gap calculation, food‐ink optimization, printable model generation, and dual‐material food fabrication.
4.2. Advancements in Dual‐Printing Technology
Dual‐material printing enables the system to combine food inks with different macronutrient profiles in response to individualized nutrient gaps. This capability enables more flexible matching of carbohydrates, proteins, and fats than single‐ink printing. Existing multi‐material food printing technologies encounter challenges that compromise both efficiency and precision (Hertafeld et al. 2019; Fahmy et al. 2021; Pant et al. 2021). Pick‐and‐place syringe printers, which use mechanical retrieval to swap materials, cause considerable delays that slow printing speeds and interrupt layer continuity. Dual‐head and multi‐head systems with fixed nozzles necessitate precise calibration to correct positional discrepancies between heads, increasing the potential for misalignment and reduced printing accuracy (Fujiwara et al. 2025). The practice of mounting syringes on the print head in these systems increases the moving mass, compromising speed and stability due to inertia during rapid movements.
Our V‐shaped mechanism avoided syringe replacement during material switching and reduced interruption between deposition steps, which facilitates more continuous layer deposition. Furthermore, the dual‐nozzle design decreased the moving mass on the print head by placing the stepper motor and material reservoirs off‐carriage. The off‐carriage arrangement reduces the moving mass of the print head, supporting more stable movement during printing. Rapid valve closure was used to reduce material leakage during switching and to support shape retention and deposition consistency. The lighter head reduced motor strain and extended system durability. The V‐shaped real‐time nozzle‐switching mechanism and computerized G‐code control could further facilitate complex dual‐material patterns, supporting customized multi‐material food deposition, while also improving the appearance of printed food by preserving its natural colors.
4.3. Mechanistic Analysis of Food Ink Formulations
In the proposed workflow, shape fidelity and weight accuracy indicate how closely the printed food portion follows the software‐generated design. Weight accuracy is especially important because the deposited mass determines the actual amounts of carbohydrate, protein, and fat delivered. The optimized GG concentration was formulation‐specific, resulting in 2% GG for AV/GG and 1% GG for CH/GG, PSP/GG, and RL/GG. GG levels below the optimized concentration led to weak structure and poor shape retention, whereas excessive GG increased stickiness, flow resistance, and extrusion roughness. These variations in shape and weight accuracy highlight differences in ink flow and structural stability during printing; accordingly, formulation‐specific adjustments to extrusion rate and force may improve printing performance and are relevant to extrusion and shape retention.
FT‐IR diagrams were used as a qualitative supporting analysis to verify major ingredient‐related functional‐group features after formulation and printing (Figure 8a,b). These spectra helped confirm the material identity of the printable nutrient carriers used in the pipeline Spectra for AV and AV/GG were nearly identical, with no new peaks or significant absorbance shifts, indicating that no major new peaks or shifts were detected after GG addition. This stability supports avocado's role as a fat‐rich ink, ideal for low‐carbohydrate meal plans. The consistent C−O peak intensity underscored PSP's suitability as a carbohydrate source for balanced meal plans that required carbohydrate intake. Furthermore, RL and RL/GG exhibited strong amide I/II peaks, consistent with the presence of protein‐related functional groups. Slightly weaker amide I/II and C−O peak intensities in cooked samples were likely due to protein denaturation and starch gelatinization. Nevertheless, no new peaks or significant shifts were observed in the final printed samples, indicating no major changes in the measured functional group profile after printing (Ma et al. 2011). This stability is consistent with the use of RL as a plant‐based protein‐containing ink. Compared with RL and RL/GG, the higher amide peak intensities of CH and CH/GG are consistent with CH/GG's role as a protein‐rich ink in the AI‐driven formulation system designed to meet AMDR targets. With the absence of new FT‐IR peaks or major spectral changes, these results suggest that GG did not induce detectable chemical modification of the major functional groups in the food inks, supporting its role as a printability enhancer without producing major detectable changes in the measured FTIR profiles. Similarly, cooking methods, including boiling and heating, did not induce significant spectral changes, indicating that no major spectral changes were detected under the tested processing conditions.
ESEM images were used to provide morphological context for the observed printing and rheological behavior (Figure 8c–h). Microstructural organization can influence extrusion stability, layer formation, shape retention, and mass deposition consistency. In food ink systems, GG functions as a hydrocolloid structuring agent rather than only as a viscosity modifier. Owing to its high water‐holding capacity and stabilizing ability, GG can promote polymer entanglement, restrict water mobility, and strengthen the physical gel network of starch‐ and protein‐containing matrices. Previous studies have shown that GG improves apparent viscosity, gel strength, microstructural compactness, and 3D printing performance in starch‐rich and protein‐containing food gels (Cai et al. 2023; Zhong et al. 2024). These reports support the interpretation that the denser fibrous networks observed in the present ESEM images may be associated with GG related network formation and the observed printing behavior.
Rheological performance determines whether a recommended food‐ink formulation can be executed by extrusion printing (Figure 9a–h). Suitable inks need to flow under nozzle shear, maintain sufficient structure after deposition, and support subsequent printed layers. Food inks with GG exhibited higher viscosity, thereby enhancing flow resistance at higher extrusion pressure, which may contribute to post‐deposition stability (Chancharoen et al. 2023). The initial crossover between AV and AV/GG may be attributed to the high‐moisture, lipid‐rich, semi‐solid structure of avocado. Since avocado already contains a hydrated matrix (Dreher and Davenport 2013), the addition of GG as an aqueous dispersion may have partially diluted or rearranged the native structure at low shear rates, temporarily offsetting its thickening effect. At higher shear rates, the native avocado matrix was more readily disrupted, while the hydrated GG phase helped maintain viscosity. This formulation‐dependent behavior is consistent with the water‐binding, thickening, and shear‐thinning properties of GG (Mudgil et al. 2014; Chenlo et al. 2010). The rheological results, particularly the low‐strain tan values below 1, indicated that the optimized formulations retained elastic‐dominated behavior under small deformation. This response is relevant to post‐deposition shape retention, while the formulation‐dependent yield behavior provides useful information for adjusting extrusion conditions. Notably, variations in tan among protein‐based inks, namely CH/GG and RL/GG, were attributed to differing protein structure binding abilities, influencing their viscoelastic responses (Carranza et al. 2023). The increase in viscosity during the final low shear stage indicated partial structural recovery after high shear. Nevertheless, the final restored viscosity values were lower than the initial values, possibly due to the broken interlinking structures in the food inks during the second shearing interval with high shear rate (Shahbazi et al. 2021).
4.4. Dietary and Clinical Implications
Texture analysis was used to assess the mechanical suitability of the printed outputs after fabrication (Figure 9g). These parameters provide information on handling stability, layer cohesion, and potential user suitability. The addition of GG increased hardness and adhesiveness under the tested conditions compared to their non‐GG counterparts. This trend is consistent with the structuring effect of GG as a thickening and gelling agent that facilitates the formation of robust, interconnected fibrous networks with food components. While the increased hardness may contribute to the mechanical strength required for height‐stable structures, the concurrent increase in adhesiveness enhances inter‐layer adhesion, which may support bonding between successive layers. These textural changes are consistent with the observed shape fidelity results (Chancharoen et al. 2023).
Furthermore, the puree and paste‐like nature of 3D‐printed food inks suggests potential relevance for texture‐modified food applications, including dysphagia‐oriented dietary design (Liu et al. 2024). Energy‐rich texture‐modified meals can further help increase calorie intake for patients with dysphagia (Yellapantula et al. 2025). The International Dysphagia Diet Standardization Initiative (IDDSI) framework provides a standardized system for describing food textures, specifically designed for individuals with swallowing difficulties. By comparing the results to a study that classified various food categories into different IDDSI levels based on their textural properties (Wong et al. 2023), PSP/GG was identified to fall within IDDSI Level 4 as pureed foods, while the other three food ink formulations (AV/GG, CH/GG, and RL/GG) were classified under IDDSI Level 5 as minced and moist foods. These results indicate that the formulations produced different texture categories under the applied tests. IDDSI tests using spoon and fork tests further provided preliminary IDDSI classifications for the printed formulations (Figure S5).
5. Conclusion
This study developed a proof‐of‐concept, end‐to‐end platform that successfully converts meal images and user data into personalized 3D‐printed macronutrient supplements. By integrating smartphone‐based food segmentation, monocular depth estimation, nutrient gap determination and automated G‐code generation, the system establishes a novel digital‐to‐physical workflow. Quantitative evaluations of the dietary assessment module demonstrated a mean volume and food weight estimation error of 37.25%, with macronutrient estimation errors ranging between 31% and 38%. Furthermore, ablation analyses highlighted the critical role of user‐calibrated 3D depth reconstruction, which significantly reduced volume estimation errors compared to uncalibrated models.
The fabrication stage was independently evaluated through shape fidelity and printed‐mass accuracy. Rheological analysis confirmed that the formulated food inks exhibited shear‐thinning behavior and elastic‐dominant responses at low strain, ensuring stable extrusion and post‐deposition shape retention. Across the four nutrient‐dense inks, printed shape fidelity ranged from 89.67% to 99.00%, and weight accuracy ranged from 79.00% to 96.00%. Notably, the avocado, red lentil, and purple sweet potato formulations achieved higher printing accuracy than the chicken formulation, underscoring the need to calibrate extrusion parameters for individual food matrices.
While these findings demonstrate the feasibility of linking AI‐driven dietary assessment with automated, on‐demand food fabrication, several limitations remain. Image‐based estimations are inherently sensitive to segmentation inaccuracies, monocular depth uncertainties, complex mixed foods, irregular geometries, partial occlusions, and variable lighting conditions. Because these early‐stage vision errors compound and propagate into the final printed supplement, minimizing upstream inaccuracies is crucial. Future work should expand the validation datasets to encompass a wider range of meals and refine density and extrusion calibrations for specific formulations. Additionally, expanding the printable food ink library and evaluating sensory quality, food safety, swallowing suitability, and clinical effectiveness will be essential steps toward deploying this technology for precision nutrition and institutional food production.
Author Contributions
Connie Kong Wai Lee: conceptualization, methodology, data curation, investigation, validation, formal analysis, project administration, visualization, writing – review and editing, writing – original draft, software. Siyu Chen: conceptualization, methodology, software, data curation, investigation, validation, formal analysis, project administration, visualization, writing – original draft, writing – review and editing. Wing Yan Poon: data curation, methodology, validation, investigation, formal analysis, writing – review and editing. Yee Him Timothy Chan: methodology, data curation, investigation, validation, formal analysis, writing – review and editing. Yang Xu: methodology, data curation, investigation, validation, formal analysis, writing – review and editing. Yuyan Zhu: supervision, resources. Mitch Guijun Li: supervision, resources, project administration, funding acquisition.
Conflicts of Interest
The authors declare no conflicts of interest.
Supporting information
Supplementary Material: jfds71425‐sup‐0001‐SuppMat.pdf
Supplementary Movie 1: jfds71425‐sup‐0002‐MovieS1.mov
Supplementary Movie 2: jfds71425‐sup‐0003‐MovieS2.mp4
Acknowledgments
The Hong Kong Research Grants Council funds this work under project nos. 25201620, C6001‐22Y and JLFS/P‐603/24, the Hong Kong Innovation and Technology Commission (ITC) under project no. MHP/060/21, and the State Key Laboratory of Displays and Opto‐Electronics at the Hong Kong University of Science and Technology.
References
- Abdi, H. , and Williams L. J.. 2010. “Principal Component Analysis.” Wiley Interdisciplinary Reviews: Computational Statistics 2, no. 4: 433–459. [Google Scholar]
- Azeem, M. , Wadood S. A., Qureshi T. M., et al. 2025. “FTIR Characteristics of Sweet Flour as Affected by Particle Size Distribution and In Vitro Digestibility of Gluten‐Free Sweet Potato Noodles.” International Journal of Food Properties 28, no. 1: 2433229. [Google Scholar]
- Bhuiyan, M. N. I. , and Nahid M.. 2025. “Smart Nutrition: AI and 3D Printing for Personalized Diets.” Food Nutrition 1, no. 2: 100032. [Google Scholar]
- Bochkovskii, A. , Delaunoy A., Germain H., et al. 2025. “Depth Pro: Sharp Monocular Metric Depth in Less Than a Second.” Preprint, arXiv, October 2. 10.48550/arXiv.2410.02073. [DOI]
- Cai, L. , Feng L., Nie M., Li D., Zheng T., and Zhang M.. 2023. “Effect of Different Hydrocolloids on the Rheological, Microstructural, and 3D Printing Characteristics of Purple Sweet Potato Puree.” Food and Bioprocess Technology 16, no. 11: 2622–2634. [Google Scholar]
- Carbonaro, M. , and Nucara A.. 2010. “Secondary Structure of Food Proteins by Fourier Transform Spectroscopy in the Mid‐Infrared Region.” Amino acids 38, no. 3: 679–690. [DOI] [PubMed] [Google Scholar]
- Carranza, T. , Guerrero P., de la Caba K., and Etxabide A.. 2023. “Texture‐Modified Soy Protein Foods: 3D Printing Design and Red Cabbage Effect.” Food Hydrocolloids 145: 109141. [Google Scholar]
- Castillo‐Guaca, S. M. , Muñoz‐Pabon K. S., Bravo‐Gómez J. E., Roa‐Acosta D. F., and Escobar J. F. V.. 2023. Identification of Macronutrients by FT‐IR Analysis and Physicochemical Characterization of Snacks Elaborated From Quinoa (Chenopodium quinoa Willd.) and Sacha Inchi (Plukenetia volubilis).
- Chancharoen, W. , Kaewkumpha Y., Chansataporn W., Ngamkajornwiwat P., and Wannakee J.. 2023. “Improvement of Printability Properties of High‐Protein Food from Mealworm (Tenebrio molitor) Using Guar Gum for Sustainable Future Food Manufacturing.” Sustainability 15, no. 24: 16937. [Google Scholar]
- Chen, Y. , Bi S., Gu J., et al. 2024. “Achieving Personalized Nutrition for Patients With Diabetic Complications via 3D Food Printing.” International Journal of Bioprinting 10, no. 2: 1862. [Google Scholar]
- Chenlo, F. , Moreira R., and Silva C.. 2010. “Rheological Properties of Aqueous Dispersions of Tragacanth and Guar Gums at Different Concentrations.” Journal of Texture Studies 41: 396–415. [Google Scholar]
- Dreher, M. L. , and Davenport A. J.. 2013. “Hass Avocado Composition and Potential Health Effects.” Critical Reviews in Food Science and Nutrition 53, no. 7: 738–750. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Fahmy, A. R. , Amann L. S., Dunkel A., et al. 2021. “Sensory Design in Food 3D Printing—Structuring, Texture Modulation, Taste Localization, and Thermal Stabilization.” Innovative Food Science and Emerging Technologies 72: 102743. [Google Scholar]
- FoodData Central . 2019. U.S. Department of Agriculture, Agricultural Research Service.
- Fujiwara, K. , Suzuki Y., Toba K., et al. 2025. “Multifunctional 3D Food Printer With Quad‐Screw Nozzle for Four‐Color Printing and Dual Ink Mixing.” Journal of Food Engineering 388: 112384. [Google Scholar]
- Gardner, C. D. , Trepanowski J. F., Del Gobbo L. C., et al. 2018. “Effect of Low‐Fat vs Low‐Carbohydrate Diet on 12‐Month Weight Loss in Overweight Adults and the Association With Genotype Pattern or Insulin Secretion: The Dietfits Randomized Clinical Trial.” JAMA 319, no. 7: 667–679. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Grela, E. , Kiczorowska B., Samolińska W., et al. 2017. “Chemical Composition of Leguminous Seeds: Part I—Content of Basic Nutrients, Amino Acids, Phytochemical Compounds, and Antioxidant Activity.” European Food Research and Technology 243: 1385–1395. [Google Scholar]
- Hertafeld, E. , Zhang C., Jin Z., et al. 2019. “Multi‐Material Three‐Dimensional Food Printing With Simultaneous Infrared Cooking.” 3D Printing and Additive Manufacturing 6, no. 1: 13–19. [Google Scholar]
- Ji, Y. , Yang X., Ji Z., et al. 2020. “DFT‐Calculated IR Spectrum Amide I, II, and III Band Contributions of N‐Methylacetamide Fine Components.” ACS Omega 5, no. 15: 8572–8578. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Joshi, S. , Bisht B., Kumar V., et al. 2024. “Artificial Intelligence Assisted Food Science and Nutrition Perspective for Smart Nutrition Research and Healthcare.” Systems Microbiology and Biomanufacturing 4, no. 1: 86–101. [Google Scholar]
- Kadival, A. , Kour M., Meena D., and Mitra J.. 2023. “Extrusion‐Based 3D Food Printing: Printability Assessment and Improvement Techniques.” Food and Bioprocess Technology 16, no. 5: 987–1008. [Google Scholar]
- Kirillov, A. , Mintun E., Ravi N., et al. 2023. “Segment Anything.” In Proceedings of the IEEE/CVF International Conference on Computer Vision, 4015–4026. IEEE.
- Kok Wah, J. N. 2025. “AI‐Driven 3D and 4D Food Printing: Innovations for Sustainability, Personalization, and Global Applications.” Food Reviews International 42: 773–801. [Google Scholar]
- Lan, X. , Lyu J., Jiang H., et al. 2023. “FoodSAM: Any Food Segmentation.” IEEE Transactions on Multimedia 27: 2795–2808. [Google Scholar]
- Li, H. , and Yang G.. 2022. “Dietary Nutritional Information Autonomous Perception Method Based on Machine Vision in Smart Homes.” Entropy 24, no. 7: 868. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Liu, T. , Zheng J., Du J., and He G.. 2024. “Food Processing and Nutrition Strategies for Improving the Health of Elderly People with Dysphagia: A Review of Recent Developments.” Foods 13, no. 2: 215. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Lo, F. P. W. , Sun Y., Qiu J., and Lo B.. 2025. “Image‐Based Food Classification and Volume Estimation for Dietary Assessment: A Review.” IEEE Journal of Biomedical and Health Informatics 24, no. 7: 1926–1939. [DOI] [PubMed] [Google Scholar]
- Lu, Y. , Stathopoulou T., Vasiloglou M. F., et al. 2020. “goFOODTM: An Artificial Intelligence System for Dietary Assessment.” Sensors (Switzerland) 20, no. 15: 1–18. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Ma, Z. , Boye J. I., Simpson B. K., Prasher S. O., Monpetit D., and Malcolmson L.. 2011. “Thermal Processing Effects on the Functional Properties and Microstructure of Lentil, Chickpea, and Pea Flours.” Food Research International 44, no. 8: 2534–2544. [Google Scholar]
- Manore, M. M. 2005. “Exercise and the Institute of Medicine Recommendations for Nutrition.” Current Sports Medicine Reports 4, no. 4: 193–198. [DOI] [PubMed] [Google Scholar]
- Mifflin, M. D. , St Jeor S. T., Hill L. A., Scott B. J., Daugherty S. A., and Koh Y. O.. 1990. “A New Predictive Equation for Resting Energy Expenditure in Healthy Individuals.” American Journal of Clinical Nutrition 51, no. 2: 241–247. [DOI] [PubMed] [Google Scholar]
- Mudgil, D. , Barak S., and Khatkar B. S.. 2014. “Guar Gum: Processing, Properties and Food Applications—A Review.” Journal of Food Science and Technology 51: 409–418. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Pant, A. , Lee A. Y., Karyappa R., et al. 2021. “3D Food Printing of Fresh Vegetables Using Food Hydrocolloids for Dysphagic Patients.” Food Hydrocolloids 114: 106546. [Google Scholar]
- Partridge, E. K. , Neuhouser M. L., Breymeyer K., and Schenk J. M.. 2018. “Comparison of Nutrient Estimates Based on Food Volume versus Weight: Implications for Dietary Assessment Methods.” Nutrients 10, no. 8: 973. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Phillips, J. A. 2021. “Dietary Guidelines for Americans, 2020–2025.” Workplace Health & Safety 69, no. 8: 395. [DOI] [PubMed] [Google Scholar]
- Ravi, N. , Gabeur V., Hu Y.‐T., et al. 2024. “Sam 2: Segment Anything in Images and Videos.” Preprint, arXiv, August 1. 10.48550/arXiv.2408.00714. [DOI]
- Shahbazi, M. , Jäger H., Ettelaie R., and Chen J.. 2021. “Construction of 3D Printed Reduced‐Fat Meat Analogue by Emulsion Gels. Part I: Flow Behavior, Thixotropic Feature, and Network Structure of Soy Protein‐Based Inks.” Food Hydrocolloids 120: 106967. [Google Scholar]
- Uzel, S. G. M. , Weeks R. D., Eriksson M., Kokkinis D., and Lewis J. A.. 2022. “Multimaterial Multinozzle Adaptive 3D Printing of Soft Materials.” Advanced Materials Technologies 7, no. 8: 2101710. [Google Scholar]
- Voon, S. L. , An J., Wong G., Zhang Y., and Chua C. K.. 2019. “3D Food Printing: A Categorised Review of Inks and Their Development.” Virtual and Physical Prototyping 14, no. 3: 203–218. [Google Scholar]
- Wang, Z. , Wang L., Hou Y., et al. 2024. “Precision Calories: A Promising Strategy for Personalized Health Interventions in the Precision Nutrition Framework.” Trends in Food Science & Technology 153: 104727. [Google Scholar]
- Wilson, A. , Anukiruthika T., Moses J., and Anandharamakrishnan C.. 2020. “Customized Shapes for Chicken Meat–Based Products: Feasibility Study on 3D‐Printed Nuggets.” Food and Bioprocess Technology 13, no. 11: 1968–1983. [Google Scholar]
- Wong, M. C. , Chan K. M., Wong T. T., Tang H. W., Chung H. Y., and Kwan H. S.. 2023. “Quantitative Textural and Rheological Data on Different Levels of Texture‐Modified Food and Thickened Liquids Classified Using the International Dysphagia Diet Standardisation Initiative (IDDSI) Guideline.” Foods 12, no. 20: 3765. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Yellapantula, S. L. , Dayananda B., Bhandari B., and Prakash S.. 2025. “Multicomponent 3D‐Printed Dysphagia Foods: Integrating Plant Proteins, Fats, and Carbohydrates for Nutritional and Textural Enhancement.” Food Hydrocolloids 168: 111525. [Google Scholar]
- Zhong, Y. , Zeng S., Lv Y., Lv W., Xiao H., and Sheng S.. 2024. “Effect of Guar Gum on the Rheological Properties, Microstructure and 3D Printing Performance of Egg Yolk Powder‐Potato Starch Composite Gel.” Food Hydrocolloids 153: 110018. [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Supplementary Material: jfds71425‐sup‐0001‐SuppMat.pdf
Supplementary Movie 1: jfds71425‐sup‐0002‐MovieS1.mov
Supplementary Movie 2: jfds71425‐sup‐0003‐MovieS2.mp4
