Giter Club home page Giter Club logo

pypictagger's Introduction

PyPicTagger

Description

This Python script automates the process of classifying images. It reads image URLs from a CSV file, classifies them using the Clarifai API, and writes the results to another CSV file. This project showcases skills in API integration, error handling, and file operations in Python.

Features

  • Automated Image Tagger: Streamlines the process of tagging the images based on their content.
  • API Integration: Utilizes the Clarifai API for advanced image recognition.
  • Error Handling: Implements robust error handling and retry strategies for API requests.
  • CSV Operations: Reads from and writes to CSV files, enabling easy data manipulation and storage.
  • Parallel Processing: Uses concurrent processing to speed up image classification.
  • URL Validation: Ensures that URLs are valid and accessible before processing.
  • Logging: Provides detailed logging for monitoring and debugging

Getting Started

Dependencies

  • Python 3.x
  • clarifai_grpc for API access
  • python-dotenv for environment variable management
  • backoff for retry logic
  • protobuf essential for the underlying functionality of the clarifai_grpc library
  • requests used during url validation

Setup

  1. Clone this repository.
  2. Install dependencies: pip install -r requirements.txt
  3. Create a .env file with your Clarifai API key: API_KEY=<Your_API_Key>

Usage

  1. Prepare a CSV with image URLs in the first column.
  2. Execute the script: python pypic.py
  3. View results in classified_images.csv, including tags and confidence scores.

Project Structure

  • pypic.py: The main script that orchestrates the classification process.
  • .env: An .env file.
  • requirements.txt: Lists all the project dependencies.

Contributing

We welcome contributions! If you're interested in improving this project, check the issues page for open tasks. To contribute:

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/AmazingFeature).
  3. Commit your changes (git commit -m 'Add some AmazingFeature').
  4. Push to the branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

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.