8000 GitHub - jacksonchen1998/nutrinet: Visual nutrition estimation from papers with modifications
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jacksonchen1998/nutrinet

< 8000 /div>
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Visual Nutrition Estimation

This repository implements the DPF-Nutrition model, based on the paper DPF-Nutrition: Food Nutrition Estimation via Depth Prediction and Fusion, with minor modifications. The model has been trained and fine-tuned on overhead images from Google’s Nutrition5k dataset to estimate nutritional information from images of food items.

Inference

To run inference, please refer to:

Input Image Requirements

For optimal performance, input images should meet the following requirements:

  • Format: RGB
  • Resolution: 640 x 480 pixels
  • Pixel Range: 0 to 255 (values do not need to reach exactly 255 but should be within this range)

Preprocessing Transformation

Use this transformation to preprocess your images:

from torchvision import transforms

image_transform = transforms.Compose([
    transforms.Resize((384, 384)),
    transforms.ToTensor(),
    transforms.Lambda(lambda x: x / 255.0) 
])

Model Weights

Download the pre-trained model weights from the links below:

  1. DPT Model Weights (dpt.py): Google Drive Link
  2. DPF-Nutrition Model Weights (dpfnutrition.py): Google Drive Link

About

Visual nutrition estimation from papers with modifications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 97.1%
  • Python 2.9%
0