Trash Detect is a comprehensive project for detecting trash using machine learning and providing a web-based reward system. It consists of a React web application, model training scripts, and database integration.
-
bin-detect-reward-main/
Main web application for trash detection and reward system.src/— React frontend source code, including UI components, pages, and logic for interacting with the backend and Supabase.public/— Static assets such as images, icons, and the main HTML file.supabase/— Supabase integration files for authentication, database, and storage.- Configuration files:
.env— Environment variables for API keys and configuration.package.json— Project dependencies and scripts.vite.config.ts— Vite configuration for building and serving the app.
-
model_train/Trash_Detect/
Model training scripts and resources for trash detection.data/— Datasets for training and validation (images and annotations).models/— Saved model checkpoints and exported models.notebooks/— Jupyter notebooks for data analysis and model prototyping.scripts/— Python scripts for preprocessing, training, evaluation, and inference.requirements.txt— Python dependencies for model training.
-
supabase/
Database migrations, configuration files, and temporary files for Supabase integration.
git clone https://github.com/Dhruv-D-Bhrasadiya/Trash_Detect.git
cd Trash_DetectNavigate to the web app folder and install dependencies:
cd bin-detect-reward-main
npm installStart the development server:
npm run devNavigate to the model training folder:
cd model_train/Trash_DetectCreate and activate a Python virtual environment (recommended):
python -m venv venv
venv\Scripts\activateInstall Python dependencies:
pip install -r requirements.txtPrepare your dataset by placing images and annotation files in the data/ directory.
Run the training script (adjust config and paths as needed):
python scripts/train.py --config configs/config.yamlEvaluate the trained model:
python scripts/evaluate.py --model models/best_model.pth --data data/validation/Run inference on new images:
python scripts/predict.py --model models/best_model.pth --input data/test/image1.jpg- Configure Supabase credentials in
.envfiles. - Use the
supabase/folder for database migrations and setup.
See individual folders for license details.
Feel free to open issues or submit pull requests for improvements or bug fixes.
For questions or support, please open an issue in the repository.