Giter Club home page Giter Club logo

ollama-rename-img's Introduction

Image Renaming CLI App

Introduction

Have you ever downloaded a bunch of images and their file names make no sense, making it difficult to find what you're looking for? What if I told you that you could use a local AI solution to help rename images based on their descriptions? This Python CLI app does just that!

This CLI app converts WebP images to JPEG, generates descriptive keywords using AI, and renames the images based on those keywords.

Getting Started

Prerequisites

  • Python (make sure it's installed on your system)
  • Ollama (make sure it's installed on your system)
  • Poetry (for managing Python dependencies)
  • pipx (for installing Python CLI applications globally)

Installation

  1. Clone the repository:
git clone https://github.com/Tedfulk/ollama-rename-img.git
  1. Navigate to the project directory:
cd ollama-rename-img
  1. Install Poetry if you haven't already:
pipx install poetry
  1. Activate the shell:
poetry shell
  1. Install the project dependencies using Poetry:
poetry install
  1. Verify the installation:
which rename

Required Packages

  • Ollama: Open-source technology that allows us to pull large language models from the community. In this project, we use llava-phi3, a multimodal model capable of processing images and generating text descriptions.

CLI Usage

Command Line Arguments

  • directory_path (str): The path to the directory containing the images.
  • delimiter (str): The delimiter to use between keywords in the filename. Default is _. Options are _, -, or (space).
  • verbose (bool): Enable verbose output. Default is False.

Basic Usage

Run the following command to process and rename images in a directory:

rename /path/to/directory -d "_" -v
  • /path/to/directory: Replace with the path to your image directory.
  • -d "_": Use underscore as the delimiter between keywords.
  • -v: Enable verbose output.

ollama-rename-img's People

Contributors

tedfulk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.