The mismanagement of waste is a pressing concern that affects the environment and human health. Despite efforts to promote proper waste disposal, many individuals continue to dispose of trash haphazardly, resulting in significant pollution and harm to natural ecosystems.
One of the main issues is the mis-sorting of trash, where items are placed in the wrong bin. This problem is particularly urgent as it can lead to contamination of recycling, rendering it unusable and increasing the amount of waste that ends up in landfills.
Another problem is the lack of awareness around composting and the need for new compost requirements. This results in organic waste being sent to landfills where it releases methane, a potent greenhouse gas that contributes to climate change.
To address these pressing issues, our team proposes the development of an application that utilizes deep neural network models to locate and classify trash in images. To compare results from multiple models we are using EfficientNetV2 and CLIP. The application allows users to either upload an image, or use their camera live for classification. For privacy we allowed all model to be downloaded and inference to be performed locally, while it performs best on a device with a GPU, we tested it on CPU only as well. The application will help individuals properly dispose of waste by identifying the appropriate bin for each item, reducing the risk of contamination and increasing the amount of waste that can be recycled or composted. Our solution will not only mitigate the impact of waste on the environment but also promote healthier communities and cleaner cities.
Website:
Terminal App:
python projects/front-end_apps/main.py
Terminal Script:
python projects/front-end_apps/trashsorting.py
Python Version 3.9 available at https://www.python.org/downloads/release/python-390/. Then run python3 -m pip install -r requirements.txt
OR
Conda: install Anaconda, create an environment conda create --name trashsorting
, activate environment conda activate trashsorting
, install requirements pip install -r requirements.txt
For GPU torch, instead of installing torch in requirements.txt do the below:
Windows/Linux: conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia
Download and install the latest version of Node.js from the official website: https://nodejs.org/en/download/. Follow the installation instructions for your operating system.
Once NPM is installed with NodeJS you can run
npm install --global yarn
Change to react-website directory and run following commands:
cd project\front-end_apps\website\react-website\
-
yarn install
(may also need to runyarn add tabler-react tabler-icons-react
) -
yarn build
generates a build folder in the current directory -
yarn start
to run on http://localhost:3000/ -
start model_inference_app.py in separate terminal to test submitting images
cd project/front-end-apps
pytest
cd project\front-end_apps\website\react-website
yarn test
cd project/backend/annotation_database
pytest
cd project/backend/model_inference
pytest
We recommend using Anaconda to create a Python environment with all the requirements outlined in the requirements.txt file. If you're not familiar with Anaconda, please see the official website or refer to this cheat sheet for the proper commands.
We recommend using Visual Studio Code (VS Code) with the Python Language and running Jupyter Notebook for this project.
The front-end and backend work on Windows, Mac, and Linux operating systems. However, to run the backend smoothly, we recommend your system to have at least 8GB of RAM and for fast response, a Nvidia GPU with at least 8GB of VRAM.
Please make sure that your system meets these requirements before proceeding with the setup.
1st place at the Annual CSU Wide Research Competition
2nd place at the Sacramento Spring Research Symposium
Dr. Clark Fitzgerald
Travis Hammond
Kenta Miyahara
Julian Hernandez
Jeffrey de Jesus
Christopher Allen
Bryan Burch
Daniel Smagly
Santiago Bermudez