Title: | LLM image classification using ollama in R |
---|---|
Description: | This package is a designed to use local models for image classification. The prompts and functions are designed to take an input image and supply classification information as an output. |
Authors: | Frank Hull [aut, cre], Johannes Breuer [ctb] |
Maintainer: | Frank Hull <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.1.0 |
Built: | 2024-12-28 20:20:03 UTC |
Source: | https://github.com/frankiethull/kuzco |
Image Classification using LLMs
llm_image_classification( llm_model = "llava-phi3", image = "inst/img/test_img.jpg", ... )
llm_image_classification( llm_model = "llava-phi3", image = "inst/img/test_img.jpg", ... )
llm_model |
a local LLM model pulled from ollama |
image |
a local image path that has a jpeg, jpg, or png |
... |
a pass through for other generate args and model args like temperature |
a df with image_classification, primary_object, secondary_object, image_description, image_colors, image_proba_names, image_proba_values
Image OCR for Text Extraction using LLMs
llm_image_extract_text( llm_model = "llava-phi3", image = "inst/img/text_img.jpg", ... )
llm_image_extract_text( llm_model = "llava-phi3", image = "inst/img/text_img.jpg", ... )
llm_model |
a local LLM model pulled from ollama |
image |
a local image path that has a jpeg, jpg, or png |
... |
a pass through for other generate args and model args like temperature. set the temperature to 0 for more deterministic output |
a df with text
Image Recognition using LLMs
llm_image_recognition( llm_model = "llava-phi3", image = "inst/img/test_img.jpg", recognize_object = "face", ... )
llm_image_recognition( llm_model = "llava-phi3", image = "inst/img/test_img.jpg", recognize_object = "face", ... )
llm_model |
a local LLM model pulled from ollama |
image |
a local image path that has a jpeg, jpg, or png |
recognize_object |
an item you want to LLM to look for |
... |
a pass through for other generate args and model args like temperature. set the temperature to 0 for more deterministic output |
a df with object_recognized, object_count, object_description, object_location
Image Sentiment using LLMs
llm_image_sentiment( llm_model = "llava-phi3", image = "inst/img/test_img.jpg", ... )
llm_image_sentiment( llm_model = "llava-phi3", image = "inst/img/test_img.jpg", ... )
llm_model |
a local LLM model pulled from ollama |
image |
a local image path that has a jpeg, jpg, or png |
... |
a pass through for other generate args and model args like temperature. set the temperature to 0 for more deterministic output |
a df with image_sentiment, image_score, sentiment_description, image_keywords