Skip to content

nlin21/trash-recognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

trash-recognition

Trash classification with YOLOv8

https://github.com/ultralytics/ultralytics
https://github.com/pedropro/TACO

TODO:

  • train model on TACO dataset
  • integrate with external source sent over WiFi/BT

Setup

  1. Camera is required (Webcam, USB camera, etc.)

  2. Install Python: check here for the required version(s)

  3. Install the ultralytics package with pip:

    pip install ultralytics
    
  4. pip may install a CPU-only version of pytorch, which is lightweight but leads to poor inference times. I recommend running YOLOv8 on a dedicated GPU with CUDA support. To check the pytorch version:

    Run python, then enter

    import torch
    print(torch.__version__)
    

    image
    If the version has +cpu appended at the end, it is a CPU-only version. The code can be run at this point with python main.py, but if you wish to use CUDA continue to step 5.

  5. To set up a GPU:

    First verify that your machine recognizes your GPU with nvidia-smi

    Uninstall the current pytorch version with

    pip uninstall torch torchvision torchaudio
    

    Then head to the pytorch website to check which versions of CUDA Toolkit are supported in the 'Compute Platform' row.

    1. Install your desired CUDA Toolkit version here (I went with 12.1)
    2. Install the corresponding pytorch version with the command in 'Run this command' (see below)

    image

    Once both CUDA Toolkit and pytorch has been installed, you can run the check from step 4 to verify:

    image

  6. Setup is now complete, plug in your camera device and run python main.py

Testing

image

Screenshot 2024-11-24 at 1 39 24 PM

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages