harsh2ai / Trinetra

A End to End Computer Vision Engine for Deep Learning Related Tasks
3 stars 0 forks source link

๐Ÿ‘๏ธ Trinetra: Advanced Image Classification Pipeline

Trinetra, named after the "third eye" in Hindu mythology, is a comprehensive image classification pipeline that streamlines the process from data labelling to model training and evaluation. It provides clear vision into your image data using state-of-the-art CLIP models.

๐ŸŒŸ Features

๐Ÿ› ๏ธ Installation

Automated Setup

  1. Ensure you have Anaconda or Miniconda installed.
  2. Clone the repository:
    git clone https://github.com/your-username/Trinetra.git
    cd Trinetra
  3. Run the setup script generator:
    python generate_setup.py
  4. Follow the instructions to run the generated setup script for your operating system.

Manual Setup

If you prefer to set up manually:

  1. Create and activate a new Conda environment:
    conda create --name trinetra python=3.8
    conda activate trinetra
  2. Install the required packages:
    pip install -r requirements.txt
    pip install git+https://github.com/openai/CLIP.git

๐Ÿš€ Usage

Image Labelling

To label your images using CLIP:

python src/classifier_labelling.py --data_dir "path/to/unlabelled/images" --categories "Human" "Vehicle" --output_dir "path/to/labelled/output"

In the categories argument, you can specify the categories you want to label.

Model Training

To fine-tune a CLIP model on your labelled dataset:

python src/finetine_classifier.py --data_dir "path/to/labelled/dataset" --epochs 10 --batch_size 32 --learning_rate 0.001 --loss_function focal --precision FP16 --save_format pt

Command-line Arguments

For a full list of options, run:

python src/finetine_classifier.py --help

๐Ÿ“ Project Structure

Trinetra/
โ”‚
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ classifier_labelling.py
โ”‚   โ”œโ”€โ”€ finetine_classifier.py
โ”‚   โ”œโ”€โ”€ loss_functions.py
โ”‚   โ”œโ”€โ”€ precision_formats.py
โ”‚   โ””โ”€โ”€ model_saver.py
โ”‚
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ generate_setup.py
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ .gitignore

๐Ÿ”ฎ Upcoming Features

๐Ÿค Contributing

Contributions to Trinetra are welcome! Please feel free to submit a Pull Request.

Development Setup

  1. Fork the repository on GitHub.
  2. Clone your forked repository locally.
  3. Create a new branch for your feature or bug fix.
  4. Make your changes and commit them with clear, descriptive messages.
  5. Push your changes to your fork on GitHub.
  6. Submit a Pull Request to the main Trinetra repository.

๐Ÿ“Š Performance

Trinetra has been tested on various datasets and consistently achieves high accuracy in image classification tasks. Specific performance metrics will vary based on the dataset and chosen model architecture.

๐Ÿ“„ License

This project is licensed under the MIT License. See the LICENSE file for details.

๐Ÿ“ž Contact

For any queries or suggestions, please open an issue on GitHub or contact the maintainer at [harshris2314@example.com].


Empower Your Vision with Trinetra! ๐Ÿ‘๏ธ๐Ÿš€

         _____
     _.-'     `'-._
   ,'               '.
  /                   \
 |    ___________     |
 |   |           |    |
 |   |    ( )    |    |
 |   |___________| ๐Ÿ‘๏ธ  |
  \                   /
   '.               ,'
     '-.._______.-'

 Trinetra watches everything