Skip to content

dakshoza/imBroker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TFLite Image Classification Broker

This library provides a simple interface for image classification using TensorFlow Lite models. It's designed to work with pre-trained models and can process both single images and directories of images.

Installation

pip install imBroker

Features

  • Single image classification
  • Batch classification for directories
  • Support for custom TFLite models
  • Handles any type of image shapes

Usage

Initializing the Broker

from imBroker import tflBroker

# Define your TFlite model's path
model_path = "path/to/your/model.tflite"

# Define your output labels
output_labels = {
    0: 'Label 1',
    1: 'Label 2',
    ... 
}

# Initialize the broker
broker = tflBroker(model_path, output_labels)

Classifying a Single Image

result = broker.predict_single_image("path/to/image.jpg")
print(result)

Classifying a Directory of Images

results = broker.predict_image_directory("path/to/image/directory")
print(results)

About

A Tensorflow Lite Image Classification Model Integration Library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages