How murilogustineli/pytorch-plantclef works
Project Overview and Main Components
• Purpose: The project demonstrates how to leverage self-supervised Vision Transformers and similarity search techniques (using Faiss) for efficient, large-scale multi-label plant species classification. It includes components for data preparation, model training, feature extraction, and fast similarity search.
• Data Ingestion & Preprocessing
• Model Training & Inference (using PyTorch Lightning)
• Embedding Workflow (using DINOv2 for feature extraction)
• Faiss-based Similarity Search for classification
• Auxiliary Utilities (configuration, plotting, serialization)
• Test Suite (ensuring integrity and correct setup)
• Deployment & Setup Scripts (environment setup, data/model downloads)
Analyzing the File Structure
• Top-level directories and files:
• "notebooks": Contains Jupyter notebooks for Exploratory Data Analysis (EDA), embedding experiments, FAISS demonstrations, setup for Intel Tiber AI Cloud, and species selection training. These suggest interactive experiments and cloud setup.
• "plantclef": This is the main package with:
◦ Configuration (config.py, class_mapping.txt)
◦ Embedding module (plantclef/embed/workflow.py): Handles feature extraction workflows.
◦ Faiss module (plantclef/faiss/classifier.py): Implements similarity search and classification routines.
◦ Torch module (plantclef/torch/*): Contains data processing (data.py) and model definitions (model.py) for PyTorch training/inference.
◦ Supporting utilities (model_setup.py, plotting.py, serde.py).
• "scripts": Contains installation and data/model download scripts.
• "tests": Provides test files ensuring the integrity of data, model, and training procedures.
• Build/configuration files (pyproject.toml, requirements.txt) and pre-commit configuration ensure that code quality and package setup are enforced.