System Requirements
Before installing, ensure your system meets these requirements:Software Requirements
- Python: 3.8 or higher
- Operating System: Windows, macOS, or Linux
- Package Manager: pip or conda
Hardware Requirements
Minimum Configuration
- CPU: Multi-core processor (4+ cores)
- RAM: 8GB
- Storage: 5GB free space
- Camera: USB webcam or video source
Recommended Configuration
- CPU: Modern multi-core processor
- GPU: NVIDIA GPU with 4GB+ VRAM (RTX 2060 or better)
- RAM: 16GB or more
- Storage: 10GB free space
- Camera: HD webcam (720p+)
Installation Steps
Install Dependencies
Install all required packages using pip:
Key Dependencies
Key Dependencies
The main dependencies include:
- torch 2.5.0 - PyTorch deep learning framework
- ultralytics 8.3.22 - YOLO implementation
- opencv-python 4.10.0.84 - Computer vision library
- numpy 2.1.2 - Numerical computing
- pyserial 3.5 - Serial communication for robotics
- matplotlib 3.9.2 - Visualization tools
Download Pre-trained Model
The repository includes the YOLOv11 model file (
yolo11n.pt) in the root directory. If not present, it will be downloaded automatically on first run.The model file is approximately 5.4MB. Ensure you have a stable internet connection for the initial download.
Hardware Acceleration Setup
The system automatically detects and uses the best available hardware acceleration:CUDA (NVIDIA GPUs)
Install NVIDIA Drivers
Download and install the latest NVIDIA GPU drivers from nvidia.com
MPS (Apple Silicon)
For Apple M1/M2 Macs, MPS (Metal Performance Shaders) is automatically detected:MPS provides significant acceleration on Apple Silicon compared to CPU-only processing.
CPU Only
If no GPU is available, the system automatically falls back to CPU processing. While slower, it’s fully functional for testing and development.VEX Robotics Setup (Optional)
For robotic arm integration:Install VEX Software
Download and install VEXcode from vex.com
Configure Serial Port
The system uses serial communication on port COM7 (Windows) or /dev/serial1 (Linux). Update the port in your configuration:
Troubleshooting
ImportError: No module named 'torch'
ImportError: No module named 'torch'
Ensure you’ve activated your virtual environment and installed all requirements:
CUDA out of memory
CUDA out of memory
If you encounter GPU memory errors, try:
- Reducing the image size parameter (imgsz)
- Processing fewer frames per second
- Using a smaller batch size
- Falling back to CPU processing
Camera not detected
Camera not detected
Ensure your camera is properly connected:Try different camera indices (0, 1, 2) if the default doesn’t work.
Model file not found
Model file not found
The trained model should be at
trash_classificator/segmentation/models/trash_segmentation_model_v2.pt. Ensure this file exists after cloning the repository.Next Steps
Quick Start
Run your first trash classification
Core Concepts
Understand the system architecture
Training Guide
Train custom models
API Reference
Explore the API documentation
System Verification Checklist
After installation, verify these components:- Python 3.8+ installed
- All pip dependencies installed successfully
- PyTorch can detect your GPU (if available)
- Camera/video source accessible
- Model file present and loadable
- Serial port configured (for robotics)