Published February 4, 2026
| Version v1.0.0
Software
Open
rezaul-h/CottonVerse: CottonVerse
Authors/Creators
Description
Version 1.0.0 โ Initial release
CottonVerse ๐ฟ
CottonVerse is a multi-model Flask-based web application for image classification tasks in the agricultural and textile domains. It enables interpretable prediction using Grad-CAM and supports four independent models:
- ๐ Cotton Leaf Disease (CottonLeafNet)
- ๐ฟ Cotton Leaf Disease (SAR-CLD-2024)
- ๐งต Fabric Texture Percentage (CottonFabricImageBD)
- ๐ฉธ Fabric Stain Type (FabricSpotDefect)
๐ Features
- ๐ Drag-and-drop file upload
- โ Prediction probabilities with visual bar chart
- ๐ฅ Grad-CAM visualization for interpretability
- ๐ธ Upload preview and CAM download
- ๐ผ๏ธ Multiple datasets and models supported
- ๐ง Powered by LEViT model (via PyTorch + timm)
- ๐จ Responsive, modern, and interactive UI
๐ Project Structure
cottonverse/
โโโ app.py # Flask app
โโโ utils.py # Preprocessing & Grad-CAM logic
โโโ models/ # Trained .pth models
โโโ static/
โ โโโ uploads/ # Uploaded images
โ โโโ cams/ # Grad-CAM outputs
โโโ templates/ # HTML templates
โโโ requirements.txt # Dependencies
โโโ README.md
โ๏ธ Installation
- Clone the repository:
git clone https://github.com/rezaul-h/CottonVerse.git
cd cottonverse
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Run the application:
python app.py
- Open
http://127.0.0.1:5000in your browser ๐
๐ Models & Datasets
| Model Name | Dataset | Classes | |------------|------------------------|---------| | LEViT | CottonLeafNet | 8 | | LEViT | SAR-CLD-2024 | 9 | | LEViT | CottonFabricImageB | 13 | | LEViT | FabricSpotDefect | 12 |
All models are trained using the LEViT architecture with PyTorch, saved in .pth format.
๐งช How to Use
- Click on a model on the landing page.
- Upload an image for classification.
- View prediction probabilities and Grad-CAM.
- Download the CAM if desired.
๐ฆ Dependencies
- Flask
- PyTorch
- timm
- torchvision
- OpenCV
- matplotlib
- pytorch-grad-cam
๐ Acknowledgements
- LEViT model: Facebook AI
- GradCAM: Jacob Gildenblat (pytorch-grad-cam)
Files
rezaul-h/CottonVerse-v1.0.0.zip
Files
(140.3 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:c507a18c341381b35bdf78ceaf6d53cb
|
140.3 MB | Preview Download |
Additional details
Related works
- Is supplement to
- Software: https://github.com/rezaul-h/CottonVerse/tree/v1.0.0 (URL)
Software
- Repository URL
- https://github.com/rezaul-h/CottonVerse