ComfyUI > Nodes > ComfyUI-LexTools > FoodCategoryClassifierNode

ComfyUI Node: FoodCategoryClassifierNode

Class Name

FoodCategoryClassifierNode

Category
LexTools/ImageProcessing/Classification
Author
SOELexicon (Account age: 4757days)
Extension
ComfyUI-LexTools
Latest Updated
2025-03-28
Github Stars
0.03K

How to Install ComfyUI-LexTools

Install this extension via the ComfyUI Manager by searching for ComfyUI-LexTools
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-LexTools in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

FoodCategoryClassifierNode Description

Classifies images into food categories using a pre-trained model for accurate predictions.

FoodCategoryClassifierNode:

The FoodCategoryClassifierNode is designed to classify images into various food categories, leveraging advanced image classification models. This node is particularly beneficial for applications in the culinary and food industry, where identifying and categorizing food items from images can enhance user experiences, streamline inventory processes, or assist in dietary tracking. By utilizing a pre-trained model specifically tailored for food classification, this node provides accurate and reliable results, making it an essential tool for developers and AI artists looking to integrate food recognition capabilities into their projects. The node processes images to predict the top five food categories, offering insights into the most likely classifications along with their respective probabilities.

FoodCategoryClassifierNode Input Parameters:

image

The image parameter is a required input that represents the image you wish to classify. This parameter expects an image tensor, which is processed by the node to extract features and perform classification. The quality and content of the image significantly impact the accuracy of the classification results. There are no specific minimum or maximum values for this parameter, but it is crucial to ensure that the image is clear and relevant to the food categories you are interested in classifying.

FoodCategoryClassifierNode Output Parameters:

STRING

The output of the FoodCategoryClassifierNode is a STRING that contains a list of dictionaries, each representing a food category label and its associated probability score. This output provides a ranked list of the top five predicted food categories, allowing you to understand which categories the image most likely belongs to and the confidence level of each prediction. This information can be used to make informed decisions or further processing in your application.

FoodCategoryClassifierNode Usage Tips:

  • Ensure that the input image is of high quality and clearly depicts the food item to improve classification accuracy.
  • Use this node in applications where food categorization is essential, such as recipe apps, dietary tracking systems, or restaurant menu management tools.
  • Consider preprocessing images to standardize lighting and orientation, which can help the model perform better.

FoodCategoryClassifierNode Common Errors and Solutions:

"Model not found" error

  • Explanation: This error occurs when the pre-trained model specified in the node's initialization is not available or cannot be loaded.
  • Solution: Ensure that the model identifier Kaludi/food-category-classification-v2.0 is correct and that you have internet access to download the model if it's not already cached locally.

"Invalid image format" error

  • Explanation: This error arises when the input image is not in the expected tensor format or is corrupted.
  • Solution: Verify that the image is correctly formatted as a tensor and that it is not corrupted. You may need to preprocess the image to ensure compatibility with the node's requirements.

FoodCategoryClassifierNode Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-LexTools
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

FoodCategoryClassifierNode