This project aims to classify different types of trash using a deep learning model. The model is trained on the garythung/trashnet dataset and uses a custom architecture called Trashmobilenet-v1.
.
├── checkpoints
│ └── best_model.pth
├── LICENSE
├── main.py
├── Makefile
├── notebook
│ └── experiment_trash_classification.ipynb
├── pyproject.toml
├── README.md
├── requirements.txt
├── src
│ ├── callback
│ │ └── earlystopping.py
│ ├── config.py
│ ├── data
│ │ └── preprocessing.py
│ ├── metric
│ │ └── metric.py
│ └── models
│ ├── evaluation.py
│ ├── model.py
│ └── training.py
├── test.py
└── uv.lock
- Python 3.12 or higher
- See
requirements.txtfor a full list of dependencies
-
Clone the repository:
git clone [email protected]:pradanaadn/trash-detection.git cd trash-detection
-
Create and activate a virtual environment:
python3 -m venv .venv source .venv/bin/activate -
Install the dependencies:
pip install -r requirements.txt
-
Login to Weights & Biases:
wandb login <your_wandb_api_key>
-
Login to Hugging Face:
huggingface-cli login --token <your_hf_token>
To train the model, run:
python main.py