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.
git clone https://github.com/your-username/Trinetra.git
cd Trinetra
python generate_setup.py
If you prefer to set up manually:
conda create --name trinetra python=3.8
conda activate trinetra
pip install -r requirements.txt
pip install git+https://github.com/openai/CLIP.git
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.
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
--data_dir
: Path to the dataset directory--epochs
: Number of training epochs--batch_size
: Batch size for training--learning_rate
: Learning rate for the optimizer--loss_function
: Loss function to use (e.g., "focal", "cce")--precision
: Precision format for training ("FP16" or "FP32")--save_format
: Format to save the model ("pth", "pt", or "onnx")--clip_model
: CLIP model to use (default: "ViT-B/32")For a full list of options, run:
python src/finetine_classifier.py --help
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
Contributions to Trinetra are welcome! Please feel free to submit a Pull Request.
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.
This project is licensed under the MIT License. See the LICENSE file for details.
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