--- license: apache-2.0 --- #**Live App:** https://scrubaroo.vercel.app/ # Scrubaroo - ResNet50 Waste Density Classifier A ResNet50-based image classifier for waste density detection, trained as part of the Scrubaroo Web3 citizen reward system. ## Model Description - **Architecture:** ResNet50 (pre-trained on ImageNet) - **Task:** 3-class image classification (High / Low / NoWaste) - **Training Dataset:** KMeans-ResNet50 (3,059 images) - **Best Accuracy:** 88.40% - **Training Strategy:** Standard CrossEntropyLoss + Data Augmentation ## Classes | Class | Confidence Score | Description | |---|---|---| | High | ≥ 85% | Area heavily covered with waste | | Low | 65–84% | Area with some scattered litter | | NoWaste | ≤ 64% | Clean area with no visible waste | ## Usage ```python import torch import torchvision.transforms as transforms import torchvision.models as models from PIL import Image # Load model model = models.resnet50(weights=None) model.fc = torch.nn.Linear(2048, 3) model.load_state_dict(torch.load('RN50_NotWL_TK-Means50.pth', map_location='cpu')) model.eval() # Transform transform = transforms.Compose([ transforms.Resize((224, 224)), transforms.ToTensor(), transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])]) # Predict image = Image.open('image.jpg').convert('RGB') tensor = transform(image).unsqueeze(0) with torch.no_grad(): output = model(tensor) predicted = output.argmax(dim=1).item() class_names = {0: 'High', 1: 'Low', 2: 'NoWaste'} print(class_names[predicted]) ``` ## Training Details - **Optimizer:** Adam (lr=0.001) - **Epochs:** 10 - **Frozen Layers:** layer1, layer2 - **Trainable:** layer3, layer4, fc ## Related Resources - **GitHub (ML Code):** https://github.com/panoik12/Scrubaroo_ML_Models - **Paper:** Scrubaroo: AI-Powered Waste Detection and Blockchain-Based Citizen Reward System, SETN 2026